Building a low cost network enabled RGB-controller using an Arduino and eControl
Recently I build a prototype of a RGB-controller which can be controlled over a home network using eControl (a smartphone application I’m building for controlling home automation devices). The RGB-controller is based on an Arduino with network shield, which should proof that a ‘Internet of things’ with low cost devices is realizable right now.
The Arduino uses a ATmega328 which is a 8bit microcontroller with only 32KB of flash memory and running at a max of 16MHz. The ethernet shield is using a simple W5100 controller, which means that all TCP/IP protocol handling should be done by the micrcontroller. So I’m not cheating by using an ethernet controller with build in webserver.
To compare, the average home router (sold around 25 Euro) contains a 32bit microprocessor running over 100MHz and contains at least megabytes of flash. The average smart phone (sold around 200 Euro) comes is around1GHz containing gigabytes of Flash. For the people not knowing what I’m talking about, it will be hard to find cheaper hardware then the hardware I used for this prototype.
The prototype includes the following functionalities:
- Automatically obtaining an ip-adress from an home router using DHCP
- Advertising the device (making it detectable) using a online service connected to using DNS
- Simple HTTP server making it possible to smartphones, computers etc. to connect
- HSV like color cycling
And there is even enough memory left for applications like:
- The addition of an RF Transmitter making it possible to control for example wireless wall switches
- Running time schedules, scenes etc.
- Addition of climate sensors
- Addition of an IR-receiver
A YouTube movie will be created soon!
Going embedded
From the embedded prototyping systems I considered, the Arduino is one of the cheapest and the most popular ones. The combination with the ethernet shield will make it the perfect addition for my home automation project. This weekend I received the one that I have ordered online.
The ATmega328 microcontroller used by the Arduino includes a serial connection, PWM outputs, I2C bus, analog inputs and more. This will make it ideal for connecting my LCD TV, RGB Led lighting, climate sensors and other equipment to the network. Running simple macros on the controller will in some cases take away the need of a home server being on 24/7. It seems that I’m not far away from generating my first code for embedded devices.