• You are viewing the forum as a Guest, please login (you can use your Facebook, Twitter, Google or Microsoft account to login) or register using this link: Log in or Sign Up

Submerged: modular aquarium automation

Awesome news for all you LED fans out there! The published source code as of now supports controlling a simple 4 channel (RGBW) Ledenet controller! The mobile app also has a rudimentary way of programming it, I'd love some feedback on that. What I implemented is the following:
  • You add a "point in time" to the led controller. That point includes the time of day, RGBW color and a fade-in time in minutes.
  • You can add as many points although they really should not overlap (this is untested at the moment).
  • Using the points in time, the gateway will calculate the RGBW value for each minute of the day. It uses the fade-in time to calculate smooth transitions between two point. Obviously 5 minute fades from 0-255 will not be very smooth, I will probably increase the resolution in a future update.
The app interface for configuring such a point looks like this:

submerged_app_pointintime.png


Example: when you program a red color at 10 AM with a fade time of 30 minutes, the controller will start fading in at 9:30. At 10 AM, it will have reached the color you've programmed. If your next point in time is sunlight (full on) at 13:00 with a fade time of 2 hours, the output will remain red until 11 AM and then start fading to sunlight over the next two hours. Again, at 13:00 it will output the programmed value.

In my opinion this allows for a flexible way of programming yet it does not require a lot of effort. At least more convenient than the idiotic program I have now to control my TC420 :)

Note:
the "level" parameter at the moment does nothing, still need a good way to translate that into RGB without getting weird fades.

Each device has 4 outputs, but since you can link in multiple devices you can pretty much control an unlimited number of channels (enough for now, any way). The downside at the moment is that these have to be configured separately for the time being.

Another thing I need to think about is a way to preview a certain color or even the entire program, software is not ready for that yet.
 
Sounds like a fun project, Now you have simulated sunrise are you going to do sunset ?
 
Wow you've put in so much effort to develop this!

Would love to hear updates.

Can this be adopted to other lights such as chihiros etc?
 
Sounds like a fun project, Now you have simulated sunrise are you going to do sunset ?
You can do pretty much any thing you like. If you program a sunrise, you can choose with which color and for how long. The same for sunset. There's no real need to pre-program such sequences.

Wow you've put in so much effort to develop this!

Would love to hear updates.

Can this be adopted to other lights such as chihiros etc?
Thanks! With this generic LED controller, you can attach pretty much any LED fixture as long as there's cables for the LEDs coming out :) That said, most fixtures come with their own controllers and connectors, you might not be comfortable cutting those off in order to connect the wires. If your fixture only comes with a main power cord, you would need to open it up and see whether you can connect the LEDs directly. Buying some LED from China is probably easier.

A fixture also might not work with a generic controller, this would need to be tested for every fixture which of course I cannot do. What kind of cables / connectors does the chihiros have?
 
Small update.. the experience of editing the LED program on the mobile app has improved a bit. There's now a button to test the program, which will sync the current program from the mobile app with the device and run it. The test run plays back the program in about a minute so you can easily see whether the result is what you were looking for. You can then easily make adjustments and do another test run until you're satisfied with the end result. For convenience it also strips out the dark / blackout periods you will probably have before your program (mornings) and after it (night). I'll put together a documentation page with some more info.

I also installed my float-sensor-equipped bottles with stock solutions, ready to be taken into production :) If I have enough time this weekend, I'll connect it up and share some pics.
 
Hi,

I finally have a bit of time in my hands and was thinking about implementing this for my new tank (still in the planning stage) and to (hopefully) eliminate my need for Seneye's monthly slides.

A few tips on the hardware list... pictures and/or links would be very helpful for those (like me) whom don't really know what they are looking for. Post some pictures of your assembly, please! :angelic:

Here is my current list:

