DIY reef-pi build log

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
This thread will be my build log for reef-pi. It will replace RKL and a custom light controller on my reef tanks.
R4FUrec.jpg

I have a Digital Aquatics RKL, but they went out of business and I'll no longer be able to receive support or replacement parts. That led me to reef-pi (https://reef-pi.github.io/), so I started contributing to the project.

I started with the instructions on adafruit (https://learn.adafruit.com/reef-pi-installation-and-configuration?view=all). I glossed over the rpi set up and just downloaded Raspbian Stretch Lite, extracted the image, and flashed it to the sd card using Etcher (https://etcher.io/). Next, I enabled ssh by adding a file call ssh to the sd card root, and pre-configured wifi by adding wpa_supplicant.conf (as described here https://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi).

Next, I booted the pi and waited for it to join the network. I used the default credentials (pi/raspberry) to log in. First steps were to change login credentials and permanently enable ssh using raspi-config. I had a few hiccups from using low quality power supply and usb cables, but eventually I fixed that. I followed the rest of the instructions and finally have reef-pi running!

I think temperature sensors or power module will be next.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I set up a couples of temperature sensors in reef-pi. It was super quick, even with following instructions and soldering. I'm using the regular DS18B20 sensors; I bought a 10 pack a couple years ago and just coat in silicone to make it waterproof. I soldered a 4.7k pull up resistor between the data and vcc lines.

5hVMDRim.jpg


Readings in air over the last 24 hours.
upload_2018-9-17_19-50-22.png


Outlet set up is next on the list.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
The next step for my build is the outlet controller. I opted for an American DJ SRP8. It seems like a discontinued product, so I might buy a couple more while I can. The first thing I did was open it up and take a look at what's inside.
IYUuj3Ih.jpg

Pretty simple! There's no isolation or protection or anything! Pretty much nothing happening on the bottom of the board either.
b2FgCuMh.jpg

There are a couple of holes where I would have expected stand offs to be used, but the board is just held in place by DB9 connectors. It's probably fine, but I covered the bottom just to make sure it doesn't connect with the enclosure and short anything. I also mapped out the pins of the DB9 connector to the channel it controls.
8JTzLVIh.jpg


Pin - Channel
1 - 2
2 - 3
3 - 4
4 - 1
5 - Common
6 - 8
7 - 7
8 - 6
9 - 5

I got a bit ahead of myself at this point and soldered a DB9 cable to some female jumper wires.
rDeWtHZl.jpg
85rC9asl.jpg

Looks good! But I forgot that I wanted to inline the ULN2803 into the cable, so I took it apart and did it again...
C7HosoHl.jpg

Now the cable is ready to go and is ready to be connected to to the pi. I wired everything up and tested it without wall power to make sure the channels were lined up correctly. Each relay clicked at the right time. Each relay consumed around 60 mA when activated, so it takes about 1/2 amp if all relays are on.
GuLZd2Th.jpg

For reef-pi set up, the first step was to configure the Outlets.
iUPB2xwh.jpg

Then I set up equipment to use the outlets.
4oJhCmNh.jpg


It was pretty easy to set up, especially in reef-pi. The only thing that was slightly annoying, was mapping the pin on the header to the gpio. It wasn't difficult, just tedious.

I think this will be a temporary set up for the next couple of months. I'd like to modify the relay board to monitor current, maybe add optical isolation, and probably change the communication from parallel to i2c or serial. That's probably a couple months off, and I'll need to find a current monitor chip. This will let me know if a relay gets stuck on, or if some equipment is not operating correctly.

Larger images can be seen in the album.

Dosing control is probably up next.
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I've finally gotten around to the next step in this build and excited to get it running on my tank. It supports 16 outlets, 2 ph probes, 3 temperature sensors, 2 ATO sensors, and 2 lights with 3 channels each. I also made a 5 foot light bar to fix some dimness on the back wall.
THWHBBzh.jpg

v2rmgkhh.jpg

It looks fine from the outside, but the inside is dang mess! It took so long to get everything tucked and jammed in.
dzvZR2th.jpg

PCA9685 and ULN2803 are integrated into the hat, along with a bunch of JST connectors which were supposed make everything neat. Ha! I also added reverse current blocking and the eeprom for official hat status.
YzCEhsvh.jpg


The UPS needed modification in order to support individual outlet control. I pulled out the live strip and cut parts out of it. An 8 channel relay board now controls it.
g2kyajWl.jpg

Va6Rvrfl.jpg
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I've finally gotten around to the next step in this build and excited to get it running on my tank. It supports 16 outlets, 2 ph probes, 3 temperature sensors, 2 ATO sensors, and 2 lights with 3 channels each. I also made a 5 foot light bar to fix some dimness on the back wall.
THWHBBzh.jpg

v2rmgkhh.jpg

It looks fine from the outside, but the inside is dang mess! It took so long to get everything tucked and jammed in.
dzvZR2th.jpg

PCA9685 and ULN2803 are integrated into the hat, along with a bunch of JST connectors which were supposed make everything neat. Ha! I also added reverse current blocking and the eeprom for official hat status.
YzCEhsvh.jpg


The UPS needed modification in order to support individual outlet control. I pulled out the live strip and cut parts out of it. An 8 channel relay board now controls it.
g2kyajWl.jpg

Va6Rvrfl.jpg
Nice. This reef-pi will be doing a lot of work :)
I love the hat. Does it do anything else otherthan pca9685 and uln2803? Like the ato or temp sensor circuit ?
Does this hat uses smt components ? Or through hole. And will it cost less than buying individual component and solder them on perma proto board ?
Apologies in advance if I’m asking too many question.m :)
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
This hat is all SMT except for connectors. The passives are mostly 0603 since I had them on hand from building the ph board.

