Current & voltage measurement

Hi everyine, I’m new to Cayenne and not really sure how to get started on a project I’d like to build and was hoping someone might be kind enough to point me in the right direction.
I’d like to monitor several things but most importantly voltage ( up to 16v) and current ( ideally 10amps but 3amps will suffice for the moment)
My questions are
Would this work on a pi, as this is what I have

If not or if there is a better idea you might have I’d love to hear it.
And if I ever get this working, as I’m not proficient or skilled enough using cayenne yet, could these be monitored using WiFi.
Maybe I’m approaching this totally wrong but here’s hoping someone can help. Thanks in advance

Is there any link on how to connect this sensor with raspberry pi. Once you have got the sensor reading on your raspberry pi then you can use cayenne python library to send the sensor data to cayenne. GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API

Hi Sharmik

Thanks for your reply. I did try looking for info on that before I asked but couldn’t find any. Maybe becausev it’s because it’s an analogue out ( just found this out) so maybe you cant. But, would you know if you can " simply" read voltage/current with Cayenne.

I am running quite a few sonoff devices, they use the EPS8266, but they only read temperature and humidity, unfortunately I need more that this now and was very excited when I read about cayenne a couple of days ago.

It seems, and I hope I’m so wrong, voltage and current is something that can’t be done simply with Cayenne. Would I be right in thinking this, sorry for what seems a dumb question, but I would appreciate and advice you can give to a novice.

But thanks for your advice, looks like it’s back to the drawing board.

A
PS. Just found this, do you think it will work

If you can read sensor data on your raspberry pi, then you can send the data to cayenne.

you can also connect SonOff to cayenne, have a look at this post Solderless SonOff Basic working in Cayenne Over The Air

this entirely depends whether you can read the voltage-current on the raspberry pi. once that is done you can use the cayenne python library to send this data to cayenne,

yes, use the python code from the tutorial to read sensor data and send it to cayenne using GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API

What a decent chap you are, from “0” I’ve loads now to go on, big thanks for your help.
Really appreciate it.
Last question honestly.
You say if I can read stuff on the pie, I can read it on Cayenne.
Do you mean using the existing modules or I have to write my own software, I’m guessing I’m using the wrong terminology, but hope you get my drift. But this is so useful, I really appreciate it, thanks

You can connect your existing module, but did you find any link on how to connect this sensor to raspberry pi?

Yes, the last link explains how to do it, and that does watts too. But not had time to read it, I’m just in a stupid traffic jam, so I’ll look when I get home, but what I’ve seen I’m sure it does, so fingers crossed.

But those are two different sensor.

Hi Sharmik
Sorry I should have said they were different. But would the INA219 be the best option as that tutorial says it works with pi.
And I guess if the answer is yes, it does work with Cayenne, is it a matter of cut and paste the code in the pi, then make sure it works, then look in the Cayenne library for the widget, I think that’s the right word😊

yes, the python code is also straight forward. you can just copy paste the code and add the cayenne code to it with the correct data type for the current and voltage widget Data types for Cayenne MQTT API

Hi again Sharmik

This is just what I was hoping for. You don’t realise how grateful I am for your help as I really don’t have a clue having never used this before

Thanks to you Sharmik, I can now start building it.

Cheers

Hi Sharmik,
Sorry I do have another question.

The widget you mentioned ( sorry I’m still on this STEEP learning curve), the INA219 as you’ll know can measure current, watts and voltage. Do I choose one widget that will do for each type of measurement or I need to pick three, one for each. And sorry it really is down to this being all new to me that I’m asking such what must seem very very basic questions.

Thanks for your help.

you will 3 different widgets for each value.
example:
virtualWrite(1, value, "current", "a") for creating a current value widget.
similarly, you need to do for voltage and power widget.

Thanks again Sharmik, just a short helpful reply from you like this would save me (and others) hours of searching, frustrations and even blowing up your Pi.

Please don’t underestimate just how much people learning this stuff are grateful for the input you give.

Thanks very much.

2 Likes