Andre's Web enabled Arduino controller

Joined
8 Mar 2011
Posts
209
Reaction score
2
Location
Cape Town, Bellville
Sorry for starting yet another thread on an Arduino controller, but I didn't want to clog up @Manic's thread and I think we're going in slightly different directions.

I really want a controller that is web enabled, that is, one which I can manage with a web browser, either from my PC or from my phone.

I thought I'd share what I've built so far, it's been going slow but maybe posting about it will keep me motivated a bit more :)

These are the components I'm using:

- Arduino Mega2560
- Arduino Ethernet Shield
- DS1307 Real Time Clock
- DS18B20 based temperature sensors
- Relay modules with built transistor / opto drivers that I can connect directly

46444f590ad47946d.jpg


My plan is to hook up the Arduino to my home network, which has ADSL and a Wireless access point. This way I can access the Arduino controller with a web browser on my PC, or using Wifi via the access point, from a phone or tablet. Opening up a port on my firewall I can also access it from the internet if I'm not at home (this has some security implications, but a VPN or password protection should sort this out).

So far I have the web server running on the Arduino, serving static files (css, images) from the SD card that is included on the Ethernet Shield. It also creates dynamic pages for specific URLs. Right now the only thing it does is report on current temperature.

Here are a few screenshots of the current program running with 5 temperature sensors. The temperature sensors all connect to the same pin, and the 'Scan' button scans this bus for probes and sets their resolution. The 'Temperature' button then reports the temperature for each of the probes.

46444f59085bc3ff8.png


46444f59085bca932.png


46444f59085bd0adb.png


I don't mind sharing the code if anyone is interested. For the current version you will need the Arduino Mega2560, Ethernet Shield, a MicroSD card, one or more DS18B20 temperature sensors and a 5k resistor.

You can download the current version here: http://code.google.com/p/arduino-aquarium-web-controller/downloads/list


Next step is to add the clock.
 
Last edited by a moderator:
Looking good Andre can you access it remotely or just on the lan. I am interested in that code will pm you my email address.
 
what was the total cost for everyting ?
 
Very nice. Are those 1-wire temp sensors? I've been fiddling with a Make Controller with the intention of doing something similar.

Can the ethernet shield resolve DNS and make an outbound request? Would be nice if it would push its status up to a server somewhere. The server could then report if it hadn't heard from the controller in a while.

I have a lot of experience with asynchronous web applications. I'm happy to help out a bit and bounce ideas if you like.
 
can you access it remotely or just on the lan

That would depend on your network configuration. The webserver runs on the Arduino, and you give it an IP address. To access it outside of your local lan you would need to do some port forwarding on your internet router, or set up a VPN to connect to your local network.

what was the total cost for everyting ?

I bought everything off eBay, these are the prices including shipping and taxes (I had to pay 14% VAT at customs when I picked it up)

- Arduino Mega2560 - R303.33
- Arduino Ethernet Shield - R190.28
- Realtime Clock Module - R92.83
- Waterproof Temperature Probe - R42.67 each
- 8 Channel Relay Module - R105.49

Are those 1-wire temp sensors?

Yeah, they're DS18B20 1 wire sensors. You can get just the chips from Mantech or RS, or you can get the already constructed probe off eBay for not much more.

Can the ethernet shield resolve DNS and make an outbound request? Would be nice if it would push its status up to a server somewhere. The server could then report if it hadn't heard from the controller in a while.

The Ethernet shield proves you with a TCP/IP stack, and you have to implement everything else on top of that yourself. But luckily the HTTP protocol isn't that complicated if you stick to the basics.

Here is an example of downloading a web page from the internet using a DNS name: Arduino - DnsWebClient
 
Thats cool Im looking to get the wifi shield set up on mine. I like your temperature probes I went for the chips but I might change them later.
 
@AndreM very nice dude... Brilliant idea... Wish the mega had more pins so that you could have the wifi shield as well as a TFT..
 
Last edited by a moderator:
@AndreM very nice dude... Brilliant idea... Wish the mega had more pins so that you could have the wifi shield as well as a TFT..

Wow, that is surprising that you've run out of pins.

I have not worked with the Wifi shield, but the Ethernet Shield only uses 5 pins out of the 54 available.

On the Mega it uses pin 50, 51 and 52 for the SPI bus (through the ISP header) and it uses Pin 10 for Ethernet select and pin 4 for SD select.

The RTC will use two pins (I2C bus), and the temperature probes uses one shared pin.

How many pins does that TFT use? Maybe it would make sense to rather use a driver for the TFT instead of connecting it directly if it uses up that many pins.
 
Last edited by a moderator:
Sorry my last post was meant to read ethernet shield.. I do have the wifi modules.,. But didnt get to try them out yet.

Yea.. 6 channels of Pwm channel LEDs, some Pwm fans, temp Controllers, heaters etc Only have 1 pin left, using the itdb02 LCD shield, so the TFT is using like 40pins off the mega... Prob can get an i2c for the TFT.. Too much of a reprogramming headache though.
 
Last edited:
40 pins for the display, yeah, that uses up almost all of the pins.

I guess this is where the focus of my project differs, I prefer having a web interface so I can use my cellphone or other internet enabled device to control it. Although, having both would be great :). I do have an HD44780 16x2 LCD I might hook up for some status information.
 
I do have an HD44780 16x2 LCD I might hook up for some status information.
DO you know how many pins this lcd uses?
 
Last edited:
Back
Top Bottom