Teensy power and potentiometer?

Status
Not open for further replies.

dsparks

Well-known member
This may seem like a trivial question, but I just wanted to be sure before frying anything.

Can I power the Teensy with an external 5V source via a wall wart (DC adapter) and use the 3.3V power pin to send 3.3V to a potentiomter. That then sends its output back to the Teensy on some analogue pin?

Picture attached.

Thank you!


teensy pot circuit.png
 
Yes, that is the way to wire it up.

The one gotcha is wiring up the 5v power via the VIN pin. You probably do not want to not get power from both the USB and external power at the same time (power will flow 'backwards' to either USB or the external power source). There are various solutions, but the simplest is just use a micro USB cable to power the device, and have the USB cable either connect to the computer when programming the device or via a cell phone charger wall wart. Or just either connect via USB or via external 5v power, but not both at the same time.
 
Michael,

No, I never power them from both sources at the same time. I am curious now though. Suppose I have a cap that is directional on the incoming DC power lines. And I apply power instead from the USB while programming the Teensy. Will this power then flow from the VIN pin back to the cap and DC jack?

And thank you!
 
Michael,

No, I never power them from both sources at the same time. I am curious now though. Suppose I have a cap that is directional on the incoming DC power lines. And I apply power instead from the USB while programming the Teensy. Will this power then flow from the VIN pin back to the cap and DC jack?

And thank you!

Yes. Lipo chargers in fact use this behavior to charge the battery from USB when the USB cable is plugged in and when the cable isn't plugged in, it uses the battery power. Here is onehorse's lipo charger designed for the Teensy: https://www.tindie.com/products/one...ger-add-on-for-teensy-31/?pt=full_prod_search. To use this charger, you need to cut the solder bridge trace that normally connects VUSB to VIN.

Now, a well designed wall wort would have diodes to to prevent charges from going 'backwards', and similarly well designed USB connections should also. But the world doesn't always have well designed connections.
 
Status
Not open for further replies.
Back
Top