JumpZero
Posts: 868
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Current monitoring with Arduino + Raspberry Pi

Mon Oct 15, 2018 3:38 pm

Hi!

My latest project is running: I measure my swimming pool water pump motor current (Amp)
And I get some graph including the inrush current at motor startup.
details are here: http://gcolin.hd.free.fr/SystemDescript ... /page.html

--
Jmp0

wh7qq
Posts: 1131
Joined: Thu Oct 09, 2014 2:50 am

Re: Current monitoring with Arduino + Raspberry Pi

Mon Oct 15, 2018 6:45 pm

Thanks for your information. I am implementing something similar for my solar/electric water heater but at present, it is only used for on and off time as I know how much current it draws. I also use the SCT-013 and an Arduino The heater element is purely resistive so inrush current is not a factor. This gives me a few more ideas.

reted30
Posts: 13
Joined: Mon Apr 30, 2018 7:24 am

Re: Current monitoring with Arduino + Raspberry Pi

Wed Oct 17, 2018 11:01 am

Hi, I have been working with Wireless Current monitoring sensor with Arduino and I am using Arduino IDE in raspberry pi, but need some suggestions about how can I sent the current readings to my smartphone using MQTT protocol in the raspberry pi using Arduino IDE as well as Raspberry Pi Wifi also .

Any leads on this will be much help.
Last edited by reted30 on Wed Oct 17, 2018 1:31 pm, edited 1 time in total.

JumpZero
Posts: 868
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: Current monitoring with Arduino + Raspberry Pi

Wed Oct 17, 2018 11:33 am

reted30 wrote:
Wed Oct 17, 2018 11:01 am
Hi, I have been working with Wireless Current monitoring sensor with Arduino and I am using Arduino IDE in raspberry pi, but need some suggestions about how can I sent the current readings to my smartphone using MQTT protocol in the raspberry pi.

Any leads on this will be much help.
Hi, what have you achieved so far? Is your current sensor transmitting data to the Arduino? This current sensor use: "Wireless Mesh Networking using DigiMesh®" according to the link you posted. If the data are already received by Arduino, then you just have to forward this data to Raspberry Pi (serial over USB, or something else..)
Tell us more
--
Jmp0

reted30
Posts: 13
Joined: Mon Apr 30, 2018 7:24 am

Re: Current monitoring with Arduino + Raspberry Pi

Wed Oct 17, 2018 1:40 pm

Actually, I have already connected the Arduino Uno with a USB port of Raspberry Pi,
Arduino IDE is installed in Raspberry Pi and I am able to check the reading in Arduino serial monitor also,
But is there any possible way to use Arduino IDE (which is installed in raspberry pi) with raspberry pi's Wifi?
And after connecting it with wifi is it possible to use MQTT protocol?

PhatFil
Posts: 526
Joined: Thu Apr 13, 2017 3:55 pm

Re: Current monitoring with Arduino + Raspberry Pi

Wed Oct 17, 2018 3:37 pm

sounds like you could use a small daemon script probably in python to establish a serial connection to your arduino and listen for particular outputs or all? and publish mqtt topic/payloads. (a daemon is just a program that starts with the system and runs in the background local.rc and systemd are 2 methods to start stuff at startup.)

viewtopic.php?t=41055
http://www.steves-internet-guide.com/pu ... tt-client/

or if your already using node red that can be connected to a serial port to listen and a simple few node flow should be easy to sus to echo inputs as mqtt output
(not used serial connections in node red myself..yet..)

JumpZero
Posts: 868
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: Current monitoring with Arduino + Raspberry Pi

Wed Oct 17, 2018 4:25 pm

reted30 wrote:
Wed Oct 17, 2018 1:40 pm
Actually, I have already connected the Arduino Uno with a USB port of Raspberry Pi,
Arduino IDE is installed in Raspberry Pi and I am able to check the reading in Arduino serial monitor also,
But is there any possible way to use Arduino IDE (which is installed in raspberry pi) with raspberry pi's Wifi?
And after connecting it with wifi is it possible to use MQTT protocol?
So I understand that your wireless current monitoring sensor sends data to the Arduino uno, this Arduino is connected via USB to the Raspberry Pi and you can read this data in the serial monitor on the Arduino IDE installed on the Pi. This is ok and working.
No you cannot use Arduino IDE with raspberry pi's Wifi. I mean not directly.
But as suggested by PhatFil you can use a program to read the data on the serial port (should be /dev/ttyACM0 with an Uno) and do whatever you want with this data, publish it by MQTT for instance.
Another solution if you are happy with the Arduino IDE serial monitor, is to enable the VNC server on the Pi (from config menu) and install on a PC/Tablet/smartphone a VNC client, you will get the PI desktop screen on this device and therefore the Arduino IDE.
--
Jmp0

Return to “Automation, sensing and robotics”