“Pedrone” Part #4 – drive it using web browser and WiFi

This is the last step. “Pedrone” is now complete. Please, remember that this is just a toy, you can’t use it to discover any sort of life on Mars ! I wrote a small Android application that acts like a mini web-server receiving commands from a standard web browser. I realized a demo video, capturing the screen while driving Pedrone with my web browser (SeaMonkey). Here it is:


pedrone3 di robotop

The Android application is relatively simple. It receives commands as “get” requests and, depending on the parameters, outputs the sound sequence to communicate with the microcontroller. Acting this way, the Pedrone executes the requested movement. After moving, the application takes a picture of the new situation (position) and gives the answer to the browser, that is still waiting. The process is a little bit slow, ‘cause the full path for the command is: 1) you click a “button” on the navigation map on the browser 2) an internet request is sent to the mini webserver 3) the webserver executes the command and send a sound sequence to the microcontroller 4) the microcontroller decodes the command and runs the motors for half second (short move) or one second (long move) 5) the application takes a picture 6) the application sends back an answer to web browser, changing the name of the image to force the browser to reload (no-cache) 7) the browser sends a new “get” to download the updated image. A screenshot of the Android application is here:

Screenshot of the Android App Pedrone-Rx3 (click to enlarge)

Screenshot of the Android App Pedrone-Rx3 (click to enlarge)

If you want, you can freely download and install this App from the Google Play Store.

For the mechanical part, I used the Lego Technic (my “children” have given me when they left university) with addition of some small screws and strong glue to create the adapters from Servo-motors to wheels and from structure to Servo-motors. In the following picture you can see how it was realized.

Three different views of "Pedrone" (click to enlarge)

Three different views of “Pedrone” (click to enlarge)…

The microcontroller circuit is not changed, look at Part #2 for complete schematics. The firmware has some changes. You can download the C source and the compiled HEX packaged in a zip file from the link : pedrone3x.zip ; the password to unzip is : eficara. Remember to set the correct fuses configuration when burning the micro. You can read such configuration in the first lines of the C source file. Here is the full C source list.

Finally, note that you can drive the “Pedrone” on your local net using a PC / Tablet / Smartphone connected on the same WiFi subnet, but you can also control it from everywhere in the world if you set your modem / router with the following rules:
1) force the router to assign a fixed IP to the MAC address of the WiFi interface of the smartphone you use as “receiver”, es: assign local IP 192.168.1.6 to MAC address 11:22:33:AA:BB:CC; this way the “Pedrone” smartphone will have every time the same IP on your local network.
2) modify the router’s firewall rules to accept incoming connections to port 8080, redirecting the requests to the IP assigned to the “receiver” (192.168.1.6 in the example)
3) get a free account on some Dynamic Dns service, as no-ip or dyndns or others and set the relative username and password in the router’s Dynamic Dns settings.
After this, you can reach “Pedrone” from everywhere in the world (if there is an internet connection !) with a standard web browser, writing the address http://my-assigned-dynamic-ip.com:8080 in the navigation bar.

Historical notes:
The idea for this project was born in August 2009, when I was in France for a sabbatic time and my smartphone was equipped with WM6. I realized a circuit and a couple of applications to test the motor driving using DTMF tones. After that, I published a video on YouTube describing the general concept. After some months I removed the video ‘cause Google acquired YouTube. I think that too much power in the hands of a single subject is very dangerous, but now that all the world is fulfilled by Android devices, it’s impossible to stop the “Masters of Universe”… Anyway, the original video is now stored on “DailyMotion”. If you want, take a look here:


dtmf_remote di robotop