Machine control raspberry zero node-red

Hi, I’m a bit lost with coding Arduino. So I made a machine control using node-red and raspberry. The raspberry is on the back of the sprayer near all the bloc valves with wifi on. Node-red receive udp pgn from aog and command relais using mcp23017. Relais work good with aog (I still have to put wire between relais and spayer valves). Also node-red can send pgn to aog.
The avantage is the easy programming.



1 Like

Looks nice. Is this “only” doing section control? I mean according to my understanding our regulatory requirements are a flow sensor for sprayer rate control and the sprayer controller would need to know which sections are active. It then adjusts sprayer pressure to reach the correct flow taking into account the sprayer speed and which sections are active.

Is this compatible with this kind of a sprayer?

I have to test in the real world. But I think my sprayer work with pressure control (old sprayer), not flow control. So if one section stop the regulation valve should move to keep the good pressure. Hopefully :woozy_face:
The idea is to make the regulation with node-red, but need times.

1 Like

Sprayer flow rate


Node-red flow :
sprayer_rate.txt (23.8 KB)

Web page where you need to tell :

  • what short of nozzles L/min at 3bars
  • distance between nozzles (0.5m)
  • how many L/ha you want

Need :

  • speed from gps or simulator
  • pressure from sensor or simulator

Then pwm can be send to regulation valve.

Look like pressure, speed, nozzle work good, give same as this data board :

1 Like

What kind of pressure switch do you use?

Just work in simulation mode yet. Didn’t plug any pressure sensor. Still many things to do…

Interesting topic. How will you measure quantity applied. Just calculate it?

Here is just calculate. But better to add hall flow sensor, check how many sections are ON to know the real L/ha it is spraying. If it’s lower than the deposit it’s because nozzle(s) are mouth, if it higher it’s leaking somewhere.

Actually rate control is just testing on the computer, I don’t want to put it on the sprayer before being sure everything work perfectly. To bad to have worry in the field with the sprayer full at busy time.

The section control is nearly finish I will test it soon

First test of section control, work perfectly :sunglasses:(berthoud major). I just unplugged valve wire from “official computer” to command them directly with node-red. This sprayer work with pressure doen’t check flow. So the regulation work perfectly. But, I have to turn on sections on the official computer (even it doesn’t command them) to have pressure regulation. And indication (total litres apply, area apply…) are wrong on the official computer.

I made arduino joystick to command “force sections on” “force sections off” and “section auto” working also perfectly.

Sorry for my english



Looks great. So those switches are taking place of the buttons on the screen? Very cool. What size boom? 9 sections?

Only 2 buttons are use yet, others will be for hydraulic. Just force all on, auto, and all off. I need to touch the screen to force on sections individually, but nearly never use.

Hello Damien,
Could you give some more informations about the developpement on raspberry ?
I suppose you use Node-red (didn’t know) ? Do you get an executable file directtly ?
Does it works on raspbian or another OS ?
Does it work also with other services (Wifi, UDP, bluetooth, etc …)
In my case, I’ve developped it on ESP8266 over UDP wifi (no wire to connect) for:
→ UTurn Output relay
→ Section Output relay
→ Input (7 sections + 1 general) on my sparayer
→ guidance barr for indication with ws2812 led
→ Serial on terminal (for debug)
I’ve put esp8266 standalone in the sprayer or fertilizer or seeder.
Development is with arduino.

Node-red is installed as a server on raspbian (can be on windows). Then just connect to ip:1880 with web browser. It work with “everything”, i use it to manage alarms with my milking robot (with web request) and send sms with 3g stick. I use it at home for my heater with espeasy (mqtt protocol). With ago, node-red listen 8888 udp port by wifi, and command relay with mcp23017 (for sections control or tramline or whatever). And node-red can send udp command to aog.
I started (not tested in real world) rate control for sprayer and seeder, with wifi udp dual antenna it is easy to catch speed directv from gps. Node-red is very quick to learn and powerful.
BUT node-red need raspberry, esp8266 is cheaper if you are good programmer.

Orange Pi One runs Node Red very well and is cheap.

Hi Damien,

I’ve tried on my local RPI zero W here but nothing.
The command is in web browser (chrome)
Do I have to install a sprecific package for that ?
This RPI runs strstr to transmit rawx sfrbx frames from M8T to rtcm)

For instance, I’ll continue wih my ESP8266 …

You have to install it

To install it

bash <(curl -sL

To start it a boot

sudo systemctl enable nodered.service