RS232 to Propeller Interface from Portable GPS
wjsteele
Posts: 697
Hmmm... I'm pulling my hair out on this one.
I've got a Garmin 72 Handheld GPS. I've connected the NMEA output to Pin 7/8 (TX/RX) on the propeller through a 2.2k resistor (on both.)
I can read the data perfectly when the GPS is running on battery power, but when I plug the GPS into the 12 volt accessory outlet of my car, the propeller dies. (It's actually not damaged, because I didn't let it sit there and cook... thank you, Parallax, for making a robust little chip!!!) I might add, the propeller is running on my 12 volts system as well, through the 5.0 and 3.3 regulators.
Anyway, I've looked everywhere in the forums and have found the sticky talking about converting 5v to 3.3v, but this seems to be more than 5v. Also, it seems that the voltage swings from -5.5 to +5.5 as far as I can tell, which seems to make sense, since the GPS is actually RS232 and not TTL, right?
What have others done here?
Bill
I've got a Garmin 72 Handheld GPS. I've connected the NMEA output to Pin 7/8 (TX/RX) on the propeller through a 2.2k resistor (on both.)
I can read the data perfectly when the GPS is running on battery power, but when I plug the GPS into the 12 volt accessory outlet of my car, the propeller dies. (It's actually not damaged, because I didn't let it sit there and cook... thank you, Parallax, for making a robust little chip!!!) I might add, the propeller is running on my 12 volts system as well, through the 5.0 and 3.3 regulators.
Anyway, I've looked everywhere in the forums and have found the sticky talking about converting 5v to 3.3v, but this seems to be more than 5v. Also, it seems that the voltage swings from -5.5 to +5.5 as far as I can tell, which seems to make sense, since the GPS is actually RS232 and not TTL, right?
What have others done here?
Bill
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
BTW, there is always a problem as well with ground potentials between units that have mains supplies. Many switch-mode PSUs will even "bite" you if you touch the DC leads.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
It still works perfectly when I plug in my GPS running on battery power... but again, as soon as I plug the GPS into the 12volt accessory outlet, the prop shuts down.
I really don't understand what I'm missing here. I've tried the above on just the Rx line of the prop and get the same thing. Even if there was a 25 volts swing between 0 and 1 on the RS232, the resistors I have in there should be enough to prevent this, shouldn't it? One other thought... it seems to be some "difference" between the tx and rx that is causing the problem... should I pull the tx (which I don't actually use) to ground instead of to 3.3v? (I've also tried using a common ground, but get the same thing.)
BTW... I'm using the GPS_IO_Mini.spin file for my i/o with Rx on pin 7 and Tx on pin 8.
Bill
Massimo
So, that means that I guess my resistors at 100k are not big enough, huh?
I think what I'll do to insure they are protected is use a transistor in there as well... that way, regardless of what comes in, the pin will only get 3.3v. The worst thing that'll happen is that I'll fry the transistor that way.
Thoughts?
Bill
This problem arises often with servos. If you have a servo and the propeller using the same power source you can have voltage drops, resetting the propeller. So using two independent battery set with common ground solves everything.
Your set-up behaves in the same way, even if cannot understand the reason, and only using your car 12V. It looks like from the battery you have an unstable power supply, and the Propeller suffers it.
A possible solution, that sometimes works, is to add a big capacitance between the 3.3V and the ground. A big fat electrolytic capacitor could be able to help the propeller when the power is not stable. Somewhere on the site someone suggested also to use a supercap... Being biased at 3.3V the capacitor voltage rating is not an issue..
Massimo
Why not feed the RS232 signal through a resistor to a pair of clamping diodes, arranged so one conducts to ground when the input falls below ground and one conducts to 3.3v when the signal exceeds 3.3 volts. Then your signal should fall pretty much between ground and 3.3 volts.
Feed that signal through another resistor to the input pin. That might help take some of the stress off the propeller.
Or maybe just use an optocoupler.
Post Edited (SkyKit) : 5/29/2010 2:21:48 AM GMT
Can you operate the propeller alone from the 12V battery, maybe blinking a Led?
Massimo
I've tried this with two different propellers (Parallax Scmartboard and Gadget Gangster's Propeller Platform SD board) and both do the exact same thing.
Max72, I have an LCD display on the propeller and it's just running the GPS VGA test, so I know when it's working.
I've checked the voltage of the prop while it is running and the power level is stable at 3.3v. The 5.0v regulator on them both are right on as well. When I plug the GPS in, it stays the same.
BTW... I've tried supplying the propeller everywhere from 4.5v to 12v all with the same problem. The propeller will run for hours without any issue if the GPS is on battery power. (The battery lasts about 4 hours in the Garmin that I have.) The data is perfectly stable... right until I plug it in. Also, I've confirmed that the GPS is working becuase the computer's RS232 shows the data just fine, even when plugged in to 12 volts.
I'm going to try and isolate everything and start from scratch. I must be overlooking something, but I just can't imagine what.
Bill
Hope you figure it out as I want to hook my garmin 60CSX up to a prop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lots of propeller based products in stock at affordable prices.