Wifi Lego Camera Robot

A Wifi controlled robot with camera


This page describes the construction of the WiFi RoboCam, a LEGO robot that uses a wireless camera and is controlled with a computer and an Arduino over wifi. The idea started as a hobby project, but was later used for the course Hardware Engineering of my ICT study.

The robot has the following functionalities:

  • Controllable via internet from a browser
  • Precision control with adjustable motor speeds
  • A tiltable wireless camera
  • Suspended bumper to protect against collisions
  • A rotating light to announce it’s presence
  • Large operating range through added antenna’s

RoboCam in action

Electrical wiring diagram
The IP camera and Arduino both work on 12 volt. They are powered by 12 AA 1,5 volt batteries, providing 18 volts. This voltage is lowered to 12 volts by a L7812CV voltage regulator. That way there will still be 12 volts for the camera, even when the batteries are running empty (thus supplying less then 1,5 volt each.
Electrical wiring diagram

Communication diagram
This diagram shows how each part communicates with the other parts.
Communication between all components
This happens when the users clicks a button:

  1.  The selected speed for both motors is send through a socket connection to the WiFly shield.
  2. The WiFly shield sends this command to the Arduino through a UART (serial) connection.
  3. The Arduino then translates the speeds to an Infra Red signal which is send to the PF IR Receiver
  4. The IR Receiver then makes the motors turn.

Robot design
The idea for the design is illustrated by these 3D renders

Figuring out how software should work took about two weeks. The construction of the robot was done in one week. These photo’s show how.

Control panel
The control panel is a html page with a MJPEG video stream and a Processing (Java) applet for controlling the robot. Each button on the applet indicates a direction for travel. Using the sliders allows the user to finetune the speed used for each direction. The arrows are to be held down, the robot will stop when the button is released. The smaller triangles are for movement in steps and cannot be held down. The buttons in the lower corners are for tilting the camera.
Control Panel

Source code
The source codes can be downloaded here:

These pages have proven to be useful:

8 thoughts on “Wifi Lego Camera Robot

    • The operating range depends on the strength of the WiFi signal. Walls and other WiFi networks will decrease the range. During tests at my university it was able to drive about 25 meters from my router. (My university has a strong WiFi network causing interference.) The maximum range for WiFi 802.11g is 140 meters outdoors, although I haven’t tested it. The 12 batteries for the electronics last for about an hour, the lego battery box lasts longer.

  1. Hi!

    I´m trying to do something similar to your project, and I´m having problems with my camera…

    Could you please upload all files (including html server) or send them by email?


  2. Dear Bas,

    I encounter an error when compiling the applet with processing. It seems that the GUI uses a few png that wasn’t included such as controlpanelup.png. I just started doing the programming using your configuration and manage to get wifly and arduino up and running but only having problem with the GUI part.

    Hope to hear from you soon regarding the issue mention above. Really appreciate you help and the guide above is very comprehensive!


Leave a Reply to Song Keat Cancel reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>