acs712 measuring current via MQTT with nodemcu

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
r16
Normal user
Posts: 24
Joined: 12 Dec 2016, 02:48

acs712 measuring current via MQTT with nodemcu

#1 Post by r16 » 23 Sep 2017, 01:04

Hello guys.
Anyone use acs712? I have one but i dont find any code for read the measures , and to send via mqtt.
Anyone use ?

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: acs712 measuring current via MQTT with nodemcu

#2 Post by papperone » 23 Sep 2017, 08:56

At the moment the ACS712 could be used with any ADC plugin which is made to make a single read, for current it's a different story...
I have some ESP8266 nodes with custom firmware as I need to read current via ACS712 connected to ADC (ADs1115) but my plan is to write a specific plugin for ESPEasy so I could convert those modules :)
I will do it but not in short term as I do have too many things to do in my "to do list" :mrgreen:
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

r16
Normal user
Posts: 24
Joined: 12 Dec 2016, 02:48

Re: acs712 measuring current via MQTT with nodemcu

#3 Post by r16 » 23 Sep 2017, 18:52

@papperone sorry but i dont understant what you said.
did you mean if i use a acs712 connected on PIN adc of nodemcu, i can read value once time?

I dont know if you know what is home assistant, or openhab.

But my ideia, is to send the value via mqtt to homeassistant.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: acs712 measuring current via MQTT with nodemcu

#4 Post by papperone » 24 Sep 2017, 17:55

ACS712 does not require any specific library as far as I know, all modules I've seen they output an analog value so you can read it via analog pin.
The issue is that if you want to measure DC current maybe some easy formulas are enough but for AC is not that simple...

And to your question, this has nothing to do with what software you use on your server, but really you need to be more precise on which type of current you woudl like to measure first!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 60 guests