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

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
i'm using the default frequency maybe 800 and it is working for the fans and doser (connected through Dual Large Power MOS Transistor Driving Module)
the Noctua is somewhat noisy when the power goes above 50% (used to cool the pi case), the arctic f12 is quieter
you can try different frequencies and see how it goes

I'll do some testing before going down another route. I'm mostly worried about added noise due to the fact that the fans will be running 24/7 at different speeds. The industry standard for the signal pwm is 25kHz +-3k mostly because it pushes the signal above the audible range.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Thanks, it does look complicated, that's what scared from the Pi. At some point I'm still going to give it a shot, gotta learn somehow.

On a different note, I just hooked up one of these pH circuits, it works and I get -8036 which sounds ok based on what I've read but how do I get it to show an actual pH value?

https://github.com/reef-pi/pH-Board
Calibrate.
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,535
Reaction score
1,709
Location
RVA
Rating - 100%
1   0   0

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
Is there a way a person can setup Reef-pi for easy editing basically like an Arduino, as in make a small change, upload and view? I mostly use Visual Studio Code on windows. I'm dying to see what makes it tick and to know if I have any chance of contributing to it. As a challenge these are the two things I would like to see if I could pull off.

The first it appears a dosing pump can only be activated with a schedule and calibration, it would be nice to trigger one at any given time using a macro. Looks like they are only enabled/disabled via the macro.

The other is with the equipment tab, thinking an option when you add a piece of equipment to select AC or DC, if DC is selected you can set a min/max speed. I see this useful for pumps, fans, lights etc. that you might only want to run based on sensor feedback and need to change the speed. Its fine now but everything runs at 100%.
As Ranjib said, reef-pi is quite a bit different from arduino, but you can actually run it on Windows depending on what features you are interested in testing.

I typically use VS Code on Windows for reef-pi development. Obviously, I can't interact with gpio or i2c, but we have mock drivers in dev mode that provide some insight into what would happen on actual hardware.

It's easy to cross compile with go, so you can build your changes and copy them to the rpi and try it out on the actual hardware. The cycle isn't quite as quick as arduino, but it's possible.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
How stable of readings should one expect with this pH circuit?

https://github.com/reef-pi/pH-Board

I'm getting a range from 8.11 to 8.18, almost every reading the 100th is different by 3-4 points.

@Michael Lane is your circuit different? I noticed in the description it said it has a microcontroller but on the schematic I see the same components as the link above.

My ph board is different from robertoB's original design. The isolation chip (ADM3260) was getting a bit more difficult to source, so I worked up a new design. It is compatible with the ph-board driver, but it does use a microcontroller to read the ADC.

Even though the boards are isolated, it's still possible to see interference from anything radiating noise. I'm not sure that's what you are seeing, but it could be. robertoB's design is basically direct access to an ADC and the ph-board driver doesn't implement any smoothing or noise rejection.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
I'll do some testing before going down another route. I'm mostly worried about added noise due to the fact that the fans will be running 24/7 at different speeds. The industry standard for the signal pwm is 25kHz +-3k mostly because it pushes the signal above the audible range.
Is there a typical module for 25kHz pwm from adafruit or sparkfun? reef-pi 3 reworked the way drivers are implemented, so it might be reasonable to add some new hardware support.
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
Is there a typical module for 25kHz pwm from adafruit or sparkfun? reef-pi 3 reworked the way drivers are implemented, so it might be reasonable to add some new hardware support.

I'm not sure if there is. I've seen a couple of other pwm boards on Adafruit but couldn't find any details on frequency in the specs. I've never used the PCA9685 board before but is there a way to lower the resolution and push up the frequency that way?
I was actually a bit surprised by the lack of options there are for fan control when it comes to hardware. Maybe it's because its mainly done via a motherboard of a pc.

