Loading...
Pages: [1] 2 3 4   Go Down
Author Topic: Automated Reptile Control System(webserver, Data Logging, RTC and much more)  (Read 5925 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have been working on a home project to automate the control of my ball python cage. the cage has three under-the-tank heaters, humidifier, heat lamp, and UV light.

the arduino system is composed of the following:
Arduino Mega 2560
Arduino Ethernet Shield
RTC Module
5x onewire temperature sensors
2x humidiy sensors
6 relays
SD card in the Ethernet shield
7.5 volt power for the arduino
5 volt power for the relay coils


the system is controlled and monitored through a web server running on the arduino. the system has 8 different pages:
1.) System Overview -- allows the user to see the current temperatures from the 5 onewire sensors, to see if the sensors are currently functioning, the status of the relays (on/off) and the average humidity within the cage



2.)Temperature Adjust - allows the user to configure the system to use either degrees F or degrees C as the temp scale. It also allows the user to control the on/off temperature settings for the three under-the-tank heaters, and the heat lamp. the settings are configured for both day-time and night-time so the tank can simulate lower temperatures at night if the user desires
all data entry areas have logic to determine if the entered values are acceptable. if they are not, the web-page details the issue the user
all user settings are saved to EEPROM




3.)Humidity Adjust - allows the user to configure the system's humidifier on/off settings for both day time and night time
all data entry areas have logic to determine if the entered values are acceptable. if they are not, the web-page details the issue the user
all user settings are saved to EEPROM



4.)Date/Time Adjust - allows the user to set the system's day, month, year, day of the week, and time zone. the system also allows for the hour, minute, and seconds to be updated over the internet through a NTP server. the code is written so a specific IP is not required for the NTP server. instead it uses DNS to resolve the IP of time.nist.gov as it is resolved to all of the server addresses in a round-robin sequence to equalize the load across all of the servers. the system automatically always connects to the internet every 24 hours to update its time again to correct for any drift associated with the RTC
The page also allows the user to configure when the UV light turns off and on signifying when the system considers it either "day time" or "night time"
all user settings are saved to EEPROM




5.)Data Logging Adjust - allows the user to enable or disable data logging, allowing the system to log one sample every 10, 20, 30, 40, 50, or 60 seconds.
This page also explains all the details of the SD card inserted into the ether net shield.
if no SD card is present, it will tell you and prevent the user from data logging.
if the SD card is present, but not formatted, it will tell the user and prevent data logging
if the SD card is present, formatted, but cannot be accessed for one reason or another it will tell the user and prevent data logging
it tells the user the size of the SD card in kilobytes and megabytes
it tells the user the amount of space used on the SD card in both kilobytes and megabytes
it has a progress bar that shows the percentage of SD card space used
data logging enable/disable settings are not saved to EEPROM. data logging must be enabled manually every time the system powers up.



6.)View Recorded Data - lists all the log files on the SD card so the data can be viewed and downloaded by the user. the system creates a different log file every day of logging is enabled. the files are named for the month, day and year so the user can easily look back at what happened with the system at a specific time with ease.





7.)I/O Setup-  allows the user to decide how the 6 relays are controlled - either automatic, or manual. each relay can be configured independently. when the relay is set for manual control, then the user can press a button to turn it on or off





8.)Network Setup - allows the user to configure the system for static settings or DHCP. even if using DHCP, the system shows the user the IP address, subnet mask, default gateway, and DNS server. if the system is using static settings, all user settings are saved to EEPROM





the code is not done, as i am still adding more features, and cleaning up the code. when done, i will post code  smiley-mr-green


Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 15
Posts: 876
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very nice.  You must really like that snake!  Or, maybe you hate having to adjust the environment every 15 minutes.
Logged

Trying to keep my house under control http://www.desert-home.com/

Netherlands
Offline Offline
Tesla Member
***
Karma: 87
Posts: 9387
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks very well done (+1),

(nitpicking -  Automated Reptile Environment Control System  - makes a better acronym  arecs that's an anagram of scare smiley-wink
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very nice.  You must really like that snake!  Or, maybe you hate having to adjust the environment every 15 minutes.

i like making things such as this, but need a reason.... cough.... excuse smiley-wink
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, really nice project!
Can you explain how can you positioning the values into the tables of your html pages?
Do you need to refresh the page everytime you want see if there was a change in the reads, or the page is always "connected" to arduino?

THANKS!!
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, really nice project!
Can you explain how can you positioning the values into the tables of your html pages?
Do you need to refresh the page everytime you want see if there was a change in the reads, or the page is always "connected" to arduino?

THANKS!!

currently the code is written so you need to refresh the page any time you want to see what the current readings are. it would be very easy to add the HTML "refresh" tag to the code to get it to auto refresh.

i have finished my enclosure and posted some images below:









Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i attached my code and the different libraries i used

some things are not done, and i know if a few bugs that need to be fixed, but i would say 98% of everything is working fine.

note: written in IDE version 1.0
Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 87
Posts: 9387
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Decent piece of work!  be proud!
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone
"wallaceb" you have done a very good job here.

Question: It possible this code to work on UNO ?

Thanks
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone
"wallaceb" you have done a very good job here.

Question: It possible this code to work on UNO ?

Thanks


unfortunately no. the entire sketch currently uses 106,000 bytes of FLASH, too much for the UNO. However with that said, most of the 106,000 bytes is the PROGMEM storage of the HTML pages. If the sketch was somehow changed to pull the HTML off the SD card instead, it might fit, but i have not checked.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Is it me or is there an issue with the Arduino.zip file?  When I try to open it, it seems it is invalid...
 I could benefit from this code.  I'm looking for tabulating code to be able to show status of things and then yet to be able to set values via the web.

tb
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have actually completed my code. i added more functionality and fixed bugs.

in the data logging adjust page, i added the ability to delete selected data files and fixed a bug in my used space calculation. now the webpage displays the exact same value as windows explorer does.  smiley-mr-green

i also added another page for system information that includes system up-time, MAC address, number of sensor malfunctions if any, and the amount of free system RAM.


there were about 10 bugs that i found over the course of testing which appear to be fixed. there is still a bug in that the watch dog timer will reset the unit ever 1-2 days if i have data logging enabled, but not if it is off. i am looking into that.


with this said, tonight when i get off work, i will post all the code directly on this page.
Logged

Aix en Provence, France
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very Nice Work indeed do you have a set up diagram as well  smiley
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very Nice Work indeed do you have a set up diagram as well  smiley

are you referring to a system schematic?


i cannot paste my code into the page because of a 9500 character limit. i am going to try uploading it to a file service


edit:
https://www.dropbox.com/s/2hdyqq6l3xn3dol/Arduino.zip

hopefully the supplied link will work.
« Last Edit: February 14, 2013, 10:55:38 pm by wallaceb » Logged

Aix en Provence, France
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Zip worked fine, very nice.

System schematic would be grand, looks well thought out in the pictures.
Logged

Pages: [1] 2 3 4   Go Up
Print
 
Jump to: