# Speed of sensors and node-red platform

**URL:** <https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559>\
**Category:** General\
**Created:** [28 November 2019 15:44 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559 "2019-11-28T15:44:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [28 November 2019 15:44 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/1 "2019-11-28T15:44:37Z")

</div>

Is it possible to get a payload from a sensor 10 times per second? I try to do this with my ultrasonic range finder but it seems it's can measure maybe once or twice per second.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 November 2019 15:55 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/2 "2019-11-28T15:55:42Z")

</div>

Anything is possible. What are you trying to accomplish ?

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [28 November 2019 16:23 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/3 "2019-11-28T16:23:37Z")

</div>

Speed limitations could be caused by the way it communicates. Provide more details

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 November 2019 17:16 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/4 "2019-11-28T17:16:34Z")

</div>

If it's a basic one like the SRF04 or 05 then they are pretty slow.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 November 2019 22:01 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/5 "2019-11-28T22:01:30Z")

</div>

What sensor and what node are you using to read it with?

I've just done some tests using an HC-SR04 running on a Pi using a Python program to make the measurements and then send it onto Node-RED via MQTT and I can get \>20 readings a second being sent to the debug window

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [29 November 2019 12:05 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/6 "2019-11-29T12:05:33Z")

</div>

I use this one

[http://wiki.seeedstudio.com/Grove-Ultrasonic\_Ranger/](http://wiki.seeedstudio.com/Grove-Ultrasonic_Ranger/)

With the grovepi board. Maybe I should order the HC-SR04 then?

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [29 November 2019 12:06 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/7 "2019-11-29T12:06:26Z")

</div>

Can you help me set this up? Is there a tutorial for this? How do I get data from python to MQTT?

20 readings per second would fix all my problems

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [29 November 2019 12:06 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/8 "2019-11-29T12:06:55Z")

</div>

It's possible that the grovepi libraries limit it

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 November 2019 12:13 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/9 "2019-11-29T12:13:46Z")

</div>

What node are you using to receive data from the grovepi?

What are you trying to measure with it?

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [29 November 2019 12:28 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/10 "2019-11-29T12:28:34Z")

</div>

I want to use the sensor to count small plants. We let the plant pass the sensor we count it. The plant falls throug a shute or hole in the table.

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [29 November 2019 12:29 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/12 "2019-11-29T12:29:47Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0293d675496106fd6e83d4eca52d7df1d9f09421.png)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 November 2019 17:01 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/13 "2019-11-29T17:01:27Z")

</div>

Which one are you using?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a0148ad73e10380b0f5034372be5a45680a1c869.jpeg)

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [2 December 2019 09:51 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/14 "2019-12-02T09:51:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1ecefdadd2ecc6d15236a17f6d282b07a8d5760f.png)

---

<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:** [2 December 2019 10:35 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/15 "2019-12-02T10:35:32Z")

</div>

I beleive @cymplecy Simon was asking which node-red-contrib-????? node did you install.

No one knows this except you, so it is a valuable piece of information you should get in the habit of providing. As a matter of fact, when you have an issue you should start off with  
Platform:  
OS:  
Node-RED version:  
Node.js version:  
name of contrib nodes involved:  
extra hardware involved:

At this point we only know you are using a Rasberry Pi because you mentioned you are using a grovepi board but only you know the rest of the information....

---

<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:** [2 December 2019 10:59 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/16 "2019-12-02T10:59:16Z")

</div>

> [@bmeester](#):
>
> I want to use the sensor to count small plants. We let the plant pass the sensor we count it. The plant falls throug a shute or hole in the table.

As a general thing & hopefully I'm not overly "mansplaining" this to you: You need to take some care over choosing the appropriate sensors for an IoT project, especially an industrial and commercial one.

Every sensor has limits and you need to understand these in context with your requirements before choosing the sensor or indeed before choosing the platform you want to use to process the sensor data.

If you have plants moving along a conveyor at 1 every 1/10th of a second, assuming at plant size of lets say 5cm (very small). That gives a conveyor speed in the region of 5 m/s if my math is right which is pretty fast. So I would have thought that an optical sensor would be a much better choice.

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [2 December 2019 11:02 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/17 "2019-12-02T11:02:40Z")

</div>

What kind of sensor do you think would be usefull for this project?

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [2 December 2019 11:03 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/18 "2019-12-02T11:03:18Z")

</div>

node-red-contrib-grovepi.

Sorry I am new to this

---

<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:** [2 December 2019 14:43 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/19 "2019-12-02T14:43:25Z")

</div>

I'm not an expert but one that has a light on one side and a light sensor on the other. The plant would interrupt the signal as it passed.

> **[Different Types of Optical Sensors and Applications](https://www.elprocus.com/optical-sensors-types-basics-and-applications/)**
>
> This article discusses types of Optical Sensors, Through-beam sensors, Retro-Reflective Sensors, Diffuse Reflection Sensors, applications of optical sensors

  

> **[240abbe54d7147a56fa5d660f69dcc0a632b.pdf](https://pdfs.semanticscholar.org/9d64/240abbe54d7147a56fa5d660f69dcc0a632b.pdf)**
>
> 3.77 MB

  
[http://www.wtec.org/loyola/opto/c6\_s3.htm](http://www.wtec.org/loyola/opto/c6_s3.htm)

Hundreds of variations on AliExpress:

> **[US $4.44 11% OFF|M18 Retroreflective type PNP NO+NC DC 4 wires photoelectric...](https://www.aliexpress.com/item/32851119030.html?spm=a2g0o.detail.1000014.11.4c93be11ct45Z1&gps-id=pcDetailBottomMoreOtherSeller&scm=1007.13338.146400.0&scm_id=1007.13338.146400.0&scm-url=1007.13338.146400.0&pvid=fa95bad9-517f-4f82-8790-06f427b73350)**
>
> Smarter Shopping, Better Living! Aliexpress.com

[https://uk.rs-online.com/web/c/displays-optoelectronics/optocouplers-photodetectors-photointerrupters/reflective-optical-sensors/](https://uk.rs-online.com/web/c/displays-optoelectronics/optocouplers-photodetectors-photointerrupters/reflective-optical-sensors/)

---

<div class="post-metadata">

**Author:** ![bmeester](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bmeester](https://discourse.nodered.org/u/bmeester)\
**Post date:** [2 December 2019 15:08 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/20 "2019-12-02T15:08:07Z")

</div>

Wow thanks for the ideas! I have seen also the breakbeam sensors. My problem is that I have no idea how to communicate with it, without a pallete.

---

<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:** [2 December 2019 20:06 UTC](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559/21 "2019-12-02T20:06:07Z")

</div>

Looks like you need to work on some basics then.

If you are just using a Pi, you will need to understand how to connect the sensor to the Pi - not too hard as long as you pay attention to the voltage levels and current (some industrial grade sensors may require more current than the Pi itself can cope with).

It is actually easier to work with an Arduino or ESP8266 but of course, that would introduce another set of things to learn about.

None of this stuff is especially difficult but it is _involved_. It takes time to get right.

😀

[Next page](https://discourse.nodered.org/t/speed-of-sensors-and-node-red-platform/18559.md?page=2)