I have a few questions (I haven't gone through your blog, so I'm sorry if these questions are already answered there):
  • You don't need Wireless & Bluetooth dongles with the Raspberry Pi 3, do you?
  • Where did you get the LCD display?
  • Is the dashboard interactive (making a touchscreen a cool addition), or is it just a status display?
  • From my understanding you should have the following:
    • Gateway - Raspberry Pi with LCD display connected to the 4 channel Relay Module.
    • Submerged Sensor module - PH & temp module that connects using Bluetooth.
    • Cabinet module (no diagram) - water leak sensors & float switches that connects using bluetooth
  • Can we use the same gateway for 2 tanks?
  • You mention an HC-06 bluetooth shield, but your diagram has an HC-05 model... which one is it?
  • You never mention the Adafruit T-Cobbler Plus, but there is one in your diagrams. Is it needed? Or can we simply use female to female jumpers?
  • What kind of water sensor do you use? Any of these?
  • Both diagrams have a PH Circuit and Temperature sensors... and there are no water sensors and float switches in the diagrams.
  • Neptune Sketch has 2 x 220Ω resistors... Is this diagram just an initial sketch?
  • You mention in Common Stuff that you use GX12 4-pins connectors. Where do you use them?
  • The Relay Module is used to switch the pump, heating, and lights on/off remotely and/or for maintenance mode, right?

My C# is a bit rusty, but I may be able to help you with some coding and documentation if you need it.
 
Hi,

I finally have a bit of time in my hands and was thinking about implementing this for my new tank (still in the planning stage) and to (hopefully) eliminate my need for Seneye's monthly slides.

A few tips on the hardware list... pictures and/or links would be very helpful for those (like me) whom don't really know what they are looking for. Post some pictures of your assembly, please! :angelic:

Awesome! Would be very cool to see whether we can get a second one running :) I'll try my best to update the hardware list a bit and get some pictures in there.


That's about right I think. Of course it also depends on what you're planning to monitor but this closely resembles the setup I have over here.

I'll answer the rest of your questions inline:
  • You don't need Wireless & Bluetooth dongles with the Raspberry Pi 3, do you?
    > I didn't test the onboard Bluetooth support of Win10, which was lacking when the 3 was just released. I'd guess it's probably there now but I'm not sure.
  • Where did you get the LCD display?
    > aliexpress.com, just a simple 7" LCD with HDMI connector. Pretty much all of the hardware I have came from China.
  • Is the dashboard interactive (making a touchscreen a cool addition), or is it just a status display?
    > It's not, but I had the same plan. There's no native support for touch panels in Windows IoT (again; last time I checked), but there's a hackster project that can help with that: https://www.hackster.io/dotMorten/windowsiottouch-44af19. One you have that running, it should be a matter of just hooking up some events to the UI. Those can be made already of course, simply using a mouse and clicking instead.
  • From my understanding you should have the following:
    • Gateway - Raspberry Pi with LCD display connected to the 4 channel Relay Module.
      > I've got the relay module linked to the cabinet module. You can use the Pi's IO but that will require a bit of coding.
    • Submerged Sensor module - PH & temp module that connects using Bluetooth.
    • Cabinet module (no diagram) - water leak sensors & float switches that connects using bluetooth
  • Can we use the same gateway for 2 tanks?
    > It's designed that way, yes. The gateway is reusable, you specify a tank per module. Not extensively tested yet (I only have one).
  • You mention an HC-06 bluetooth shield, but your diagram has an HC-05 model... which one is it?
    > I've got HC-06, Fritzing didn't have a HC-06 model at the time so I used HC-05. I don't believe it matters that much though.
  • You never mention the Adafruit T-Cobbler Plus, but there is one in your diagrams. Is it needed? Or can we simply use female to female jumpers?
    > Not needed, but handy for prototyping; especially when you want to use the IO header on the Pi. I recommend having one lying around.
  • What kind of water sensor do you use? Any of these?
  • Both diagrams have a PH Circuit and Temperature sensors... and there are no water sensors and float switches in the diagrams.
    > True, I haven't updates the diagrams in quite a while
  • Neptune Sketch has 2 x 220Ω resistors... Is this diagram just an initial sketch?
    > I'll have to check, think so. To my knowledge I used resistors for the OneWire sensors (4k7) and the ones that came with the Atlas stuff. Nothing more.
  • You mention in Common Stuff that you use GX12 4-pins connectors. Where do you use them?
    > I've made two simple enclosings for the modules with those connectors on the side. So moved from doing everything prototype style to a bit more of a permanent setup.
  • The Relay Module is used to switch the pump, heating, and lights on/off remotely and/or for maintenance mode, right?
    > Correct. And you can switch them from the app manually as well.
My C# is a bit rusty, but I may be able to help you with some coding and documentation if you need it.

Cool! Let me know when you need anything. Are you planning on using your own Azure instance, or want to use mine? I've made it all to be multi tenant but that probably needs to better testing as well since I'm the only one using it so far.
 
