0
\$\begingroup\$

I am developing a aeroponics type system which has multiple stacks. Each stack has multiple trays which house the growing plants. I am going to use the Pi 4 as a main control station from where i can control, modify and monitor all processes. To control the operation of the water pumps and nutrient pumps, LEDs, ultrasonic foggers, etc i have decided to add micro-controller (Pi Pico) to the stacks. The Pi 4 will communicate the instructions to the Pico, but i cannot figure which communication protocol/method is the best (I2C, PCI, CAN, IEEE 1394)?

To make it more clear, the Pi 4 will interface with the Pico(s) and the Pico in turn will control the operation of the stack.

\$\endgroup\$
2
\$\begingroup\$

You are spoilt for choices.

  1. I2C - not really suitable for off board use. Glitches cause lockups that require timeouts and retries to recover from.

  2. PCI (I think you mean SPI as most microcontrollers don't implement PCI). SPI is not unreasonable, but requires a number of wires and driver chips to have it run a distance.

  3. CAN - I'd rate that as a candidate. Designed to run a distance and tolerates errors and glitches by design.

  4. IEEE1394?? as in Firewire. Again, most microcontrollers don't implement that standard. Very high speed and not designed for your use case.

// My suggestions:

  1. UART (RS485). Along with CAN, this is a suitable candidate.

  2. WiFi. Takes care of the issue with wiring. If you choose a ESP8266/ESP32 microcontroller it comes for free. Has Arduino support and zillions of examples. Pi4 has WiFi as well, so it ticks the boxes.

What you are proposing sounds like a 'Programmable Logic Controller' that has been is use by industry for decades. To that end there are standard protocols like MODBUS that are supported on both ends.

Again, you're spoilt for choice - there are many, many different ways of achieving the same goal. I'd suggest you do some research before you start re-inventing the proverbial wheel. What you want to do has been done many times over and blogs, videos etc are out there. I'd even suggest you don't need to write any code and design any hardware - its all 'off the shelf' and open source.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.