It supports
  • Back powering the rpi with 5v
  • 9 channels of PWM control via PCA9685 (split between 3 connectors)
  • 3 channels for 1 wire communication (up to 3 DS18B20 temperature probes)
  • 2 i2c ports for ph probe modules
  • 2 ATO sensors
  • 8 channel 12v relay control via ULN2803
  • 8 GPIO breakout (intended for 3.3v relay module)
Cost can be a bit misleading since quantity, source, shipping, and authenticity all play a role. On this board, the eeprom and back power protection could be considered optional. The total cost for this board was around $10. Of course I spent much more than that since most components were purchased in multiple quantities. I would also bet that the price is similar to purchasing breakout boards from cheap sources. In my case, I wanted a more compact footprint to squeeze everything into the UPS body.

It's designed in Kicad and files are available at https://github.com/Ranthalion/reef-piHat. I have a handful of extras since PCBs come in packs of 10.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
This hat is all SMT except for connectors. The passives are mostly 0603 since I had them on hand from building the ph board.

It supports
  • Back powering the rpi with 5v
  • 9 channels of PWM control via PCA9685 (split between 3 connectors)
  • 3 channels for 1 wire communication (up to 3 DS18B20 temperature probes)
  • 2 i2c ports for ph probe modules
  • 2 ATO sensors
  • 8 channel 12v relay control via ULN2803
  • 8 GPIO breakout (intended for 3.3v relay module)
Cost can be a bit misleading since quantity, source, shipping, and authenticity all play a role. On this board, the eeprom and back power protection could be considered optional. The total cost for this board was around $10. Of course I spent much more than that since most components were purchased in multiple quantities. I would also bet that the price is similar to purchasing breakout boards from cheap sources. In my case, I wanted a more compact footprint to squeeze everything into the UPS body.

It's designed in Kicad and files are available at https://github.com/Ranthalion/reef-piHat. I have a handful of extras since PCBs come in packs of 10.
Very nice. This is a very good balance of cost vs feature. We should promote this more :) . SMT components will make it harder for beginners though. I am thinking of doing something similar but with through-hole components
 

crusso1993

7500 Club Member
View Badges
Joined
Oct 21, 2018
Messages
8,671
Reaction score
44,647
Location
SW, FL, USA
Rating - 0%
0   0   0
Very nice. This is a very good balance of cost vs feature. We should promote this more :) . SMT components will make it harder for beginners though. I am thinking of doing something similar but with through-hole components

