Arduino or Raspberry Pi for shack automation? Where to split the work between them
- Replies 2
- Views 41
- Created
- Last Reply
Top Posters In This Topic
-
The DXer 1 post
-
Patricia Wilson 1 post
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
A lot of shack automation projects start with the question "Arduino or Pi?" It is usually better to ask which parts of the job each one is good at. A typical project might include an antenna switch, a band-decoder, a rotator controller, PTT sequencing for an amplifier and preamp, a remote power/SWR readout, and some logging or digital-mode software. Those tasks have very different requirements.
The rough split I'd start from: put anything with hard timing or safety consequences on a microcontroller, and put anything that needs a network stack, a filesystem, or desktop-class software on the Pi. PTT sequencing, relay drivers, reading a forward/reflected power detector, and watching a rotator potentiometer are all natural Arduino-class jobs. Running WSJT-X, Direwolf, a Hamlib rigctld server, a web dashboard, or a logging database is Pi territory. Linux is not a real-time OS, so a Pi toggling GPIO pins to key an amplifier is relying on the scheduler behaving, which is a poor basis for sequencing hardware that can be damaged by hot-switching.
A few practical points that come up repeatedly:
Logic levels. Raspberry Pi GPIO is 3.3 V and is not 5 V tolerant. A classic Uno-style board runs at 5 V. If the two talk over serial or I2C, use a level shifter or make sure both sides are at the same voltage. Also check what your radio's CAT or data port actually uses. Some are TTL-level, some are RS-232 levels, and some, like single-wire bus interfaces, are open-collector style. Don't wire one straight to a GPIO pin without confirming the electrical spec in the manual.
Driving relays and PTT. Don't drive a relay coil from a pin. Use a transistor or MOSFET driver (or a driver board) with a flyback diode across the coil, and consider an optocoupler or a small relay for the PTT line so that the radio's keying circuit is isolated from the controller. Also check the relay's RF rating at your frequencies. A relay that is fine for switching a 12 V accessory may have poor isolation or a bad impedance bump at VHF/UHF.
RF in the controller. Both boards can be upset by RF, and both can generate noise. Switch-mode USB supplies and Pi clock harmonics can show up as birdies or a raised noise floor on HF. Common fixes are a linear or well-filtered supply, ferrites on USB and power leads, a metal enclosure, and keeping the controller away from the antenna feedline and tuner. Sensor leads that run out to the antenna area should get filtering (small capacitors, series resistors or ferrites) at the controller input. Don't connect long outdoor lines directly to a GPIO pin; use surge protection and some form of isolation.
Reliability. A Pi running from an SD card can have trouble if power is cut at the wrong moment. For a controller that lives in a remote shack, a read-only root filesystem, a proper shutdown path or UPS, and a hardware or software watchdog are worth the effort. On the microcontroller side, a watchdog timer plus a sane default state on boot (all relays off, PTT released) matters more than clever features.
How are people dividing responsibilities between the two? Is there a point where you'd skip the Arduino entirely and use a microcontroller board with built-in Wi-Fi, or where you'd skip the Pi and run everything from a PC already in the shack?
Link to comment
https://www.hamradiobase.com/forums/topic/10726-arduino-or-raspberry-pi-for-shack-automation-where-to-split-the-work-between-them/Share on other sites