Arduino or Raspberry Pi for shack automation? Where to draw the line between the two
- Replies 1
- Views 91
- Created
- Last Reply
Top Posters In This Topic
-
Mark Thompson 1 post
-
Rachel Martinez 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 ham automation projects seem to land on the same question: should this job go on an Arduino-type microcontroller or on a Raspberry Pi? The answer depends on what the device has to do when RF is present, and on how badly it can fail. I'd like to compare notes on where people split the work.
A rough division that holds up for many builds: use a microcontroller for anything that must be predictable, simple and close to the hardware. Examples are antenna switch control, band-decoder outputs, PTT sequencing, reading an SWR or power detector voltage, and reading a rotator potentiometer. Use a Pi for anything that benefits from a full operating system, such as logging, a web interface, MQTT, running Hamlib's rigctld, a digital-mode TNC like Direwolf, or scheduling and remote access.
The combination is often better than either alone. The Pi talks to the radio and the network. A small microcontroller on a serial or I2C link drives relays and reads analog values, so a Linux crash or an SD card problem doesn't leave a relay stuck in the wrong state.
A few practical points worth discussing:
Logic levels. Pi GPIO pins are 3.3 V and are not 5 V tolerant. Many Arduino boards run at 5 V. Connecting the two directly can damage the Pi, so use a level shifter or a resistor divider on lines going into the Pi, or choose a 3.3 V microcontroller board.
Relay drivers. A GPIO pin shouldn't drive a relay coil directly. Use a transistor or driver IC, and put a flyback diode across a bare coil. Ready-made relay boards usually include these parts, but check the board's input requirements, because some are active-low and some need more current than a Pi pin should supply.
PTT safety. If software controls PTT, add a hardware timeout so a hung program can't leave the transmitter keyed. This can be a small timer circuit or a microcontroller that drops PTT after a set period unless it keeps being refreshed.
RF in the shack. Cheap boards and long unshielded wires can pick up RF, so behavior sometimes changes only when you transmit. Common fixes include a metal enclosure, ferrites or common-mode chokes on USB and power leads, small bypass capacitors on sensor lines, and keeping control wiring away from feedlines.
Where do you put the boundary between the two? Does your station logic live on the Pi, in a microcontroller, or both?
Link to comment
https://www.hamradiobase.com/forums/topic/9202-arduino-or-raspberry-pi-for-shack-automation-where-to-draw-the-line-between-the-two/Share on other sites