Shop OBEX P1 Docs P2 Docs Learn Events
Serial voltage levels — Parallax Forums

Serial voltage levels

Steve Hicks (N5AC)Steve Hicks (N5AC) Posts: 20
edited 2006-10-26 17:34 in Propeller 1
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

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2006-10-13 20:23
    A simple resistor divider level shifter should work in·this case.
                 220        220
    GPS I/O >----/\/\---o---/\/\---> GND
                        |
                        o----------> Propeller I/O
    


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Steve Hicks (N5AC)Steve Hicks (N5AC) Posts: 20
    edited 2006-10-13 20:50
    Thanks! I'll post a note after testing this to let everyone know if this works.

    Steve
  • acantostegaacantostega Posts: 105
    edited 2006-10-13 22:08
    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 SchwabeBeau Schwabe Posts: 6,560
    edited 2006-10-13 22:54
    acantostega,
    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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 10/13/2006 10:58:00 PM GMT
  • acantostegaacantostega Posts: 105
    edited 2006-10-13 23:16
    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?
  • ALIBEALIBE Posts: 299
    edited 2006-10-26 17:34
    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/
    ·
Sign In or Register to comment.