Xbee running on 3.3v from analogwrite?

XBee projects like the adapter, xBee tutorials, tweetawatt/wattcher, etc. from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
coding1227
 
Posts: 32
Joined: Tue Apr 30, 2013 5:00 pm

Xbee running on 3.3v from analogwrite?

Post by coding1227 »

Hi Adafruit team et al.,

I have a question for you guys... my apologies in advance if they sound rather "noob-ish" :) I am playing around with the xbee Pro S1 60mW and I wanted to connect it to my Arduino, and I was wondering:

I would like to be able to digitally turn "on & off" my XBee using my arduino. I wanted to use an analog pin to send 3.3v to the XBee using analogWrite(3, 168) [this will send ~3.3v to pin3). BUT... I realize that this voltage is PMW, and thus, I would need some kind of low pass filter to smooth the PMW.

Could you give me any recommendations on what kind of resistance & capacitor I should use for making a low-pass filter, considering the calculations shown here (http://sim.okawa-denshi.jp/en/PWMtool.php)?

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Xbee running on 3.3v from analogwrite?

Post by adafruit_support_rick »

That's not the way to do it. You can't source enough current from a digital pin to drive an XBee, anyway.

Instead, get yourself a PN2222 transistor. Attach a 4.7k resistor between a digital output pin and the transistor base. Connect the emitter to 3.3V, and the collector to your XBee. Turn it on and off via the digital pin attached to the base.

User avatar
coding1227
 
Posts: 32
Joined: Tue Apr 30, 2013 5:00 pm

Re: Xbee running on 3.3v from analogwrite?

Post by coding1227 »

awesome. Thanks! :)

Locked
Please be positive and constructive with your questions and comments.

Return to “XBee products (discontinued)”