OSA raspberry pi aquarium controller - controller has been put to work on my 125g - Page 2
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 01-23-2014, 07:25 PM   #16
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: yorba linda, ca.
Posts: 591
Default

Quote:
Originally Posted by benjaf View Post
12 bit resolution no less, hmm.. I'll have to do some work to safely drive a MOSFET off of that. But that is certainly the right sort of thing!
Why do you need to drive a MOSFET? The chip can output 10ma per channel. Most Led drivers don't require even a fraction of that on their PWM pin to function correctly.
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers, and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 01-23-2014, 07:43 PM   #17
benjaf
Algae Grower
 
benjaf's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2012
Location: Denmark
Posts: 105
Default

Quote:
Originally Posted by O2surplus View Post
Why do you need to drive a MOSFET? The chip can output 10ma per channel. Most Led drivers don't require even a fraction of that on their PWM pin to function correctly.
True. But I am not using dimmable drivers, I'm using MOSFETs to switch the LEDs directly.
__________________
benjaf is online now   Reply With Quote
Old 01-23-2014, 09:11 PM   #18
hamato
Algae Grower
 
PTrader: (0/0%)
Join Date: Jun 2008
Location: Canada
Posts: 70
Default

On a side note what relay board are you using? I see some on the bay listed as " 4-Channel Relay Module DC 5V With Optocoupler For Arduino PIC ARM AVR DSP" for under $5. Will this work for simple 6v peristaltic dosing pumps?
hamato is offline   Reply With Quote
Old 01-23-2014, 10:38 PM   #19
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,045
Default

Quote:
Originally Posted by hamato View Post
On a side note what relay board are you using? I see some on the bay listed as " 4-Channel Relay Module DC 5V With Optocoupler For Arduino PIC ARM AVR DSP" for under $5. Will this work for simple 6v peristaltic dosing pumps?
With a relay, there are 2 power sources. One to move the magnet to the on position (say 5v/arduino). It's called coil voltage. And another separate power source for your device not connected to the arduino. It's called contact voltage. You should make sure on both specs when buying relays.
mistergreen is online now   Reply With Quote
Old 01-24-2014, 01:10 PM   #20
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

and most of those larger relays are used for 110v AC, such as mine.

I'm using a mosfet board for the time being, same as HunterX's, until I can make some cheap open collector driver boards; which, i think, are better/simpler.

I'm using the OCD on my gertboard to handle bringing the relays to ground. however, the OCD, i think, will handle a 50v load on each pin! So a 12v power supply for pumps would be a no brainer.

this is the OCD https://www.adafruit.com/products/970 itself.
__________________
scapegoat is offline   Reply With Quote
Old 01-24-2014, 01:16 PM   #21
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,045
Default

An easy solution for the 110v contact relay is to plug in a power adaptor say 6v for the peristaltic pump.


Sent from my iPad using Tapatalk HD
mistergreen is online now   Reply With Quote
Old 01-24-2014, 03:13 PM   #22
hamato
Algae Grower
 
PTrader: (0/0%)
Join Date: Jun 2008
Location: Canada
Posts: 70
Default

Quote:
Originally Posted by mistergreen View Post
An easy solution for the 110v contact relay is to plug in a power adaptor say 6v for the peristaltic pump.
I actually have to power an arduino based device (currently powered from 10v power supply) 2 of the 6v dosing pumps and a 12v water pump. I'm trying to do this with a minimum of power supplies & excess equipment. I doubt I'll ever be switching any 120v stuff from my controller. The ebay relays have 5v control and AC250V 10A; DC30V 10A on the output side so I think they should work with some regulation, but open to your suggestion on the best route to go!

Looks like both HunterX and scape are using the same mosfet board. I just want to order stuff soon as ebay has a 1month lead time
hamato is offline   Reply With Quote
Old 01-24-2014, 04:18 PM   #23
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

i'm using an ac to dc power converter for everything DC related. it's rated at 12v and 2.1a. the thing is, it gets wired directly to mains. Search amazon for dc to dc regulator and you'll find a plethora of options to bring your 30v down to whatever you need. I'm using
Amazon.com : DROK Adjustable 4.0-40V to 1.25-37V 5/12V DC LM2596 Voltage Regulator Experimental Power Buck Converter+LED Voltmeter : Electronics Amazon.com : DROK Adjustable 4.0-40V to 1.25-37V 5/12V DC LM2596 Voltage Regulator Experimental Power Buck Converter+LED Voltmeter : Electronics
and it came preset to 5v out.

A lot of my hardware decisions were directly taken from Hunter's controller. w/o his controller I'd still be sitting on 2 Pi's thinking, "gosh... i should get started"

You'll notice a lot of similarities between the two units as I start building it within a box for actual use. I think mine may end up simpler in appearance because I'm not using any mechanical switches, and both the Pi and relay board require 5v, so i only have 1 dc to dc regulator.

As I'm learning about electronics, as I go, and what I want/need to use, you'll start to see a larger separation between the units when I get to work on my second model.

The mosfet board won't be used with that version as I think I very much prefer the open collector driver. it's a much simpler, and MUCH cheaper, item to use. it'll just require some building on my part.

Once I get prototype 2 done I'll release the code. I'll also be working with a buddy who keeps a reef to build a controller for him to test. something I'm happy to do for others post prototype 2 creation, for component costs (including shipping) and nominal charge for time to put the unit together and shipping.

Once prototype 2 is done for the basic controller I'll move on to ATO code/hardware additions. After that I think I'm going to build an RGB LED fixture and software to control that w/ the controller. I'm dreaming of a full day cycle including dawn and dusk colors, to moonlighting, to everyone's favorite "thunder storm"

