I am using a H-bridge L298N to run
2 x 12V 1 amp DC motors
and i am using a 12V 5amp power adapter to run the motors.
My concern is.
can i supply power to arduino uno with the same 12v 5amp power adapter without damaging my arduino?
or should i supply power to arduino with different and separate power source?
what is the safest maximum power voltage and amp i should use to run the arduino?
Should be fine. IF you don't drive a lot with the Arduino (5V, 3,3V and IO). Aka <10-20mA.
lordstark:
what is the safest maximum power voltage and amp i should use to run the arduino?
That question does not make sense if you know power, voltage and current (amp) are three completely different (but linked) things...
But because an Arduino is voltage controlled, that's the only parameter that counts and the recommended max is 12V. It will then draw the current it needs which will give you a power rating.
P = U x I (or P = V x I for Americans)
will arduino only take what it requires from the supplied power?
Correct.
However, you may run into problems with running the pump and the Arduino from the same power supply, as motors generate severe electrical disturbances that can reset the Arduino, cause it to malfunction, or even destroy it.
One approach is to have two power supplies and connect the grounds together. Another is to use "power supply decoupling", using a small series resistor and large capacitor to ground, between the motor power supply and the Arduino RAW input.
lordstark:
will arduino only take what it requires from the supplied power?
Yes
But I think you find it hard to understand because you're analogy is flawed.
lordstark:
if i supply 12V power to arduino
No, you supply 12V, period. That power might come from a power supply which can be the analogy of a (constant pressure) water pump. The pressure is the analogy of volts.
lordstark:
and the current is 5amp ( the size of water pipe)
The size of the water pipe would be the analogy to the resistance in the wire. The analogy of current is the rate of flow (aka liters per minute). The max current rating of the power supply (5A here) has "the maximum rate of flow the pump can produce (if you just connect it's input and output with a big pipe)"
And the Arduino need a constant pressure, just like you're washing machine at home. And just like your washing machine, the Arduino determines how much current flows (water flows).
The analogy of power is a bit harder. In electricity that's the product of voltage and current (P= U x I). So with water it's the product of flow rate and pressure. Think of it as the force it can have on an object. If the pressure is low you need a lot of water to feel the force. But if the pressure is high, even a small jet is powerful.
So Ohms law:
I = U / R
is in hydraulics:
Q = p / R
And power
P = U x I electrical
P = p x Q
PS If you're American, read U as V
PPS It's actually ΔU and Δp (delta aka the difference) but we tend to simplify the writing for electrical so I did so for hydraulic.
I am using a H-bridge L298N to run
2 x 12V 1 amp DC motors
and i am using a 12V 5amp power adapter to run the motors.
My concern is.
can i supply power to arduino uno with the same 12v 5amp power adapter without damaging my arduino?
or should i supply power to arduino with different and separate power source?
what is the safest maximum power voltage and amp i should use to run the arduino?
kind regards
Without you giving full details of the hardware, its impossible to say - that means if possible datasheet
link for each piece of hardware.
To me a "1A" motor might mean 1A idle current, 1A nominal, or 1A stall current, which are very very
different motors, but I have no way to check unless you tell us. If the stall current of each motor is
below 2.5A the power supply will dropout and probably not manage to power the Arduino without
reseting.
Some 5A power supplies will cutout immediately if the current reaches 5A or above, others may trip and
stay off until power cycled, some will struggle at high current but recover gracefully.
In general its a bad idea to share power supplies between motors and logic circuitry, owing to the
noise spikes and dropouts that motors put onto their supplies.
I guess there will be only a problem of getting overheated at 12v, the voltage can be extended up to 25v also But the better suggestion is to give different power supply of around 9v to Arduino.