View Full Version : Converting Stamp 5V digital to 3.7V for xbee
02-27-2010, 02:56 PM
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.
02-27-2010, 03:31 PM
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.
stamp inp --<----/\/\-------o------<---- XBee out
stamp out --->--/\/\--------o----->----- XBee in
Vss --------/\/\------- '
02-27-2010, 03:39 PM
Thanks, is that 10K or 1K?
02-27-2010, 03:59 PM
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.
02-27-2010, 04:36 PM
02-28-2010, 01:35 AM
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
02-28-2010, 03:19 AM
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 :)