ESP32 with ACS712 Medelec´s

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jgu1
Posts: 813
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

ESP32 with ACS712 Medelec´s

Post by jgu1 »

Hi!

I am starting with a new project. Charge controller for solarpanel. I use an ESP32 with a Ili9488, so far working, but I want to use Martin´s (medelc)
nice component for measurering the Amp when charging. The ACS712 is supplyed with 5V and the analog input to ESP32 is max 3,3V
Is it possible to set some parameters for the ACS712 Vref. ect so I can use this component or/and do I need some extra calculation, any advice please :D .

Thank´s in advance.

Jorgen
Attachments
NySolcelle.fcfx
(18.97 KiB) Downloaded 63 times

medelec35
Matrix Staff
Posts: 2088
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 645 times
Been thanked: 703 times

Re: ESP32 with ACS712 Medelec´s

Post by medelec35 »

Hi Jorgen.
Since the ACS712 is connected to a 5v supply, then set up the properties as though it's connected to a 5V suppy.
The ESP32 ADC will need to have a max of 3.2v
What you will need to do is connect the output of the ACS712 to a 10K resistor the other end of the 10K resistor connect to the ADC i/p.
Then connect the ADC i/p to GND via an 18K resistor.
Martin

jgu1
Posts: 813
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

Re: ESP32 with ACS712 Medelec´s

Post by jgu1 »

Hi Martin!

Some progress. As you say, I add a resistor 10k to the output of the ACs712 > analog input on ESP32 from there 18k > ground.

I read now without load on the ACS712 -3.7 is it possible to use some of the setting in the proporties for the ACS712 component for alignment?

I try some diffrent but no good luck. I also try to use potmeter 50k instead of resistors it is possible to get 0.0A but then it is not liniar when I increase the amp´s.

Jorgen
Attachments
NySolcelle.fcfx
(23.99 KiB) Downloaded 60 times

Post Reply