UART and Optosoloators

Status
Not open for further replies.

Dylpickle

Active member
Hey :)

I'm putting the final touches on a MIDI controller and I have added provisions for powering another Teensy and having it communicate via UART.

Currently I've just got 4 pins

- 5v out from VIN to provide Power to another t4.0 via its vin pin
- GND
- RX
- TX

Question 1 - Should I have protection or isolation from the VIN pin?
Question 2 - should RX and TX be optoisolated to prevent against reversed polarity or over voltage coming back to damage the UART RX and TX? (6N138 maybe)

Thanks :)

m7eQdFw.png
 
One possible gotcha is if some coding error causes the pins at either end of a direct connection to be configured as outputs and one happens to be high and the other low will possibly fry both boards. An insurance policy is to insert some current limit like so.

TX>--->resistor>-----RX
Rx<--- <resistor<----TX

A 1K resistor limits current to 3.3 Ma in a worst case scenario and as a bonus, absorbs overshoot and ground bounce.

Be mindful of potential ground loops.
 
thanks mate,

in regards to the ground loop, would this be a consideration if there only 1 DC supply being used? with the VIN pin connecting to the VIN of the slave to power 5v and the gnd of both boards being connected?
 
I wired a Mega to a T2 and fed the T2 from the Mega's +5v. The T2's 0v, Thick and short soldered directly to a sensible looking common 0v point on the back of the Mega. Noisy Led displays 0v line was thick and direct to same common 0v point. T2's TX and Rx via 470R to Mega RX and TX3. Still works.
 
Status
Not open for further replies.
Back
Top