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

Thread: Can this fry my Teensy 3.2?

  1. #1

    Can this fry my Teensy 3.2?


    I need to be able to switch a load (8v , 0.5A) on/off with a Teensy 3.2.

    I was initially planning to drive a MOSFET with Teensy, which would turn the power on/off on a traditional regulator, like this one, but then came across a "smart" regulator (

    The neat thing about this particular DROK reg is that it has an "Enable" pin, which, if pulled to GND, disables the output. This is exactly what I needed.

    I got it and started using it - and it seems to work fine, saving space and simplifying the design.

    However, being a non EE, I have a tingling sensation that I might be risking to fry my Teensy.

    I see two ways to wire this up, would really appreciate feedback on the "right" way.

    #1. Connect some digital OUTPUT pin from Teensy to the "enable" port of the regulator (say via 1k Ohm resistor).
    Now, when I drive the pin low - regulator turns off, when I DigitalWrite(1) - reg turns on. When Teensy is not powered - the regulator is ON by default (since "enable" pin is held high by the reg)

    #2. Connect "Enable" port on the reg to the common GND (say via 3k Ohm resistor), and connect T3.2 pin to "enable" port on the regulator (say via 100 Ohm resistor).
    Now, the reg is always OFF, unless I DigitalWrite(1) on the T3.2 pin that's connected to the "enable" port.

    Both models work in practice, when I test them. I prefer #1 - as I would like to keep the regulator ON when Teensy is not powered.

    The thing is, voltage between "enable" pin on the regulator, and the common GND is about 7v. (Again, if left un-grounded - the regulator is ON.)
    When I ground the "enable" pin on the reg via multimeter - I see 60 micro Amps flowing from "enable" into common GND.

    I suppose in the wiring model #1 - Teensy would have to be "sinking" that current. Is 60 micro amps safe to sink through a digital pin (say pin 13)? Will the fact that the reg's "enable" port is initially held at 7v pose some frying risks, or should I assume that the voltage will drop quickly and be under Teensy's safe limit? Am I even right being concerned about the voltage on an OUPUT pin?

    In the model#2, I guess the same is true, most of the current is going to flow to GND through the digital pin on teensy, but will fact that there is resistor always pulling the "enable" pin to GND somehow make it safer?

    Sorry if this sounds like nonsense, my intuition for Ohms law has gone the way of my hair.


  2. #2
    Any thoughts?

    Do I risk damaging a GPIO on Teensy 3.2, if it is connected to a source of 7v via a 4 KOhm resistor, and the source of that 7v is such that it drops to 0.2v when as little as 60uA (micro amps) of current are drawn.

  3. #3
    Senior Member
    Join Date
    Apr 2013
    There are some unasnwered questions here so tricky to provide perfect answers.

    Putting 7V without current limit straight into a Teensy will damage things, though the input protection may mean the GPIO is not where the smoke comes out.This is not unlimited though, depending on the enable circuit you may find the protection keeps it at no more than ~5V, using a diode which may mean you cannot be un-enabled.

    In this case it sounds like the enable pin is pretty robust and low current so toggling the pin between enabled and OUTPUT may work (not HIGH and LOW as 3.3V HIGH is going to pull from a nominal 7V enable). Teensy GPIO are good to 10-20 mA (not micro) so you have a bit of head room on that count, so if you just want to try come up with a resistor value that cannot provide more than 10mA from 7V (your 1k looks good) and explore what happens with pin disabled,input, inputpulldown and output-HIGH and output-LOW. This runs a low not not zero risk of letting the smoke out if things are not quite as they appear, but a lot quicker than doing lots of maths or modeling. You may find you cannot actually prevent the input circuitry grounding the enable pin hard enough to trigger it, so either need a 50/50 resisive divider or a transistor circuit to gnd the pin.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Quote Originally Posted by greg View Post
    Do I risk damaging a GPIO on Teensy 3.2, if it is connected to a source of 7v via a 4 KOhm resistor
    Yes, risky. The 5V tolerant inputs don't implement clamping diodes.

    If you also connect a diode between the pin and 3.3V, then together with the resistor the pin's voltage will be limited to approx 3.9V, than that would be fairly safe. But only safe as long as you never operate Teensy in an extreme low power mode, where the resistor current is more than Teensy's entire power usage.

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Colmar, France
    Why not using an optocoupler to make things more secure?

    The optocoupler's internal LED would be driven by the Teensy through a current limiting resistor and the optocoupler's internal transistor would then pull down the enable signal to ground when lit. Easy, cheapo, and secure.

  6. #6
    Thanks, guys! Really appreciate your thoughts.

    Wanted to avoid complexity, so kept on playing with this. Finally, we got what we "think" should be safe.

    We connect the "enable" port of the reg to common GND via a 10k resistor, and pin 13 to "enable" via 1k. Now, seems like there is no way for that pin to ever go over 5v (in fact, its kept at 0.5v max by the 10k res when floating, driven to 3v when we DigitalWrite(1) on pin 13, and near 0 when we DigitalWrite(0). Does this look right right to you, or should I go back to elementary school to study Ohm's law?

    Click image for larger version. 

Name:	RegExplain.jpg 
Views:	18 
Size:	87.6 KB 
ID:	16533

Posting Permissions

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