Sudo DIY Aquarium Controller

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
This is a project I've always wanted to do due to the high cost of electronic aquarium controllers on the market. First let me say, that I do not knock the high cost, since a company has to make a profit, and due to volumes cost of components and more importantly the tooling cost of enclosures can be quite high. Depending on the design of the enclosure with rafting, knock outs, etc., just the tooling alone for an enclosure can run around $100k. So you can imagine with a low volume finished product why the end cost to the consumer is so high even though the electronics alone that are used are relatively dirt cheap. So the challenge here will be to overcome these obstacles.


Target price should be $150 - $175 for the following base unit.

  • 7” capacitive touchscreen display
  • Microcontroller
    32 GPIO(s)
  • Wi-Fi or Bluetooth
    Can have both but will raise the cost about $15


[*]Ethernet


[*]Multiple USB ports




[*]Up to 32GB SD Card / Application Layer


[*]Enclosure

  • Can be 3D printed or laser cut
    3D printed would be the preferred method but to drive down the cost, laser cutting would be cheaper. The challenge here is to create an enclosure design that is esthetically pleasing and low cost to one off produce.




[*]4-6 Electronically controlled outlets on a power strip

  • (1) always on for pump / filter
  • (2) on/off controllable either by timer or condition
  • (3) on/off controllable either by timer or condition
  • (4) on/off controllable either by timer or condition
  • (5) on/off controllable either by timer or condition
  • (6) on/off controllable either by timer or condition


[*]Temperature Probe




The overall goal is to have an application layer that is modular in approach that allows for easy upgrades and scalability. Want to add on o2 probe, there can be an app for that, want to add a PH probe, there can be an app for that. The main application can easily have a calendar/schedule for dosing, water changes, or more in depth historical logging. Controller will be capable of displaying and sending alerts to a smart device.


I’ll be looking at kicking this project off after the first of the year, I have prototype hardware coming in this next month, but due to the holidays and travel will not have much time to get it kicked off until after the New Year. I would think with this large of a community there are some coders out there and with the input (both good and bad ) this could be a fun community project.


Software will be open source under GPU/GPL.
 
  • Like
Reactions: 3 people

alphabeta

Junior Poster
Dec 28, 2014
3
0
1
Raspberry pi or Arduino? Or something else?


There projects like that around. Any reasons to start a new one?
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
Raspberry Pi would give you the most bang for the buck while being the better choice for this type of application, and the Pi Foundation recently came out with a nice 7" DPI touchscreen for $60 that doesn't use any of the GPIO(s). I haven't seen other projects, but I also haven't looked either. The reason to start a new one is simple. I've always wanted to do it.
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
I looked at some of the implementations and the direction is not quite what I was thinking. The overall goal is somewhat DIY, but with more of a finished professional product. The more I think about the GPIO aspect, and keeping things clean without the need for a bunch of wiring which can get confusing for the average user. I already have development started on a Bluetooth / RS232 module for work purposes. I can easily alter the PCB layout and enclosure to accommodate the 12 GPIO’s, 8 digital, 4 analog. This will be a sub $20 module with the enclosure. This way there is no wiring between the touchscreen and GPIO’s. If you have multiple tanks you only need one touchscreen. This could be done in a way that if you already own a tablet that you could just use a microcontroller, which would cut down on cost. So will have to consider cross development.
 

alphabeta

Junior Poster
Dec 28, 2014
3
0
1
ok, I see. indeed, this is beyond what now is available as ready to use projects.


having wires and connections ... for some guys is a bonus rather than a deficiency :)


i will definitely keep an eye on the project, and if time permits, i may try to chip in with codding/electronics etc.


i build a modified iaqua - arduino based controller. took much more time that i expected.
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
There will always be wires. Just in this instance not from the screen. This way the screen/enclosure is a cleaner look. Only need to bring in a power source.


I got in a first batch of a few of the pi 7" screens. They are nice, but I'm not all that excited about the overall depth of everything assembled. 1.50" or so is a bit thicker than I would like, but its hard to beat $85 all in for a capacitive touchscreen that will have longevity in the marketplace. Will be interesting to see how it compares to the screens from 4D Systems at nearly double the price and only offered in resistive.


The bluetooth / rs232 / GPIO boards go into Rev 1 next week. This will be a quick and straight forward process. Tooling up for the enclosures not so much. That's at least 6-8 weeks.


I can completely understand the amount of time taking longer than expected. Especially as a project goes on there is always something more to add.
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
First step is power management. This could be done cheaper, but using a pre-assembled unit saves time, and time is money and produces a more finished product.


Modified a Startech RKPW081915 by adding a 4 Channel Relay. There are tons of tutorials out there so won't expand much on that aspect unless requested. This leaves (4) outlets dedicated as always on and (4) outlets that are controllable.


Used 6mm standoffs to separate the 4 Channel Relay PCB from the PSU, 12mm standoffs to separate the cover from the PCB. Cover was 3D printed. Main purpose for the cover was to provide tunnels for the light pipes that get extend to the front panel.


