reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Discussion in 'Do It Yourself (DIY)' started by Ranjib, Feb 10, 2017.

  1. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    I am exhibiting reef-pi along side two of my pico reefs in Bay Area makerfaire. If you are attending, please drop by and say hi. Here are some pics. A fully assembled reef-pi and a opened up reef-pi along side its electronics is also part of the exhibithttps://instagram.com/p/BUVVTDYA6w9/ IMG_0915.JPG IMG_0908.JPG IMG_0910.JPG IMG_0903.JPG IMG_0899.JPG IMG_0897.JPG IMG_0904.JPG
     
    njtiger aquariums and LbulletM like this.

  2. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    Here are some pics of wooden housing and the electronics mounted in it IMG_0835.JPG IMG_0851.JPG IMG_0844.JPG IMG_0853.JPG IMG_0780.JPG
     
  3. Mark Taber

    Mark Taber Member

    Joined:
    Oct 7, 2016
    Messages:
    89
    Likes Received:
    31
    I will be interested to know more about the monitoring capabilities. I started building the Reef Pi on Reefuge forum but that seems to have died so following this with interest.
     
    njtiger aquariums likes this.
  4. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    reef-pi project was awarded blue ribbon, Maker Faire, Editor's Choice award :) . There are several new and existing reefers expressed interest in building the controller, if theres enough follow up interest, I'll run a DIY workshop for building reef-pi controllers. There were several educators interested in building inexpensive reef tanks as part of STEM program. Anyone here have experience with STEM curriculum ?

    I'll polish and publish a build guide soonish.
     
  5. LbulletM

    LbulletM Valuable Member R2R Supporter MTRCMember Build Thread Contributor

    Joined:
    Sep 7, 2016
    Messages:
    1,400
    Likes Received:
    961
    That's awesome! Congrats on the win! Also good to see that it's motivating a whole new generation both through STEM programs and an introduction to our hobby. Especially the latter, because they can't afford drugs if they're trying to afford a tank. ;)
     
    njtiger aquariums and Ranjib like this.
  6. wedgen

    wedgen New Member

    Joined:
    May 21, 2017
    Messages:
    1
    Likes Received:
    2
    Greetings,
    This sparked me to want to build a tank, I'm looking at getting a Innovative Marine 10 gallon Nuvo Fusion to start my tiny tank. I don't have room for a large one at the moment. I'll put a refugium in the back likely, I like the natural filtration. I've wanted to build a fish tank again for a while (moved and had to leave the tank at location).

    Have you used/seen the Neptune Apex stuff? Looks like a nice commercial version of this DIY. .
    I think its time to build a shield for the Pi. I think we could whip up a pcb real fast to make it mount onto the pi easier as well as add BNC connectors for popular sensors. Most certainly should include the PH and Salinity sensors. Do you have a bom in google sheets to share so we could attempt to build a kid shield. Taking this to a new level I can see using the MAX11300 as a universal I/O controller so we can save the GPIOs. Although this system really only needs the spi port. Maybe serial to an external display other than a screen. I think a printable enclosure is also in order.
    I wish I had more time to talk to you @ the fair, but would like to discuss further.
     
    njtiger aquariums and Ranjib like this.
  7. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    I have not used, but seen Apex in action. They are awesome, I have seen jaw dropping 120G tanks powered by apex. I know GHL is good too. It was surprising for me when I first realized they too have receptacles on the controller housing.

    They were far too expensive for me, and I didn't need all the features at once. Relay was most important in the beginning. Also, I wanted something hackable, specially where I can do image capture automation, hook up PID controllers, grow it with my reef etc. More than anything, I wanted 1 module every month for 10-20$ :). I went with wood instead of 3d printing the housing for same reason.

    MAX11300 will be nice :), this will simplify the wiring. Isn't it expensive? We have to implement the I2C protocol in go. Current ICs are bare bones (they do only one thing, and they are cheap, and they are part of embd already). None the less, its worth having a max11300 based build. Your tank is big too.

    I'll think adding bits for mosfets or opamps (for more than 5v PWM outputs), hbridges (something like l293d) for dosing pump controls etc will be good. Likely to come from my own use :).

    I think what I am trying to get at is that we should know exactly what function we are solving, it has to be one of the more common ones, and we should add minimal electronics for that (cause one goal of the project to keep it inexpensive).
    Im not aware of salinity sensors (temp, ph & ORP). For the pico reefs I dont use anything beyond temp sensor, first build has BNC connectors, I am thinking of barrel jack.
    Godspeed.
    We can always sync up on google hangout or over beer (if you are in bay area)
     
    njtiger aquariums likes this.
  8. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    Forgot to mention, i had started a fritzing based circuit diagram, but never really finished it, its half baked and available here: https://github.com/ranjib/reef-pi/blob/master/doc/reef-pi.fzz
    BOM is also there: https://github.com/ranjib/reef-pi/blob/master/doc/BOM.md , but its outdated. Give me a day, I'll fix BoM (its lot simpler). I have never used fritzing, so that will take some time.
    BTW, all the things in the makerfaire was tuned for the pico reef (hence the build has 4 relays, and only temp sensor and pwm ), i'll make the BoM reflect those.
     
    njtiger aquariums likes this.
  9. Cary

    Cary Well-Known Member

    Joined:
    Feb 19, 2016
    Messages:
    591
    Likes Received:
    701
    Location:
    Allen, Tx
    Very nice. I am interested too.
     
    Ranjib and njtiger aquariums like this.
  10. Mike Logsdon

    Mike Logsdon New Member

    Joined:
    May 26, 2017
    Messages:
    4
    Likes Received:
    4
    I read all, ordered all the hardware, tried installing on RPI3, and when run sudo install i get errors about archive, have you seen this before....Great work here?
     
    njtiger aquariums likes this.
  11. Mike Logsdon

    Mike Logsdon New Member

    Joined:
    May 26, 2017
    Messages:
    4
    Likes Received:
    4
    here is exact error

    pi@raspberrypi:~ $ sudo dpkg -i reef-pi-0.0.3.deb
    dpkg: error processing archive reef-pi-0.0.3.deb (--install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    reef-pi-0.0.3.deb
    pi@raspberrypi:~ $
     
    njtiger aquariums likes this.
  12. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    njtiger aquariums likes this.
  13. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    For those who are following the thread, I have updated read me with with bill of material of a reef-pi build, specifically targeted for pico reef tanks, the ones I put on display for the maker faire.

    Now that I have the BoM, housing concrete, I'll write down an assembly guide tonight.
    Meanwhile, on the software side, I am in process of merging the adafruit.io integration, i.e reef-pi will be able to send data (temperature, ph etc) to adafruit.io, where you can build graph. I have a rough draft of PID controller also, hopefully we'll be able to use it to build temperature controller (heater failure is one of the most common reason for tank failure), all of these will go in the next pre-release,
     
    njtiger aquariums likes this.
  14. Mike Logsdon

    Mike Logsdon New Member

    Joined:
    May 26, 2017
    Messages:
    4
    Likes Received:
    4
    getting ready to work tonight, but will try the new file tomorrow, and see if it works, will let you know...you did good job on info to get started...thanks
     
    njtiger aquariums likes this.
  15. mikeh77

    mikeh77 Member

    Joined:
    May 29, 2017
    Messages:
    5
    Likes Received:
    7
    Very cool stuff! So I'm actually in the final steps of finishing a vivarium build. I'm an ex-reefer that's into rainforests and vivariums now, but eventually I'll definitely get back into the reef hobby via a pico/nano tank.

    For fun, here's a reddit thread I created for my build, and a picture of it currently. I'm using the pi to monitor temperature and humidity within the tank, as it needs precise conditions for poison dart frogs and orchids:
    https://www.reddit.com/r/Vivarium/comments/66cv1s/first_build_mikes_55g_vivarium/
    [​IMG]

    Anyway, I have a question for you, and it's on wiring. I'm driving two Meanwell drivers from the pi that require 0-10V PWM. I'm using 4x COB LEDs (2 per driver) with computer fans for cooling (and an irrelevant IR-controlled LED strip via LIRC for accent lighting), and I have a PWM6985. I decided to go with a Darlington transistor to amplify the PWM signal from 5V output to 10V, as you said in one of your posts (I've read them all). I know the PCA board gets it's power on the side pins from the pi, but the question is, do you need two power supplies for this project or one? Two being a power supply to hook up into the relay in the top-center of the PCA board, and another to amplify the v+ signal from the board through the transistor and into the driver? Or do you simply only need one 10V supply to the transistor and leave the main relay on the PCA disconnected?

    Great stuff, and thanks in advance for the help!
     
    njtiger aquariums and Ranjib like this.
  16. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    I power the PCA9685 board straight from Pi. I use 2.4 amp 5 volt power supply to power Pi, which in turn powers display and the PCA board. Since all my LEDs controls expect 0-10v, i cant use the PCA board straight. Initially I used darlingtons (ULN2803a), but I encountered the issue where each independent 10V pwm output will require a dedicated ground, since the darlignton pairs are used as sink. For kessil controller, this was not possible as all the connector (3.5 mm audio jack) share a common ground. I went with logic level P channel mosfet , which allows me to convert 10v pwm (mosfet drain) from 5v pwm (pca9685), and the outputs can share a common ground.
    Coming back to your original question, I do use two power source, 5 v , 2.4 amp for Pi, and a 10V 1 amp for the mosfets. For pico controllers, I mount a female barrel jack connector in the housing, while for the BC29 controller, the whole power adapter is crammed inside the housing.
     
    njtiger aquariums likes this.
  17. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    Forgot to mention, I love your vivariam :) . I think reef-pi code base can be used to maintain something like that (use mcp3008 to sense humidity may be) . Thanks for sharing
     
    njtiger aquariums likes this.
  18. mikeh77

    mikeh77 Member

    Joined:
    May 29, 2017
    Messages:
    5
    Likes Received:
    7
    Interesting. Also, thanks for the praise of the vivarium!

    So to clarify at this point, since I'm kind of unclear about what you're saying, would you mind looking at my Fritzing diagram (attached)? If I'm following you, then it should look like the following (the servo represents the 0-10V PWM signal going in to the LED driver)? Is this wrong? Thanks again so much for your help!! My fzz file is linked here: https://drive.google.com/file/d/0B9hP62eJvLfwYkZNcmhSbWh5cDQ/view?usp=sharing

    [​IMG]
     
    Ranjib and njtiger aquariums like this.
  19. Ranjib

    Ranjib Valuable Member R2R Supporter Reef Squad R2R Excellence Award Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    4,822
    Likes Received:
    7,365
    Location:
    Foster City, Bay Area
    Yeah, you got it :)
    Couple of things from your circuit:
    - 10v + ve will also go to pin 10 of uln2803a, and pin 9 to ground
    - You have servo in your diagram, thats 3 wire, for led you'll have only two so the recommended circuit is more like this

    [​IMG]
     
    njtiger aquariums likes this.
  20. mikeh77

    mikeh77 Member

    Joined:
    May 29, 2017
    Messages:
    5
    Likes Received:
    7
    Cool, ok. Yeah I'm actually driving high powered LEDs through a Meanwell power supply, and that's a PWM signal that requires 3 wires - red, black, and yellow. Right now I just have the lights hooked up to a manual potentiometer knob that's powered with a 9V battery, and each of those knobs have 3 wires as well. For straight LED strips it would be different, but this is actually for an LED driver.

    So fingers crossed, I'm gonna try to hook it up this week. Big thanks for the heads up, and I'll let you know how it goes either way!
     
    njtiger aquariums likes this.
Draft saved Draft deleted

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
Loading...