It would be nice to have some hardware support for pwm fan control if there is a suitable board for it. Variable fan speed might not be critical for a reef but it could make for better chiller options and control. Bigger fans on lower rpms means less noise but with the possibility to kick it up when the need is greater.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
As Ranjib said, reef-pi is quite a bit different from arduino, but you can actually run it on Windows depending on what features you are interested in testing.

I typically use VS Code on Windows for reef-pi development. Obviously, I can't interact with gpio or i2c, but we have mock drivers in dev mode that provide some insight into what would happen on actual hardware.

It's easy to cross compile with go, so you can build your changes and copy them to the rpi and try it out on the actual hardware. The cycle isn't quite as quick as arduino, but it's possible.

This sounds good, I don't care to access the gpios.

Are you running something like xampp for the database?

Any special plugins for VS needed?

For your pH that's nice not having ADM3260 my complaint has been cost.

For the Atlas circuit is Reef-pi sending calibration values to it or managing them like the ph-board?
 

NeonRabbit221B

2500 Club Member
View Badges
Joined
Jun 21, 2019
Messages
3,037
Reaction score
5,408
Location
Richmond, Va
Rating - 0%
0   0   0
Finally getting around to my electrical safety improvements and redundancy equipment for heating and I wanted to make sure I thought this through correctly. I have my American DJ relay board with everything except the pi's power supply plugged in (this goes to a separate outlet. I have a ground probe plugged into one of the unused channels that runs into the sump chambers of my AIO. The relay board goes into a GFCI plug and then into the wall. I can't power the pi from the relay board as the always on plug is dead as of now.

Additionally I have an issue where I have an electrical outlet behind the cabinet the tank sits on. If my tank were to shatter it could start a fire... No equipment is plugged in but I was wondering if it would be a good idea to 3D print some type of cover.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Finally getting around to my electrical safety improvements and redundancy equipment for heating and I wanted to make sure I thought this through correctly. I have my American DJ relay board with everything except the pi's power supply plugged in (this goes to a separate outlet. I have a ground probe plugged into one of the unused channels that runs into the sump chambers of my AIO. The relay board goes into a GFCI plug and then into the wall. I can't power the pi from the relay board as the always on plug is dead as of now.

Additionally I have an issue where I have an electrical outlet behind the cabinet the tank sits on. If my tank were to shatter it could start a fire... No equipment is plugged in but I was wondering if it would be a good idea to 3D print some type of cover.
Dont print a cover for the outlet...just go get an outdoor bubble cover. If something happens a weatherproof cover is UL listed.

Gfci is always wise around water. Some people have an issue with plugging their return pumps into a gfci but if the return pump is tripping a gfci it means something is leaking to ground or the GFCI is faulty.

Many people dont know how a gfci outlet works.
It does NOT measure anything on the ground wire. What it does is measures current on the hot wire and current on the neutral wire. If that difference is 6 milliamps it trips(USA gfci). What it assumes is if the current going out on the hot is not equal to the current coming back on the neutral then it has to be leaking somewhere. And 6 milliamps is the threshold for personal safety.

Note USA gfci have a 6milliamp safety threshold. The rest of the world uses 30milliamps.
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Is there a typical module for 25kHz pwm from adafruit or sparkfun? reef-pi 3 reworked the way drivers are implemented, so it might be reasonable to add some new hardware support.
Im not sure if there are any higher frequency hobbyists modules out there. The problem becomes more expensive chips and better engineered driver designs to be able to handle the speed.
Heck I cant even find a mosfet module that will handle over 300hz correctly such that it gives you good resolution for dimming simple led circuits.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Time to upgrade the Pi 3B. Gonna wait for Amazon pricing to catch up to shave off shipping.
Nice if you want to upgrade but not necessary. My build has just about everything and plugs along nicely on a lowly pi zero w. Amazing what 10 dollars gets you!
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,535
Reaction score
1,709
Location
RVA
Rating - 100%
1   0   0
Nice if you want to upgrade but not necessary. My build has just about everything and plugs along nicely on a lowly pi zero w. Amazing what 10 dollars gets you!

