Variable DC voltage adjust with arduino

I have a voltage source which is around 100 volts 12amp max, and I would like to control and vary the voltage with an Arduino. How do I do that.?
Please suggest circuits which can be used.

AC or DC ?

ON/OFF control ?
How often ?

No.. no ON/OFF
I would like to vary the voltage from 60 to 100 according to my need.

AC or DC ?

How often/fast ?

1 Like

Does your voltage source allow for external control? Much of what you are asking really depends on your source. Some sources allow for external output control and some do not. Those which do generally have an input scaled to their output range. If you have a fixed 100 volt DC capable of 12 amp supply then being able to vary the output will not be easy. You really need to provide a good sescription of your voltage source, in detail like power supply make and model number.


The source is actually from solar panel which I want to decrease as per my need to control the ampere as per my need..

Though if the generated power is below my requirement due to less sunlight, then there will be no need to control..

I hope ai have been abke to explain what i want to do.

You can mechanically pull a cover over the solar panel.

1 Like

:frowning: That would be fairly advanced electronics and it would probably have to be custom built. And anything over about 50V is considered "dangerous" which adds to the difficulty in testing/troubleshooting/debugging.

That makes things more confusing... Normally you control the voltage and that indirectly controls the current, based on the load... Voltage, current (amps) and resistance are related by Ohm's Law. We don't always know the resistance but resistance is "the resistance to current flow"... Less resistance means more current. Higher voltage also means more current.

There are special-purpose constant current (or "controlled current") power supplies, and in this case the voltage depends on the load. They are rare, except for some LED power supplies.

In most cases the voltage is constant (or "independent"). For example, here in the U.S., we have 120VAC at the power outlet. If nothing is plugged-in no current flows but the voltage is always there. If we plug-in a 100W lamp and turn it on, about 1 Amp flows. If we plug-in a toaster or hair dryer, it may take 10 or 12 Amps. If we connect a toaster and a hair drier at the same time we get excess current, a circuit breaker blows, and voltage suddenly drops to zero.

It's the same if you buy a power supply... If you have a 12V / 10A power supply, the 12V is constant and the 10A is available. If you connect a regular little LED with the usual current limiting resistor you'll get 10 or 20 mA. (If you connect the LED without a resistor you'll get the full 10A or more and the LED will burn-out.)

BTW - Power (Wattage) is the product of Voltage x Current.

It all depends on the application but in the case of a solar panel we usually want a constant voltage. That usually means we want more than the minimum voltage with some kind of voltage regulator circuit (to hold a constant voltage out) and maybe something to disconnect it when there's not enough sun and voltage drops to an unusable or unacceptable level.

You can buy low-voltage regulator chips but higher voltage (and higher current) regulators are usually specialty-built.

1 Like

No, it clearly sounds as if you are posing an "XY Problem".

As others have pointed out, you have not actually described what it is you need to control or why. :worried:


Hiii @nemo4all


Do you have your PV charging some batteries?
Are you talking about a GridTie system?

We need more info about your system.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Ok.. To be more clear firstly I forgot to mention that the source is DC voltage.
In my application on a proper sunny day my panels generate around 100 volts 10amps...
Now that is connected to a solar MPPT charger and the MPPT charger converts that panel voltage to 24V DC @ 40amps max which is directly connected to the battery.
Now the load, the battery and the output of the MPPT charge are all three connected in parallel.

Now that I do not want to charge the battery with more than 20amps, the charger restricts the output to 20amps until the battery reaches 80% charge wher the battery stops drawing more than 20 amps, and then the charger removes its amp limit, so that the generated output amps can be shared with the load as well as the battery.

What I want to do is continuously measure the amps required by the load and control the voltage input to the MPPT charger to control the output amp of the charger and remove the limit.
In this way if the load requires 5 amps and I do not want to provide more that 20amps to the battery i can control the panel voltage input to the charger to output only 25amps of the charger.
An in case there is clouds and the generated output from the charger is below 25amps the load will draw the rest of the amps from the battery, which I do not have to control.

I hope this time it is much more clear.

What do you want to do with the difference? Do you want to heat water? Do you just want to heat the air? As I pointed out in the beginning, you need to reduce the power generated by the solar panel to do what you require, unless you just dissipate the excess power.

That is what I have explained..
Covering the panel partially and reducing power geneated is not good option, as cells may get damaged.
So I want to use pwm from arduino and mosfets and control the panel to charger voltage input.

Nope. You have mentioned an undefined "load" several times. It's not clear what that load is.
Besides, what you want to do sounds like bypassing the protection circuitry of the battery charger, which is risky business at these power levels. I hope you've got a good fire insurance.
This is going to be much more complicated than throwing an arduino and a couple of mosfets at it. At least it will be if you want it to be safe and all components to have an acceptable service life.

I'm puzzled.
You need to understand your PV cells are not voltage but current sources.
Can you draw a basic diagram of your system and where you want to control?

Not possible, your MPPT controller will fight you every step of the way.
First off, your MPPT measures the power output characteristic of your PV panels not the voltage and converts the ENERGY to make as efficient conversion of that solar energy to charge current.
If you start controlling the PV panel input to the MPPT it will not be able to find the best load to convert that energy to charge current and your efficiency will go down the drain.

What savings will your scheme have?

Tom... :smiley: :+1: :coffee: :australia:

1 Like

Not sure how much sense that makes, but it becomes clear that the battery controller will control how the battery is being charged and like the solar controller, will automatically compensate for voltage variations.

But unless we know what these devices are with their datasheets, and what the other load is and how it needs to be controlled, it is all moot. :roll_eyes:

It is all in the details - which we do not have.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.