View Full Version : Propplug works, USBtoRS232 also but not with prop [Update: both work]
04-06-2009, 11:37 PM
I've got a propeller hooked up to the PropPlug, and it is communicating.
Now I tried the USBtoRS232, also from Parallax, and it doesn't communicate at all.
The both return their signal when Rx are connected with Tx so I suppose the converters are working fine.
I also connected the ground to the Propeller ground.
Is there a difference between the two converters that I missed?
Thanks in advance!
Post Edited (Robot Freak) : 4/6/2009 7:52:05 PM GMT
04-06-2009, 11:41 PM
Yes. The USB to RS232 adapter produces RS232 (+6V / -6V) signal levels and, if you connect it directly to your Propeller, can destroy the Propeller.
The PropPlug produces +3.3V signal levels (+3.3V / 0V) which is what the Propeller is designed for.
There's also a USB2SER adapter which produces +5V signal levels (+5V / 0V) for use with Stamps and other 5V logic devices. This can
also damage a Propeller if directly connected to it. Any voltages greater than 3.3V or less than 0V can damage the Propeller. There's a
whole long "sticky" thread about techniques for correctly connecting a Propeller to voltages outside this range.
The Propeller is a fairly robust chip and can stand a lot of abuse, but not voltages much above +3.3V or much below 0V unless the current
is limited. The protective diodes on the chip can handle about 1/2 mA. Normally a high value resistor is used in series with the I/O pin to
limit the current. For RS232 signal levels (up to +12V / -12V), you'd need a 27K resistor, maybe higher.
Post Edited (Mike Green) : 4/6/2009 3:56:30 PM GMT
04-06-2009, 11:46 PM
Thanks mike, I've disconnected the power.
The Propeller is still doing fine.
How would I make 3.3V signal levels of the RS232 ones?
Just a resistor? I Guess that it should have worked then.
Does the USBtoRS232 do 0V / +5.0V levels or -5.0V / 5.0V ?
I'd prefer not to use a max232, because I haven't got them at the moment.
Why is the PropPlug $24,99 and the USB to RS232 just $14,99??
Post Edited (Robot Freak) : 4/6/2009 3:54:59 PM GMT
04-07-2009, 12:03 AM
You really need the MAX3232 to work reliably with RS232 levels. On the Prop receive side, just a 27K series resistor will work. The problem is on the transmit side. The Propeller produces a +3.3V / 0V signal and many RS232 receivers won't accept 0V in place of a negative voltage. They often won't accept +3.3V for a positive voltage since they often treat the range +3V to -3V as indeterminant (for noise reduction).
If you read the spec for various TTL to RS232 chips, most of them have +5V to +7V / -5V to -7V output signal levels.
I'm not really sure why the PropPlug is more expensive than the USB to RS232 adapter because the PropPlug is simpler.
There's a 3-transistor RS232 to +3.3V logic converter schematic on the Propeller downloads webpage. It uses the RS232 receive line for a source of -V for transmission, so it's somewhat limited in how it can be used, but it might work for your application. The main limitation is that it's functionally half duplex and it echos its RS232 input back to the RS232 line.
04-07-2009, 12:07 AM
Thanks for explaining Mike!
Phil Pilgrim (PhiPi)
04-07-2009, 12:38 AM
A simple resistor won't work, I'm afraid. The reason is that RS232 signals are inverted, and the Prop expects positive true data. I would second Mike's recommendation to use a MAX3232 and not futz around with half-baked measures. Unfortunately, the PropPlug connector does not provide power, so you will have to tap power for the MAX3232 from elsewhere on the board.
But if you already have a PropPlug, why not just use that?
04-07-2009, 03:33 AM
Here is a quick update about the USBtoRS232 adapter.
The communication is up and running by using transistor inverters on both signals.
The Tx of the Propeller and PC being input of the inverters, the Rx of the Propeller and PC being output of the inverters.
To protect the Propeller I added a 10k resistor on both I/O pins.
Only tested with -5V/+5V serial connections!
Does anyone knows what will happen with -12V/+12V??
Post Edited (Robot Freak) : 4/6/2009 7:57:10 PM GMT