Measuring DC Voltage With Arduino and Node-RED

by Jhon_Control in Circuits > Arduino

4223 Views, 16 Favorites, 0 Comments

Measuring DC Voltage With Arduino and Node-RED

base_portada.jpg

There are a lot of tutorials DC voltage measurement with Arduino, in this case I found a tutorial that I consider the best functional method to measure DC without requiring input values of resistance, only requires some resistance and a multimeter, In next tutorials we will start with solar panels and we need to measure VDC over long periods.

The code was taken from startingelectronics.org of the article Measuring DC Voltage using Arduino thanks for the great contribution.

Source: Measuring DC Voltage using Arduino

We made some modifications but added a visualization and the result was very good !!
Our arduino measures the voltage in the battery and transmits via serial to Node-RED.

Tutorial PDAControl

English Versión

Measuring DC Voltage with Arduino and Node-RED

http://pdacontrolen.com/measuring-dc-voltage-with-...

Español Versión

Midiendo Voltaje DC con Arduino y Node-RED

http://pdacontroles.com/midiendo-voltaje-dc-con-ar...

Install Node-RED

http://pdacontrolen.com/installation-node-red-plat...

Materials

materiales.jpg

Materials

1 Resistance 1MOhm, I recommend to 1% tolerance.

1 Resistance 100K or 2 of 200K in parallel, I recommend to 1% tolerance.

1 Multimeter

1 Arduino Mega 2560 R3 - Very cheaps!!!

​Functioning & Connections

montaje_1.jpg
diagrama_base.png

Functioning

Based on the method of measurement of the multimeter, which uses a great resistance to measure voltage and that the measuring instrument does not affect the measurement in the circuit.

Since the ADC of Arduino Mega 2560 R3 in this case allows maximum 5v, has been used voltage divider between 1MOhm and 100k.

Recommendation: In this case I used 5% tolerance and the result was good but if better measurement or pressure is required use resistance 1% tolerance.

Node-RED & Node-RED Dashboard

DASH.png
nodes_node_red.png
config_grafica_24h.png
config_widget_grafica.png
nodo_serial.png

Node-RED & Node-RED Dashboard

Since this time we will perform a test at the local network, the platform par excellence for testing in "real time" and view Node-Red data, dragging nodes and connecting will have a fast monitoring application,

We will use the Nodes:

Node Serial ports, these will allow point-to-point communication via serial Arduino PC (Node-RED).

Node-RED Nodes Dashboard, Allows a variety of Widget nodes to create spectacular views.

Install Node-RED

Simple installation Node-RED IoT Platform connections: PDAControl

Install Node-RED

For a long time I had wanted to try this platform called Node-red created by IBM, it was developed in nodejs, Node-RED is developed by Nick O’Leary and Dave Conway-Jones thanks for your contributions.

But what is Node-Red?

It is an open source graphic tool based on connection of nodes that contain API’S and / or services for the communication and / or connection of devices for the Internetof things, has a friendly web interface, contains a variety of basic and complex IoT functions, there is also an online version of Node-RED called IBM Bluemix .

There are a variety of tutorials to install Node-RED on a local server, but these tutorials, although very complete, did not work correctly for me, I have decided to compile the steps to install Node-RED on Linux, in this case Lubuntu ( (Ubuntu) I hope it will be Your liking this guide.

Node-RED

https://nodered.org

Calibration

medicion_bateria2.png
medicion_bateria.png
2017-10-02-164244_1366x768_scrot.png

Calibration

For the measurement to be correct it is recommended to perform the calibration using a multimeter and take the following measurements and modify the values in the Arduino IDE code.

Complete explanation of calibration method

Battery 6v Measurement

bateria_6v.jpg
dashboard.png
DC Voltage Measurement - Medicion de voltaje DC  Arduino & Node-RED  : PDAControl

Battery 6v Measurement

In this case we will perform the measurement of an acid battery from 6v to 12Ah

I have created a Dashboard in the Emoncms platform with measurements in DC.
You can see the dashboard in real time here

Another Application 10w Solar Panel Measurement

Review Solar Panel 10W - Revision Panel Solar 10W  Arduino & Node-RED : PDAControl

10w solar panel measurement

A few months ago I bought a solar panel from 10W to 22VDC max, with Arduino I made safe measurements without fear of burning the ADC

Conclusions and Recommendations

montaje.jpg

They would say that it is impossible but for a long time look for a tutorial to measure DC Voltage in an efficient and better manner supported in code and especially functional thanks to startingelectronics.org for this contribution.

In most tutorials, you need to enter the value of the resistors, and their versions are not very useful for measurements in slightly more realistic applications or in real projects.

Since in future tutorials we will use a solar panel 10w this measurement application is perfect for those cases. I consider that one of the advantages this method will not affect the measurement given the high impedance similar to the multimeters.

Tutorial PDAControl

English Versión

Measuring DC Voltage with Arduino and Node-RED

http://pdacontrolen.com/measuring-dc-voltage-with...

Español Versión

Midiendo Voltaje DC con Arduino y Node-RED

http://pdacontroles.com/midiendo-voltaje-dc-con-a...