ZeroBot - Raspberry Pi Zero FPV Robot

Raspberry Pi Zero 3D Printed Video Streaming Robot

Similar projects worth following
ZeroBot is a Raspberry Pi Zero W based robot. It can be controlled using any computer or smartphone via a web browser. The integrated camera module makes for a low latency video stream. In addition the Raspberry Pi acts as a Wifi access point, so no router is required. The parts for the hull as well as the wheels can easily be printed on any regular 3D printer.

Some of the key features are:
- Compact CAD design with 3D printed components
- Analog control via a joystick (and multitouch)
- Simple battery solution using only a standard power bank
- Low latency streaming (~0.2s)
- Easy and cheap to build using widely available components

STL files on thingiverse:

View all 6 components

  • How to Get Started (Fall 2018)

    Max.Ka day ago 0 comments

      For the Zerobot robot there are different instructions and files spread over Hackaday, Github and Thingiverse which may lead to some confusion. This project log is meant as a short guide on how to get started with building the robot. 

      Where do I start?

      1. Grab the STL-files from here: and print them out following the instructions on Thingiverse
      2. Get the remaining parts: 
        - Raspberry Pi Zero W
        - 2x ICR18650 lithium cell 2600mAh
        - Raspberry camera module
        - Zero camera adapter cable
        - Mini DC dual motor controller
        - DC gear motors
        - ADS1115 ADC board
        - TP4056 USB charger
        - MT3608 boost converter
        - Raspberry CPU heatsink
        - Micro SD card (8GB or more)
        - 2x LED
        - BC337 transistor (or any other NPN) 
        - 11.5 x 6mm switch
        - 4x M3x10 screws and nuts
      3. Wire up the electronics according to this schematic: In case you are not familiar with this: The schematic is optimized for readability. You don't have to use this exact wiring (e.g. connection LEDs to ADS1115) as long as the electrical connections stay the same. For the wire gauges, use around 22 AWG wire for the signal connections and slightly thicker wire for the batteries and motors.
      4. The software comes preinstalled on an SD card image. Download it from here:, extract the files using 7-Zip and flash it to your 8GB micro SD card. Do not boot the Pi before entering your WiFi router name and password in the wpa_supplicant.conf file on the SD.
      5. After the SD card is inserted you can assemble the robot as seem on the pictures on the Hackaday project page. Make sure that all wires are properly isolated. Lithium batteries are very dangerous. If there is a short circuit between the batteries, they can catch fire. 
      6. Turn the robot on and wait for the Pi to connect to your WiFi. After that you can connect to it by accessing its IP followed by the port :3000 like this: If you don't know your Raspberry Pi's IP use a WiFi scanner like "Fing" on your smartphone to scan for devices.
      7. After that you are done! Have fun with your Zerobot! Below are some common questions/problems.

      The robot spins/ doesn't drive right

      The motors might be reversed. You can simply swap the two wires to fix this.

      I can't connect to the Zerobot in my browser

      The Raspberry Pi itself with the SD card image running on it is able to display the user interface in your browser. There is no additional hardware needed, so this can't be a hardware problem. Check if you are using the right IP and port and if you inserted the correct WiFi settings in the wpa_supplicant.conf file.

      I see the user interface but no camera stream

      Check if your camera is connected properly. Does it work on a regular Raspbian install?

      Zerobot and Zerobot Pro - What's the difference?

      The "pro" version is the second revision of the robot I built in 2017, which includes various hardware and software changes. Regardless of the hardware the "pro" software and SD-images are downwards compatible. I'd recommend building the latest version. New features like the voltage sensor and LEDs are of course optional.

      Can I install the software myself?

      If you don't want to use the provided SD image you can of course follow this guide to install the required software: You should only do this if you are experienced with the Raspberry Pi. The most recent code is available on Github:

  • The new Zerobot Pro

    Max.K02/20/2018 at 22:02 17 comments

    All new features: More battery power, a charging port, battery voltage sensing, headlights, camera mode, safe shutdown, new UI

    The new software should work on all existing robots. 

    When I designed the ZeroBot last year, I wanted to have something that "just works". So after implementing the most basic features I put the parts on Thingiverse and wrote instructions here on Hackaday. Since then the robot has become quite popular on Thingiverse with 2800+ downloads and a few people already printed their own versions of it. Because I felt like there were some important features missing, I finally made a new version of the robot.

    The ZeroBot Pro has some useful, additional features:

    • Instead of a single battery with a power-bank circuit, the ZeroBot Pro is now powered by two 2600mAh batteries in parallel. Thanks to a cheap TP4056 Micro-USB charger the case does not have to be opened to recharge the batteries. 5V for the Pi and 6V (optional) for the motors are regulated by MT3608 boost converters.
    • Thanks to a ADS1115 ADC the Raspberry can measure the battery voltage and display it on the user interface
    • The entire user interface has been optimized for various screen sizes. There are now buttons for different functions:
      • A photo button for taking pictures in full resolution. This is not as easy as it appears. The stream has to be stopped to start the raspistill application and then restarts.
      • A toggle button to turn the LED headlights on and off. The LEDs are connected via a transistor to an IO pin. (I adopted this idea from franciscorps version of the ZeroBot:
      • Finally there is a shutdown button that turns the Pi off safely after displaying a confirmation prompt. This should prevent the file system from corrupting
    • The 3D printed parts have been optimized as well to reduce warping and to fit the front panel more easily. 

    If you are interested in building the robot, you can head over here for the instructions: 

    The 3D files are hosted on Thingiverse:

    Download the SD card image:

    After flashing the image to a 8GB SD card, open the file "wpa_supplicant.conf" with your PC and enter your WiFi settings.

  • Easy Setup using SD Image

    Max.K06/24/2017 at 13:07 14 comments

      After a few people ran into problems with the tutorial, I decided to create a less complicated solution. You can now download an SD card image for the robot, so there is no need for complicated installs and command line tinkering. The only thing left is getting the Pi into your network:

      1. Download the image file from here and unzip it to your PC:
      2. Flash the image to an 8GB or bigger micro SD card with the software of your choice (e.g. Etcher). Don't plug the SD into the Raspberry yet!
      3. In the boot partition of the SD, open the file wpa_supplicant.conf (e.g. using notepad). Change wifi ssid and password to your wifi name and password. The file will be automatically moved to its spot of the Pi's file system on boot. If you make a mistake, you just need to create the file again.
      4. After the Pi has booted up, find out its IP address using your routers interface or through an app like Fing. Connect to this address (e.g. with any browser on your computer

      If you don't want the robot to be restricted to your home network, you can easily configure it to work as a wireless access point. This is described in the tutorial.

      EDIT 29.7. Even easier setup - the stream ip is selected automatically now

  • Introduction

    Max.K05/29/2017 at 20:53 1 comment

    The goal for this project was to build a small robot which could be controlled wirelessly with video feed being sent back to the user. Most of my previous projects involved Arduinos but while they are quite capable and easy to program, there are a lot of limitations with simple microcontrollers when it comes to processing power. Especially when a camera is involved, there is now way around a Raspberry Pi. The Raspberry Pi Zero W is the ideal hardware for a project like this: It is cheap, small, has built in Wifi and enough processing power and I/O ports.

    Because I had barely ever worked with a Raspberry, I first had to find out how to program it and what software/language to use. Fortunately the Raspberry can be set up to work without ever needing to plug in a keyboard or Monitor and instead using a VNC connection to a remote computer. For this, the files on the boot partition of the SD card need to be modified to allow SSH access and to connect to a Wifi network without further configuration.

    The next step was to get a local website running. This was surprisingly easy using Apache, which creates and hosts a sample page after installing it.

    To control the robot, data would have to be sent back from the user to the Raspberry. After some failed attempts with Python I decided to use Node.js, which features a library. With the library it is rather easy to create a web socket, where data can be sent to and from the Pi. In this case it would be two values for speed and direction going to the Raspberry and some basic telemetry being sent back to the user to monitor e.g. the CPU temperature.

    For the user interface I wanted to have a screen with just the camera image in the center and an analog control stick at the side of it. While searching the web I found this great javascript example by Seb Lee-Delisle: which even works for multitouch devices. I modified it to work with a mouse as well and integrated the socket communication.

    I first thought about using an Arduino for communicating with the motor controller, but this would have ruined the simplicity of the project. In fact, there is a nice Node.js library for accessing the I/O pins: I soldered four pins to the PWM motor controller by using the library, the motors would already turn from the javascript input.

    After I finally got a camera adapter cable for the Pi Zero W, I started working on the stream. I used this tutorial to get the mjpg streamer running: The latency is surprisingly low at just 0.2-0.3s with a resolution of 640x480 pixels. The stream was then included in the existing HTML page.

    With most of the software work done, I decided to make a quick prototype using an Asuro robot. This is a ancient robot kit from a time before the Arduino existed. I hooked up the motors to the controller and secured the rest of the parts with painters tape on the robot's chassis:

    After the successful prototype I arranged the components in Fusion 360 to find a nice shape for the design. From my previous project ( I knew that I would use a half-shell design again and make 3D printed parts.

    The parts were printed in regular PLA on my Prusa i3 Hephestos. The wheels are designed to have tires made with flexible filament (in my case Ninjaflex) for better grip. For printing the shells, support materia is necessary. Simplify3D worked well with this and made the supports easy to remove.

    After printing the parts and doing some minor reworking, I assembled the robot. Most components are glued inside the housing. This may no be professional approach, but I wanted to avoid screws and tight tolerances. Only the two shells are connected with four hex socket screws. The corresponding nuts are glued in on the opposing shell. This makes it easily to access the internals of the robot.


    Read more »

View all 4 project logs

  • 1
    Installing The Latest Raspbian Image

    DISCLAIMER: This is not a comprehensive step-by-step tutorial. Some previous experience with electronics / Raspberry Pi is required. I am not responsible for any damage done to your hardware.

    I am also providing an easier alternative to this setup process using a SD card image:

    This tutorial is based on Raspbian Jessie 4/2017

    Personally I used the Win32DiskImage for Windows to write the image to the SD card. You can also use this program for backing up the SD to a .img file.

    IMPORTANT: Do not boot the Raspberry Pi yet!

  • 2
    Headless Setup

    Access the Raspberry via your Wifi network with VNC:

    Put an empty file named "SSH" in the boot partiton on the SD.

    Create a new file "wpa_supplicant.conf" with the following content and move it to the boot partition as well:

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
        ssid="wifi name"
        psk="wifi password"

    Only during the first boot this file is automatically moved to its place in the Raspberry's file system.

    After booting, you have to find the Raspberry's IP address using the routers menu or a wifi scanner app.

    Use Putty or a similar program to connect to this address with your PC.

    After logging in with the default details you can run

    sudo raspi-config

    In the interfacing options enable Camera and VNC

    In the advanced options expant the file system and set the resolution to something like 1280x720p.

    Now you can connect to the Raspberry's GUI via a VNC viewer:

    Use the same IP and login as for Putty and you should be good to go.

  • 3
    Installing the required software (update 2018)
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install apache2 node.js npm
    git clone Desktop/touchUI
    cd Desktop/touchUI
    sudo npm install express
    sudo npm install
    sudo npm install pi-gpio
    sudo npm install pigpio

    Run the app.js script using:

    cd Desktop/touchUI
    sudo node app.js

    You can make the node.js script start on boot by adding these lines to /etc/rc.local before "exit 0":

    cd /home/pi/Desktop/touchUI
    sudo node app.js&

    The HTML file can easily be edited while the node script is running, because it is sent out when a host (re)connects.

View all 7 instructions

Enjoy this project?



straggler1 wrote 06/08/2018 at 17:47 point

Thanks for putting all this work into making this project accessible to others. I finally got mine to work last night. In you opinion, how hard would it be for someone with no coding experience to add a pan tilt servo movement to the camera and implement it into your code? I can follow tutorials on pan/tilt servo movement with plenty of resources online but implementing the control into your modified UI seems intimidating. Do you have any tips for me or any bits of advice as I venture into this? Thanks again! 

  Are you sure? yes | no

Max.K wrote 06/09/2018 at 16:25 point

Interesting! A good place to start would be Seb Lee's multitouch example, that I used as a base for my interface:

On his website is an example where the left side of the touchscreen is used as a joystick and the right as a button for shooting. You would have to implement a second joystick for the right side instead of this button. 

I have prepared this for you:

It should work on pc and touch devices but I'm not sure if multitouch is functional.

The html will "send" two more values for pan an tilt next to the motor control values. You will only have to modify the app.js file to receive these values. 

  Are you sure? yes | no

straggler1 wrote 06/14/2018 at 05:49 point

Thank you so much for this! I very much appreciate it. I am very excited to try all this out soon. 

One more question not relating to the above. I am attempting to update the existing code to run the upgraded version of zerobot. Step one of that process you listed is to GIT clone the touchUI. However when I run that command I get informed that the folder touchUI already exists and contains files. What is the correct way to update it? I attempted to simply delete the old touchUI folder on the desktop and replaced it with the new. This however bricked the whole thing. I would love your advice on how to proceed from here. Thank you. 

  Are you sure? yes | no

Max.K wrote 06/14/2018 at 09:27 point

The easiest way is probably to install the new sd card image instead of trying to update the older one. The update should usually work however.

  Are you sure? yes | no

hack wrote 06/06/2018 at 04:52 point

This has been so much fun putting together.  The software was a breeze to install thanks to all your hard work.   Everything seems to work fine.   I tested the software and the motors move, the video works and the lights turn on!  I ended up using a lithium ion battery pack from adafruit because I wasn't having much success soldering the two batteries together .  My main problem right now is wire management.  Right now I can't fit everything in the case.  I'm working on cutting down the length of the wires, because I made them too long.    Anyone have tips on other ways to save space?    Thanks!

  Are you sure? yes | no

Max.K wrote 06/07/2018 at 07:06 point

That's great to hear, thanks!

About the wire management: Do not use more than one boost converter module. Some of my images show two, but both won't fit. Also, if you are using a flat lipo battery maybe you can break off the parts of the printed case that would hold the standard batteries. That might give you some more room. But the most important thing is to get the wires as short as possible. 

  Are you sure? yes | no

CAPNMATTTTT wrote 05/25/2018 at 04:14 point

Great project! I got mine up and running tonight. I have a quick question, is there a way in software to to rotate the camera image? It seems to be flipped on mine? Its odd, because it looks like I installed it correctly.

  Are you sure? yes | no

Max.K wrote 05/25/2018 at 06:48 point

Yes, that can be fixed easily. In the file in the folder touchUI on the desktop you have to remove „-vf -hf“. Use VNCviewer to get access to the user interface, then change the file with a text editor and reboot.

  Are you sure? yes | no

Kris wrote 05/19/2018 at 04:47 point

How long does this robot last on a full charge? and what is the overall dimensions of the robot? Thanks.

  Are you sure? yes | no

Max.K wrote 05/20/2018 at 10:08 point

At least two hours, probably a lot more depending on the usage. 

95mm length, 115mm width, 70mm height

  Are you sure? yes | no

germainduhil wrote 05/15/2018 at 05:26 point

Hi very nice project. I didn't see diode to protect Dual Channel DC Motor Driver. It is not necessary to reduce damage on MOS ? 


  Are you sure? yes | no

Max.K wrote 05/15/2018 at 06:55 point

I guess the IC on the board has internal diodes, or else the H-bridge would not work. There is also a diode soldered to the board, that might just be for reverse polarity protection.

  Are you sure? yes | no

hack wrote 05/07/2018 at 15:49 point

Hi.   This is a great project!   Thanks for all your hard work!    I got the image downloaded to an SSD and the software seems to be running fine.   Just waiting on a few more parts to arrive so in the meantime  I decided to get the nuts glued into the shell.   This has proven to be quite frustrating for me.   Wondered if anyone had any tips on how they did this and what type of glue they used.  It was hard to apply the glue and then try to position the nut in place with tweezers but maybe I’m doing something wrong?  


  Are you sure? yes | no

Max.K wrote 05/07/2018 at 17:34 point

Thanks! The easiest way would be to stick a longer m3 bolt though the plastic part and to screw it into the nut. Before pulling on the bolt to sink the nut in place, apply a few drops of glue to the nut. This way the nut is aligned perfectly.

  Are you sure? yes | no

hack wrote 05/07/2018 at 18:14 point

Ahhh.   Brilliant - don’t know why I didn’t think of that !  Thanks!

  Are you sure? yes | no

grobi_schalenelli wrote 05/01/2018 at 21:21 point


Why is the ADS1115 powered at 3.3 volts? According to the data sheet, it can be up to 7 volts. Does that have a definite reason?

  Are you sure? yes | no

Max.K wrote 05/04/2018 at 06:43 point

In order to communicate via i2c with the Raspberry Pi, the ADS1115 also needs to run at 3.3V. The ADS1115 has two pullup resistors that you could desolder, then it would work at 5V. But I though setting it to 3.3V was the easier option.

  Are you sure? yes | no

manu663 wrote 04/16/2018 at 20:57 point

Hi all, The zerobot works as a charm but when I forward the port through my router, I get only access to the remote CTL but I receive no video stream. Any advice ? Thx !

  Are you sure? yes | no

Max.K wrote 04/18/2018 at 07:59 point

There are two ports that you have to forward, 9000 and 3000.

User averneus wrote that he got this to work in the comments here:

  Are you sure? yes | no

manu663 wrote 04/18/2018 at 18:53 point

Thank you so much ! 

I certainely read that to quickly! My bad !

  Are you sure? yes | no

peppegti wrote 04/13/2018 at 11:16 point


I want to connect with ssh, but I don't know the user and pass

  Are you sure? yes | no

Max.K wrote 04/13/2018 at 14:03 point

It's the default: "pi" and "raspberry"

  Are you sure? yes | no

laflaf3d wrote 04/05/2018 at 11:23 point

Hi Max,

I try your code during I wait to receive component. When I hit "Off" button, my pi shutdown even if I answer "cancel". So in the code I saw :

if(confirm("This will shutdown the Pi.\nAre you sure?"))
alert('Shutting down...\nPlease wait 20s before turning the power off.')
socket.emit('power', 1);

I guess "{ }" are missing !? And alert() and socket.emit() are always executed...

So I wrote that :

if(confirm("This will shutdown the Pi.\nAre you sure?")){ 
alert('Shutting down...\nPlease wait 20s before turning the power off.');
socket.emit('power', 1);
alert("Okay, on the road again!");

I aim to redesign the body to avoid support and add lego compatibility. I will tell you more.

Very very thanks for your work. Beautifull job!

Best regards

  Are you sure? yes | no

Max.K wrote 04/05/2018 at 12:44 point

Thanks, Good catch! I must have though I was using Python. Will be fixed asap.

  Are you sure? yes | no

laflaf3d wrote 04/05/2018 at 13:17 point

and about Nodejs ?

  Are you sure? yes | no

dinujohnk wrote 04/03/2018 at 12:45 point

Hey, why is the USB port and Ethernet disabled in the given image?? Is there any particular reason, what if I turn it on. How to turn it on? 

  Are you sure? yes | no

Max.K wrote 04/05/2018 at 07:48 point

Sorry about the late answer. If you scroll down on this site, spencerjack96 has asked the same question and got a solution from someone.

  Are you sure? yes | no

abuse.twink wrote 04/03/2018 at 12:30 point

Thanks for the detailed description of the process, it turned out very cool

  Are you sure? yes | no

laflaf3d wrote 03/30/2018 at 07:46 point

Hi, I love this project. I have yet the Pi zero and motors. I ordered the other components.

I have some idea to upgrade this robot after my first try :

- make body "Lego" (and "Lego technic") compatible

- improve code to add other stuff (other light, servo, WS2812 lights).

Best regards

  Are you sure? yes | no

Hack&Invent wrote 03/22/2018 at 22:40 point

Hey nice job! wondering why your project didn't win the 2017's edition?

  Are you sure? yes | no


[this comment has been deleted]

Max.K wrote 03/13/2018 at 22:02 point

I'm not exactly sure what the link does. What version of the image file are you using? Have you tried adding ":3000" after the IP? This should get you to the interface immediately.

  Are you sure? yes | no

Max.K wrote 03/17/2018 at 22:50 point

Did it work before you upgraded to the newer version? The message that you get should only show when the port is not entered after the ip, but I'm no sure about that. In most occasions it might be easier to download the Zerobot Pro image and flash that to the sd card. 

  Are you sure? yes | no

electrobob wrote 03/01/2018 at 14:53 point


  Are you sure? yes | no

kentfisker wrote 01/17/2018 at 13:50 point

This looks awesome - I am trying to buy the components to make one.

What is the little board between your battery and one of the motors?

  Are you sure? yes | no

juandelacosta wrote 03/06/2018 at 03:27 point

battery charger

  Are you sure? yes | no

spencerjack96 wrote 01/05/2018 at 17:38 point

Hi. Did you lock down the USB ports as they don't appear to work booting from a fresh image :(

  Are you sure? yes | no

Max.K wrote 01/10/2018 at 09:25 point

Sorry for the late answer. Yes, at some point I configured the usb port as a usb-lan bridge to my computer. It should be reversible but I would have to look that up. 

  Are you sure? yes | no

juandelacosta wrote 01/12/2018 at 07:37 point

that explains why i couldnot  pair the ps3 controller directly. had to do pair separately via pc app

  Are you sure? yes | no

juandelacosta wrote 01/16/2018 at 06:13 point

if you can please do so next step is trying to add a usb mic and speaker

  Are you sure? yes | no

juandelacosta wrote 02/01/2018 at 04:10 point

 you need to edit /boot/cmdline to remove modules-load=dwc2,g_ether  .. and remove the reference dtoverlay=dwc2  from /boot/config.txt

seems to work

  Are you sure? yes | no

juandelacosta wrote 12/20/2017 at 10:15 point

i dont know but doing a update and upgrade killed node and a few other things. what should i do?

  Are you sure? yes | no

Max.K wrote 12/20/2017 at 21:15 point

I'm not sure what that problem could be. Maybe it installed a new version of that is not compatible with the code. If nothing else works you can flash the SD image again.

  Are you sure? yes | no

juandelacosta wrote 12/20/2017 at 21:23 point

yeah but im adding other features like ps3 controller,audio mic and  sound and i got the robot also to samba share files.

  Are you sure? yes | no

Max.K wrote 12/21/2017 at 14:10 point

Maybe you can try to run the node script from the command line to see if there are any errors. But I‘m not an expert on this.

  Are you sure? yes | no

juandelacosta wrote 01/11/2018 at 01:53 point

its strange the ccd its self fried

  Are you sure? yes | no

juandelacosta wrote 01/11/2018 at 01:54 point

picked up a new pi 5mp and did a bit of testing everythung works and even the pcb works but not the ccd. ill find a new ccd hopefully

  Are you sure? yes | no

guiducci.alessandro wrote 10/24/2017 at 19:15 point

hi! I'm creating your robot, unfortunately i haven't your same motor driver so I've tried with this model: 

2Pcs L9110S H Bridge Stepper Motor Dual DC Driver Controller Module  The wbe interface works and the motor too, but both motors sping with no sense, not according with the direction given by the web interface. Do you thing the driver is wrong or can it works with this project too? I'm using same wiring diagram 

  Are you sure? yes | no

Max.K wrote 10/25/2017 at 16:06 point

Your motor driver should be compatible. 

The Raspberry generates a voltage between 0 and 3.3V on the output pins that are connected to the driver. Try using a multimeter to check if the voltages change when you move the joysticks. 

Maybe it's just a simple problem with the wiring of these pins.

  Are you sure? yes | no

guiducci.alessandro wrote 10/25/2017 at 17:35 point

with multimeter  i read on both motor tension within a range of + 3,26 and -3,26V, depending on the joystick directions, but the problem is that when I move the joystick:

- forward -> M1 spin forward, M2 not move

- right -> M1 and M2 move forward

- left -> M1 spin backward 

- backward -> M1 spin backward , M2 spin forward

How can I debug this kind of problem, there is some mapping on the SW to set?

  Are you sure? yes | no

Max.K wrote 10/25/2017 at 19:34 point

As you're describing it, the behavior of motor 1 is correct. M2 would need to be reversed and is also missing one direction of movement. This still looks like a wire that is attached to the wrong pin. You can configure the directions via software but that would be the same as reversing the motor cables.

Try measuring the voltage between each pin and ground instead of between two output pins (the negative voltage would suggest that you did that previously).

You can also test the motor driver without the raspberry using a 5V or 3V source on the input pins to see if the motors are turning.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates