|Yesterday, 02:29 PM||#1|
TankDroid - Bluetooth Android-Arduino Controller
Yes, yet another arduino based aquarium controller. Finally am far enough to show you guys what I've been working on.
Inspired by AH's iAqua, robsworld's Robo-Tank, and bits and pieces from other older projects.
I started off reading the iAqua mega thread, and soon realized they were hitting space limits on the MEGA. I decided to go with a DUE and had begun my build with a 3.2" LCD. Later, Rob's mega-thread had started, and one quote stuck out.
In comes the bluetooth, and weeks spent learning to write an app (Android if you haven't guessed), add a couple months of trial and error - and TankDroid was born.
It more or less covers the same things as iAqua, and a little less than Robo-Tank. No remote connect (for now ).
It is not complete (maybe far from it still), and I'd like to continue evolving it - but at this point, I am confident that it works. Still coming across the occasional bug in coding or in the app - but so far working very well. I do need to re-write the app to optimize it, as I used MIT App Inventor 2 which is not the best way to write apps (Takes a few seconds for the initial opening of the app). I also need to clean up the code before I post it, and would like to have it run while I'm on vacation without errors before I'd feel confident posting it.
- Bluetooth Control
- 5 LED Channel Control @ 12-bit PWM (right now set to WW/CW/R/G/B, but will add adjustability if there's enough interest for anyone else to build one of these)
- Sunrise/Low Sun/High Sun/ Sunset/Moon Lighting
- Custom Lighting
- 8 Relay Channel Control
- Heater Limit Controls + Alarm
- 3 Temperature Probes + Calibration
- 1 pH Probe + Calibration
- Feed Settings to turn off filters etc.
- Auto Feeder
- 2 Auto Dosing pumps (may expand on this later)
- Programmable schedules for power, lights, dosing, and auto-feeding
- Arduino DUE
- HC-05 Bluetooth Module (reprogrammed to 115200)
- DS3231 RTC (found to be less affected by noise, and to stay in sync better than the DS1307, also runs on 3.3V)
- DFRobot pH board + probe
- Optocoupled 8 Channel Relay Board
- Optocoupled 2 Dosing Channels
- Relay for Auto feeder
The hardware is a mess for now, after having to try various configurations and swapping pieces. I will be moving everything to a custom board in the coming weeks, and likely create a new box as I put a couple too many holes in this one. Also, having the dosing pumps inside the box makes me a little nervous.
First screen, upon clicking the button, list of your bluetooth devices pops up.
Then, select TANKDROID. I am going to try to change this, so it automatically finds the right device to pair without input.
Set to update every 3 seconds. Couple bugs still (MIN temps, fertilizer vials). Ignore pH value, probe was not connected when I took this capture. Clicking the Temp or pH icons resets the respective MIN/MAX.
Feeding icon shows last fed time or time left in feeding cycle when active.
Light icon shows the current mode, and time left to next fade, or time left in active fade when in a fade.
Dose remaining show up, accidently inverted the dose remaining in the app - so the vials actually fill up as the real ones empty .
Custom Lighting Screen, sliders or can type in a value. Checkmarks sends the value, the left icon resumes normal lighting mode.
Power Controls - Click on the icon to toggle power.
Light Values (click and type in), checkmark sends and saves the values, and the X requests current values (used to confirm changes, or revert changes) - this goes for most the screens.
Temp Limits for heater safety:
Temperature Calibration, this screen will show the current temps as well to help in calibration - placeholders there for now.
pH Settings - same as above, placeholder for current ph for now, also just realized i mixed up the high and low (whoops!). I'll add a checkbox option to allow for CO2 control based on pH value later.
RTC Sync button sends android time to the arduino. Very easy to sync, but this RTC is very good, hasn't lost a second in 8 days. The ds1307 I had lost about 4-5 seconds a day.
Fertilizer settings, refill and run buttons:
That's it for the screens for now.
- Fix MIN temp readings
- Fertilizer Icons on home screen
- Temp & pH readings on calibration screens
- Redo Box & Clean up circuit board
- Clean up coding & app
- Add WIFI
To Do if there's interest from others to build one:
- Allow adjustability in LED channel colours
- More LED channels?
- Add more dosing pump capability
No LCD means TONS of room to add things, whole sketch is at 10% of the DUE's capacity.
Also, didn't get any shots of it, but the app scales up nicely to my 7" tablet as well.
I may go with a PI server to allow for wifi control - the PI could connect to the controller via bluetooth and offer some separation between the DUE and the outside world. Still playing with this in my mind, and won't likely get anywhere for a month or so.
|Yesterday, 05:40 PM||#5|
Planted Tank Obsessed
This is seriously cool. Doesn't even have to be a phone either, plenty of tablets run on android operating systems and can use this!
Low Tech Community Tank
Any feedback is welcome~
|Today, 12:49 AM||#6|
When I first started my arduino project, this is what I had in mind.
Using an android phone or tablet to interface with the Arduino. I decided that it would take me too long learn to write an android app and get the interface working that I decided to just use an arduino with LCD.
I REALLY wish I would have done what you did an used android. A lot better long term potential and flexibility, and better screen/touchscreen quality.
Your project looks really good. Very impressed.
7 foot wide "river" themed arduino controlled tank
|Today, 02:23 AM||#8|
Thanks everyone! Lot of hours into this one.
PhysicsDude55, The communication is actually quite simple over BT, as simple as sending serial commands back and forth. AppInventor made the android bit simple, but now I feel like I should do things the right way and rewrite the app properly. AppInventor has a lot of limitations.
Rob, Thanks! No schematics as of yet, but will be working on one to create a custom board soon. Not too worried about noise (at least yet), everything seems to be working great with the optos in place. The DC motors were creating more noise than the AC relays.
True test will be the next two weeks, as its now in complete control of the tank. Maybe I will try to borrow the scope and take some real measurements when the relays go on and off.
Thanks again everyone for the feedback!