How can i control the amperage with Arduino?

Hi, i need to control the output amperage with arduino, any idea about how can i do it?

What device are you controlling, how much current?

.

LarryD:
What device are you controlling, how much current?

.

Hello, thanks the reply.

That's the problem. I have a device that need to oscillate the amperage between 2A and 200mA. So i have to give different amperage to the same device in real time.

Recommend you get a D/A converter, Adafruit has some.
Then google transistor constant current source.
The two together should give what you need.

You will need an external power supply.

.

I have a device that need to oscillate the amperage between 2A and 200mA.

This is not a simple problem.

The easiest way to solve it is to buy a programmable power supply with an adjustable current limit. Expect to pay between $300 - $1500.

Exactly what is your application?

If the load is constant and known, a known-variable voltage will give you a known-variable current and it's a lot easier to control the voltage. ...Not easy, but easier.

Can you use PWM or do you need pure DC?

Of course it's also important to know the required voltage and/or the load impedance/resistance (Ohm's Law).

You can look-up "constant current power supply chip" or "constant current power supply circuit".

...I know you don't really want constant current, but that's generally how you differentiate what you're trying to build from a normal constant voltage (or variable-voltage) power supply.

You'll probably have to make modifications to make the current variable-controllable but that shouldn't be too difficult ...if you can understand how the circuit works.

Most constant current power supplies are switching designs which makes them more complicated but that should also make it easier to control with PWM from an Arduino. On the other hand, with only 200mA you can get away with a linear (non-switching) design as long as the impedance is low enough that you don't need to boost the voltage.

What is the load? Motor, LED, pure resistor?

There are plenty of current controller chips available, many act like switching power supplies to control the current.

DVDdoug:
Exactly what is your application?

If the load is constant and known, a known-variable voltage will give you a known-variable current and it's a lot easier to control the voltage. ...Not easy, but easier.

Can you use PWM or do you need pure DC?

Of course it's also important to know the required voltage and/or the load impedance/resistance (Ohm's Law).

You can look-up "constant current power supply chip" or "constant current power supply circuit".

...I know you don't really want constant current, but that's generally how you differentiate what you're trying to build from a normal constant voltage (or variable-voltage) power supply.

You'll probably have to make modifications to make the current variable-controllable but that shouldn't be too difficult ...if you can understand how the circuit works.

Most constant current power supplies are switching designs which makes them more complicated but that should also make it easier to control with PWM from an Arduino. On the other hand, with only 200mA you can get away with a linear (non-switching) design as long as the impedance is low enough that you don't need to boost the voltage.

I'm a trying to make an universal Wireless cell phone charger, so i have to variate the amperage to make it universal, as you know some devices need 200mA, others 2A. It has a constant voltage (5V).

nicoloso100:
I'm a trying to make an universal Wireless cell phone charger, so i have to variate the amperage to make it universal, as you know some devices need 200mA, others 2A. It has a constant voltage (5V).

That makes no sense at all.

Most if not all cell phones use a 5V input with the battery charge current controlled by the charger circuit inside the phone itself. You do not need to control the amount of current going into the phones 5V input. Probably a bad idea to attempt to do this.

And what has 'Wireless' to do with it ??

Charging the (Lithium) batteries in phones needs to be done very carefully, they can and do explode if you get it wrong.

How much experience do you have in electronics and battery charging in particular ?

nicoloso100:
I'm a trying to make an universal Wireless cell phone charger, so i have to variate the amperage to make it universal, as you know some devices need 200mA, others 2A. It has a constant voltage (5V).

And you are entirely clueless about how it works. The charging process is controlled entirely by the controller built into the phone. Trying to force more current into the device than the charge controller is allowing will break things. The only thing that different amperage controllers can do is have some way of telling the charge controller how much amperage they are able to supply.

An example of this are when you have two outputs on a charger that are rates for different currents (like 1.0A and 2.4A on one of my battery banks). There isn't two separate voltage supplies connected to the different outputs; there's only one regulator connected to both. The difference is that one output has the Data lines unconnected, and the other has voltage dividers on the Data lines to signal a higher amperage ability. It's up to the phones charge controller to interpret the signal on the data lines to know if how much amperage it can request.

It's the same for wireless charging. The dock makes power available, but it's the charge controller that decides how much to accept. You can't force more into it wants.

1.0A output

2.4A output

srnet:
And what has 'Wireless' to do with it ??

You have not heard of wireless charging in your part of the world then?? Look up "samsung wireless charging" in google

From a noob to another, you don't "force" amperage (current) into a device, the device pulls what it needs.
A power supply that is capable of feeding 2A will work ok for feeding 200mA.
Things only get complicated when you need to make sure that the device will not pull more that it can handle, that's a problem with LEDs, so there's need of a power supply that limits the current to a safe (pre-programmed) level (that's a constant current power supply).
It is not a problem with a thing like a mobile phone that have charging circuitry inside, it would be a problem if you were feeding a battery directly, but you are not. In fact what the charging circuit inside do, is make sure that the battery only get what it needs.
It is irrelevant in this case if the charging is wireless or via the normal usb connection.

ocsav:
From a noob to another, you don't "force" amperage (current) into a device, the device pulls what it needs.

This is NOT an absolute rule. Constant voltage power supplies work this way, but constant current power supplies will force a set amount of amperage into the device, and will apply whatever voltage they can (within their limit) to push that current.

The vast majority of power supplies that you will commonly come across are constant voltage, but you should be aware that there are other types.

ocsav:
From a noob to another, you don't "force" amperage (current) into a device, the device pulls what it needs.

Not quite true. The anodising process uses constant current for the best results. It varies the voltage to keep the current the same

--
Mark

I stand corrected. That's what being a noob is.
But I'm having a hard time wrapping my mind around that concept. I thought that cc power supplies worked by lowering the voltage according.
I used to see power sources as wheels, the circuit would "drink" what it wants and that cc power supplies were a way to make sure it wont "drink" to much. What you are saying is that some power supplies do have a pump ?

But I'm having a hard time wrapping my mind around that concept. I thought that cc power supplies worked by lowering the voltage according.

An ideal constant voltage source will have a constant voltage between it's terminals, and supply whatever current (positive or negative) is required by the rest of the circuit to maintain that voltage.

An ideal constant current source will force a fixed current through it's terminals, and apply whatever voltage is required by the rest of the circuit to use that amount of current.

Ideal devices are only a fictitious abstraction though. Real devices have imperfections, or can borrow certain aspects from the different ideals and combine them into a new device.

What you are probably thinking of is the constant current limiting circuits that are often used on the output of a power supply. When the current demand is below the current setting, it acts as a constant voltage source. When current demand rises above the limit, it switches to constant current mode and reduces the applied voltage.

It's important to remember that a current limited power supply is a composite device, and this direction of thinking is only one way of looking at it. You can also go the other way. When the voltage needed to create the specified current is below the voltage setting, the supply acts in constant current mode. When the voltage requirement gets to high, it switches to constant voltage mode and reduces the applied current.

These two ways are just mirror images of each other. A constant voltage supply with current limited is not any different from a constant current supply with voltage limiting. Neither is more correct than the other, but depending on context one will tend to be more useful than the other.

I used to see power sources as wheels, the circuit would "drink" what it wants and that cc power supplies were a way to make sure it wont "drink" to much. What you are saying is that some power supplies do have a pump ?

That analogy is not wrong, because it is a good way of thinking about certain kinds of power supplies; namely, ones that are meant to be used primarily as a constant voltage source and use current limiting as a protection feature. Just keep in mind that there are other types of power supplies that work differently, and require a different analogy.