Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

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

  1. #1
    Senior Member
    Join Date
    Oct 2019

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

    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.

  2. #2
    Member MorganS's Avatar
    Join Date
    Apr 2015
    Northern Nevada
    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.

  3. #3
    Senior Member
    Join Date
    Dec 2014
    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:

    Click image for larger version. 

Name:	teensy-base-board.jpg 
Views:	43 
Size:	137.6 KB 
ID:	20241

    If you use a breadboard, you should pull power from the rails on the board.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts