OSA raspberry pi aquarium controller - controller has been put to work on my 125g - Page 3
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 02-01-2014, 04:25 PM   #31
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

I know what mongodb is for, I wanted to use it for my project along with another library. Neither were able to be installed right away because neither support the ARM chip. Mongodb ended up being impossible to get going because I needed the latest. The most recently converted version was too old and the time it took to build the software was... hours.

But I wonder of npm could assist with that. I'll give it shot with version 2.
__________________
scapegoat is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 02-02-2014, 03:32 AM   #32
biogenetic40379
Planted Member
 
PTrader: (2/100%)
Join Date: Jan 2012
Location: Columbia, MO
Posts: 275
Default

I am making a DIY reef controller this semester for one of my classes. Should be fun
__________________
biogenetic40379 is offline   Reply With Quote
Old 02-03-2014, 03:00 PM   #33
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,049
Default

I tried installing all of the software onto the pi. A 4 gig sd card is not enough. Go for 8 or 16GB.

It's a long and tedious process btw. Compiling can take hours since it's only a little mobile computer. When you have everything up and running, I'd suggest you make a disk image copy of your SD card on your real 'computer'. So when or if it crashes and the SD card is corrupted, you can easily mount the disk image over.

Here are a list of compatible sd cards
http://elinux.org/RPi_SD_cards

Last edited by mistergreen; 02-03-2014 at 03:15 PM.. Reason: +
mistergreen is offline   Reply With Quote
Old 02-04-2014, 12:23 AM   #34
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

Quote:
Originally Posted by mistergreen View Post
I tried installing all of the software onto the pi. A 4 gig sd card is not enough. Go for 8 or 16GB.

It's a long and tedious process btw. Compiling can take hours since it's only a little mobile computer. When you have everything up and running, I'd suggest you make a disk image copy of your SD card on your real 'computer'. So when or if it crashes and the SD card is corrupted, you can easily mount the disk image over.

Here are a list of compatible sd cards
http://elinux.org/RPi_SD_cards
that was the plan. I even have an 8gb here waiting.

but in the end I decided i'd rather use stuff that works for it right away and get going. If anything I've learned a bit more about using node, express, and socket.io for web development.

i just got my 2 float switches in, I need to figure out how i'm mounting them as well as how to switch it NO or NC.

figuring out box layout was a bit more difficult than I anticipated. I've got everything, roughly, sitting on plywood waiting to be marked and holes drilled to mount the hardware.

Mine will be a bit more difficult to set up because it is being mounted between wall studs. so the plug that powers the unit will be underneath, with the outlets and pumps in front. The unit will then open up above the outlets/pumps to get to the hardware. I'll leave a space at the top for ventilation (and network cable) so the two fans will be in the bottom to pull cool air into the box.

I'm unable to really work on the box because my panel saw is inaccessible due to the weather; we have a car in the garage now in front of the saw and work bench.

really looking forward to having this thing on the tank so i've less to worry about w/ it. i'm planning on a complete tank overhaul in the spring though and am seriously considering moving the current inhabitants to a 40 breeder and going either asian or south american themed w/ some smaller gar.
__________________
scapegoat is offline   Reply With Quote
Old 02-27-2014, 04:59 PM   #35
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

It's totally been awhile since I've updated. I've stalled a bit just being busy with life as well as taking my time to think about the project more.

I decided that the gertboard was much too large to place in a "final" product; especially when I was only using one little chip. So i purchased said chip, and a quarter perma board meant for a Pi w/ ribbon cable.

I need to plan out the board a bit more before getting to work on soldering because I want everything Pi related attached to it, and it is quite small.

I also picked up a plastic indoor electrical box that'll give me about 9"x9" interior space to mount hardware; while the outlets and pumps will get mounted to the door and wired up w/ ample length of stranded wire. All main AC voltage items will go on the left, low DC voltage items on the right.

The attached pictures show the box w/ the quarter board and gertboard next to each other (inside the box for scale), as well as the chip on a breadboard for prototyping.

