Building an Arduino HTTP Robot Web Server

Arduino Ethernet Shield mounted on an Arduino Mega 2560

Introduction

As powerful computers become less expensive, smaller, and more modular a doorway has opened for professionals and hobbyists working in technology fields. Powerful microcontrollers can be purchased for under $50. These microcontrollers allow for programers to interact with, and control physical devices. These microcontrollers have turned many programmers and computer scientists into physical inventors rather than only software engineers.

A further movement away from proprietary models of development to Open Source technologies and an Open Source mindset is also changing the way people are interacting with machines. Operating systems such as Android and Linux allow people to interact with the low level of machines and to adjust these machines for specific tasks and purposes never conceived by their original designers.

My project seeks to take advantage of some of the momentum among technologists, programmer, and hobbyist inventors. I seek to create a robotic device that houses a self contained HTTP server. Control of the device will take place via standard Web browsers on a client's machine.

Reasoning

Internet technology is progressing at incredible speed, and while various communication channels are being adopted, these technologies almost all rely on the basic structure of the Internet to carry out their functions. As of 2011 it is difficult to find a device capable of communication that does not have an integrated Web browser. This is the main reason for choosing to make the proposed robotic device HTTP controlled.

If the device I plan to create houses and maintains it's own server, then the only thing a client would need to control the machine would be a Web browser and a connection. The simplicity and stability of the HTTP protocol also make it desirable to build upon, as a robust and well tested infrastructure already exists to handle these communications. Standards are also well established allowing the actual interface for controlling the device to be familiar to users and nearly guaranteed to work on any range of devices they may have.

Methodology

After investigating the available options for microprocessors and microcontrollers, the decision has been made to use Arduino as a base for The Machine. Arduino has many benefits for individuals and groups trying to learn how to control hardware. A few of these benefits include:

  1. Open Source Hardware – Arduino devices themselves are open source. This means that the basic structural design and electrical engineering of Arduino controller boards can be reproduced by any individual or company without limitation. This makes Arduino hardware relatively affordable.
  2. Open Source Software – The Arduino language is a C-based language that is open source. The software to upload Arduino programs (referred to as “sketches”) is freely available for Mac, Windows and Linux systems. Open source software projects tend to have a community of enthusiasts who are willing to share and assist with code. This makes it possible to legally extend and enhance ideas developed by others and, more importantly, to see how similar projects have been designed. The open nature of the code also makes it possible to freely share the designs and code developed in the course of this project with no restriction. Following C-style programming Arduino accepts libraries to simplify some tasks. These libraries are generally posted online and are free for general use.  
  3. Starter kits and tutorials – Arduino kits aimed at beginners can be purchased with parts and instructions for simple projects. These simple projects are a good basis for learning and extending electronic projects.
  4. Expansion Specifications – The Arduino project offers a design specification for expansion circuits referred to as “shields.” This has led to a number of easy to use components for input and output. Notable to this project is the Arduino Ethernet Shield which will be the first design iteration in controlling The Machine from a Web browser.

Goals

The goals of the project are to increase my understanding of physical electronic devices and circuits while learning how to interact with these devices through custom code. I intend to create a small robot or controllable physical device that can be operated remotely via a standard Web browser. The project will be composed of three distinct facets:

  1. Create the device – Create a controllable robotic device. This may be something similar to a small motor driven vehicle.
  2. Create an embedded Web server – The integrated web server will be be built into the robot and will interpret HTTP GET requests and translate them into signals that can be processed by the robot.
  3. Create the controller - The controller will consist of a series of Webpages that comprise an interface for controlling the robot. This will rely on standard HTML pages enhanced by JavaScript. When finished the pages that make the controller will be added to the embedded server of the device.

Ideally the device would work remotely via a WLAN network connection but that would be a later step and it may not be possible to complete this aspect in the first phase of the project.

In the course of the project I expect to enhance my knowledge of programmable microcomputers, electronic circuits, and physical interaction of computer devices. In the process it may be necessary to learn some more aspects of networking and to create a solution to allow the device to broadcast it's changing IP address to the world.