Tips for connecting a microcontroller to J2

220 Watt DC-DC ATX Power Supply

Tips for connecting a microcontroller to J2

Postby howshaw » Tue Oct 20, 2009 1:04 pm

I have discovered that if I connect the J2 connector RX input and TX output directly to microcontroller (I use a PIC16F876A) I/O pins then there is a current drain when the DSATX shuts down. With nothing plugged into J2 the DSATX draws about 20mA from VIN for a few seconds after shutdown, and then around 3.5mA while it has 12V on VIN nothing on ACC. With the PIC connected it draws around 60mA continuously from VIN after shutdown. This is because the DSATX sources current through the TX output of J2, and sinks current into the RX input of J2, when it is idle. This can be fixed with a small hardware mod. as follows...

1) Place a 1N4148 (or similar small signal silicon) diode in series with J2 TX(out) with the anode to the DSATX and the cathode to the external microcontroller.
2) Pull the cathode of the 1N4148 to the positive supply rail used by the external microcontroller. This converts the DSATX TX output into an "open collector" and stops the DSATX trying to power the external microcontroller through the TX output when the microcontroller's power supply is switched off.
3) Drive the DSATX RX input from an open collector driver, either use an open collector gate, or drive the RX input through a small signal silicon NPN transistor (I used a BC183L). Let the DSATX pull the RX input up to its supply as it wishes, don't use a pull up at the microcontroller end.

Remember:
The 1N4148 will stop the DSATX data from swinging all the way to ground, but whats a diode drop between friends!
The open collector drive transistor will invert the sense of the data going into the DSATX RX input.

I doubt if many people need to know this, but I worked hard to work out why my battery kept going flat. I hope that spreading the word may help others.

PS to the designers of the DSATX: When you design digital interfaces remember that inputs should have passive pullups, and outputs should be open collector.
Howard.
howshaw
 
Posts: 4
Joined: Thu Feb 05, 2009 11:15 am

Return to DSATX

Who is online

Users browsing this forum: No registered users and 1 guest

cron