Shop OBEX P1 Docs P2 Docs Learn Events
Converting Stamp 5V digital to 3.7V for xbee — Parallax Forums

Converting Stamp 5V digital to 3.7V for xbee

patterson7019patterson7019 Posts: 25
edited 2010-02-27 19:19 in BASIC Stamp
First, I have to say the series 1 xbees, very cool. Fired up one on my laptop and another on my desktop, worked perfectly right out of the box.

I wanted to hook up the Din and Dout on the xbee to my stamp, but I don't know how to convert the 5V from the stamp Dout to 3.7V for the xbee Din. I also don't know if the stamp will see 3.7V as a correct input value. I wanted to avoid buying extra stuff at this point as I was hoping to do a presentation early next week. No time to order parts. The goal is to remotely control the robot by issuing commands on my laptop.

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://perfectaperture.com/robb

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-27 07:31
    Din to the XBee from the Stamp can be via a voltage divider with a 10K and 20k resistor. That brings the 5 volt Stamp output down to 3.3 for the XBee. Dout from the XBee to the stamp can be direct or through a resistor. The Stamp input responds fine to the 3.3 V levels.

                             1k
    stamp inp --<----/\/\-------o------<---- XBee out
    
    stamp out --->--/\/\--------o----->----- XBee in
                             1k           |
                                           |
                           2k             |
           Vss  --------/\/\------- '
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • patterson7019patterson7019 Posts: 25
    edited 2010-02-27 07:39
    Thanks, is that 10K or 1K?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://perfectaperture.com/robb
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-27 07:59
    Oh, it is the ratio that matters. 1k with 2k, or 10k with 20k, or any r1/r2 = 1/2
    Vxb = Vbs * (2k / (1k+2k) = Vbs *2/3 = 5 * 2/3 = 3.3
    What do you have on your bench or can obtain this weekend? If you have a pack of 1k resistors, use two in series to get the 2k.

    There is a lot of leeway in the choice, but
    -- too low a value (<300 Ohms?) would load down the Stamp too much.
    -- too high a value (>100 kOhms?) would risk slow response or noise pickup.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Larry~Larry~ Posts: 242
    edited 2010-02-27 17:35
    I have used the sparkfun units. they work great and go both ways 5 to 3 and 3 to 5 if needed I keep one or two arround always
  • patterson7019patterson7019 Posts: 25
    edited 2010-02-27 19:19
    That does the trick! 3.31V using 10k's (and a couple in series). I was looking at the sparkfun unit, I'll probably order a few next week, but I wanted to figure out what I wanted for AVR CPU's and programmers from them too [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.perfectaperture.com/robb
Sign In or Register to comment.