PDA

View Full Version : Serial voltage levels



Steve Hicks (N5AC)
10-14-2006, 02:37 AM
I'd like to hook a propeller to a GPS module that does TTL RS-232 (0-5v).· Can the propeller work with this directly or do I need to put a 3.3/5v level converter in between the module and the propeller?

Thanks,
Steve

Beau Schwabe (Parallax)
10-14-2006, 03:23 AM
A simple resistor divider level shifter should work in·this case.


220 220
GPS I/O >----/\/\---o---/\/\---> GND
|
o----------> Propeller I/O

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Steve Hicks (N5AC)
10-14-2006, 03:50 AM
Thanks! I'll post a note after testing this to let everyone know if this works.

Steve

acantostega
10-14-2006, 05:08 AM
Hi Beau,
why wouldn't you use the simpler 4.7k-10k series resistor solution in this case?
I'm wondering because I'm interfacing a Propeller to the CmuCam2, which uses 0-5v TTL at 115200 bauds. I've been putting a 10k resistor in series with the cam's TX pin and nothing at all on the RX pin. I've only done sme testing with the cmucam, sending some commands and receiving some packets, but I haven't had any trouble yet.

Post Edited (acantostega) : 10/13/2006 10:13:41 PM GMT

Beau Schwabe (Parallax)
10-14-2006, 05:54 AM
acantostega (http://forums.parallax.com/member.php?u=46543),

You said...
why wouldn't you use the simpler 4.7k-10k series resistor solution in this case?

That would probably work just fine as well, but after thinking about it,·using the divider·might be a better solution in terms of keeping
substrate noise levels down on the IC.· Using a 4.7k to 10k series resistor assumes you are relying on the substrate diodes for part of
the current path which might lead to unwanted noise.

The divider method steers away from this.

If the Propeller I/O is set as an Input and the GPS I/O is set as an OUTPUT, then a LOW· (0V)·on the GPS Input to the divider will show up as a LOW (0V)·on the Propeller I/O
If the Propeller I/O is set as an Input and the GPS I/O is set as an OUTPUT, then a·HIGH (5V) on the GPS Input to the divider will show up as a·HIGH (2.5V) on the Propeller I/O

If the Propeller I/O is set as an Output and the GPS I/O is set as an INPUT, then a LOW· (0V)·on the·Propeller·Input·to the divider will show up as a LOW (0V)·on the·GPS I/O
If the Propeller I/O is set as an Output and the GPS I/O is set as an INPUT, then a·HIGH (3.3V) on the·Propeller Input to the divider will show up as a·HIGH (3.3V) on the GPS I/O

If the Propeller I/O is set as an Output and the GPS I/O is set as an OUTPUT and there is a collision, the maximum current through the linking 220 Ohm resistor will be 15mA ; minimum·7.7mA

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 10/13/2006 10:58:00 PM GMT

acantostega
10-14-2006, 06:16 AM
I see. It's good to know this. Maybe this should go in the "How to interface a 5V signal to the Propeller?" sticky thread?

ALIBE
10-27-2006, 12:34 AM
Beau, thanks for the advice here. I will be using this in my GPS Module interface

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"any small object, accidentally dropped, goes and hides behind a larger object."


ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
http://ALIBE.crosscity.com/ (http://ALIBE.crosscity.com/)
·