Author Options:

Measure current and voltage with arduino? Answered

How would I measure the voltage and current of this circuit with an arduino?



Yes, its pretty straight forward for those voltages.

The arduino ADC is not very sensitive though, so you need some gain there.

You need a potential divider for the 48V...Arduino,and you need a current shunt for the current, and then an amplifier, or you use something like the ZXCT1021 which does it for you.

Thanks I was just checking that i was on the right track for the voltage, I was thinking of using 9K and 1K resistors to bring down the volts from 50 to 5 and then measure with an analog pin. However I am slightly confused, as i do not get the concept of the shunt and how i would hook it up and how i would measure the current from it...

Put a diode clamp to the 5V supply, just in case.

The shunt is a low value resistor, the current from your load passes through it and develops a voltage across it, which you measure. You have to have a reference to make the measurement of course, so typically you ground the measurement to one side of the resistor

The best way to do this is by using a zener diode circuit with a resistor rated enough to bring down the voltage to maybe around 20Volts and then you feed that to a voltage regulator to then bring it down to your 5V for the arduino input. Then you use the arduino to read that 5V output and you just calculate your stuff for the 10BIT ADC voltage level per step from 0 to 1023. This should give you your reading for voltage if you have done everything right, for current you want to use a shunt resistor of 1 OHM with a high power rating depending on how much Amperage your reading, you want to go with some thing that is higher than the power calculator for the overall current being measured. Once you do this, you just read the voltage drop across the resistor and just do an ohm's law equation in your code to calculate the current and spit it on an LCD display or on your computer. I agree with lemonie, why re invent the wheel when you already have something out there cheaper than what it will cost to make this type of circuit. But for learning experience, this circuit should work should work.

It seems a rather complicated substitute for a multimeter.
You'd need a datalogger or similar to convert the analogue V / A to a digital-signal, but these things can work direct to a PC. Maybe you want to build one of these things and that's the question?