Need to switch 5V from 3.3V Trinket Pro

Discussion in 'General Electronics Chat' started by PickyBiker, Mar 7, 2016.

  1. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    I am using an Adafruit Trinket Pro 3.3V and I need to use one of it's digital outputs to apply 5V power to another board that only draws 30ma. It needs to be positive logic so that a high on the trinket pin applies 5V to the second board. The 5V source I have is regulated and filtered. I would like the switch circuit to use a few components as possible. An IC would be okay if it can work with 5V.

    What would a switch like that look like?
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    If your trinket gives out 3.3v and you want to switch 5v, the you need an npn transistor to pull the load down to switch it on, or use two transistors to switch the positive supply side.
     
  3. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,736
    [​IMG]
     
  4. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    GopherT, How can that deliver 5V at 40ma to the output?
     
  5. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    Expanding on DD's suggestion:
    SupplySwitch.PNG
     
    Dodgydave likes this.
  7. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    It seems this would be easier and use fewer components if I reverse the logic and use a single PNP transistor, like this. I will just need to set the Trinket output pin low when I want power to the other board.

    I think this will work.
    upload_2016-3-7_11-30-29.png
     
  8. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    With that setup, the PNP base will never go above 3.3V (if it even reaches that), so the PNP will be permanently switched on.
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    What you have in post #7 will work with two signal diodes in series with the base and a resistor from base to emitter. Or, without changing your original question at all, two options.

    1. Reed Relay with suppression diode built in: http://www.digikey.com/product-deta...lectronics/SIL03-1A72-71D/374-1322-ND/3131688

    2. Opto coupler, either a standard transistor output kind or a photomos power switching part, with one current limiting resistor.

    ak
     
  10. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    Alec_T, yes, I see that, thank you. Here is a change I think should fix that.
    upload_2016-3-7_15-48-52.png
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    When IC3 pin 10 goes low it will sink about 14mA. I'd increase R1 to reduce that.
     
  12. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    I'm not sure how that should be calculated. I looked at the datasheet for the 2N2907 to see if I could determine the maximum base current flow but I didn't see it. I admit I don't know what a lot of the specs mean.

    A guess would be that 670 ohms should drop that to a little over 5ma. Is that large enough?
     
  13. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    The old rule of thumb is that the base current should be 10% of the collector current for hard saturation. 50 years later, 20 or 30 to 1 are ok if you need to conserve battery power. Anything from 470 to 1K is fine, with 10K to the emitter for turnoff.

    ak
     
  14. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    Thanks Analog Kid and Alec_T

    Appreciate the help.
     
  15. PickyBiker

    Thread Starter Member

    Aug 18, 2015
    56
    1
    FYI: Made the circuit with 10k and 1k... works just fine. Thanks again.
     
    Dodgydave likes this.
  16. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    Good to know it works.
     
  17. marcf

    Member

    Dec 29, 2014
    136
    19
Loading...