Dual powering arduino. Possible problem?

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I looked at the powering schematic for arduinoi nano. Docs say that if i need to use external power i must connect it to +5V pin which is used as +5V output pin when powering from USB. The power selection is made by a diode.

 

What would happen if i have both powers connected and external power goes very low, say, +3V. I think condition when Udiff between Uusb and Uext is higher than Vf of the diode will (may) create a short cicuit. Am i right about it?

 

Also, if i need to power peripherals (modules) only when external power is present (need over 1A) should i use ADC to check external power rail going separately from external PS and use MOSFETS as switched to provide power to other parts of circuitry?

 

This topic has a solution.

Artem Kuchin.
Electronics hobbyist. Born in 1976.

Last Edited: Mon. Dec 4, 2017 - 07:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ArtemRu wrote:
I looked at the powering schematic for arduinoi nano.

It helps to show a schematic of the circuit in question, hopefully this is the same:

 

The input to the 78m05 needs to be above 7 volts to get 5v out, so if you want to monitor the VIN voltage level, be sure to use a voltage divider resistor network to feed your ADC.

D1 above prevents the VCC 5v from backfeeding into the USB circuits, likewise the 78m05 will do the same for the VIN circuit.     With VUSB usually in the range of 4.7 - 5.0v, the Vf of the D1

will prevent it from powering the AVR and anything else connected to VCC 5v as long as the VIN is above 7.0 volts.    If you lose VIN (or it drops much below 7.0v) then power will be sourced from VUSB

if present.    Hope that helps.

 

Jim

 

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

Last Edited: Thu. Nov 30, 2017 - 01:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lost my reply!  As long as VIN is above 7.0 volts, it will provide power to the circuit, if it drops below that level, then power will be provided from VUSB thru D1.

Since power is limited from VUSB (usually to 0.5 amp), if your circuit needs more power then that, then Yes, you will need a way to shed power hungry external devices (p-channel high side mosfet would be one such way)

 

Jim

 

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank for the reply, but in my case Vin is not used.

I used +5V pin to  supply stable +5V from external source. Vin is not connected, so 78m05 is not used.

But that power supply may fail. If it gets only +3V on +5V pin then D1 will be open and we have +5V and +3V connected at the same point.

I don;t know how output part of external power supply is organized, but in worst case it seems like we have a short cicuit here. Should i add a zenner diode from external power supply too?

 

Artem Kuchin.
Electronics hobbyist. Born in 1976.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Place a Schottky diode (such as a B540c) in line with external power, similar to the one used in the VUSB line but rated for expected current.

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If powering the nano via the +5V pin, you should place a diode (with low VF) between the power supply and the +5V pin 

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the external power supply, which is normally 5V, drops to 3V, then yes, that is a problem.

If the USB is connected, then the USB will be "back feeding" the external power supply, and will be trying to raise the 3V back up to the VUSB (almost 5V) level.

 

So, if one has two power supplies connected to the circuit then the "easiest" way to protect the supplies and the circuitry is for each of them to have a diode in series with their V+ supply line.

On the schematic shown above, the VUSB supply has this diode shown.

 

You ought to check YOUR specific board and make sure that that diode was included.

 

As mentioned above, already, the +5V pin does not have such a diode included from the physical pin to the remainder of the circuit.

So, if you expect to use both power supplies, and you fear that your external power supply may go low, then you should add such a diode in series with its V+ line.

When added, the VUSB supply can supply the circuit board, but it will not be back feeding into the external power supply.

 

Know that the drawback to such a system is that the diodes will have a small voltage drop across them when their supply is providing current to power the circuit.

For many circuits whether you run the board at 5.2 V, 5.0 V, or 4.4 V, etc., may not matter much.

 

But it can matter if the micro is running at its maximum rated clock frequency, and that maximum clock frequency is operating voltage dependent.

i.e. the micro might be "in spec" running at 20 MHz only if the Vcc is 5 V, (not 4.4 V plus 0.6 V across the diode...).

 