I've got a lot planned for this thing!
__________________
scapegoat is offline   Reply With Quote
Old 01-30-2014, 02:24 PM   #24
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

I'll have another video up within the next couple days.

Currently this prototype controller is doing everything I want from it.

I can do the following from the GUI:
  • turn on/off up to 6 relays by clicking a button
  • schedule any of those relays to turn on/off with military time (schedule is only daily)
  • assign any of those relays to turn on/off based on temperature from the sensor as well as giving it a temperature to turn on if the tank temp falls below. it'll then turn off once the temp is reached.
  • tell 2 dosing pumps to turn on at a specific time each day and dose by mL. I give the pump a time and mL, backend figures out how long to turn the pump on to dose that mL based on 12v giving me 100mL in a minute. so 15mL is around 8.8 seconds. I still need to test this to ensure I'm getting 15 mL of liquid

So I will be dosing ferts daily, so probably mixing either a weaker concentration or dosing less. Currently this thing is all still hooked up to a breadboard and on my computer desk. I'll start designing the box and wiring layout. I'm very hopeful to have this thing hooked up to the tank this weekend so I can see it in real action, and start planning out mk 2.

Does anyone have any controller suggestions? as in, what you'd like to see, control, schedule off of?

A few future additions will be:
  • ATO
  • LED dimming w/ PWM
  • password protection
  • off network access
  • data graphing

i'd really like to offer open source, freely available, controller software that is competitive w/ some of the commercial examples on the market.
__________________
scapegoat is offline   Reply With Quote
Old 01-30-2014, 07:54 PM   #25
salman
Algae Grower
 
PTrader: (5/100%)
Join Date: Apr 2013
Location: New York
Posts: 136
Default

This sounds really interesting. I like automation. I can probably do the hardware part but not too good with software. You think there is a way to control more than 6 relays with raspberry pi? I saw online somewhere a guy was controlling 16 relays using only 4 pins from pi. Are you also planning to do possibly a sunrise/sunset with LED's? That would be interesting.

What OS do you recommend for Rpi?

Last edited by salman; 01-30-2014 at 11:36 PM.. Reason: edit
salman is online now   Reply With Quote
Old 01-31-2014, 01:18 AM   #26
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 salman View Post
This sounds really interesting. I like automation. I can probably do the hardware part but not too good with software. You think there is a way to control more than 6 relays with raspberry pi? I saw online somewhere a guy was controlling 16 relays using only 4 pins from pi. Are you also planning to do possibly a sunrise/sunset with LED's? That would be interesting.

What OS do you recommend for Rpi?
yeah, I could totally run more if I used a microchip and told it what to do over I2C. Thing is, I only really need 4-5. 2 heaters, one LED fixture, one pump, and my co2. Now, if I was running this on multiple tanks, like my breeding rack, i'd consider it.

I am planning on building an LED fixture as my next big project to handle the sunset/sunrise stuff. I have a BML fixture, and it really doesn't need to be dimmed at all, so i don't see a point in programming that right now.

as far as OS, i'm using Adafruit.com's occidentalis (based on raspian) because it comes with a bunch of useful additions to the kernal for dealing with sensors and such.
__________________
scapegoat is offline   Reply With Quote
Old 01-31-2014, 08:24 PM   #27
scapegoat
Planted Tank Guru
 
scapegoat's Avatar
 
PTrader: (14/100%)
Join Date: Jun 2010
Location: philadelphia, pa
Posts: 2,192
Default

I've ordered some float switches from amazon. I top off the sump every couple days, and some times forget and come home to the obnoxious sound of air being sucked into the pump and a tank full of bubbles.

I'll have two, one to trigger a small pump to start, and another as a fail safe if the water level gets too high.

Since i've got an 8 channel relay, and only 6 relays i'm controlling, one of the remaining two will go through this switch. This is easy because the relays just need to be brought to ground, so the switch will merely sit between the relay pin and ground. the second switch will actually sit between the first switch and ground and be "normally on" so that if the sump water gets too high (the top off pump stuck on for some reason) the other float switch will float and kill the connection.

this doesn't require any additional programming, and is all wiring... so why the hell not for $12?

I need to consider connectors for things like probes and these float switches. I was looking at hunter's controller and i suppose the DIN connectors would do nicely enough. I might just solder everything together this time around though.
__________________
scapegoat is offline   Reply With Quote
Old 02-01-2014, 02:20 PM   #28
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,045
Default

hmmm, the RPi has no analog input without an addition chip. That means no analog sensors. No pwm except 1.

Maybe plugging in an arduino to this is the way to go. It's cheaper than a gerty board. Why add a bunch of components to extend the RPi when a single arduino will do.
I think that's my route if the coding isn't too much of a problem. I can handle it but I'm think of userbility for folks.

Oh, looks like somebody started a project for home automation already with Rpi and arduino
http://ni-c.github.com/heimcontrol.js/

I'll give it a try. If it needs something for the aquarium hobby, I'll mod it. This project looks exactly what I wanted to do with the arduino originally.

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

I'll have to check that out. I'd like to know how they got mongodb working since it doesn't support arm. Amd all the builds I've found for it were older and took hours to build on the pi.

No real interest in the arduino right now though. The pi does everything I need at the moment.
__________________
scapegoat is offline   Reply With Quote
Old 02-01-2014, 04:14 PM   #30
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,045
Default

I think the mongodb is used to store your settings for the devices.
mistergreen is online now   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 03:09 PM.


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