INA219 IC2 Added to ESP8266 code

tmp9EC4Just a minor addition to my ESP8266 code – the INA219. Set to 32 volts, 2 amps by default, this i2c addition works with the cheap 0x40 addressed boards – I found them as low as under £2 – these little wonders can measure high side voltage and current !

So in a typical solar situation you might attach the ground to the board – and use it’s 2-way terminal to break the high-side output to your load.  You can tell the incoming voltage – and via a 0.1r resistor on the board, which leads to VERY low voltage loss – you can read the current. You could of COURSE parallel another 0.1r resistor onto the board to double the current etc. I will be trying all of that soon.

For now the manual and code on the web has been updated… see “Blowing the Home Control 2017 code” on the right menu of the blog.  OTA code also updated.

In the process I found the one chip my i2c_check code could not see on the bus… I’ve now experimentally added i2c_scan which does – and I’ve used new I2c code set to full speed – just for this board – but for this application it does not matter in the slightest as the board has a 500us+ conversion delay,   While I was on I’ve just tested that both this and the SSD1306 will run with the processor at 160Mhz (see cpu_freq command). Works a treat.  Not tried all other displays at this speed.

Enjoy.

Facebooktwittergoogle_pluspinterestlinkedin

4 thoughts on “INA219 IC2 Added to ESP8266 code

  1. Works fine!

    Note: Question marks are missing in the manuals examples.
    Use {ina219_getcurrent?} and {ina219_getvoltage?}

    Best regards.

Leave a Reply

Your email address will not be published. Required fields are marked *