Automatic band decoder for dual radio operation with 6-band support (160m-10m) and 6x2 antenna switching for ham radio contesting and SO2R operation.
- Dual Radio Support: Simultaneous monitoring of two transceivers (YAESU/ICOM/KENWOOD)
- 6 HF Bands: 160m, 80m, 40m, 20m, 15m, 10m
- Band Detection Methods:
- BCD input (YAESU/KENWOOD)
- Voltage sensing via ADS1115 (ICOM)
- Auto-detection of radio type
- Antenna Control: 6x2 antenna switch with flexible routing
- 16 Relay Outputs:
- 12 for band-pass filters (6 per radio)
- 2 for antenna switching
- 2 spare outputs
- Real-time Monitoring: Live band detection with <50ms latency
- Web Interface: Optional Flask-based control panel
- Raspberry Pi 5 (or 3B/4 with legacy GPIO)
- 2Γ SainSmart 8-Channel Relay Modules
- 2Γ ADS1115 16-bit ADC (I2C) - for ICOM radios
- Resistors: 4Γ 1kΞ© (BCD protection), 4Γ 10kΞ© (voltage dividers)
- Dupont cables and jumpers
- YAESU: FT-991, FT-891, FT-dx10, etc. (BCD output)
- KENWOOD: TS-590, TS-890, etc. (BCD output)
- ICOM: IC-7300, IC-7610, IC-9700, etc. (Band Voltage output)
See docs/WIRING.md for complete pinout and connection diagrams.
Radio 1 BCD: GPIO 14,15,10,9 Radio 2 BCD: GPIO 13,19,26,11 Software I2C: GPIO 5 (SDA), GPIO 6 (SCL) ADS1115 #1: 0x48 (Radio 1 ICOM) ADS1115 #2: 0x49 (Radio 2 ICOM) Relay Board 1: GPIO 18,23,24,25,8,7,12,16 Relay Board 2: GPIO 20,21,2,3,4,17,27,22 # Flash Raspberry Pi OS Lite (64-bit) to SD card # Use Raspberry Pi Imager with SSH pre-enabled# Update system sudo apt update && sudo apt upgrade -y # Install dependencies for Raspberry Pi 5 sudo apt install -y python3-pip python3-dev git python3-lgpio # Enable I2C (optional, but recommended) sudo raspi-config # Interface Options β I2C β Enablecd ~ git clone git@github.com:IO7T/dual-band-decoder.git cd dual-band-decoderpip3 install -r requirements.txt# Test relay outputs sudo python3 tests/test_relays.py # Test BCD inputs sudo python3 tests/test_bcd.py # Test ADS1115 (ICOM) sudo python3 tests/test_ads1115.pysudo python3 src/band_decoder.pyEdit config/settings.yaml to customize:
- Band frequency ranges
- Relay assignments
- Antenna switching logic
- Radio types (auto/manual)
- Logging level
# Install service sudo cp scripts/banddecoder.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable banddecoder.service sudo systemctl start banddecoder.service # Check status sudo systemctl status banddecoder.service # View logs sudo journalctl -u banddecoder.service -f# Start web interface python3 src/web_interface.py # Access: http://banddecoder.local:5000Features:
- Live band display for both radios
- Antenna routing configuration
- Relay status monitoring
- System diagnostics
# Run all tests cd tests sudo python3 run_all_tests.py # Individual component tests sudo python3 test_gpio.py # GPIO basic test sudo python3 test_relays.py # Relay sequential test sudo python3 test_bcd.py # BCD input test sudo python3 test_ads1115.py # ADS1115 I2C test sudo python3 test_integration.py # Full system test# Enable verbose logging sudo python3 src/band_decoder.py --verbose # Test individual components sudo python3 src/band_decoder.py --test-mode # Monitor GPIO states watch -n 0.1 'raspi-gpio get'Contributions welcome! Please:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License - see LICENSE file.
IZ7KHR - Amateur Radio Station
- Callsign: IZ7KHR
- GitHub: @IZ7KHR
- Raspberry Pi Foundation for excellent hardware and documentation
- Ham radio community for testing and feedback
- Contributors to lgpio and ADS1115 libraries
Perfect for:
- SO2R (Single Operator Two Radios): Automatic band selection
- Multi-Multi Contests: Filter switching for multiple stations
- Field Day: Rapid band changes
- DXpeditions: Reliable antenna routing
Compatible with:
- N1MM+
- Win-Test
- WriteLog
- DXLog.net
See docs/CALIBRATION.md for:
- ICOM voltage calibration
- BCD signal verification
- Relay timing adjustment
- Antenna switch testing
- Band detection latency: <50ms
- Relay switching time: 10ms
- Antenna switching: 15ms
- CPU usage: <5% (RPi 5)
- Memory: ~50MB
- Support for 2m/70cm bands
- N1MM+ UDP integration
- Web-based calibration wizard
- Frequency-based detection (CAT control)
- MQTT support for home automation
73 de IZ7KHR π»
Good luck and good DX!