I also have hooked up an i2c BME280 and a VEML7700 LUX sensor. I am now working on an ESP32S NodeMcu Dev board which allows me to have 6 ADC pins to my disposal. Here is the Grafana 1 second sensor update and you can see after 19:00 hrs the sample rate smoothed right out after I installed the capacitor. Just getting the readings to post to the influx database was a challenge but the hurdle was overcome.Īlso it seems a 0.1uf capacitor from the ADC pin to ground has seemed to stabilize the noise quite a bit. The results are encouraging and there is still a lot more work and coding to be done. So just to be clear the ESP8266 was just an experimental first try. So till I step up to the plate and get a "real" charge controller, either Arduino or Rp or some derivative thereof is my option. Well my cheap(actually inexpensive) MakeSkyBlue charge controllers do not have any kind of serial output. That should give you the most accurate measurement of the voltage without temperature compensation. 10-20 readings, and take the median of those readings. What I've done in the past is to get say. but I'm not sure.Īs for how to get better readings - you can always take 10 readings and average them - but the noise in the readings will get averaged in too. Basically, I suspect it is susceptible to both temperature and voltage fluctuations into the esp chip. Also, the measurement is only as good as the reference voltage, which for that chip I don't think it's any good. I was going to use an ESP to do voltage monitoring until I realized that it's only got a 10 bit ADC, and even then it'll only tell me voltage. For most uses though, voltage is enough to get an idea of what's going on - and knowing your voltage now is better than knowing your voltage and currents after another two months of development Without also knowing how much power is going in or out, it's not the whole picture. Having voltage is nice, but it's only some of what's going on. What I'm actually going to do is to use an ESP8266 and RS485 to TTL converter to get data straight from my charge controller. Another possibility is to use your charge controller. If the database grows to quickly I can always change the retention policy or slow the data feed down some. Possibly I will throw some current readings in there also.Īs far as Grafana is concerned the readings update fast enough for me as I am injecting data every 5 seconds. My next update on this I hope to have at leastmy 3 arrays and 2 batterybanks recording. The noise may be less noticable on the ESP32 as it has 12 bit resolution. If I need more ADC channels I can always use another ESP32 they are cheap enough. Next step is to work with this code on an ESP32 and use all 8 available ADC inputs on the ADC1 SAR.ADC2 SAR is used by the Wifi so no go there for the other 10 ADC channels. There are suggestions to read the inputs twice in rapid succession and discard the first reading. There is some noise in the measurements if you read the data by the secondso there are some solutions that I will try. I built 2 of the ESP8266 boards just to see the difference in V if there was any.07V eh not bad for a 10 bit resolution Then Wifi and then sending data to the influx db. So far so good I got all the right outputs going to the serial monitor. Using an ESP8266 board I installed a BME280 i2cboard for environment stats and calculated a Voltage divider for 100V max to 3.3V for the A0 pin. Over my holiday, (forSean's benefit) my Vacation I immersed myself into learning the Arduino IDE. Well you wereright there wasn't an easy answer but. You don't want to live-stream data to influxDB because then you'll just have way too much data in there - and if you use a PI, you'll destroy your storage medium fast. So I use MQTT for everything - but I have important information live streamed and displayed in Node-Red, and then once every five minutes it sends an AVG value via MQTT to Node-Red which then pushes it to InfluxDB and Grafana picks it up from there. The issue with influxdb and grafana is that they aren't good for streaming data - as in, they are great to show data taken every couple minutes - but I want to know my voltage and temperature instantly. When I finish it, I'll have code for an esp8266, and an image of a pi to allow for all of this monitoring. Check youtube there are a bunch of tutorials, all of which skip over some very important steps. Getting data into influxdb is the hard part. I've got my system up and running now - and trust me, you did the easiest part. Well, you've got the majority of work left. No matter what, you'll need to develop the hardware yourself from scratch and write all the code from scratch. Your best bet is going to be either an arduino with an esp8266 to send data over WIFI or an ESP32 that has enough analog inputs for you to be able to use them.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |