SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By fll-freak
#132570
Update.
My Sparkfun order of RS-485 parts nor my Pololu order of a real RS-232 converter arrived in today's mail. So I decided to switch to plan-B and figure out a way to generate the RS-232 signal myself from the plus and minus rails on my detector.

First idea was to use an optocoupler. This did not work very well as the diode needed way too much current for my poor little MSP430 to provide. Running the diode at less current drastically increased the switching time. I did not feel like adding a transistor amplifier to drive the diode, so I looked through my stash of parts.

And I came across an old quad comparator from Radio Shack when they still used to sell decent parts. I powered this from the +-5V and set a reference voltage with a potentiometer. The input came from my MSP430 and in short order I was generating nice square +-5V RS-232 signal that all my computers were able to understand and process properly.

I did find a small software bug that accounted from why the 0x05 did not ever come through properly. So all in all it was an interesting learning experience.

And just to cap it off, my lightning detector is still acting as a lightning repulser. We have had storms all around us, but never within 30 miles. I will never get this thing calibrated at this rate.

Thanks to one and all for the activity on this thread. Your ideas were instrumental in my regaining my sanity.