Author Topic: Power supply for an microcontroller kit  (Read 1630 times)

0 Members and 1 Guest are viewing this topic.

Offline romhunterTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: vn
Power supply for an microcontroller kit
« on: November 01, 2018, 10:23:46 am »
Hello, I'm in the process of designing a microcontroller kit (for AVR, PIC, and some chinese micros). The problem I'm facing is that I need that kit to be able to get power from either USB or an external DC power supply without something blow up. Both of those thing could be attached at the same time, and I'd prefer the external supply to power my circuitry.

Can someone suggest me an idea of what should I do?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19962
  • Country: gb
  • 0999
Re: Power supply for an microcontroller kit
« Reply #1 on: November 01, 2018, 10:37:41 am »
If both power supplies are connected, how do you determine which one is used?

If you just want to take power from the source with the higher voltage, then an ideal diode circuit can be used.
https://docs-emea.rs-online.com/webdocs/0a82/0900766b80a826bb.pdf

If you want to select which power supply is used, based on an external input, then some additional logic (possibly another MCU) and switching (transistors or relay) is required.

Another possibility is a SPDT switch to manually select between power supplies.
« Last Edit: November 01, 2018, 10:43:32 am by Hero999 »
 

Offline romhunterTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: vn
Re: Power supply for an microcontroller kit
« Reply #2 on: November 01, 2018, 10:41:09 am »
If you just want to take power from the source with the higher voltage, then an ideal diode circuit can be used.

Basically the external one range from 9-12V, got regulated down to 5/3.3V, I'd like to use it when possible. USB should only be use when external supply is unavailable
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19962
  • Country: gb
  • 0999
Re: Power supply for an microcontroller kit
« Reply #3 on: November 01, 2018, 10:45:04 am »
If you just want to take power from the source with the higher voltage, then an ideal diode circuit can be used.

Basically the external one range from 9-12V, got regulated down to 5/3.3V, I'd like to use it when possible. USB should only be use when external supply is unavailable
Where is it regulated down? On the board? If so, it makes it easier.
 

Offline romhunterTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: vn
Re: Power supply for an microcontroller kit
« Reply #4 on: November 01, 2018, 11:11:56 am »
Yes, it will be regulated on board.
 

Offline spudboy488

  • Regular Contributor
  • *
  • Posts: 136
Re: Power supply for an microcontroller kit
« Reply #5 on: November 01, 2018, 11:41:07 am »
Low Vfwd diodes to steer the supplies. What I did on my board was to have a 3 pin header and jumper to select USB or external power sources
« Last Edit: November 01, 2018, 11:46:14 am by spudboy488 »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Power supply for an microcontroller kit
« Reply #6 on: November 01, 2018, 11:51:11 am »
Study the schematic diagram for most of the Arduino circuits. Most of them have quite clever and elegant implementation of exactly what you are describing.  Automatically selecting either the 5V from USB input, or the 7~12V input from the "barrel connector" (or the header pins, etc.)
 
The following users thanked this post: romhunter

Offline technix

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Power supply for an microcontroller kit
« Reply #7 on: November 01, 2018, 01:08:14 pm »
A simple way is set your VIN regulator slightly above 5V (ex. 5.2V for my usual TPS563201 VIN buck converter) and put a diode in VBUS. This way the external power is always slightly higher than USB and there is no risk of backfeeding.

You can read my published schematics for SushiBits ARM Classic, which included VIN to 5V regulator using TPS563201, VBUS/regulator current steering, and a subsequent 5V to 3.3V regulator using TPS562200.
« Last Edit: November 01, 2018, 01:11:07 pm by technix »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19962
  • Country: gb
  • 0999
Re: Power supply for an microcontroller kit
« Reply #8 on: November 01, 2018, 09:14:51 pm »
Study the schematic diagram for most of the Arduino circuits. Most of them have quite clever and elegant implementation of exactly what you are describing.  Automatically selecting either the 5V from USB input, or the 7~12V input from the "barrel connector" (or the header pins, etc.)

https://eelabs.wordpress.com/2014/04/14/schematic-and-inputoutput-pins-explain-for-arduino-uno-r3/
http://www.fecegypt.com/uploads/dataSheet/1522237550_arduino%20uno%20r3.pdf
 

Offline romhunterTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: vn
Re: Power supply for an microcontroller kit
« Reply #9 on: November 02, 2018, 04:31:30 pm »
Study the schematic diagram for most of the Arduino circuits. Most of them have quite clever and elegant implementation of exactly what you are describing.  Automatically selecting either the 5V from USB input, or the 7~12V input from the "barrel connector" (or the header pins, etc.)

Thanks for the tips. I've choosen this design to be implemented in my design. It's quite clever and fit my needs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf