The DIY Aquarium Controller

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Here I will be documenting some of the build towards the DIY Aquarium Controller so far that has the nickname the Aqua Box.

Goals:

- Support 16 different sensor inputs
- Creates itself as a webserver over WiFi network
- Unique ATO Features
- Dosing Box
- Credit Card sized
- Powered by USB or Rechargeable Lithium Ion
- User friendly and visually appealing graphics
- Java8 based multi-platform software support

So far these are some simple goals to hit along the way, so far the box is all down on paper and the circuitry is being designed via AutoCAD, a shipment of some vital parts are coming in soon and thats when the build will start to take shape.

On the nerdy side of things that was accomplished late last night was a concept for multiple SPI based sensor outputs all being connected to a single data line into a single input on the controllers main board. So 8 Sensors can share a common input without loss of data or interruption, this means we can really pack a ton of features into a tiny Controller that takes up next to no power.

I know that this first post is somewhat bland in content, but I've been on the fence about wanting to keep this under wraps or share it with the reefing community, and I've decided that we are one big family here so I'm letting it out of the bag.

More to come soon with pictures and probably some video content.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Tomorrow is an exciting day when the webserver will finally take its first steps and go live! It might only be for a few minutes to debug but everything is headed in the right direction.

There's thoughts in the air weather to add extremely cost effective memory such as an EEPROM into this box for analyzing aquarium data over periods of time. A few kilobytes of space goes a long way if you're just working with pure numbers. It's not definate but there will be research done as far as internal memory. This shouldn't affect the cost of the box considering a good EEPROM is only about $2
 

psidriven

Active Member
View Badges
Joined
Apr 4, 2007
Messages
148
Reaction score
35
Location
Westside Taipei
Rating - 0%
0   0   0
Any pictures? Would love to see what a credit card sized controller would look like. Keep up the good work.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Unfortunately no pictures as of just yet the parts I was waiting on came in around 8pm last night so needless to say I quickly managed to write a test program over the new serial connection and by the time that was done it was really late. Should have some pictures by anywhere from tonight - Monday
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
As I read through some previous DIY Controller threads I see that most have fallen off the path to completion. So to mitigate this feeling for anyone who might potentially want to follow along I will be giving updates daily (might skip a day or two for various reasons) but I will make sure there's always something on the table.

So this is my " Phase I " where the parts get collected up, baught, installed, tested etc. before actually building. Here's some goals for this phase some have been completed already.

Parts:
[x] ESP8266 WiFi Moduld
[x] Development boards
[x] Shift registers
[ ] EEPROM
[ ] Temp/pH probes

Tests:
[x] Development boards
[ ] Shift registers
[x] Single-Line databus system
[ ] EEPROM
[ ] Webserver

Update: This idea is up in the air considering how much still needs to be done that this would truly add another serious task to the entire build but there might be some implementation of something called " Processing " it's a really cool unique way to approach web-based applications without requiring the user to install any sort of software. But this type of programming is extremely powerful and pretty much unlocks any limitations of website applications. An easy way to go about this would be to utilize the new p5.js* programming language library, and possibly implement JSON elements. At the end of the day this could eliminate our EEPROM based memory to a cloud based memory system but again these are all serious thoughts and big tasks, but when I get ideas I'm just going to jot them down as they come, and let y'all know if I will actually take action on it.
 
Last edited:

justingraham

5000 Club Member
View Badges
Joined
Jul 13, 2016
Messages
5,348
Reaction score
6,710
Rating - 0%
0   0   0
What sensors do you plan on incorporating?

Like the fmm from apex? Temp and ph I see anything else that you are trying to make on this?

I hope it works out for ya this always intrigues me.

Also why are you making it? And what do you think the overal price in parts will be?

Good luck man like as you said most people start this project and never finish it
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
The number of sensors truthfully isn't too clear but it will include some of the most generic useful ones I.e. Temp, pH. There most certainly will be an ATO system that hast already been tested and designed it just needs to go through some final tweaks before it's ready.

The overall cost without sensors for this project in hoping won't run anymore than about 60-70 dollars. The purpose is to make it so small, simple, and efficient that the average newcomer reefer isnt intimidated by a giant 800 dollar price tag and a mess of wires.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
So around 1AM the first packets between a webserver that is about the size of a triple A battery was sent back and forth. The packets were successfully read and were able to control a simple circuit.

The test of the webserver is officially complete. The next test is going to most likely be testing simple register memory designs which will later be used to select the sensors properly to get input data, and to put memory into an EEPROM.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Also some simple visual graphics will probably be programmed tonight for later use.
 

