I would like to be able to reset an XBee with an Arduino by connecting the reset pin on the XBee to a General I/O pin on the Arduino. I'm wondering if any additional components (transistors, resistors etc.) are necessary between those pins.

I found this tutorial on ladyada, but it shows how to reset the Arduino with the XBee which is the opposite of what I'm looking for. Schematic from the tutorial: enter image description here


The reset pin is bidirectional, and default configured as open-drain with a pull-up resistor (datasheet page 13). That means that you can assert Reset by making that pin low.

Don't make the Arduino's output high to de-assert Reset! Two reasons:

  1. Xbee are 3.3 V devices, and 5 V on the input may damage them
  2. If you would make the output high (whether 3.3 V or 5 V) and the Xbee would make it low you would have a short-circuit.

So to de-assert Reset switch the Arduino I/O pin to input. Make sure the ATmega's internal pull-up is disabled! The Xbee's pull-up resistor will take care of the proper high level.

To interface the 3.3 V Xbee safely with the 5 V Arduino you can use LadyAda's adapter which has a level shifter.

enter image description here

  • \$\begingroup\$ If I understand properly. To reset the xbee, I can set output low and to de-assert the reset, set the arduino pin as input. I suppose I can secure the xbee reset pin with a 10k resistor. Do you agree ? \$\endgroup\$ – hotips Aug 1 '12 at 14:53
  • \$\begingroup\$ @si2w - "If I understand properly." then nothing. Did you fall off your chair? \$\endgroup\$ – stevenvh Aug 1 '12 at 14:56
  • \$\begingroup\$ You can't have a new line inside comments... ;-) \$\endgroup\$ – hotips Aug 1 '12 at 14:58
  • \$\begingroup\$ @si2w - No, you have no formatting in comments to avoid that people use them for long stories. Comments are for short reactions only. To answer your question: yes, output low = assert, input = de-assert. I'm not sure a 10 k series resistor will work. If the pull-up is also around 10 k (I don't know) it would form a divider to get you 1.65 V, not low enough for a low level. OTOH if the pull-up is around 100 k the level will be 0.3 V, probably low enough. You can try and see what level you get. \$\endgroup\$ – stevenvh Aug 1 '12 at 15:06
  • \$\begingroup\$ I know for the formating... I still distracted sometimes ;-) Thanks for reply ! \$\endgroup\$ – hotips Aug 1 '12 at 15:23

What I'm doing in the same situation, is to use a BS170 (small-signal MOSFET N-channel) to pull the signal low when the Arduino pin goes high.

Arduino output -> Gate of MOSFET and Xbee Reset -> Drain of MOSFET. Source is tied to ground.

In general, I find MOSFETs easier to use for digital signals the BJT transistors like in the LadyAda tutorial.

You may also want to use a resistor (200 - 1000 Ohms) between the Arduino output pin and the MOSFET gate, to limit the current spike when switching. A MOSFET gate is like a small capacitor, only drawing current when changing state, but it can draw a lot of current for a very short while; there's a risk in very temporarily exceeding the 40 mA rating of the Arduino pins.

So, why do I thiink this is better than a solution that uses no intervening components? Two reasons:

1) With the direct pin tied, one small software bug might put the pin high and fry the Xbee. This is a very real risk. Don't ask me how I know :-)

2) The Xbee RESET signal is not specified to any particular input capacitance, so you may end up sinking more current than acceptable when driving the output pin low on the Arduino. It's a small risk, but why take it?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.