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

Thread: USB/BATTERY power switcher without altering the teensy board ?

  1. #1

    USB/BATTERY power switcher without altering the teensy board ?

    Hello,

    I try to make a power switcher for a teensy board

    Click image for larger version. 

Name:	Untitled.jpg 
Views:	34 
Size:	41.2 KB 
ID:	15116

    my problem is the thick wire in the schematic, is it alright to do so ? what if usb and batteries are plugged together ? should I add a diode ?

    thanks

  2. #2
    nobody ???

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,997
    The question and the answer are trivial. You need to prevent battery current from flowing into USB and USB current from back feeding the 7805. Thus, you might drop all the resistor, opamp and mosfet stuff and just use a dual schottky diode like the BAT754C. Connect the 78(L)05 output to pin1, USB power to pin2 and pick the power to the Teensy from pin3.

  4. #4
    well indeed, I really dont understand why arduino boards use this kind of setup while a simple diode should be enough

    https://www.arduino.cc/en/uploads/Ma...-schematic.pdf

    if someoneone would enlight me on this..maybe the NCP1117 allows such a setup

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,997
    That's relatively easy to explain: These Schottky diodes have a voltage drop of about 350-400mV. Thus, a 5V Arduino would have problems with the 5V ADC reference and 5V related analog PWM when "only" fed with 4.6 or 4.7V. A Teensy 3.x works with 3.3V and its voltage regulator doesn't really care if the input voltage is 5.0 or 4.6V, there is enough overhead for proper and clean voltage regulation.

    I've been wondering for a long time why PJRC does not use a dual diode array on its T3 boards instead of that Vin-Vusb trace which needs to be cut or not.

  6. #6
    yes, totaly, I thought the same, why not design teensy with a diode

    but why is there no diode on the arduino schematic to protect the VREG ????

  7. #7
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,997
    Albert Einstein has probably an answer...

    Click image for larger version. 

Name:	Albert-Einstein-Quotes-1.jpg 
Views:	7 
Size:	67.0 KB 
ID:	15133

    If not, there is still the assumption that in the Arduino schematic, there is a different voltage regulator (an 1117-5) which can probably deal better with reverse voltage feeding than the old, asthmatic and outdated 78xx series.

  8. #8
    Quote Originally Posted by curtis newton View Post
    maybe the NCP1117 allows such a setup
    lol....well I'll do add a diode, so I get the nice mechanic and I protect the regulator too

    I like to cut off the battery if the usb is plugged, quiet ellegant....and there is no need to discharge the battery if the usb is plugged in

    tahsnk for the support dude ;-)

  9. #9
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,997
    I'd go for the dual diode solution, though. That would have worked 40 years ago when I started tinkering with electronics, it works nowadays, thus we might extrapolate that it will still work in another 40 years.

  10. #10
    2 diodes ? you mean one from battery, one from usb I guess

  11. #11
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,997
    Quote Originally Posted by curtis newton View Post
    2 diodes ? you mean one from battery, one from usb I guess
    That's what I wrote above:
    Quote Originally Posted by Theremingenieur View Post
    (...) just use a dual schottky diode like the BAT754C. Connect the 78(L)05 output to pin1, USB power to pin2 and pick the power to the Teensy from pin3.
    Man, I'm not a native English speaker/writer. But this does look relatively clear, doesn't it?

  12. #12
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,986
    Quote Originally Posted by Theremingenieur View Post
    ...
    Man, I'm not a native English speaker/writer. But this does look relatively clear, doesn't it?
    Yes, Seems too easy. Looked at Digikey:: Voltage - Forward (Vf) (Max) @ If :: 600mV @ 100mA
    Datasheet shows that as 'TYP'ical and MAX 420 mV at 30 mA

Posting Permissions

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