psidriven

Active Member
View Badges
Joined
Apr 4, 2007
Messages
148
Reaction score
35
Location
Westside Taipei
Rating - 0%
0   0   0
think the big thing now is user interface that doesn't require a degree in computer programming. if you can manage that it would be greatly appreciated for the coding illiterate like me.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
image.jpg


So last night instead of working on the user interface I was really eager to get some more nerd work done. This is an example of how a 74HC595N can be used in conjunction with a micro-controller to shift out data. This register has 8bits to it so it is essentially a single byte of data. In the picture above there was a test number of ' 250 ' shifted out in bits to the register. As you can see it was a success and now instead of these red LEDs I can start giving the sensors their own numerical address in the program which will make it really easy to shift through them at a fast rate. But you also see that there's still many ports still open on the micro-controller which allows for really significant space saving which will get us closer to that credit card sized outcome that we want.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Success with the tests for a the single line data bus. The sensors used were multiple different light sensors that all were tampered with accordingly. The program was able to quickly shift through the assigned addresses of each sensor, read the data, print the data, clear the address, then call out the next address and repeat the process. Each data reading cycle took 10 miliseconds but I now have buffered it up to 20ms just for the sake of accuracy. That gives us a pretty dang fast sensor reading time of 8 sensors all within 1.2 - 1.6 seconds.

Conclusion on this part of the project. The AquaBox now has the potential to do these simple tasks:

Read pH
Check temperature
Send data to the AquaBox ATO
Adjust lighting

Within anywhere from 40 miliseconds - 1.2 seconds.

Obviously the internet portion of this project will probably damper these results but I am extremely happy with this. So far on my circuit board diagram only 4 wires are being used to accomplish all of this.

There most likely could be a future call for more logic behind this system where a single chip could address up to 255 sensors of sensor addresses instead of just 8.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Probably going to begin ordering some sensors to play around with soon. I think the EEPROM will have to wait due to some logic errors in my calculations in regards to how exactly to extract the binary information on the addresses and read them to the ESP8266 chip.
 

Mark Taber

Community Member
View Badges
Joined
Oct 7, 2016
Messages
89
Reaction score
31
Rating - 0%
0   0   0
Following. I hope this does continue and that it is easy to follow for non nerds.
Good luck with this.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Today was pretty productive, for a lazy day.

1.) Programmed more animations for the status ring, its a really gorgeous display I've been wanting to use this ring for some time now and have finally found a perfect use for it. So far I've animated and designed a WiFi Connected, WiFi Disconnected, and Auto-Top off Filling Aquarium.

2.) Cut off a big chunk of code to handle serial-events, but this wont affect the final product it's really just for me to debug the thing as I go.

3.) Ordered some more parts, one of the parts was just some more solder-less breadboards to expand my prototyping and begin connecting each of these parts together. The other two items I will keep in the dark about to add some cliff hanger affect for those of you who are following this project.

I will say though I did not order the EEPROM Chip, but when I do i've pretty much decided to go with an ATMEL AT28C16 Chip, this chip comes in different packaging variants and I will most likely prototype with the DIP version and put a square surface mount in the final product to save space.
 
OP
OP
Andrewalex11

Andrewalex11

Reef Technology
View Badges
Joined
Jan 27, 2017
Messages
323
Reaction score
270
Rating - 0%
0   0   0
Here we go! Got the Beta Server running! We are officially locally wireless, I still need to work out the kinks of opening up this thing to the public internet for use everywhere but that's not my main concearn as of right now so we will just put that to the side.

After spending my day finishing up some much needed reading of the WiFi API for the ESP Chip I've finally constructed a working stand alone webserver on this chip i was going to use a quarter for comparison but my frag plugs were closer haha.

IMG_0764.JPG


The chip is being powered via USB and wall plug which is one way to charge and power the AquaBox in the future but if you notice the rechargeabl lipo battery slot on the side. So early on we got the power outage problems solved so you don't loose your settings.

Here's the Beta client, not too pretty but as time goes on it will be very much updated, and most likely re-written in the previously spoken about p5.js*

IMG_0763.PNG


Yes this was viewed on my phone, mobile support will be a prime concearn for sure.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 19 14.2%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 9 6.7%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.7%
  • I wear reef gear primarily to relax where I live.

    Votes: 21 15.7%
  • I don’t wear gear from reef brands.

    Votes: 75 56.0%
  • Other.

    Votes: 9 6.7%
Back
Top