@Ranjib - Why do you think SMT would be harder for beginners?
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib - Why do you think SMT would be harder for beginners?
Equipment for smt are expensive, individual component for smt can be smaller, ics can have significantly larger pin count, and sourcing smt individually is harder than through hole components . I think through holes are definitely lit easier than smt, and soldering in general is a deterrent. But if we keep it relatively less complex and modular, so that builders can rip the benefits incrementally
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I think a fully completed one of these hats with headers would be pretty popular. hits all the tricky bits and makes it neat.
Thanks.
I'll put a couple more together and consider setting up a Tindie store or something. Maybe the For Sale - Dry Goods section would be better.
 

Kampo

Active Member
View Badges
Joined
Dec 19, 2017
Messages
349
Reaction score
327
Location
South West Michigan
Rating - 0%
0   0   0
Thanks.
I'll put a couple more together and consider setting up a Tindie store or something. Maybe the For Sale - Dry Goods section would be better.
nice, I would be intrested in one or two forsure depending on cost if you do end up deciding to make a few shoot me a pm.
 

BlakeFL

Community Member
View Badges
Joined
Dec 8, 2012
Messages
29
Reaction score
31
Rating - 0%
0   0   0
nice, I would be intrested in one or two forsure depending on cost if you do end up deciding to make a few shoot me a pm.

I would be interested as well depending on the price. I would ask to buy a bare board but should solder the ph board first to gauge the complexity. Currently waiting to see if Roberto has a spare board I can buy. I'm confident with smaller components, just not drag soldering the IC's.
 

Diamond1

Valuable Member
View Badges
Joined
Oct 17, 2013
Messages
1,368
Reaction score
1,911
Location
Cleveland Ohio
Rating - 0%
0   0   0
This thread will be my build log for reef-pi. It will replace RKL and a custom light controller on my reef tanks.
R4FUrec.jpg

I have a Digital Aquatics RKL, but they went out of business and I'll no longer be able to receive support or replacement parts. That led me to reef-pi (https://reef-pi.github.io/), so I started contributing to the project.

I started with the instructions on adafruit (https://learn.adafruit.com/reef-pi-installation-and-configuration?view=all). I glossed over the rpi set up and just downloaded Raspbian Stretch Lite, extracted the image, and flashed it to the sd card using Etcher (https://etcher.io/). Next, I enabled ssh by adding a file call ssh to the sd card root, and pre-configured wifi by adding wpa_supplicant.conf (as described here https://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi).

Next, I booted the pi and waited for it to join the network. I used the default credentials (pi/raspberry) to log in. First steps were to change login credentials and permanently enable ssh using raspi-config. I had a few hiccups from using low quality power supply and usb cables, but eventually I fixed that. I followed the rest of the instructions and finally have reef-pi running!

I think temperature sensors or power module will be next.

Love your set up. I would be interested in one of your hat's also. If it was populated with all the SMT parts.

Is that a Tunze wavebox on the right side of the main display?
 
OP
OP
Michael Lane

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
Love your set up. I would be interested in one of your hat's also. If it was populated with all the SMT parts.

Is that a Tunze wavebox on the right side of the main display?
I have parts for a few more, so I'll assemble and test this weekend.
That actually is a Tunze wavemaker box! I got it as part of the full system, and I've never really liked how large it is in the tank. It does a good job, and I often use the top of it as a sort of coral nursery, so I guess I shouldn't complain...
 

Fusion in reefing: How do you feel about grafted corals?

  • I strongly prefer grafted corals and I seek them out to put in my tank.

    Votes: 3 3.3%
  • I find grafted corals appealing and would be open to having them in my tank.

    Votes: 51 55.4%
  • I am indifferent about grafted corals and am not enthusiastic about having them in my tank.

    Votes: 28 30.4%
  • I have reservations about grafted corals and would generally avoid having them in my tank.

    Votes: 7 7.6%
  • I have a negative perception and would avoid having grafted corals in my tank.

    Votes: 3 3.3%
Back
Top