I need to figure out how to best attach sensors, like the thermometer, and the float switches. So if anyone has any recommendations for that, I'd really appreciate it. I was thinking maybe stereo jacks since I only need low voltage and 2 points of connection.
Attached Thumbnails
Click image for larger version

Name:	bread.jpg
Views:	38
Size:	69.4 KB
ID:	281130  

Attached Images
 
__________________
scapegoat is offline   Reply With Quote
Old 02-27-2014, 05:28 PM   #36
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,049
Default

You can use RJ jacks for inputs. It's fairly easy to work with. You need a crimper and ether net cables though.

I got the idea from lego mindstorm.
mistergreen is offline   Reply With Quote
Old 02-27-2014, 06:04 PM   #37
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

That would work pretty well. I have a box of Ethernet cable... over 400' and the crimping tool. Just need the right ends. Forgot that I needed more than 2 wires for those. The float switches will use stereo jacks.

I love it when a plan comes together
__________________
scapegoat is offline   Reply With Quote
Old 03-11-2014, 10:47 PM   #38
dubels
Planted Tank Obsessed
 
PTrader: (10/100%)
Join Date: Jun 2012
Location: CA
Posts: 307
Default

Any plans for PH controller functions? I have been looking into using a Raspberry Pi to control a tank but don't have a clue in regards to programming. Going to keep an eye in this project to see how it all develops. Thanks for sharing
dubels is offline   Reply With Quote
Old 03-19-2014, 12:35 AM   #39
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

So i'm not building a box. My woodworking tools are out in the garage, which also contains my wife's STi for the winter; so there isn't any room to work.

Instead I purchased a plastic electrical box that measures 12"x12".

Unfortunately I only have around 9"x9" to work.



and a closer look of how i'm planning on mounting everything.



I am mounting everything to some acrylic that will mount to the box. The box itself will be mounted to a piece of plywood mounted between wall studs. Hence the 9"x9" space I have to work.

So, this is the plan currently. The low voltage electronics are precariously combined via their mounting holes w/ stand offs. The pi will connect to the white perma-board via a ribbon cable, and everything will then connect to the perma-board.

To the right of the perma board is the mosfet board (red) w/ the dc to dc regulator on top.

You may be wondering where the dosing pumps and outlets go... that's the super duper funtime part.

I have a lot less wiring to do than the arduino builds b/c everything i'm controlling will use a web GUI. Which, now that I'm looking at the picture, may need to move the Pi b/c the ethernet port is at the bottom, way too close to 110v.
__________________
scapegoat is offline   Reply With Quote
Old 06-20-2014, 03:15 PM   #40
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

not a huge update. I've started over. After getting the previous code working as a proof on concept, I decided to have a go at making it a bit cleaner.

I've also began keeping the code in version control on github: https://github.com/bugeyed/osa

I have also purchased a dremel and dremel work station so I can begin drilling the plastic for screws... yet am still playing with the layout. I've decided to mount one of the terminal blocks to the side in order to receive hot, share neutral, and ground to go to the outlets that will be mounted in the door.

in any case, there isn't much to look at. I'm hoping to clean up my basement work bench to begin putting the thing together. then I'll get to work adding the probe stuff back in.

but for anyone inclined, please check out the git repository.
__________________
scapegoat is offline   Reply With Quote
Old 07-26-2014, 09:42 PM   #41
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

I'm finally getting this thing wired up. I've done what I can to keep the 120v wires cleanly out of the way. I've wired it up with 18g lamp wire. Good for 10a, which is all the main power port is good for. I'm also going to put a 10a fuse inline with the main load coming in; just to be extra safe. I have one around here somewhere

this thing... for all intents and purposes, is ready to fire up for testing. I'm going to blow the box out with compressed air, as well as the ac to dc converter. my main goal is to make sure the dc to dc regulator is reporting 12v in and 5v out, and nothing blows up. after that is done I can grab some 5v electrical cabling and wire up the relay and Pi, to the power and to each other.

once that is secured, i'll do some more work on the web based front end, and finally get the mosfet board hooked up to the Pi to control my peristaltic pumps.

