book collections email follower instructable user
Picture of Browser Controlled Roomba Robot With the Raspberry Pi Model 3 A+
Web interface.png


This Instructable will focus on how to give a dead Roomba a new brain (Raspberry Pi), eyes (Webcam), and a way to control everything from a web browser.

There are a lot of Roomba hacks that allow control via the serial interface. I have not been fortunate enough to come across a Roomba that has current firmware or working motherboard. Either the Roomba is too old or the Roomba is dead. I found the Roomba I used for this project in a local thrift store bargain bin for $5. It still had a decent battery, but a dead motherboard. (I also found the webcam at the same thrift store for around $5). All I'm using from the original Roomba are the motors, chassis, and battery. You do not have to use a Roomba for this project. You could use different motors, wheels, and chassis if you like. I just fancy turning a piece of junk into something usable.

For this build I used the Raspberry Pi Model 3 A+ and a Riorand motor controller. I am using code from the Dexter Industries Browser Controlled Robot that I modified. The Dexter Industries version sets up the Pi as a websocket server that allows you to control their robot (brick pi platform) from a client html file running another computer.

I have changed the code use the GPIO pins and added a way for the Pi to shutdown when a button is clicked / when the escape key is pressed in the browser. I also made some changes to the control web page to allow viewing a motion stream through an iframe, while controlling the robot all within a single page. I set the Pi up with a static IP to host the client file so I could connect using any computer or device on my network.

I am documenting the process here in the hope of showing how to create a simple, inexpensive base robot.

Parts Used

  • Roomba 500 series

.All together just under $100.

Step 1: Install Raspbian and Setup a Static IP Address

Picture of Install Raspbian and Setup a Static IP Address

I used Raspbian Stretch Lite. I didn't see a need for the desktop, but you may install the desktop version if you prefer.

I am going to assume you already know how to install Raspbian. If you you need help, you can find the Raspberry Pi Foundation's guide here.

Once you have Raspbian up and running, login and run the raspi-config program.

 pi@raspberrypi:~ $ sudo raspi-config

Setup your WiFi connection in raspi-config


2 Network Options


N2 Wi-fi                       

Select a Country, enter your SSID, and enter your passphrase

Setup SSH in raspi-config

Once I did the initial config, I used SSH to set everything up headless. (You could skip this if you use a monitor. It was easier for me to make changes to the code without having to stop the robot and plug it into a monitor.)

Back at the raspi-config main menu


5 Interfacing Options  


P2 SSH         



Back at the raspi-config main menu select


Verify you are connected to your network

pi@raspberrypi:~ $ ifconfig

You should receive an output similar to this. (Note the IP address; you may need it later. e.g.

wlan0: flags=4163  mtu 1500 
	inet  netmask  broadcast
        inet6 fe80::c74f:42ec:8cd3:2fda  prefixlen 64  scopeid 0x20 
	ether b8:27:eb:6a:a4:95  txqueuelen 1000  (Ethernet)
        RX packets 44396  bytes 5847726 (5.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30530  bytes 39740576 (37.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Verify you can reach the internet.

pi@raspberrypi:~ $ ping

You should receive an output similar to this.

PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=54 time=18.2 ms
64 bytes from ( icmp_seq=2 ttl=54 time=19.4 ms
64 bytes from ( icmp_seq=3 ttl=54 time=23.6 ms
64 bytes from ( icmp_seq=4 ttl=54 time=30.2 ms
--- ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 18.209/22.901/30.267/4.715 ms

Setup a Static IP

To be able to consistently connect to your robot using the same address on your network, you will want to set up a static IP.

Get your current network address e.g.

I am using the address that was automatically assigned by DHCP when the Pi connected to my network. You can change this to whatever you like as long as it matches up with your network and doesn't conflict with any other assigned addresses.

Open dhcp.conf in a text editor. (I use nano)

pi@raspberrypi:~ $ sudo nano /etc/dhcpcd.conf

Scroll down to #Example static IP configuration and change the following lines.

#interface eth0
#static ip_address=
#static routers=
#static domain_name_servers=

Change to match your network and remove the # at the beginning of each line.


interface wlan0
static ip_address=
static routers=
static domain_name_servers=

Save and exit.

Reboot and connect to the Pi via SSH

pi@raspberrypi:~ $ sudo reboot

Connect from another computer using SSH. Windows users can use PuTTY or the Windows Subsystem for Linux (Windows10).

ian@computer:~$ ssh pi@

Enter your password (the default is raspberry).

pi@'s password:

You should be now be at your Pi's command prompt.

Awesome robot design.
ianderson3 (author)  DIY Hacks and How Tos9 months ago