Measure PWM output with Arduino?

Hi,

.interesting thing for me was the fact that when the light bulb is 100% powered the voltage between the two negatives was 0 and when it was 0% it was maximum…

Thank you, that proves that your PWM switching component, a MOSFET most likely, is between the MOTOR -ve and the POWER -ve, so you cannot measure the voltage across the motor with the A0 and gnd of the Arduino across the motor.
BasicMotor PWM.jpg

Tom… :slight_smile:

Ok...how can I measure it then?

After looking for a long time I found a schematic from a french forum but I dont speak french and I dont have an idea what are the saying about it…

Hi, What is it that you want to finally accomplish with the controller? Regulated Output Voltage, OR Regulated Motor Speed?

Tom.... :)

Regulated output voltage

Hi, Are you long for a smooth DC output?

If you want to make a regulated supply, it will have to reference the -ve supply rail, that controller is for motors that don't care about gnd reference.

Some of the devices you may use this supply on will be gnd sensitive, and you have already found one, your arduino.

Tom... :)

Well I'm planing to use the controller not only for a DC motor but other things as well-dimming lights, charging car battery, creating constant voltage output.By that I mean that if you connect a non constant electrical DC source which fluctuates over time(for instance 2,4,8,34,67V) you will also have fluctuating voltage output.But if I can measure voltage with arduino and if I write an algorithm which controls the digipot I'll always have constant output....if can't measure the output arduino will be "blind" and there will be no input data

You may have to build your own from scratch.

HI, You are describing a BOOST-BUCK switch mode power supply, but 2V to 67V inpout range is a bit over the top.

What is your electronics, programming, arduino, hardware experience?

If you are supplying 10V at 10A from your regulated supply. And you have 5V doing into your supply And you have 100% efficiency

Power In = Power Out

5V x input current = 10V x 10 A

input current = (10 X 10)/5 = 100/5 = 20A

Are you aware of these sort of calculations?

Also how are you going to guarantee DC with minimum or ripple?

Tom.... :)

input current = (10 X 10)/5 = 100/5 = 20A

Are you aware of these sort of calculations?

Do you know Georg ? Do you obey his laws ?