That's about right I think. Of course it also depends on what you're planning to monitor but this closely resembles the setup I have over here.
I'm thinking about having something similar to yours, just with fewer sensors (at least to start with)... 1 module with temp & PH sensors for the tank and 1 for the cabinet with 1 leak sensor, 2 fertilizer level switches, and the relay module.

Gateway - Raspberry Pi with LCD display connected to the 4 channel Relay Module.
> I've got the relay module linked to the cabinet module. You can use the Pi's IO but that will require a bit of coding.
Even better! I saw a youtube video with everything needed, so I just assumed you were doing the same...

Can we use the same gateway for 2 tanks?
> It's designed that way, yes. The gateway is reusable, you specify a tank per module. Not extensively tested yet (I only have one).
Nice, I have 1 nano tank running with a Seneye device and another one in the planning stage where I want to implement at least your temp and ph sensors from the start, after that I'll add an auto-dosing pump for fertilizers and the cabinet module with it. Then, the plan is to replace the Seneye in the other one with these modules (saving money on the long run by eliminating the need for monthly slides).

Are you planning on using your own Azure instance, or want to use mine? I've made it all to be multi tenant but that probably needs to better testing as well since I'm the only one using it so far.
Don't know really... I never used Azure before and created a free account yesterday. I'll probably try to create my own instance first and then we can try to use yours in order to test the multi tenant feature.

Thank you!
 
Hi @kadoxu, sorry for not replying any sooner. I'm in the midst of buying a new house so haven't got that much spare time. Oh and I got to present the Submerged solution on a Dutch IT conference last week, awesome stuff :)

Nice, I have 1 nano tank running with a Seneye device and another one in the planning stage where I want to implement at least your temp and ph sensors from the start, after that I'll add an auto-dosing pump for fertilizers and the cabinet module with it. Then, the plan is to replace the Seneye in the other one with these modules (saving money on the long run by eliminating the need for monthly slides).

Yup that should work just fine. I have not investigated whether there is a maximum of bluetooth devices to pair with, but three of four should not be the issue. Bluetooth range could be an issue, make sure there's not too much distance between the Pi and Arduino's.

Don't know really... I never used Azure before and created a free account yesterday. I'll probably try to create my own instance first and then we can try to use yours in order to test the multi tenant feature.

Sure, no prob. Do take into account that some of the components used are not available in a free version, so when your trial runs out it'll start costing money. I'm running my back-end off my MSDN subscription (which gives 130 eur free credits every month).

The Arduino Nano, did you get the original ones, or the cheap Asian copies?
Cheap copies do just fine. On aliexpress, search for the robodyn ones, they're quite good. I got almost everything off aliexpress, just takes a bit of patience waiting for the components to arrive.

In the Submerged Sensor Module diagram, you have a Pre-Assembled Female BNC, can one be used, or should I use a Single Circuit Carrier Board instead?
http://www.warburtech.co.uk/product....scientific.com-101.pre-assembled.female.bnc/
http://www.warburtech.co.uk/product...scientific.sccb.single.circuit.carrier.board/
Single circuit carrier is definitely the easiest way to go. You can also mount everything directly on a PCB but my soldering skills are far from good enough for that.
 
Hi @kadoxu, sorry for not replying any sooner. I'm in the midst of buying a new house so haven't got that much spare time. Oh and I got to present the Submerged solution on a Dutch IT conference last week, awesome stuff :)
No problem, I still have a lot to read and am still waiting for the breadboard, so I can't really do much for now... and I'm also a week away from moving to a new house!

Sure, no prob. Do take into account that some of the components used are not available in a free version, so when your trial runs out it'll start costing money. I'm running my back-end off my MSDN subscription (which gives 130 eur free credits every month).
Hum... I have an MSDN subscription from work... maybe I can use that account.


I am happy to say that the new versions of Windows 10 IoT Core already support wireless, Bluetooth and the touchscreen! :)
 
Here's an update! Unfortunately selling my current apartment means I need to clear out my tank and I've decided to sell it to buy a new one for the new house later in 2017. Although that doesn't necessarily means that development on Submerged will stop, it'll definitely mean that it will slow down. I'll keep everything up & running and try to provide support, buy just can't guarantee quick responses as my priorities are different at the moment.
 
Back
Top