Arduino or Raspberry Pi for shack automation? Where to split the work and how to keep RF out of it
- Replies 2
- Views 104
- Created
- Last Reply
Top Posters In This Topic
-
Nordic Ham 1 post
-
Diana Patel 1 post
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
I'd like to compare approaches for shack automation: antenna switching, a rotator controller, band-decoded filter switching, PTT sequencing, and some logging of voltage, temperature and SWR. Most of the build guides I find pick either an Arduino or a Raspberry Pi without explaining why. I suspect the better answer is to use both, each for what it does well.
Here is the split I would start from. The Raspberry Pi runs a full Linux system, so it suits software that already exists: Hamlib's rigctld for CAT control, fldigi, WSJT-X, Direwolf for packet and APRS, a small web dashboard, and remote access over the network. An Arduino-class microcontroller runs one simple program with predictable timing. That suits relay sequencing, reading a potentiometer on a rotator, counting pulses, reading analog forward and reflected power, and enforcing a PTT timeout. If the Linux side crashes or an SD card gets corrupted, the microcontroller can still put everything into a safe state.
A few details seem to matter more than the choice of board:
1. Logic levels and current. Raspberry Pi GPIO is 3.3 V and not 5 V tolerant, and each pin can only supply a few milliamps safely. Many classic Arduino boards run at 5 V. Never drive relay coils directly from either one. Use a transistor, MOSFET or ULN2003-style driver, with a flyback diode if the driver does not include one.
2. Fail-safe defaults. On power-up or reset, pins can float or briefly change state. Pull-down or pull-up resistors should hold PTT lines, amplifier keying and antenna relays in a known safe state until the controller is running properly.
3. RF immunity. A microcontroller and a 100 W signal on a nearby antenna can get along badly. Typical countermeasures are a metal enclosure, ferrite chokes on USB and control cables, small bypass capacitors at the I/O entry points, short wiring, and keeping control wiring away from feedlines.
4. Noise from the other direction. Cheap switching supplies, including the Pi's power adapter and the DC-DC converters on some Arduino boards, can put birdies on HF. It is worth checking with the receiver before you commit to a layout.
Where would you put the line between the Pi and the microcontroller? Do you let Linux make any hard real-time decisions, or keep those in the microcontroller?
Link to comment
https://www.hamradiobase.com/forums/topic/10104-arduino-or-raspberry-pi-for-shack-automation-where-to-split-the-work-and-how-to-keep-rf-out-of-it/Share on other sites