Arduino or Raspberry Pi for shack automation? Where to draw the line between microcontroller and Linux
- Replies 2
- Views 50
- Created
- Last Reply
Top Posters In This Topic
-
Robert Moore66 1 post
-
Jessica Taylor 1 post
A lot of ham projects start with the same question: should this be an Arduino-style microcontroller or a Raspberry Pi? Antenna switch, rotator interface, PTT control, band-decoder, SWR/power logging, remote station monitoring, digital-mode node. They can all be done on either platform, but the two are good at different things, and the wrong choice usually shows up later as RF noise, flaky timing or an SD card that gets corrupted after a power loss.
Here is the split I would start from for discussion. A microcontroller (Arduino, Pico, ESP32) is a good fit when the job is deterministic and close to the hardware: switching relays, reading an ADC for forward and reflected power, generating stepper pulses, decoding band data from a rig, or enforcing a PTT timeout. It boots instantly, has no filesystem to damage, and behaves the same every time. A Pi is a good fit when the job needs an operating system: running Hamlib's rigctld, WSJT-X or Direwolf, hosting a web interface, logging to a database, or bridging USB sound cards and serial ports over a network.
The practical hybrid is a Pi for the network, logging and software layer, and a microcontroller for anything that must fail safe. The Pi talks to the microcontroller over USB serial or I2C with a simple command protocol, and the microcontroller owns the relays and PTT line.
A few things worth getting right regardless of platform:
Logic levels. Pi GPIO is 3.3 V and is not 5 V tolerant. Many classic Arduino boards run at 5 V. Connecting them directly can damage the Pi, so use a level shifter or a 3.3 V board. The same applies to CI-V, TTL CAT and other rig interfaces, which often need proper level conversion rather than a direct pin connection.
PTT and relay drive. Do not key a radio or drive a relay straight from a GPIO pin. Use a transistor or MOSFET stage, or an optocoupler if you want isolation from the radio, and put a flyback diode across relay coils. Add a hardware or firmware PTT timeout so a software hang does not leave the transmitter keyed.
RF in the shack. Switching supplies, USB cables and long sensor leads can both radiate noise and pick up RF. Ferrites on USB and power leads, a metal enclosure, bypass capacitors on analog inputs, and short wiring all help. Test it on receive across the bands you use, then again while transmitting, since a project that is quiet on the bench can misbehave near an antenna.
Power and recovery. A Pi running from an SD card needs a clean shutdown or a read-only root filesystem if it is going to be left unattended. Decide what state each relay and output should be in when power is lost or the software crashes, and design the hardware so that default is safe.
What are you using each platform for, and where have you found the dividing line between them? Rotator control, remote antenna switching and digital-mode nodes are probably the areas with the most interesting trade-offs.
Link to comment
https://www.hamradiobase.com/forums/topic/10617-arduino-or-raspberry-pi-for-shack-automation-where-to-draw-the-line-between-microcontroller-and-linux/Share on other sites