XBee digital out driving LED

Apologies if this post belongs in another category. I searched for a while before posting.

I need to drive an LED from XBee digital output for use as an opto-coupler. My original thought was to drive an n-channel (enhancement) MOSFET gate with the 3.3VDC digital output high signal. However, I was not sure that was enough voltage. I would like to power the MOSFET directly from the XBee and not use an additional power source. Vgs would likely be fairly low given the +5VDC input.

Also, I am wondering if driving the LED would prevent going into sleep mode whereas something like an SCR/Thyristor may allow a momentary digital high signal to toggle the LED on/off.

Many thanks in advance!

Hi bitTwiddler,

Either of these options should work just fine to drive an LED from an XBee. The older models were capable of [driving a small 5mm LED directly so you may be able to do that depending on the specs of the LED you use. Otherwise, a simple NPN transistor would work as well here, unless you are looking to drive a high-power LED. If that is the case, you may need an alternative power source.

As for the LED preventing the XBee from going into sleep mode, I am afraid we do not have much information about that. I would recommend checking the datasheet of the XBee you are planning to use for this project. Digi’s [Resources page and their [Support Page would be two places that might help you find out information about that question.

I hope this helps you figure out how to create an optocoupler for your XBee project.](Technical Support | Digi International)](Knowledge & Resources | Digi International)](https://www.digi.com/blog/802-15-4-digital-output-with-an-led/)