Accéder au contenu principal

Articles

Affichage des articles du mars, 2017

Ina226 voltage and current sensor with esp8266 sending by MQTT

I needed to measure the voltage and the current of my lawn mower robot, as i have already an home automation system, the point was also to integrate these measures into Openhab and idealy using mqtt protocol. The first idea that came up was to use a voltage divider to measure the voltage with the esp8266 analog pin.Nevertheless i found some contradictives infos about this, the accepted voltage was low between 1v and 2v depending on the sources. Unfortunately my battery is a 28,4v one. With some search I found on banggood the ina226 sensor already soldered and ready to plug with an arduino. The question was; is this compatible with an esp8266 to allow an easy integration with my home automation system. The answer is yes. Thanks to the help of Shelvin blog  here are the details: Pinout for a NODEMCU: Nodemcu/INA226 D1/SCL D2/SDA GND/GND 5V/VCC IN+ & IN- correspond to the current meter for the tests, I linked them before the INA226 power so as to have some

Feedback about room temperature sensor with standalone ATMEGA328P and DHT22

After some months of low cost low power room sensor usage here is the feedback. The sensor send every hour to OpenHAB with the OpenMQTTGateway  temperature, voltage and humidity data, it is powered by 3 AA alkaline batteries. But the most interesting thing about this sensor is how the battery voltage decrease so as to have an idea on the batteries lifetime. Here is below voltage (mV) graph on the last day, month and 4 months sent by the sensor (the charts are updated every day): Day Month 4 months We can see that on a 4 months duration the battery decreased around 0,1V. If we consider an end of life at 3V for our 3 AA batteries this give us a lifetime of  4,5V - 3V = 1,5V 15 * 4 months = 60months = 5 years of expected duration (without taking into account the AA auto discharge) 5 years of expected duration with a less than 8€ sensor !