ACS712 to measure solar panel current

Good day. I just want to ask if it is even possible to measure solar panel Imp by using ACS712 20A - or it would only be possible to measure current by using a load such as a light bulb. I was recently working on PV IoT monitoring with an ESP32. So the circuit basically looks like this:

PV Specs:
Pmax: 25W
Voc: 22.32
Isc: 1.49A
Max Vmp: 18V
Max Imp: 1.39A

Any help is much appreciated. Thanks you so much.

does ESP32 measuring from 0 to 1V or from 0 to 3,3V?
how is it powered ? +5V to Vin ? or USB?

If you use WIFI
" Note: ADC2 pins cannot be used when Wi-Fi is used. So, if you’re using Wi-Fi and you’re having trouble getting the value from an ADC2 GPIO, you may consider using an ADC1 GPIO instead."

1 Like

My bad. I've mistaken the 35 for GPIO35.

GPIO35 or GPIO32 ?

I'm currently powering the ESP32 with my laptop in the meantime and plan to use a portable powerbank later on. I haven't yet started interfacing the ACS712 and I wanna know if would it ever work directly with solar panel's Imp as shown in the diagram.

either of them are adc1 pins which work with wifi on, as I have seen on the datasheet

You can try it but don't count on much accuracy.

1 Like

I found a similar problem in one of the forums (Measuring Voltage and current of solar panel) and I came across this one

Can you please enlighten me as to why? Because it defeats the purpose of the project which is to monitor solar PV parameters such as voltage and current.

And are there any better ways of doing it (measuring PV Imp and send to cloud)?

The author of that quote clearly does not know what you want to do, so ignore it.

If you expect Imp to be around 1A, the ACS712 (20A) is far from the best choice of current sensor. Something like the high side sensor INA219 would be a much better choice, as you can monitor the panel voltage at the same time.

That way you get around using the terrible ADC of the ESP32 as well.

1 Like

i currently end my project, planned using such sensor, but discover that Victron MPPT device has uart output, let falling the sensor and focused on interface.

1 Like

This one (why not give a link?)

or like this

Have you seen this:
image

Thanks! I just ordered a couple of those and will do some tests when they arrive.

And by the way, as an alternative, will ACS712 5A work on my set up?

I'm sorry. I just wanna know if measuring current between the PV and battery is possible using the sensor. My goal is to display that data on the cloud.

Or should I just place the sensor between battery and load instead - if the first option isn't possible.

I'm using a PWM scc

without problem.

1 Like

That is a better choice than the 20A version, but the INA219 will far outperform both.

1 Like

Please understand that this will interfere with the current readings you are looking for. The PWM means the current is NOT a steady value! It will vary from a continuous current to one with very short pulses to one with very long zero values when the battery has been fully charged.
Are you sure there is not a place in the scc to indicate the current?

1 Like

A 5volt-only ratiometric ACS712 sensor is a poor match for an ESP processor.
Readout will depend on current as well as ESP power supply variations.
And don't forget that ESPs don't like 5volt on their I/O.
Best to use some sort of current sensor with I2C output.
Leo..

1 Like


This is what I'm using and even if it shows current readings, I would like them to be fetched to cloud