Additionally, other circuity might well expect a "regulated" 5 V supply.

 

Lastly, if you have external devices that require 5V at a fairly high current then do NOT power them through the micro's PCB.

Run your 5V supply directly to the devices, and DO have a common Ground connection for the micro and the other devices.

 

How you turn those devices on and off depends upon what they are, (obviously).

 

If you are using the USB connection for serial communications, then it might work out well to power the micro and the PCB from the USB, and NOT connect an external power supply to the PCB.

You can, however, use the external power supply to power the other, external, power hungry devices, (with a common Ground connection).

 

JC

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With the Arduino Nano, I will usually convert it to 3.3V by first removing the 5.0v three-terminal regulator and replacing it with an AMS1117_3.3, a 3.3V voltage regulator in the same package.  Then I lift the pad of the surface mount Shottky diode on the side that is not connected to the USB 5.0V Vcc from the Nano PCB using a low-watt soldering iron and box-cutter blade.  I solder a 30AWG wire-wrap segment between the lifted cathode of the Shottky diode and the Vin tab of the AMS1117_3.3.   Now the 5.0v VUSB becomes 3.3 v for all the AVR and Nano circuitry.  On TFT displays, there is usually a three-terminal small regulator that takes the 5.0v (actually about 4.7v after the Shottky diode) and converts it to 3.3v for the TFT use.  There is a pair of pads on the TFT that connects the on-board regulator's input pin to its output pin.   Jumping these two pads bypasses the regulator on the TFT and allows the TFT to use the 3.3V from the Nano board.  The Nano also supplies 3.3v for any RDA5807m FM radio module board and any real-time clock (like a DS3231/24LC32 I2C module) and any other 3.3v device.   The last device I installed on an Arduino that required 5.0v was a PS2 purple-connector mini DIN-8 keyboard.  MIDI devices are designed to run on 5.0v but can run on 3.3v if you reduce the value of the resistor that are connected to the MIDI OUT jack from 220 ohms to about 150 ohms.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you everyone. About dual supply it is clear now.

Now the second question about powering some modules only when external power supply is present.

 

Here is what i think about:

 

 

 

Total current will be AT MOST 2A, which will create a drop voltage on mosfet of 0,053*2=0.1V which is very acceptable.

10K transistor on gate is to drain charge from gate when EN is floating. Need to close it for sure.

2M resistor is basically for the same reason. When transistor is fully closed i need to make sure that Vcc line to LOAD

is not floating and at GND level.

 

Is everything ok here?

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just realized that this is wrong! When MOSFET opens the voltage as SOURCE will rise, so, Vgs will drop and mosfet will close and thus it will oscillate.

But if i put load on the drain side (upper) side then i don't know how to pull power line for these modules to GND when not open.

Pribably N-channel mosfet will not wok. Need to think more.

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aha, below is a new scheme with P-channel mosfet. By default pins on atmega are in hi-z state, so, 10K resistor will close the mosfet. When pinn outputs LOW transistor is open.

While it is closed 2M resistor pull floating power line to GND. +5V here is always ON, no matter what power supply is used. So, power supply probing is done separately.

Now i hope it work as i need it.

 

 

 

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Correct, use P-channel for high (power) side switching, and use N-channel for low (gnd) side switching.

BTW the 2M resistor on the drain of your p-fet above is not needed.  

 

 

Jim

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What 2M resistor is not needed? The line will just float without it when mostfet is closed. Currently when +5V line is floating with common ground connected i hear terrible clicks from sound module.

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ArtemRu wrote:

What 2M resistor is not needed? The line will just float without it when mostfet is closed. Currently when +5V line is floating with common ground connected i hear terrible clicks from sound module.

In the diagram above, the "load" prevents the drain from "floating", that was why I said it was not needed.  Nothing was said about this being an audio application, so I'll bow out!

Good luck with your project.

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, not every real load is just pure resistance to GND:)

 

Thank you, ki0bk, for your time and attention.

 

Artem Kuchin.
Electronics hobbyist. Born in 1976.