Node-Red Sensors

#1

Hello

I have a question about reading Sensor datas with Node-Red and the Raspberry Pi.
I watched some Youtube Videos, and the most of them have the Grove Pi addition to connect there Sensors.

Now i want to ask if i need this Grove Pi or can i connect the Sensors directly with the Raspberry Pi and Analyse the Sensor Datas with a Node-Red flow.

Some of the sensors only have an analog output so i would connect a ADC MCP3008 to the Pi. Do this also work with Node-Red?

Would be nice if you can share a tutorial i can read/watch, how i connect the sensors / ADC with the Pi and how i can read the datas from it. (If something like this exists.)

Thanks

0 Likes

#2

Have a look here:

https://nodered.org/docs/hardware/raspberrypi

Interacting with the Pi hardware

0 Likes

#3

Thanks exactly what im looking for.

0 Likes

#4

This contrib-node may also be useful.

node-red-contrib-ds18b20-sensor

0 Likes

#5

and - https://flows.nodered.org/node/node-red-node-pi-mcp3008

0 Likes

#6

Thanks ill try this at the weekend.

Will this work for every type of sensor?

This one ill try for the sensors with the analog output.

0 Likes

#7

I believe that the ds18b20 node is only for ds18b20. If you are using 1-Wire devices then also look at using owserver along with node-red-contrib-owfs. That will talk to all 1-wire devices I think.

0 Likes

#8

You can, as you've seen, attach sensors direct to Pi GPIO though direct driver support can be lacking. Much sensor-type work on the Pi focuses on the use of Python rather than JavaScript.

You do need to be quite careful how you connect your sensors. The Pi's GPIO is unbuffered and many people have "blown" their Pi due to incautious wiring and misuse of power.

Many of us find it easier & safer to use an ESP8266 (for wireless) or Arduino Nano (connected direct to the Pi) as sensor platforms. This can also get round timing issues - as you probably know, the Pi is a general purpose computer and therefore not optimised for the kind of real-time use you may want when dealing with sensors. Using an ESP based microprocessor also means that you can put the sensor and the Pi in more convenient locations.

Before the advent of the Pi Zero, this arrangement was also often a lot cheaper. The Pi Zero has evened that out a little though as you can get an ESP8266 on a development board with USB & headers for a couple of dollars US, it will still be cheaper.

3 Likes

#9

Thanks for your answers.
But there is one more thing im not sure about.
How do i need to connect the ADC MCP3008 to the Raspberry Pi.
In every tutorial they do it different.

What is the rule for the connection?

Thanks

0 Likes

#10

The one I wrote the mcp3008 node for was this one

0 Likes

#11

Okay.
But i have only the MCP3008 without any additional stuff.
Do i need some transistors for safety or will the ADC Module itself be okay?

0 Likes