# Node-Red Sensors

**URL:** https://discourse.nodered.org/t/node-red-sensors/2938
**Category:** Hardware
**Created:** [7 September 2018 08:36 UTC](https://discourse.nodered.org/t/node-red-sensors/2938 "2018-09-07T08:36:31Z")
**Posts on this page:** 16
**Page:** 2

<div class="post-metadata">

### Author: ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)
#### Post date: [21 August 2019 15:49 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/21 "2019-08-21T15:49:37Z")

</div>

> [@TotallyInformation](#):
>
> For serial over any distance, you'll need to think about wire resistance, voltage losses, external interference (the wire acts as an Arial and can generate an appreciable voltage due to radio interference), lightning strikes and lawnmowers/spades/dogs 🙂 Well maybe you do, I'm no expert on that front.

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.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 August 2019 15:56 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/22 "2019-08-21T15:56:24Z")

</div>

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

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 ☹

---

<div class="post-metadata">

### Author: ![Exit2Studios](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/exit2studios/32/10998_2.png) [@Exit2Studios](https://discourse.nodered.org/u/Exit2Studios)
#### Post date: [21 August 2019 16:13 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/23 "2019-08-21T16:13:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [21 August 2019 17:01 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/24 "2019-08-21T17:01:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Exit2Studios](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/exit2studios/32/10998_2.png) [@Exit2Studios](https://discourse.nodered.org/u/Exit2Studios)
#### Post date: [21 August 2019 18:10 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/25 "2019-08-21T18:10:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)
#### Post date: [21 August 2019 19:12 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/26 "2019-08-21T19:12:39Z")

</div>

There's an [MQTT library for ESP32](https://github.com/espressif/esp-mqtt) that supports https, which is arguably an excellent way to send your telemetry.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 August 2019 19:55 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/27 "2019-08-21T19:55:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [21 August 2019 20:39 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/28 "2019-08-21T20:39:15Z")

</div>

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

Craig

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [21 August 2019 20:58 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/29 "2019-08-21T20:58:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [21 August 2019 21:20 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/30 "2019-08-21T21:20:36Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Exit2Studios](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/exit2studios/32/10998_2.png) [@Exit2Studios](https://discourse.nodered.org/u/Exit2Studios)
#### Post date: [22 August 2019 15:26 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/31 "2019-08-22T15:26:32Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)
#### Post date: [22 August 2019 20:24 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/32 "2019-08-22T20:24:40Z")

</div>

> [@TotallyInformation](#):
>
> Serial over any distance brings issues of its own

> [@JayDickson](#):
>
> The recommendation is usually to not go over 3 meters with a standard serial cable.

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.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [22 August 2019 20:35 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/33 "2019-08-22T20:35:16Z")

</div>

Here you go

> **[ESP8266 Home Control 2016](https://tech.scargill.net/home-control-2018/)**
>
> Home Control Software and Hardware using Raspberry Pi (or similar and ESP8266 makes Node-Red as the base - with MQTT as the underlying comms protocol.

---

<div class="post-metadata">

### Author: ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)
#### Post date: [19 April 2020 18:44 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/34 "2020-04-19T18:44:56Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [19 April 2020 19:12 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/35 "2020-04-19T19:12:56Z")

</div>

@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 .

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [19 April 2020 20:08 UTC](https://discourse.nodered.org/t/node-red-sensors/2938/36 "2020-04-19T20:08:56Z")

</div>



[Previous page](https://discourse.nodered.org/t/node-red-sensors/2938.md?page=1)
