Root cause to RS-232 bug found!

Last night I found the true cause of my RS-232 problems. The question should not have been why two computers did not work when one did, but rather how did any manage to work.RS-232 uses voltage levels to send over a serial signal. Long time ago, the standard was +-12 volts. Over time that has been narrowed to as low as +- 5 volts. The logic level on my detector was correct in timing, but the Sparkfun RS-232 level converter I was using was not generating an appropriate RS-232 signal. The converter does not use a ‘normal’ RS-232 driver like the Maxim drivers, but rather uses two simple transistors. It gets the negative voltage by stealing it from the other sides TX line and storing it in a capacitor. This design is highly dependent on the receiver of your data.

In my case the signal was about 1 volts in amplitude and was not even centered on zero but rather at nearly 3 volts. Why the laptop was able to decode this awful signal I do not know.

So I searched around and found that Polulo sells a similar converter, but theirs uses an honest driver chip and does not steal power. I placed an order for one of these to replace the Sparkfun crummy unit.

Unfortunately neither the RS-485 parts I ordered nor this Polulo part will get to me before the hurricane and associated lightning storms hit us this weekend. So I was scratching my head as to how to bypass the problem to be ready in time when it occurred to me that my detector has both a plus and minus 5 volt supply. This voltage swing should be enough to drive most modern UARTS.

Looking to my available inventory, I stumbled on some optoisolators. One of these should do the trick. Drive the LED part from the micro and use the transistor to switch a load resistor between the +5 and -5 rails. I should be all set for the hurricane!

For those that are following this, I would discourage purchasing either of these two Sparkfun products. It gives me no joy to do so as I am very fond of their products, but these two are pretty substandard:

RS232 Shifter Board Kit

RS232 Shifter SMT

I would suggest looking at the Pololu products instead.

 

This entry was posted in Lightning detector, Product reviews, Projects, RS232 Shifter. Bookmark the permalink.