and obviously I need to check the wiring for the 10th time. and yes... that is 14g speaker wire being used for the 12v power supply. it's all I had on hand.

please keep in mind this is a prototype. I've, mostly, enough parts to make a second. but it'll be mounted in either a wooden box, or I'll get myself a nice 3d printer and learn how to design for that.



and after triple checking everything, i plugged it in. the unit successfully powers on without anything exploding. The white arrow is pointing to the display on the ac regulator showing the input is 12v and the output is 5v. so it's time to power the Pi, the relay, and to hook them all up.



I've got 2-3 items I need to schedule, two pumps, and an auto top off system. so for the time being I'll have 3-4 outlets set for scheduling, one hooked up to my float switches, and probably nothing on the 6th for now.
__________________

Last edited by scapegoat; 07-27-2014 at 01:28 AM.. Reason: b
scapegoat is offline   Reply With Quote
Old 07-27-2014, 02:36 PM   #42
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,049
Default

The main power to the box will need a surge protector. Current spikes can affect other appliances in your house.

I had my lights, heater, and filter connected straight into the wall for a month and then my electric stove's switch turned on and off by itself for an hour exactly at the time my lights turned on. I couldn't figure it out for the longest time. I even opened up the electric stove and disconnected the switch to see.
mistergreen is offline   Reply With Quote
Old 07-30-2014, 05:41 PM   #43
bigd603
Planted Member
 
PTrader: (1/100%)
Join Date: May 2011
Location: Portland, OR
Posts: 261
Default

Quote:
Originally Posted by mistergreen View Post
The main power to the box will need a surge protector. Current spikes can affect other appliances in your house.

I had my lights, heater, and filter connected straight into the wall for a month and then my electric stove's switch turned on and off by itself for an hour exactly at the time my lights turned on. I couldn't figure it out for the longest time. I even opened up the electric stove and disconnected the switch to see.
Wow, thats crazy. I never would have thought that could happen.
bigd603 is online now   Reply With Quote
Old 07-31-2014, 01:59 PM   #44
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

I've dedicated the last couple days to the GUI. I think I've finally landed on a general look and feel.

Please keep in mind that this is web based, but developed for phone use. I have some modifications to make for tablets, and even more for desktops.

Here is the dashboard: You'll notice 6 blocks, two of which currently have something in place. This area is going to be used for "quick glances." Are my lights on? yes. what is the water temperature? Eventually, other items will be displayed here... and ultimately, deciding on what is displayed there will happen in the config page.

I've left it at 6 items for simplicity. I'm not sure what else to stick in there at the moment, probably pH. I might raise that section up closer to the title, or remove the title and raise it up to the fill in logo and include a twitter feed so potential users could get notifications of updates, or controller news.



Next is the menu open. Currently displaying the home button (to be replaced with a dashboard icon), and outlet button, and a, non-functional, config icon. the menu is toggled by the three white lines at the top right.



The only place to go from here is the outlets list. This is a really simple listing, with a button/notifier that an outlet is turned on, along the with the label and edit button. I might change the layout later on to look more like the dashboard... but i thought this was easy to read at a glance. The controller code on the Pi actually sends the information to the front end via web sockets. If you're on your phone looking at this, and someone else is on the computer looking at the same screen, and you turn an outlet on, you'll both be told instantly. pretty cool.





Finally we have the edit modal. This still needs to be spruced up and made prettier. You'll notice that we only have a "save & close" button. This is in order to keep the front end and back end in sync. When you change any of the data on the front end, the front end data is automatically modified due to the two-way automatic binding with AngularJS. You can therefore only close the modal via that button, which then sends the modified data to the server to be updated there.



and yes, you can change the label here. I might include the ability to set an icon as well; which could replace the computer on/off icon. If I change the list layout to blocks, that's a certainty.

__________________
scapegoat is offline   Reply With Quote
Old 07-31-2014, 02:33 PM   #45
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,359
Default

That's a really nice looking GUI so far! This is a cool project.
AnotherHobby is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012