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

OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
That looks awesome. What is the estimated cost at this time to get a board and have the manufacturer handle all of the SMT components?
I assume that will be a lot. :-/ , I’ll let @theatrus answer this. But the board itself without any components was 30-50$
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
Current progress on the reef-pi PCB:

board-reva.PNG


I've added an isolated pH sensor circuit. Of course, in my attempt to "put everything on the board", ...

Are there future plans for larger tank boards?
More sensor and light inputs?
This looks awesome, great work!
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Current draw for the PWM signal is negligible. I would recommend using the supply inside the BB if possible. Once less thing to deal with. That is assuming you will have this circuit housed inside of the light housing. If not, then disregard.

Hmm...I'm trying to imagine what you mean by that? I thought you had to supply a 12 volt external psu to the pca9625 board. Are you saying you are using your on/off line inside your black box as a 12 volt input for your perf board, into your regulator?
 
Last edited:

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
The transistor I used was a PN2222 from Adafruit (I had these already)

Current draw for the PWM signal is negligible. I would recommend using the supply inside the BB if possible. Once less thing to deal with. That is assuming you will have this circuit housed inside of the light housing. If not, then disregard.

This may help a bit, sorry I forgot to include earlier. Notice traces between pads on the boards that I used.
upload_2018-3-19_6-27-38.png

Thank you for this, it is awesome.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
awesome :)

Currently reef-pi uses ezo circuit for ph . For this board to work with reef-pi, we have to implement calibration as well voltage to ph value conversion logic , am I right?

Correct, but not in the Reef-Pi software (unless you want to!). This section us isolated by an http://www.analog.com/en/products/interface-isolation/isolation/isolated-i2c-isolators/adm3260.html, which gives us a tiny bit of power and I2C isolation. Digital is far easier to isolate, so it includes a local MCU (https://www.microchip.com/wwwproducts/en/ATSAMD10D14), which handles the actual A/D conversion as well as any protocol work. This matches the topology of the EZO setup (+/- some parts) pretty much exactly. I plan on emulating the "critical subset" of the EZO I2C protocol on this microcontroller, which means the reef-pi software doesn't know the difference between the two units.

I initially had an 8-bit PIC on here, but the open source aspects of their XC8 compiler are awful (want code optimization? its mega bucks to buy a license), so went with a (cheaper!) 32bit ARM (standard GCC + the Atmel libraries). Its crazy how the market moves sometimes. There is also an SMC to act as a beeper driver and a watchdog that can power cycle the Raspberry Pi if it doesn't check in periodically, which I've used the same MCU for commonality. Due to the isolation needs, this functionality can't really be shared.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
I assume that will be a lot. :-/ , I’ll let @theatrus answer this. But the board itself without any components was 30-50$

That would be right if I bought a single board, but no one actually does that :). PCBs can be had at stupidly low prices these days, so the PCB in about 10-20 volume is around $5. The board is very low tech comparatively (6/6 traces, 2 layer, etc). This doesn't count parts (ballpark $20-45, depending on pH or other bells and whistles in single board quantities - pricing gets much better even if you go to Qty 20-50) assembly - I'll post the details of that in a bit. I usually do very-low volume assembly in house, and have used a few contract manufacturers in the past.
 

binay

Community Member
View Badges
Joined
Feb 9, 2018
Messages
31
Reaction score
16
Rating - 0%
0   0   0
Reinstalled and finally up and running and my diy led light with 10 channels
15214780487571455810635.jpg
1521477757911471332277.jpg
1521477976669307661962.jpg
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,957
Reaction score
3,355
Location
Sacramento, CA area
Rating - 0%
0   0   0
Are there future plans for larger tank boards?
More sensor and light inputs?
This looks awesome, great work!

Yes, how that’s done is a bit TBD.

One way is to simply add add-on modules that can be attached to the HDMI connectors as it already has I2C on it: think adding a PCA PWM controller there, or multiple pH channels, as a double-ended module so you can stack them. There are also <$10 HDMI breakout adapters which can be added to add your own circuitry, etc.

