9 years, 1 month ago.

USB device not recognized on board !

I am using mbed LPC1768 assembled circuit on a board from last 1-2 years. I was using USB port as serial port for communication with PC GUI. Due to some reasons the cable length need to be extended so I have added MAX 232 (mbed Pin 13,14) on the board. I have made following changes:

1. Assembled MAX232 : Pin 11 -> mbed pin 13 Pin 12 -> mbed pin 14 (through resistor divider for 5V to 3V3 for insuring safety)

2. Connected 5V to VIN (mbed pin 2) since it will not receive supply from USB.

But after that the mbed is not getting recognized by PC but it is getting detected if I connect it off board to PC. I have compiled modified program & uploaded off board. The program is running fine & data is being transmitted to RS232 except detection of USB port.

I am unable to understand the cause for this problem. Can anybody help me? /media/uploads/bnilesh/capture.jpg

What happens if you don't power Vin with your mbed on your board?

posted by Erik - 25 Sep 2015

In case USB is connected the USB communication LED stays ON without any blinks same is happening in case I apply VIN.

posted by mbed Tester 25 Sep 2015

Hi mbed Tester,

The issue could be floating grounds. I had similar problem:

  • mbed LPC1768 was plugged on a custom made board
  • custom made board was powered with 5VDC from external AC/DC supply
  • mbed LPC1768 was supplied by 5VDC from custom made board via its VIN pin (pin 2)
  • my laptop was connected to mbed with USB cable (to display USB serial data on terminal window). But it was not recognized.

I realized that 5VDC output from my AC/DC source was separated from the input, i.e. ground ("-" end) from 5VDC output was floating from input ground (probably grounds of primary and secondary side of internal transformer are not connected). Therefore, the ground of my custom board&mbed was floating respect to laptop (and laptop USB) ground. When I checked with multimeter by measuring DC voltage between ground of laptop USB and mbed ground (without USB connection), the difference was over 40VDC. Fortunately, nothing was destroyed and problem was solved simply by using one jumper cable to connect laptop USB ground with mbed ground. After that, mbed was recognized by my laptop (but I had to press blue reset button on mbed first).

What you can do:

  • 1. if it is possible, unplug mbed from your board and connect it to PC with USB cable. If it gets recognized, that is good, nothing was destroyed.
  • 2. if it is not possible to unplug it (already soldered, etc.), then connect mbed to PCB with USB cable but without external VIN supply (already suggested by Erik). Also check if any other peripheral can draw any current from mbed and try to disconnect it. Check with multimeter if LPC1678 has 3.3V (there are 2 identical voltage regulators on the top of mbed LPC1768 - both should give 3.3VDC at its output).

Let us know the result.

Another thing: you don't have to use voltage divider to protect mbed pins from TTL Rx/Tx pins of MAX232. mbed pins are 5V tolerant. Also, these voltage dividers could disrupt digital signal, especially if you go with higher transmission rates.

Cheers, Miloje

posted by Miloje Zecevic 25 Sep 2015

Thanks a lot Miloje for so detailed & informative reply. Since the mbed was working on USB after unplugging from my custom board & I was not going to use USB in my required testing I already installed the unit in testing setup. next time after removing the unit I will checkout the grounding issue & reply back. I agree Rx/Tx are 5V tolerant but didn't wanted any risk & I am working on low BR 9600 I kept them on board. But I will keep this in mind. Thanks again.

posted by mbed Tester 28 Sep 2015
Be the first to answer this question.