Wi-Fi Coverage Mapping Robot for Your Home
Drive a robot to marked spots around your home, log your own network's signal strength and turn it into a heatmap of dead zones.
Measuring at the same height and in a grid makes the results comparable. The robot carries the Pi's Wi-Fi radio along the grid, reads the signal from your router at each point and Python draws the map.
Only measure networks you own or manage. This project reads your Pi's own connection; it does not capture anyone's traffic.
Mission steps
Mark a grid
Put small tape marks on the floor every metre and note their x,y positions on a sketch of the room.
Drive the robot
Use the gamepad robot setup to drive to each mark. Keep the Pi connected to your own home Wi-Fi.
Log the signal
At each mark press a button; the script averages five readings of the link signal from iw and saves x, y and dBm to a CSV.
Draw the heatmap
Plot the CSV with matplotlib; around −50 dBm is excellent, below −70 dBm is weak.
Act on it
Move the router, change its antennas or add a mesh node, then map again to see the difference.
Code
import re, subprocess, time, csv
def rssi():
out = subprocess.run(['iw', 'dev', 'wlan0', 'link'], capture_output=True, text=True).stdout
m = re.search(r'signal:\s*(-?\d+)', out)
return int(m.group(1)) if m else None
with open('wifi_map.csv', 'a', newline='') as f:
w = csv.writer(f)
while True:
pos = input('Grid position x,y (blank to quit): ')
if not pos: break
x, y = map(float, pos.split(','))
vals = []
for _ in range(5):
v = rssi()
if v is not None: vals.append(v)
time.sleep(1)
avg = sum(vals) / len(vals)
w.writerow([x, y, round(avg, 1)]); f.flush()
print('Saved %.1f dBm at (%g, %g)' % (avg, x, y))Tip: test every script on the bench before installing it in a moving machine.
Questions
Will my phone see the same signal?
Not exactly — antennas differ — but the map shows which rooms are relatively weak, which is what you need to decide where to improve.