Software Setup
Install Dependencies
sudo apt update
sudo apt install rtl-sdr git
sudo pip install pyrtlsdr
sudo pip install rpi_ws281x adafruit-circuitpython-neopixel
sudo pip install numpy scipy
Signal Detection Script
import numpy as np
from rtlsdr import RtlSdr
import board
import neopixel
import time
# LED Configuration
LED_COUNT = 60
LED_PIN = board.D18
LED_BRIGHTNESS = 0.3
pixels = neopixel.NeoPixel(LED_PIN, LED_COUNT,
brightness=LED_BRIGHTNESS,
auto_write=False)
# SDR Configuration
sdr = RtlSdr()
sdr.sample_rate = 2.048e6 # 2.048 MHz
sdr.center_freq = 915e6 # 915 MHz (US)
sdr.gain = 40 # Adjust as needed
def process_samples(samples):
# FFT to find signal strength
fft = np.fft.fft(samples)
power = np.abs(fft)**2
return np.mean(power)
def update_leds(signal_strength):
# Map signal strength to LED colors
intensity = min(1.0, signal_strength / 1000)
for i in range(LED_COUNT):
# Create pulsing effect
pulse = (np.sin(time.time() * 2 + i * 0.1) + 1) / 2
r = int(255 * intensity * pulse)
g = int(100 * intensity * (1-pulse))
b = int(50 * intensity)
pixels[i] = (r, g, b)
pixels.show()
try:
while True:
samples = sdr.read_samples(256*1024)
strength = process_samples(samples)
update_leds(strength)
finally:
sdr.close()
Important Considerations
⚠️ Power Sequencing: Always connect power to LED strip BEFORE data connection to prevent damage.
⚠️ High Current: 5V 10A supply can deliver dangerous current. Double-check all connections.
💡 Pro Tip: The 470Ω resistor protects the LED strip from voltage spikes.
- Frequency: Smart meters use different frequencies by region (915MHz US, 868MHz EU)
- Antenna: Use a properly tuned 900MHz antenna for best reception
- Signal Processing: Consider adding an LNA if signals are weak
- Power: Calculate max current: LED_COUNT × 60mA × 5V
- Decoupling: Add 0.1µF ceramic capacitor near Pi power pins
- Weatherproofing: Use IP65+ enclosures for outdoor installation
- Legal: Check local regulations for radio reception
- Privacy: Be mindful of data privacy when monitoring transmissions