Node-Red Sensors

I'll second this. I work with medical devices that communicate over RS232 daily. The recommendation is usually to not go over 3 meters with a standard serial cable. When using DB9 to RJ-45 adapters to run custom lengths (using cat6), i can sometimes get away with 6 meters reliably, and at 10 meters it's like flipping a coin whether the signal will still make it. This is assuming you're talking 5v signaling, not 3.3v, which will perform even worse.

1 Like

And a 6-10m length of unscreened cable will have some "interesting" characteristics, especially if you live near a large radio mast :smile:

I used to live not that far away from the masts that powered BBC Radio 4 and some world service broadcasts. Lots of local stories about peoples radiators and even teeth fillings acting as quite effective receivers :frowning:

My serial run will be pretty short. That being said, the esp8266 is interesting. What are the analog read capabilities of those boards?

It has a single 10-bit ADC channel on the A0 pin.
You can connect an ADS1115 device to it using I2C which will give you four extra 16-bit analog channels.

1 Like

Looks like the esp32 has more analog inputs. Any words of wisdom on going that route?

There's an MQTT library for ESP32 that supports https, which is arguably an excellent way to send your telemetry.

ESP32 is great if you need extended capabilities including more GPIO, including Analogue, true realtime OS with easy to use hardware and software interrupts, programme via Ardiuno IDE still or use various languages including Python, JS, etc. More memory, 2 core CPU, easy to add on SD-Card, camera and display interfaces, ...

Of course, you may pay $10 per unit rather than $2 so a bit more expensive.


It would be cheaper and more effective for you to go the ESP8266 with an Arduino Nano as the ADC engine - again check Peter Scargills setup as he has done all of this for you already

The only thing that would rule out the 8266 is lack of TLS if that is a concern for you


As Julian(@TotallyInformation) suggested I would go for the ESP32. I am just getting into Micropython on the ESP32 and can really recommend it. It is possible to have different versions of a program on the file system for testing and you can interact with the system over a web interface, a huge improvement over the Arduino IDE.

Furthermore, depending on how much you want to spend and what physical protocols you’re looking for there’s choice when it comes to ESP32 boards too. Adafruit came up with their Huzzah Feather board, which is ESP32 based. I use Pycom boards for my own setup. I have a GPS tracker for my wheelchair set up, which currently is set to using either Bluetooth or WiFi (and capable of switching on a soft reboot), but will be going to LoRa in the future. Goals: activity tracking and mapping accessibility in my near vicinity. For simple temperature sensors in a back yard this is soon overkill. NodeMCU is a board I looked at when figuring out what would work for me. It is ESP8266 based board, capable of running MQTT. It is also strong enough to be flashed to MicroPython and operate with MQTT through that, which is how/why they attracted my sight.


Could you point me to Scargills setup? I found "the Script" but am not entirely even sure what it does. Looks to just install all the necessary bits to the pi?

It's sad to see serial comms getting so little respect. Back when dinosaurs roamed the earth (before wifi and cheap ethernet), we used to run rock-solid RS-232 serial links at 9600 baud or higher for hundreds of feet. All it takes is proper attention to voltage levels and cabling (capacitance, shielding and grounding), but it can easily cost more than the modern alternatives and is generally not worth the bother.


Here you go

How to connect and config USB sensor to rpi and node red?

@Martin10 You should open a new thread and give a little more detail like what sensor, what platform/os (ok you said it is a pi, what model and os), version of NR, node.js and dashboard, what have you tried so far, Have you searched the flows tab for a contrib node that might work with the sensor .

1 Like