I’m also keen on experimenting with adding a CAN bus using the same protocol as AquaBus down the road. The UART on the Pi Zero W that isn’t used for the Bluetooth module however is extremely limited and won’t work for this.

Or go up even bigger on the main board.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yes, how that’s done is a bit TBD.

One way is to simply add add-on modules that can be attached to the HDMI connectors as it already has I2C on it: think adding a PCA PWM controller there, or multiple pH channels, as a double-ended module so you can stack them. There are also <$10 HDMI breakout adapters which can be added to add your own circuitry, etc.

I’m also keen on experimenting with adding a CAN bus using the same protocol as AquaBus down the road. The UART on the Pi Zero W that isn’t used for the Bluetooth module however is extremely limited and won’t work for this.

Or go up even bigger on the main board.
I 'll echo my thoughts on this, as I did the slack channel.
I think of three flavors (main boards):
- Pico: Aimed for 5-10G pico tanks. Minimal cost, minimal features (4-8 outlets, temperature, 2 pwm [using pi itself], 1 ato). Our aim here is to support a low-cost pico tank (softies, lps mostly).
- Nano: Aimed for tanks up to 30G. Everything therein pico + ph + doser . More outlets, more pwm (pca9685 integration). I am still not decided on what the exact number of outlets (probably 8-16) and PWM jacks will be.
- Standard: Aimed for 120G+ tanks. Provides everything that reef-pi can do, including the experimental things (every feature of nano in higher volume, i.e. more outlets, ph probes, dosing pumps, wave makers). This assumed a multiple physical unit system. I have very little idea about how this will be, I am likely to think about this more as and when pico board is done, and we have learned some lessons, and nano board's idea is solidified.

Not to mention, it is possible to combine multiple of these units. Also, I am making its explicitly possible each module is independently buildable with DIY perfboard/protoboard and through hole components. A combination of these two approaches should address most needs, albeit at the cost of some extra elbow grease.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I 'll echo my thoughts on this, as I did the slack channel.
I think of three flavors (main boards):
- Pico: Aimed for 5-10G pico tanks. Minimal cost, minimal features (4-8 outlets, temperature, 2 pwm [using pi itself], 1 ato). Our aim here is to support a low-cost pico tank (softies, lps mostly).
- Nano: Aimed for tanks up to 30G. Everything therein pico + ph + doser . More outlets, more pwm (pca9685 integration). I am still not decided on what the exact number of outlets (probably 8-16) and PWM jacks will be.
- Standard: Aimed for 120G+ tanks. Provides everything that reef-pi can do, including the experimental things (every feature of nano in higher volume, i.e. more outlets, ph probes, dosing pumps, wave makers). This assumed a multiple physical unit system. I have very little idea about how this will be, I am likely to think about this more as and when pico board is done, and we have learned some lessons, and nano board's idea is solidified.

Not to mention, it is possible to combine multiple of these units. Also, I am making its explicitly possible each module is independently buildable with DIY perfboard/protoboard and through hole components. A combination of these two approaches should address most needs, albeit at the cost of some extra elbow grease.
Not to mention, @theatrus has led the charge on pico pcb designs, so all this tremendously resides on his availability, priorities and wishlist
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Hmm...I'm trying to imagine what you mean by that? I thought you had to supply a 12 volt external psu to the pca9625 board. Are you saying you are using your on/off line inside your black box as a 12 volt input for your perf board, into your regulator?
The manual dimmers that were used in the SBReef BB had 12v coming from an internal supply (the same that is powering the fans). I used that to power this circuit.
Where does your dimmer circuit draw its power from?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Reinstalled and finally up and running and my diy led light with 10 channels
15214780487571455810635.jpg
1521477757911471332277.jpg
1521477976669307661962.jpg
This is awesome and massive :)
I’d love to see a pic of this thing in action (over a tank ), must be looking cool.
The temperature graph looks pretty rough
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
Ordered some 5.25” bay covers, to act as my key panels. I might make this really easy on myself cut them in half. Create the keys on one side. The top of the bay plate will complete the square. Realized i dont have a broach the size i want and not buying one lol.

