Hey!
I want to connect the ACS712 to the ESP32 to implement it into Home Assistant. But i get really random reading like there is no load connected and it output 2A. I am using a voltage divider. Maybe has someone any experience with it and can help me whis his/her's solution. The code is rather simple its just the one from the library. Thanks in Advance! (i know its not that specific but i don't know how to ask otherwise)
Sincerly, Matteo
show schematic and sketch
i don't have a particular sketch and schematic. It's just a simple "analogRead". But i have tried the sketches from this
and i have tried the voltage divider from this
But it didn't help. i am just stuck
You don't have a voltage divider. The green wire goes directly to the ESP32 input. The resistors are doing nothing.
You need to do this:
As for the resistors, they have to reduce the sensor output to something within the range of the ESP.
Cap is 0.1µF (the period can't be seen on the screenshot)
BTW your 1K + 2K = 3k is far too low. The sum MUST be > 4.7k I suggest the sum be somewhere around 10k or 20k.
Thanks for the answer! I will try it! So i need to connect the OUT pin to R1 and the input pin of the ESP is on the bottom right or am i wrong?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.