USB to RS232 converter problem

There is a fairly serious problem with the Pololu USB to RS232 adapter, however it is easy to fix. When the converter is plugged into a USB port, the default seems to be to set TX high (regardless of whether a terminal or other program has allocated the port).

If the converter happens to connected to a port pin on an unpowered MCU, it will power the MCU via the input protection diodes and may cause reset problems. Powering up and down the MCU may also cause the USB port to hang, requiring one to kill and restart a terminal program, for example. I have now determined that this happens with either PIC or AVR processors.

The simplest fix is to put a resistor between TX on the USB adapter and RX on the MCU. I used 27K ohms, which seems to work. An isolation diode also works.

Added 4/25/07:
The problem is worse than I thought. I just fried the USB RX input when I switched on the PIC to which it was connected (the USB converter was unplugged from the PC port). I now have 27K resistors between each connection. You may need to go higher than 27K – the port still sometimes hangs when the PIC is powered up and down.

These are expensive lessons! Does anyone need a TX-only USB-RS232 converter? Free for postage…

Cheers, Jim

Any idea how fast this happens?

Reason I’m asking is because of the available power on the USB to serial converter. I haven’t done this yet, but I was planning on making a USB dongle thingie with a Baby-O powered by the USB converter. With power flowing from both directions, do you know which one “wins” so to speak? I’m guessing the Baby-O would power up just fine, but I’m only guessing.

Thanks for bringing this up.

Tom

Oh man Tom, is that a great idea. I keep finding myself needing at least one USB to serial adapter for each Orangutan and Baby-O I can get my hands on. The only thing missing would be programming through the USB port. I have a vague sense that it could be accomplished with a boot-loader of some sort (like with the Butterfly, not that I have a clue how to write one).

It’s totally my vision of the inevitable Baby Orangutan X2 (since I know the Pololu guys have sooooo much free time):


Something akin to the TI USB development board or the Parallax USB basic stamp board, but with an AVR of course. USB powered, programmable, and and UART TX/RX connected, with all the usual Baby-O goodies, plus more LEDs. Everyone loves LEDs. I would also like to take this opportunity to pre-preorder the first four.

Until then, Tom, if you do make a Baby Orangutan Thumb Stick, please post pictures!

-Adam

Heh! Probalby nothing so elegant as a thumbstick, but my heart’s in the right place, I hope.

As far as USB programming goes, I’m super-interested in seeing what the X2 is going to be like. Not exactly a thumb drive, but looking at the specs it’s got a built in USB programmer. Might spell the future for development on a new Baby-O? Still, I can see if it doesn’t since the whole strength and charm of the Baby-O is that it’s stripped down to the minimum parts necessary. I’m not sure tacking a USB converter on it would be ideal as far as the form factor goes.

(But I’d still buy one if Pololu made it!)

Tom

Sorry, I should have added that no problem arises when the MCU (either PIC or AVR) is powered by Vbus from the USB adapter. The problems arise when the MCU is supposed to be powered by something else. In the above case, the circuit would have required too much power from the USB bus, hence the external supply.

In fact, a Vbus-powered arrangement makes a great little peripheral–I constructed a geiger counter from a PIC, which provides the 500V required by the tube via a DC/DC converter and outputs counts/minute via the serial port. I basically followed the ideas presented in an article by Tom Napier in Circuit Cellar #184 and it works well.

So, Tom – go for your O-stick!

Cheers, Jim

Waitaminutewaitaminute! 500V using DC-DC converters? I know diddly about geiger counters, so I’d love to hear more about this, if you don’t mind sharing. WOW!

(Is this why you’re not powering this device directly from the USB?)

Tom

The geiger counter is powered by the USB bus. Geiger tubes conduct current only for about 90 microseconds (when a particle passes through them) and then only through a 10M ohm resistor. So, the DC-DC converter can be very low power.

For example, look at:
techlib.com/science/geiger.html

My version draws about 10 mA at 5 V and was made from an 8-pin PIC, a single transistor and photoflash transformer salvaged from a very cheap camera. The PIC counts particles as well. The only items of significant cost were the geiger tube (imagesco.com) and the USB-RS232 converter.

But hey, check out the FT232 breakout board from Spark Fun for only $15. After some experimentation, my experience indicates that the FTDI-232R chip does not suffer from the problems described for the Silicon Labs chip used by Pololu.

I attribute this to the difference in the IO (RX/TX) interface–the FTDI chip has a separate Vcc (2.5 - 5.5 V) for the IO, whereas the SiLabs chip advertises “5V-tolerant” 3.3 V IO. Taken together, the FTDI chip is a better deal and more reliable to boot.

Jim