M5Stack Voltmeter

Hi,
new to the forum, have a few flows running with easy basic tasks.
Now I am trying to find a way to read dc voltage using M5Stack Voltmeter based on ADS1115 on i2c.
I can not get any of the nodes to read values from this unit,

anyone knows if it is possible at all?

Frank

Welcome to the forums @LA9KY

Do you mean you have tried 3rd party nodes?
If not - the flows website has many, and some appear to be for the ADS1115.

https://flows.nodered.org/search?term=ADS1115

I am not at all clued up on these things - but plenty of people here, on the forums who are

Thank you.
Have tried 4-5 of the nodes, but no luck. I have the +/-36V V meter, which is a package that includes the ADS1115, and I understand that a basic ADS1115 supported in the flows has a max of +/- 6.something Volt. But the M5Stack package runs on 5v from the pi and capable of +/-36V in my case.

If I cant find support helping me with this, I might have to go for a hat with ADC, supported by NodeRed, capable to measure up to 16vdc, suggestions very much appreciated..

@zenofmud and @dynamicdave are tinkerers I believe. I can use a Multimeter though :wink:

Although its based on ADS1115, it looks like there are other control chips, on the I2C bus, that actually control the ADS1115. So I don't think any of those ADS1115 nodes will work with this unit.

1 Like

hehe, remote site, extreemely long test leads, or maybe a webcam of the multimeter :laughing:

1 Like

Hi, you are correct, I should have checked for working nodes before I purchased these, just focused on ADS1115 and went on... need monitoring 4-5 dc voltages and a couple of amp meters, from remote site.. I see there are some written codes for Arduino, new to me... dont even have one..

That's a shame, I believe the M5 Stack is based on an ESP 32, so you could get one and build the firmware. Probably not a beginner project tho ...

You could look at something like Tasmota, which would be easier.

The M5 Stack ESP devices are supported by ESPHome as well and it wouldn't be hard to use that to get output from the meter to MQTT which would be the best approach.

Those sensors all use Grove I2C connections I believe so you could also attach them to any ESP or Arduino. Or even, if you are particularly perverse, direct to a Pi.

I have 2 of the M5 devices, a Basic (2" colour screen with 3 buttons and an ESP32) and the Nano(? a tiny LED matrix over an ESP32). The Basic is sat on my desk displaying outputs from multiple sensors including 2 directly attached (temp/humidity & light) and the others from around the house. They both run ESPHome.

The M5 devices also can run Micropython and they have their own scratch-like programming environment as well. But I prefer ESPHome.

Which ever way you do things, sending direct to MQTT is by far the easiest and most reliable approach and decouples the sensors from Node-RED. Node-RED consumption of the data is then trivial.

M5Stack is famous for their ESP32 devices - yet this looks like just a sensor that talks I2C.
Thus you (@LA9KY) first need to setup a host (e.g. a Pi) that's running node-red, and secondly a node that supports I2C (on the hosts platform), e.g. node-red-contrib-i2c.

Alternatively, go the way @TotallyInformation described: Connect the sensor to an ESP32 device, let the ESP32 device talk to the sensor and broadcast the sensor read via MQTT.

Yes, as I said, this is an ADC on a Grove mount using I2C.

1 Like

Yes my idea was to use the Rpi4 I am testing on now, and I am looking at a i2c hub or maybe a mux, to be able to share the i2c port on the PI. But not sure if that will work. The M5Stack voltmeter has 0x49 address and I cant change it, like I would do if I use stacked hats on i2c.

I managed to read out the object message from the unit, but the 4 channels that comes up is with values, does not represent the correct value, with or without any DC hooked up. (shows 0.5nnn and 2.5nnnn V)

But also what is commented here, there are more to this unit around the ADS1115. Could I maybe look for the ADS1115 itself and build something around that, the range will only be up to the Vdd, if it is powered from 5v or 3,3v, so to be able to measure 14vdc I would have to do some engineering....

I could look into ESP32, and MQTT, but then kind of disappointed...

But really, are there no hat for the pi with adc inputs?

Of course you can (as always :wink:) - but I'm quite certain it won't be packed as nicely as this M5Stack sensor. M5Stack even offers I2C Hubs to get across the limitations of a single I2C channel. If you don't intend to only build on "professional" components, this looks like a valuable collection of powerful sensors & addons...

I've just checked some of the results that show up when you input "pi hat adc" into your favourite search engine: Their range usually is quite limited - as you already noticed ... and most of them talk I2C. Thus you end up in a similar situation, just with a PCB stacked directly on top of your Pi, rather than a separate(d) module.

By the way: This hat seems to be commanded a bit differently ... and really looks promising for your use case. There's even a node available; it's quite old (last time updated in the flow library 4+ years ago), still maintained yet (there's an updated release on GitHub) and could be a starting point...

YES, that looks very interesting, thank you for digging @ralphwetzel , will study a few moments befor pressing the button :slight_smile:

Use a INA219 module for measurement of voltage and current.

1 Like

Well I'm back again :slight_smile:
have a couple of INA260's and have hooked it up for test. Running INA260-sensor-node from NR.

@iiot2k I get readings looking at debug for v, c and p. The v (voltage) show only 0,9v
I have the Vin+ and Vin- terminals hooked up for high side measurement, from rpi I have connected serial and 5v, so on INA260 nothing connected to the rest of the header pins. By default the bus is tied to the Vin+ and it reads the 12v. But why is the node only showing 0,9 ? Current is there but my test device does not pull much, when I get the voltage correct I will bother with the current and power..

I am hoping you have experience with the adafruit INA 260 and can assist :slight_smile:

Maybe I should have moved this post since it does not have anything with the M5Stack to do.

First, don't connect VCC of INA260 to 5V.
The I2C lines are connected via pullup resistors and to 5V and
this is deadly for Raspberry Pi.
You can connect VCC to 3.3V or use a level shifter.
I don't know what the INA260 node measures.
I think that the 0.9V is the shunt voltage.
This is how the INA260 is connected:
image

thanks,
well seems my Rpi survived, now connected to 3,3v on the pi, and I have connected according to the schematic. Nothing on A0 A1, but maybe I am missing something here, looking at the drawing how does it switch between the registers. Using the node, I only have the address and shunt config available, do I have to write a code?

No, the INA260 does this automatically cyclically.
In the node it is set as follows:
16 averages, 1.1ms conversion time, shunt and bus continuous.
How did you connect the INA260 (maybe a picture)?

The relayboard with the red led is my load on 12v.
INA260:
red 3.3v
black gnd
blue sdc
green sda

from PS (12v)
red is the High side going to terminal V+
then from V- to the load 12v+
this should be the shunt connection to measure current.

then I understand that the Vbus on the INA260 is tied to V+, which I also measured, and I would expect Vbus to be the measured voltage.

From documentation I understood that th overhead pins V+ and V- should be used if measuring on low side, so nothing connected here.

the picture of my screen, I tried some different nodes, IN219 and INA226, but the one debugged is INA260