Was going to use it for OctoPrint. 3B is probably more than my ReefPi will ever need.
 

That Crusso Kid

10K Club member
View Badges
Joined
Oct 21, 2018
Messages
14,893
Reaction score
76,038
Location
SW, FL, USA
Rating - 0%
0   0   0
This is post 14,000!

This thread and project simply keeps getting better and better!
 

Zippyfear

Community Member
View Badges
Joined
Apr 30, 2019
Messages
86
Reaction score
150
Rating - 0%
0   0   0
Here's an updated AC 120v - 240v power bar I've been working on for Reef-pi. I've been offering these for quite a while and stand behind it but just added a snubber to protect the relays from inductive loads such as motors and added a DB9 socket to match the Reef-pi controller so you only need one cable to controller.

It was designed to be wire free internally, the AC outlets are held firmly in place by a strong 3D printed plate and soldered directly to the board, the 5th image is what you have when its fully assembled. Then it easily drops in the case and is secured with 17 screws overall.

The power bar has an internal 120v - 240v AC-DC module which powers the relays. If Reef-pi is turned off or DB9 is unplugged all outlets turn off.

In the near future I plan to offer a small module that will add an emergency power outage feature. This will plug into the power bar DB9 and have dip switches so you can set each outlet to go to a specific mode if power to controller is lost or DB9 is unplugged. For example you could have outlet 1, 3 and 7 stay on and the remaining turn off. You could also plug something into any outlet and it will only turn on if power goes out or DB9 is unplugged. If you plug the power bar into a UPS you'll have an emergency backup mode for power outages and no need to keep the controller running under battery power.

As you can see this board has North America outlets but soon I will have a version with Australian plugs that work for many countries and another with the large universal outlets to cover the rest. I'm planning to run a Kickstarter soon if any one is interested. If you already have Reef-pi running you can get a DB9 to screw terminals adapter so it would connect easy to your system.

You can also solder wire to the pads on the circuit board and use your own outlets.

I messed up the board so had to put relays on top, I wanted them on the other side of board. Those and the other components will all be on the other side which trim about 14mm off the height of the case. And in the large image the outlets are supposed to be flush with the top but I messed up and ran out of filament, SMH...

US_power_bar_clips.jpg


power_bar_schematic.png

If you only need 8 wires, you should change the design to just use Cat 5e cables.. much cheaper and easier and more readily available for most everyone
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Finally getting around to my electrical safety improvements and redundancy equipment for heating and I wanted to make sure I thought this through correctly. I have my American DJ relay board with everything except the pi's power supply plugged in (this goes to a separate outlet. I have a ground probe plugged into one of the unused channels that runs into the sump chambers of my AIO. The relay board goes into a GFCI plug and then into the wall. I can't power the pi from the relay board as the always on plug is dead as of now.

Additionally I have an issue where I have an electrical outlet behind the cabinet the tank sits on. If my tank were to shatter it could start a fire... No equipment is plugged in but I was wondering if it would be a good idea to 3D print some type of cover.
GFCI and any outdoor bubble cover is better than 3d printed. Anything that requires fire or electrical safety, are better (economical and tested) with off the shelf items (from homedepot or lowes).

GFCI is a pretty robust solution , as @Bigtrout mentioned, not only where you have potential fire/water hazard, but also cases where its open ground. Something I learned recently during home purchase. The local code allows GFCI as workaround for openground situations.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
If you only need 8 wires, you should change the design to just use Cat 5e cables.. much cheaper and easier and more readily available for most everyone

Unfortunately 9 wires are needed, 8 relays + one for a common GND. I considered only have 7 outlets switch but last minute changed to all 8, maybe 7 is better.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.3%
  • 100% dry rock + 100% live sand

    Votes: 47 33.8%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 30 21.6%
  • 75% live rock, 25% live sand

    Votes: 14 10.1%
  • 25% live rock, 75% live sand

    Votes: 10 7.2%
Back
Top