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.
Anything is possible. What are you trying to accomplish ?
Speed limitations could be caused by the way it communicates. Provide more details
If it's a basic one like the SRF04 or 05 then they are pretty slow.
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
I use this one
With the grovepi board. Maybe I should order the HC-SR04 then?
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
It's possible that the grovepi libraries limit it
What node are you using to receive data from the grovepi?
What are you trying to measure with it?
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.
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
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....
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.
What kind of sensor do you think would be usefull for this project?
Sorry I am new to this
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.
Hundreds of variations on AliExpress:
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.
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.