lundi 3 mars 2014

Alsipian Reefs Arduino Reef Controller

Ok, so I've been posting to nano-reefs about this specifically because I've been using it on a nano tank system, but in light of it's scalability, I'm going to spread the news as it were on what I'm building in my free time. The goal in this whole project is to make a universal controller that is easy to use as well as easy to program. So here's my plan:



First, here's the original "working" version:

(( I'd post a video here, but apparently I need more posts to add links... ))

I had this up and going at the beginning of the year, then tragedy struck when the tank I had actually broke. Since then, I've managed to rebuild the tank, but the controller has gone back to the drawing board, especially since I've discovered how to design circuits.



The current controller has four main components:



The Brain

The Sun

The Power

The Nutrients




These are all currently integrated into my stand, but as this project continues on, I want to break down the components individually so they can be easily inserted into most other stands. It may take a while, but I'm sure eventually it'll reach that point.



THE BRAIN



So this is the main controller for the entire system. In my stand it all is housed in a drawer underneath the tank in the stand. This houses the power supply to convert AC to DC, the Arduino Mega, and my major contribution: the motherboard. Everything connects to here so the Arduino can easily control them and the user in turn can easily control their tank. The two main ports on this board are for the lighting(The Sun) and peripherals. The peripheral port branches off into a Rat-Tail style of a cable that connects to The Power and The Nutrients as well as a float switch and Atlas probes. Other connectors include two ports for fans (Mostly for the power supply and lighting) and two "One-Wire" ports mainly intended for temperature probes, though a PAR sensor could be easily adapted to it. A RGB LED gives the user a general idea of what's going on or what they need to do to their tank. Lastly, it houses a Tiny RTC to help the Arduino keep track of time as well as keep your time if ever the power goes out.



THE SUN



This is something that's more tank specific. I built mine on my own using parts from RapidLED (Minus the drivers). The system is primarily designed for those who have DIY lighting in mind, not really "professional" lighting. There are 8 channels ranging the whole spectrum:



Cool White

Natural White

Ultra-Violet

Royal Blue

Blue

Green

Amber

Red


They run off 10 different phases:

Dawn

Sunrise

Morning

Midday

Afternoon

Evening

Sunset

Dusk

Midnight

Darkness




For now, the system simply runs on a 12 hour day, sunrise starting at 0700 and sunset starting at 1900. I'm currently developing the code to use the current date to determine the actual sunrise and sunset and run off that. After that I'd like to add a spectrum sensor inside the tank to feed data to the Arduino. This would allow it to maintain the PAR desired for corals while giving the user liberty to alter the color of the tank.

I.E. I'd like my midday phase to be bluer. So, as I increase the blue leds, the other leds dim accordingly so I don't burn my corals, but at the same time, they still get appropriate light.



But sadly, those are future developments which require some sort of UI. Once I get a touch screen to work, it'll definitely help.



The Power



I think this part specifically helps a lot of users. It's a simple box with 10 outlets, 8 of which are controlled by the Arduino. The outlets turn on and off via a solid state relay board making it very easy to plug in a powerhead and program a wavemaker. Other outlets are used for lighting a refugium or even a mini-light for the stand to see your products better. You can also plug in filters and have the ability to turn them on and off, or simply hide all your wires in the stand and have only one wire leaving the stand.



The Nutrients



This is the dosing system. This is based on the fact that you have containers to hold your supplements that you want to does. It has 4 small dosing pumps that for me dosed:



Magnesium

Calcium

Strontium

Alkalinity Booster




​For now, it simply doses daily based on recommendations on the bottles as well as my monitoring.



The Future!



I'm currently on the quest to perfect my motherboard. This has put a lot of other things on hold since I need to get a solid Brain to program before I can develop the software more.

Plans include giving the Brain a touchscreen for a slick UI and a buzzer for an audible alarm. There will most likely be a refining in the peripheral connection to make it more universal. I also look to add more connections for more sensors to attach easily. I'm also thinking of separating the Atlas Probe connections to make those easier to handle as well. The biggest thing will be the AI. I want to set it up so that it learns from the user on how to care for the tank. My biggest example is that it will ask the user, probably weekly, for them to do a water test and feed it the results. It will then react accordingly, especially with the Doser (Calcium and Alkalinity are a biggie) to lower or raise its dosage accordingly. Testing with a PAR probe will let me also program it to be smarter about the lighting and at the same time allow the user to change colors freely without having to worry about burning or not giving their coral enough light.



Current State



I just received my first prototype of the motherboard from OSHPark. Good news is my lighting signals work, but bad news is my minor components don't. It's amazing how many careless mistakes you can make on something like this even after going over it several times for weeks. Some of the holes were a little off, but nothing to the point I still can't attach things. I'm going to have to test my peripheral connections later after I build my new rat-tail cable. The picture of my board should be in the attachments.

Problems:

Tiny RTC for some reason isn't keeping time. I can set it fine without any errors, but it never keeps that time. I don't think it's an error on my board, but an error with the RTC component itself. I'll try a different one later.

The piezo buzzer is not loud at all. I should've done some more research and realized that simply plugging a buzzer to the Arduino wasn't going to be loud enough to alert someone. Shouldn't be a hard fix though. I'll probably just send the 12v current through it and have the Arduino just turn it on or off.

I definitely need to figure out this common ground issue. My indicator LED won't work because I think I sent it's common to the wrong spot. It may also be messing with the RTC, but I'll be doing some more testing tomorrow to figure out what the real problems are.

I'm going to develop another version for sure, but I have a question for you all:

Should I:

Keep the motherboard and Arduino separate? This may allow the user to add custom shields.

Attach female headers to the motherboard so it itself acts more like an Arduino shield? May make it easier to add a touchscreen.

Try to embed an Arduino into the motherboard to make it stand alone? May infringe on some copyright stuff.

Just some thoughts for me to work to.



Stuff You Don't Want to Hear



Some of you probably think this is cool, some may say I have too much time on my hands. I've gotten this far and I enjoy it enough to keep going. The software side is simply a matter of sitting down and doing it (which will take a while in of itself), but what's really holding me back at this point is the hardware, specifically the cost. I'm looking to start something like a kickstarter, but I have no clue how much my goal should be or the rewards I should give for how much. I'm thinking if I can make something out of this to look into putting the hardware somewhere you guys can buy it and keep the software opensource. So for now, I'm going along at a snail's pace till I can overcome this hump. Till then, all help is welcome, especially if you know anything about the technical aspects, please send me a PM!



And almost done!



Hope you guys think it's a cool project and I'm wide open to any advice or suggestions as well as feel free to ask my anything! I'm a pretty open guy. I'll try to keep this topic updated as things develop. With testing going on this week, I'll probably have a few more posts coming at least. Hope you all enjoy!



UPDATE

So if you read this before, it's because you've seen it on nano-reef. I'm posting it here to widen my audience for support and advice on further advancements. The information above is a little dated, but the general goal is still there. Currently I've ordered a revision board to test with. Hopefully it should be here by the end of this week or the beginning of next. If it works, then I'll fine tune the system and look to selling some systems come summer depending how much support I can get. The further I get into this, the more I'd like to keep it open-source so basically all you'd pay for is the hardware. Anyway, you think it's a cool idea, let me know, I'm always motivated by support. If you have any suggestions, I'm just as open as well. The first place I'll update information is nano-reef:

(( Again, I'd post the link... but I need to post more here before I can, so for now you'll all have to deal with text. ))

But I'll be monitoring here as well and updating when I can. Let me know if you have any questions!




Aucun commentaire:

Enregistrer un commentaire