Using Teensy input pin as VCC\GND pin for sensor devices

Status
Not open for further replies.

kdharbert

Well-known member
I need to save space on my breadboard to keep things neat. As such, I have implementations where I attach a 4 pin device across 4 Teensy pins...and set two of the pins as inputs on the Teensy and connect them to GND and VCC. This leaves two pins for a serial connection and powers the device.
Are there any drawbacks or limitations to this kind of connection? I just want to make sure this can't catch up with me later.
 
If the sensor power consumption is small enough, like under 5mA, then set those pins as outputs and drive them high and low as appropriate. Not all Teensy pins have the same power limitation, so it's worth checking if your sensor needs more than 5mA.

It is not something I would use for long-term use, but to quickly plug a sensor into a breadboard and develop the code, it's a good idea.
 
The Teensy LC is specified at 5 mA for most pins, and some pins can do 20 mA output.
The other Teensies are generally specified for 10 mA per pin.
There's also often a "sum across all pins" specification for the microcontrollers on each Teensy boad, but those are not specified as part of the Teensy itself.
Note that the current matters both for output (voltage) and input (ground) -- current into ground is just as much current as current out from positive voltage.
I would instead use an arrangement similar to popular RC servo connectors, where each Teensy pin has three pins -- one for the signal, one for power, and one for ground.
Here's a board I use for this:

teensy-base-board.jpg

If you use a breadboard, you should pull power from the rails on the board.
 
Status
Not open for further replies.
Back
Top