This approach will work for rj45 or hdmi key jacks.
Plan is 12 key jacks.
Already have dc panel jack for 24v adapter. Mounted 2 usb extenders from the pi to the front panel(key board and mouse).
And 4 bnc ports.

Pi and circuits mounted inside by drilling holes and using standoffs.
 
Last edited:

Kampo

Active Member
View Badges
Joined
Dec 19, 2017
Messages
349
Reaction score
327
Location
South West Michigan
Rating - 0%
0   0   0
so I might give my reef-pi light controller another go I diagnosed my failure to a bad power supply that cooked the pi, not a cooling issue. I see there has been some talk of just using GPIO pins for PWM but I can't find the exact post with documentation (this post is getting HUGE!! might be time to start a wiki documenting features) my fresh water light uses 2 channels, my salt uses 4, if I"m just using the controller for lights can I go without the extra PCA9685?
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
The manual dimmers that were used in the SBReef BB had 12v coming from an internal supply (the same that is powering the fans). I used that to power this circuit.
Where does your dimmer circuit draw its power from?

Yeah i guess that makes sense. The dimmers are powered by the 4 pin connection in my driver below labeled as on/off and V+ I presume. Is the safest way to test that it's 12 volts is use a multimeter to measure across V+ and on/off?

You are probably right that there is a good chance it's 12 Volts, considering what's coming out of the 2 pin jst next to it drive the fans at presumably 12 volts too [it's marked that and so are the fans]. The 3rd set of wires all the way to right go to the led module tray that holds all the reflectors and leds. What voltage reading do you think I would get across the wires going to the led tray?
upload_2018-3-19_21-14-8.png
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Yeah i guess that makes sense. The dimmers are powered by the 4 pin connection in my driver below labeled as on/off and V+ I presume. Is the safest way to test that it's 12 volts is use a multimeter to measure across V+ and on/off?

You are probably right that there is a good chance it's 12 Volts, considering what's coming out of the 2 pin jst next to it drive the fans at presumably 12 volts too [it's marked that and so are the fans]. The 3rd set of wires all the way to right go to the led module tray that holds all the reflectors and leds. What voltage reading do you think I would get across the wires going to the led tray?
upload_2018-3-19_21-14-8.png
To test the output on the V+, put the multimeter across V+ and GND on the 2pin connector. I cant remember whether the on/off pin get pulled to V+ or GND to turn the system OFF. For mine, I left that pin disconnected.
Voltage going out to the LEDs would depend on what and how many are running. LED drivers are a constant current device. They will adjust their voltage depending on what the LEDs need (within specs).
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
When i use a multimeter across ON/OFF and V+ , when the light is switch on, but the pot is switch off, the DC voltage reading is about 9.53 volts. If the switch is on 100% - then the volts across on /off and v+ is zero. When I compare against the fan line , grnd and 12 volts, i get 12.36 volts on the multimiter. On the 4 pin jstl what are the two lead labels that I should measure across to get the accurate psu voltage for the pot? Is it the ON/OFF and V+? Could it be possible that the pot is powered at 10 volts instead of 12? Or should I just use the multimeter accross vdim + and vim- ? or some other combination?

upload_2018-3-19_22-18-38.png



upload_2018-3-19_22-18-24.png
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Across V+ on the potentiometer small perf board, plus the seperate ground on the dc fan line. I get reading of 11.71 volts

upload_2018-3-19_22-24-31.png
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
That sounds consistent with what I was getting on the SB lights driver. I believe you should get the following measures.
+12V & GND = ~12V
+V & GND = ~10V
+V & ON/OFF (When OFF ~10V, When ON ~0V) the ON/OFF is being driven high to turn the driver on, which is why there is no voltage difference when on.
VDIM+ & VDIM- ... You will likely be able to measure voltage across this and see it ramping up or down as you adjust brightness. Also you can switch your meter over to the Hz and Duty setting and toggle between the two to look at the signal as well.
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 16 37.2%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 12 27.9%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 8 18.6%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 7 16.3%
  • Other.

    Votes: 0 0.0%
Back
Top