This example demonstrates a complete FM transmitter control system using:
- Raspberry Pi Pico as the main controller
- QN8066 FM transceiver
- 16x2 LCD display with I2C backpack
- Rotary encoder with push button for navigation
Raspberry Pi Pico
┌───────────────────┐
│ │
┌─────┤ 3.3V (36) │
│ │ │
┌───────┼─────┤ GND (38) │
│ │ │ │
│ ┌───┼─────┤ GP0 (1) SDA │ ← I2C Bus
│ │ │ │ │
│ │ │ ┌───┤ GP1 (2) SCL │ ← I2C Bus
│ │ │ │ │ │
│ │ │ │ ┌─┤ GP2 (4) ENC_A │ ← Encoder A
│ │ │ │ │ │ │
│ │ │ │ │ ┌┤ GP3 (5) ENC_B │ ← Encoder B
│ │ │ │ │ ││ │
│ │ │ │ │ │┌┤ GP4 (6) ENC_BTN│ ← Encoder Button
│ │ │ │ │ │││ │
│ │ │ │ │ │││ GP16(21) CEN │ ← QN8066 Enable
│ │ │ │ │ │││ │
│ │ │ │ │ │││ │
│ │ │ │ │ │││ │
│ │ │ │ │ │││ │
│ │ │ │ │ │││ │
│ │ │ │ │ │├┘ │
│ │ │ │ │ ├┘ │
│ │ │ │ ├┘ │
│ │ │ ├┘ │
│ │ ├┘ │
│ │ │ │
│ │ │ │
│ │ │ ┌─────────────┐ │
│ │ └────┤ SDA VCC ├──────┘
│ │ │ │
│ └────────┤ SCL GND ├──┐
│ │ │ │
│ │ LCD16x2 │ │
│ │ I2C 0x27 │ │
│ └─────────────┘ │
│ │
│ │
│ ┌─────────────┐ │
│ ┌────┤ SDA VCC ├──────┼──┘
│ │ │ │ │
│ │ ┌──┤ SCL GND ├──────┼──┐
│ │ │ │ │ │ │
│ │ │ │ QN8066 │ │ │
│ │ │ │ │ │ │
│ │ │ │ CEN XCLK ├──────┼──┼──── 32.768kHz
│ │ │ │ │ │ │ Crystal
│ │ │ │ ALI RFO ├──────┼──┼──── Antenna
│ │ │ │ │ │ │
│ │ │ │ ARI │ │ │
│ │ │ └─────────────┘ │ │
│ │ │ │ │
│ │ └───────────────────────┘ │
│ └───────────────────────────┼──┘
│ │
│ │
│ ┌─────────────────────┐ │
│ │ Rotary Encoder │ │
│ │ │ │
├───┤ A │ │
│ │ │ │
├───┤ B │ │
│ │ │ │
├───┤ BTN │ │
│ │ │ │
└───┤ GND │ │
│ │ │
└─────────────────────┘ │
│
┌───────────────────────────────┘
│
│ Common Ground
└───────────────────────────────────
- Raspberry Pi Pico - Main microcontroller
- QN8066 Module - FM transceiver
- LCD 16x2 with I2C backpack - Display (address usually 0x27)
- Rotary Encoder with push button - User interface
- 32.768 kHz Active Crystal - Clock reference
- Breadboard and jumper wires - Connections
- Audio source - Connect to ALI/ARI pins
- Antenna or dummy load - Connect to RFO pin
- Pull-up resistors - 4.7kΩ for I2C (usually built into modules)
| Raspberry Pi Pico | Component | Pin/Signal | Description |
|---|---|---|---|
| 3.3V (Pin 36) | All modules | VCC | Power supply |
| GND (Pin 38) | All modules | GND | Common ground |
| GP0 (Pin 1) | I2C Bus | SDA | I2C Data |
| GP1 (Pin 2) | I2C Bus | SCL | I2C Clock |
| GP2 (Pin 4) | Encoder | A | Encoder channel A |
| GP3 (Pin 5) | Encoder | B | Encoder channel B |
| GP4 (Pin 6) | Encoder | Button | Push button |
| GP16 (Pin 21) | QN8066 | CEN | Chip enable (optional) |
- Line 1: Current frequency (MHz) and stereo/mono indicator
- Line 2: Transmission power and current menu mode
- Menu indicator: Shows current selection mode (FRQ/PWR/MOD)
- Rotate encoder: Adjust current parameter
- Press button: Switch between modes (Frequency → Power → Mode → Frequency...)
- Serial monitor: Detailed status information
- FRQ Mode: Adjust transmission frequency (87.5 - 108.0 MHz)
- PWR Mode: Adjust transmission power (20 - 120)
- MOD Mode: Toggle between Stereo and Mono
Install these libraries through Arduino IDE Library Manager:
- QN8066 - by PU2CLR
- LiquidCrystal I2C - by Frank de Brabander
- Upload the sketch to your Raspberry Pi Pico
- Open Serial Monitor (115200 baud) for debugging
- Use the encoder to navigate:
- Turn to adjust current parameter
- Press to switch between modes
- Monitor the LCD for real-time information
- Check serial output for detailed status
- Blank display: Check I2C address (try 0x3F instead of 0x27)
- Garbled text: Check I2C connections and power
- No backlight: Verify LCD I2C module power
- No response: Check pin connections and pull-up resistors
- Erratic behavior: Add debouncing delay or hardware debouncing
- Button not working: Verify button pin and interrupt setup
- Device not detected: Check I2C connections and crystal
- No transmission: Verify frequency range and power settings
- Poor audio: Check audio input connections and levels
This example can be extended with:
- RDS transmission - Add station name and text
- Frequency presets - Store favorite frequencies
- Audio level meters - Real-time audio monitoring
- Web interface - Use Pico W for remote control
- EEPROM storage - Save settings between power cycles
QN8066 Pico LCD Control Starting...
System ready!
Freq: 106.9 MHz | Power: 73 | Mode: Stereo | FSM: 10 | Audio: 45 mV
Freq: 107.5 MHz | Power: 73 | Mode: Stereo | FSM: 10 | Audio: 52 mV
Freq: 107.5 MHz | Power: 83 | Mode: Stereo | FSM: 10 | Audio: 52 mV
This example provides a complete, interactive FM transmitter control system with professional-grade user interface and monitoring capabilities.