8 years, 7 months ago.

Reasons for serial port to stop working

I am building a robot and the first time I connected the circuit one of the serial ports of the mbed stopped working. I tested that by using another port to perform the same operation. I think the tx is not writing anything because when I shorten tx and rx, write to tx and then read from rx, nothing gets read.

Now I know I have a problem with the circuit of my robot, but I have not found it yet and was thinking that knowing what might be the reasons to damage the serial will help me debug. Also I was wondering whether I can use some shielding in order to protect a serial port as while I was debugging I damaged a second serial.

2 Answers

8 years, 7 months ago.

Connecting a TX to a TX is not intended, although it should survive that, and should never work. A way to damage it is connecting your mbed directly to an RS232 level serial signal. That might be read out for a while, but it will damage the mbed.

8 years, 7 months ago.

One way to identify pin damage on a logic device is to remove all power and measure the ground-to-pin diode junction. I would expect to see a 0.3 to 0.6 volt drop and that it should be similar to other pins. If the pin reads open circuit or short circuit it is probably damaged. It may be possible to replace the micro on a MBED.

For ways to prevent damage: Firstly check your grounding, make sure that the MBED is properly grounded relative to the rest of the circuit otherwise a fault could make it float positive and see negative potentials on its IO pins.

Secondly remember that serial signals are relatively slow so they can tolerate series resistance. 10K series resistors should not adversely affect a 9600 baud signal but will present a barrier to fault currents. Note that this requires that the input does not have a pull-up.

Serial buffer ICs can generally withstand a bit of abuse on the RS232 side, and if the budget will stretch then "Fault protected" devices are available that will withstand substantial overvoltage conditions.

Optocouplers are still an attractive option provided you remember not to link the input ground to output ground under the device. There are some attractively priced logic output types and downright cheap phototransistor types. With transistor types watch the rise and fall times they are slow. For a robot application you can ignore the isolation voltage as it'll probably only ever see 12v or 24v whatever your motor supply is.