PSU can be rack-mounted on a 6" deep 1U mount attached inside the cabinet using right angle shallow mount adapters


VCC, GND, IN1 - IN4 (6) pins are are extend using Molex 6 circuit housing 51191-0600 to the Binder parts parts listed below.


6 wires from the end of the PUR cable get attached to the relevant pins for GPIO and PWR/GND


Other parts used:


Bivar - LED Light Pipes Light Pipe Assembly Vert Round Lens - SMFLP12.0


Binder Series 718: - Male receptacle with wire leads, rear-mounted - 09 3423 86 06


Binder Series 718: - Single-ended cordset, female 90° plug, 2m PUR cable - 79 3468 52 06
 
Last edited by a moderator:
  • Like
Reactions: 3 people

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
After weighing all the pro's and con's decided to go the 4D Systems route. Got a decent enclosure done for the 7" that can be printed on a hobbyist 3D printer with a single extruder. I'll modify the design for dual extruders and put together a version for the 4 1/2" . This way depending on budget you can use either screen. Hopefully before I leave this week for the Holidays I can get a few printed up for verifying clearances.








 
Last edited by a moderator:
  • Like
Reactions: 2 people

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
Inserts and hardware arrived. Finished adjusting clearances and fitment. Over the holidays I'll start designing in proto.io the interface. First shipment of bluetooth/gpio boards come in after the New Year.








 
Last edited by a moderator:
  • Like
Reactions: 2 people

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
Since I had excess time in flight delays and travel time, I was able to start a storyboard layout in Photoshop. I will preface that Photoshop is simply not my strong suit and this is a quick first stab at the main systems page. Everything should be accessible to setup a system from these 10 items. For example anything sensors for the water (PH, CO2, Temp, O2, etc) will be setup from the “Water” button. All icons will be driven through a config file and so a user can customize their own icons and location. This way the total look and feel can be customized by the end user through a config file without ever having to touch any code.

.jpg
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
Since I had excess time in flight delays and travel time, I was able to start a storyboard layout in Photoshop. I will state that Photoshop is simply not my strong suit, and this is a quick first stab at the main systems page accessible from the top right "system icon" on any page.


Everything should be accessible to setup a system from these 10 items.


For example anything sensors for the water (PH, CO2, Temp, O2, etc) will be setup from within the “Water” button.


All icons will be driven through a config file, so a user can customize their own icons and location. This way, the total look and feel, can be customized by the end user through a config file without ever having to touch any code.


From the top bar the alert icon will only be visible if there are active alerts, and wifi bars if wifi is enabled


 
  • Like
Reactions: 3 people

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
Started playing around with a Home Screen.


I envision two modes.

  1. Static
  2. Define the 4 elements you want always displayed.



[*]Dynamic

  1. All 8 elements will rotate on a defined timer rotating through the elements


In either mode you can move the dial to view instantly a non-displayed element.


Four quick on/off buttons, this could be expanded to probably eight, but I’m trying to keep down the clutter.


If there are Alerts this will be shown near the date/time.





Made what should be final changes (hopefully) to the systems page.





The iHome button will be renamed eventually but this will be an expansion area into smart home devices via bluetooth/wifi/zigbee/zwave
 
  • Like
Reactions: 2 people

pdeuchler

Junior Poster
Jan 4, 2016
1
0
1
I'm working on something similar as well, my main suggestion would be to start small (simply have a PH readout and maybe allow an outlet to be controlled by PH) and work up from there. By far the hardest part I've found is working with undocumented systems and negotiating variances in products manufactured by different companies (I drastically underestimated the variance between different PH probes, for example), for example I spent two whole weeks just trying to eliminate back EMF in the system while it only took about 30 minutes to get an accurate PH reading once all the wiring was properly set up. I'd also recommend tackling things like the UI/configuration stuff last... I wasted almost a full month fiddling around with my config UI before I realized the workflow needed to be completely different. I'm currently just stubbing out config variables with functions that return a constant while in development but will eventually read from a user defined data source.


Do keep this thread updated with your work on the O2 sensor/probe/system, I'm currently stuck on that (and I'm too stubborn to buy a $200 kit at this point)
 

JDowns

Lifetime Charter Member
Lifetime Member
Jul 27, 2007
355
22
18
52
New Hope, Pennsylvania
For the most part a-lot of the coding in general is already done and will just need to be tailored to the application, at least for the back end systems (wifi, hci, rfcomm, gpio, SMS, email, AWS, etc). The GUI just helps give me an idea of the scope of classes and general framework that will be needed so I don't waste to much time coding and re-coding without a proper work flow.


EMF can be a nasty mistress! I have a feeling for probes I'll be ordering and reselling quite a bit of equipment. Will be much easier to work around the knowns rather the recreate the wheel.


Bluetooth GPIO boards are in and off to the lab for ALT testing. Should have them back in a few weeks.
 
  • Like
Reactions: 2 people