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

Thread: Analog voltage when teensy power off

  1. #1
    Junior Member
    Join Date
    Jun 2021
    Posts
    4

    Analog voltage when teensy power off

    Hello all,

    This is my first post on this forum and my first time using a Teensy. I have been using Arduino Micro and Mega for a while now.

    I am working on a hobby project which requires a battery powered controller. I have selected the Teensy 4.1 as the micro for it's serial ports and plenty of I/O pins.

    I am planning to use the Adafruit Powerboost 1000C as the power source so that I can have a lipo battery powering the controller normally, and then plug in a USB cable for external power and to charge the Lipo.
    All this works fine.

    My question however, is that the Power Boost has a Low Battery Output (LBO) that gives a voltage out between 4.9V (When powererred from USB) and The lipo voltage when on internal battery only. This pin then drops to 0v when the lipo is low. I want to use this to indicate when the lipo is low.

    I am planning to pass this LBO through a voltage divider and into one of the Teensy's analogue pins to ensure no more than 3v appears at the teensy.

    The problem is that when the controller is powered off and no 5v is on the teensy, this 2-3v will still be on the analogue pin.

    Does any one think this would cause a problem with the teensy back powering somehow?. I've seen this occur with a cheap Max7219 but the teensy is more expensive so do not want to risk damaging this device.

    Thanks
    Keith.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,178
    Use high value resistors in the divider so current is limited? 100k or so ought to be benign. A few nF of capacitance might be
    needed to eliminate noise pickup, note.

    The sure-fire approach is an opto-coupler however.

  3. #3
    Junior Member
    Join Date
    Jun 2021
    Posts
    4
    Thanks for the response. I did not think about using an opto isolator. At least this will ensure there is no interaction when the power is off.

    I've not used one before, off to google to learn about these and understand their data sheets.

    Next I need to find a way to shoe horn it onto the circuit board.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    14,862
    In Beta it was found that activating many or ALL the 7 UART Serial between two Beta T_4.0's caused startup trouble when one was Off and the other was On.

    > UART Serial Rx and Tx are held high 3.3V when idle.

    So the Off T_4.0 was having 14 pins attached at 3.3V and it was back powering from the On Teensy ... Paul did a one wire change for those Beta boards and that issue went away.

    Next Beta and all production boards handled this no problem. So a single pin held high when the Teensy is off should not cause trouble. This would be the case on i2c (or other) when the pullups are on the external device as well.

    The T_4.1 has 8 UARTS - and that was tested to work as well.

  5. #5
    Senior Member
    Join Date
    Nov 2015
    Location
    Cold hollow VT
    Posts
    203
    Can't you just use a schottky diode with the cathode to the LBO pin and the anode to the Teensy. Have the input configured INPUT_PULLUP. The diode will block the positive voltage from the PowerBoost 1000.

  6. #6
    Senior Member
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    231
    I'd use a 74LCV1T45 in say SOT-23 (TI SN74LVC1T45DBV*) for this, with pin 1 (VCCA) connected to Teensy 3.3V, pins 2 (GND) and 5 (DIR) to ground, pin 3 (A) to Teensy input pin, pin 4 (B) to LBO, and pin 6 (VCCB) to Power Boost VS pin.

    Whenever either or both of VCCA/VCCB is at 0V, the A and B pins are "disconnected"; no current will flow between the two. Tying DIR to ground means A is an output that will follow the logic at input B, when both VCCA and VCCB are between 1.7 and 5.5V.

    I admit, I kinda like these voltage level transceivers, and use them for most of my unidirectional voltage level shifting needs, so I can be biased here.

Posting Permissions

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