I guess you can tell the last week or so has been dedicated to the software for my Aquarium Controller.
The DS1307 Real-Time-Clock has been a pain since I put it together. After countless checks and rechecks, lots Googling and moving back and forth from the Arduino Uno where it was working to the Arduino Mega where it was not working, I found the solution.
On the Uno, the SDA is wired to Analogue A4 and the SCL is wired to Analogue A5. With the Mega, the SDA needs to go to 20 and the SCL goes to pin 21.
Some of the other things I have included:
- Restart in previous status after reboot
- Temperatures are now read in real time
- pH is read in real time
- Event timmers
- Feeding pause, on timmer or manual
- Dossing on timmer or manual
- Auto Top up including float switch
- Alarm system
The dossing function is working great except it is using delays to do the servo swing and this prevents the controller from doing anything else during that time.
I have also managed to get Python to talk to PushBullet and send me updates which could include anything. The big problem here is when I use Python to talk to the Arduino, as the serial connection is established, the Arduino resets. There are a few methods to prevent this that I must still try.
I removed the DFRobots LCD panel with buttons and replaced it with the simple 16×2 LCD. I am not going to use the buttons so have rather used my own buttons for certain tasks.
I was looking at a menu system but my brain couldn’t take it and my ultimate aim is to install a touch screen so will implement a menu structure then. For now, all settings are hard coded at upload time.
I did run a live test using the temperature probe and pH probe on my current tank over the weekend and all seemed to be 100%. I now need to look at a housing and such like and then take the controller live.