Shop OBEX P1 Docs P2 Docs Learn Events
5 volt sensors interface — Parallax Forums

5 volt sensors interface

JED1JED1 Posts: 17
edited 2006-04-15 19:09 in Propeller 1
The large majority of the sensors (modules) one can get these days are 5 volt based. Yet the Propeller is running at 3.3 volts,
So I am assuming that all the I/O pins are also 3.3 volt logic based. I didn't see anything stating otherwise, hopefully I missed
something.

So now if we are going to use these I/O devices and sensors it implies that we will need to do a lot of level shifting.
I am not looking forward to the extra H/W on my circuits to do this for all those I/O pins. How is Parallax addressing
this to help the user community?

Jeff

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-04-09 18:44
    As an output, the Propeller can drive 5V devices fine since it is above the threshold.

    As an input, a 1K-10K resistor will provide needed current protection from a 5V device.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Southern Illinois University Carbondale - Electronic Systems Technologies

    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
  • TimCTimC Posts: 77
    edited 2006-04-09 19:33
    Martin your solution works for one way data but not two way, such as I2C data.

    For 1 and 2-way traffic a real level shifter could be used. Like one of these 3 chips:

    SN74LVC8T245
    GTL2010
    ADG3308

    NO DIP format that I can find. This world is not getting hobby friendly mad.gif

    Regards
    Tim
  • LarryLarry Posts: 212
    edited 2006-04-09 20:17
    Jeff,

    You'll have to do a little NEWTHINK, but it's really not such a problem. For example,

    I2C works fine at 3.3 v. Just make sure the pullups go to +3.3v, and maybe use slightly smaller resistors.
    Proper I2C device interface with the clock and data lines as open collector (thus the pullups). They don't power the lines.


    Many CMOS devices likewise will work just fine at the lower voltages. I use 8 Pin Pic chips al the time at 3 v. with no problems,
    Likewise Sharp IR sensors and lots of other stuff. A good example is the 24LC256 used for the Propeller memory- It'll run at either voltage.

    In fact, circuits are more forgiving with regards to overcurrent at those levels. I'm not saying you should do it, But it is possible to run an
    LED right off a PIC pin with no resistor and not sustain any damage at 3 v.

    The transition is pretty easy. Datasheets for devices will get you started, and if you are stumped, here's the place to ask..

    I look foreward to running projects off of just a single lithium battery.

    Larry

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • El PaisaEl Paisa Posts: 375
    edited 2006-04-09 20:22
    This issue is a touchy one.
    Some 3.3v devices are 5v tolerant, other not.
    The chip designer is the only one that should specify the max specs.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-09 20:23
    Actually the limit resistor works for bidirectional communications as well. The resistor is there to limit the current through the diode clamp in the propeller. For a bi-directional line they are almost always configured with pull up resistors, so you use a pullup resistor to 5V on the side of the limit resistor the 5V device is. The limit resistor will have to be scaled to be roughly an order of magnitude (10x) smaller than the pull up resistor so when the propeller sinks its pin to 0V the 5V input will be under the logicl low threshold. If you use a 10kΩ resistor for the pullup and a 1kΩ resistor for the limit, the low voltage seen by the 5V device would be 0.45V which is safely into the low voltage threshold of the 5V device.

    Now for 5V analog signals, a resistor divider must be used to maintain the linearity of the signal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-09 22:21
    The I2C spec shows how to connect a 3.3v device to 5v devices -- using fets in the lines with pull-ups on each side of them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • JED1JED1 Posts: 17
    edited 2006-04-09 22:25
    Thank you everyone for your input.

    Jeff
  • JED1JED1 Posts: 17
    edited 2006-04-15 19:01
    Thank you Jon, but it is just that, I was wanting to avoid any extra components needed. Any chance an I/O
    module to minimize this interfacing will be provided by parallax?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-15 19:09
    Not likely, but you never know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.