Arduino or Raspberry Pi for shack automation? Where to split the work between them
- Replies 2
- Views 78
- Created
- Last Reply
Top Posters In This Topic
-
Nicole Jackson 1 post
-
Brian Clark 1 post
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Many shack automation projects start as "I'll just use a Pi for everything," or "an Arduino is enough." After a while they tend to settle into a split. This is a starting point for comparing notes on where to draw that line.
The Arduino-class side (Uno, Nano, Pro Micro, or a 3.3 V board like a Pico) is good at the things that must happen on time and keep working: switching antenna relays, sequencing a transmit/receive changeover, reading a rotator potentiometer through an ADC, measuring forward and reflected power from a detector, and driving a band-decoder output. It boots in milliseconds, has no filesystem to corrupt, and fails in ways that are easier to predict. A hardware watchdog and a sensible default relay state matter more than most people expect.
The Raspberry Pi side is better for the "computer" jobs: running Hamlib's rigctld or rotctld, logging, a small web dashboard, a soundcard TNC such as Direwolf, digital-mode software, or a remote-control gateway. It can talk to the microcontroller over USB serial, and a simple line-based protocol is usually enough. Some people make the Arduino emulate a protocol Hamlib already understands, such as a GS-232-style rotator interface, so existing software works without custom code.
A few things are worth settling early, because they cause the most trouble in a real shack:
Voltage levels. Pi GPIO is 3.3 V and is not 5 V tolerant. An Uno-style board is 5 V. Before connecting anything to a rig's CAT or data port, check what that port expects. Some interfaces are TTL-level, some are RS-232, and Icom's CI-V is a single-wire open-collector bus. A USB-serial adapter or level shifter is often the safer choice over direct GPIO.
PTT. A microcontroller pin should not be wired straight to a rig's PTT line. Use a small transistor or optocoupler that pulls the line to ground, and confirm the open-circuit voltage and the current the radio expects. Add a hard timeout in firmware so a software hang can't leave the transmitter keyed. The rig's own time-out timer is a backstop, not the main plan.
RF in the wrong places. USB cables, relay control leads and sensor wires can all pick up common-mode RF and cause random resets or false readings. Shielded cable, ferrite chokes on both ends of the USB run, bypass capacitors near the inputs, and a metal enclosure with the feedline grounded at the entry point go a long way. Test at full power on each band, not only on the bench.
Power. A cheap buck converter that drops 13.8 V to 5 V can produce birdies on HF. If you hear them, add filtering, move the converter away from the receive antenna's feedline, or use a linear regulator where the heat is acceptable. Also use quality storage on the Pi and set up clean shutdown or a read-only root filesystem if the power can be cut without warning.
Where do you put the boundary? Does the Pi ever touch relays, or is it only a front end to a microcontroller that owns all the switching and interlocks?
Link to comment
https://www.hamradiobase.com/forums/topic/10327-arduino-or-raspberry-pi-for-shack-automation-where-to-split-the-work-between-them/Share on other sites