Skip to content

Oscilloscope

This is a board dedicated to measure current and power of a circuit using INA219, capable of transferring information to a Telegraf instance or via MQTT. I did it to probe other board power consumption in battery powered mode.

Features

  • Measuring current, voltage, power
  • Configurable sampling interval
  • Configurable number of samples to average per interval
  • Capable of transfer information to other reporting system via UDP using telegraf/influxdb

Measurement Voltage 0V...26V Max Current 3.2A Max Power 83W Operation Voltage 3V...5.5V Communication Protocol I2C

Bill of Material

Assembling

  • Wire your ESP32 to breadboard GND and 3V3
  • Wire your INA219 as per the table
ESP32 INA219
GND GND
5V VCC
27 SCL
26 SDA

oscilloscope wiring

  • Wire your load to be measured to VIN+ and VIN- as per the figure

oscilloscope load

Code

The configuration code, other than main\main.c is contained in components\grownode\boards\oscilloscope.c. The code is meant to be basic in order to give you some training to basic features.

The Main

You just need to 'load' the board into the firmware

  • add an include "oscilloscope.h" directive on the header declarations
  • change the configuration row from the standard gn_configure_blink(node) to gn_configure_oscilloscope(node)

This will tell the compiler to load the easypot1 code into the firmware upon the next build.

Playing with code

See the INA219 leaf reference doc to understand how to configure and play with parameters

Creating a full monitoring system

TODO

Final Result

Here's a quick demo I did while testing: