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

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
From my primitive understanding, we can use reef-pi as it is, with stepper motors. We have to connect pi or pca9685 pwm pin to a stepper drivers (such as drv8835) and that should be it.
Reversing the motor direction is very common. The titration systems definitely use those capabilities. From a manufacturing and electronics perspective, H-brige drivers (a type of circuit that allows easily switch the polarity of motors) are very common and omnipresent in most stepper/dc motor equipment. I guess from manufacturing point of view its hard to know if this feature will be used or not, but given the prevalence (and cheap) of this capability, its safer to just have it.
It will be awesome if @theatrus, @Bigtrout or @Michael Lane can validate my assumption, beforer i embark on testing this setup ;-)
It sounds like you have it right. Stepper motors are driven by alternating magnetic fields, so it's a bit more complicated than using a DC motor. The stepper driver will control moving those fields with each pulse.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
It sounds like you have it right. Stepper motors are driven by alternating magnetic fields, so it's a bit more complicated than using a DC motor. The stepper driver will control moving those fields with each pulse.
As I am reading through, it seem like the duty cycle does not matter that much (anything above 50% is good) and I have to actually change the pwm frequency to change the speed of the stepper motor. I am ordering a DRV8825 driver and that 33$ stepper motor based doser for testing. Thanks for checking :) . I'll keep you all posted
 

MrWheelock

Valuable Member
View Badges
Joined
Jun 21, 2017
Messages
1,443
Reaction score
5,510
Location
St. Petersburg FL
Rating - 0%
0   0   0
Can't wait to see the results. I was thinking about using those instead of gutting a slave doser unit. Looks like those are wire for +/- in one direction and +/- in reverse direction. Is there any reason to wire "reverse"? I don't imagine I'd ever need to draw water from the tank....
Auto water change
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
Does anyone know what this email alert is caused by? The probe is still working so I am not sure why it says it failed.

20190910_100151.jpg
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,530
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
The weird thing is that the probe never actually stops working according to my graphs on the dashboard.

Does it actually register temp changes or displays the same temp it read last? When I was playing around with my build, I saw that same message when I disconnected Temp probes with pi running. It continued to display temp reading, but it didn't register changes, but continued the last temp reading.

I would check make sure the probe is functional and registers temp changes.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Some updates on the wave maker test. On a sad note, the 12V submercible pumps were not variable speed. They didnt run on PWM signal. I dont know if they would rather respond to analog (0-12V) or they are just fixed speed. I'll figure it out later, if they do work in analog speed, I'll take the analog path on ciruit side.

But even without the PWM support, I was able to kinda use those pumps straight by supplying entire 12V. The way I did was pretty simple, just disable pwm module in kernel config, declare GPIO 18 and 18 (which is feeding L293d en1/en2 pins) as normal outlets in reef-pi and instead of pwm profile, use timers. Though I dont have the variable speed features, now with switching offloaded to l293d, I can do lot more aggressive (5 or 15 second pulses) without worrying about relay's failing or click noises. I am planning to use this as wavemekar, as intended, but with times instead of pwm profiles. I have tested my dosing heads also, and they work just fine. Which means I can use this exact controller to control any two dosing pumps. All of this will only involve couple of software tweaks. The hardware/circuit/enclosure is reusable as it is. I like this.

Pumps: Amazon product


Build
A3CF4FCE-954A-4844-AC36-4A07E83A1B09.jpeg

1FF28C2C-0BC2-406F-942F-1B0C210CCBB6.jpeg



Tank and pumps (ignore the clutter :))

FAE83A1F-D013-47CD-A08E-BCD08D84856D.jpeg


The dosing unit
50D00768-27D2-4A43-850F-52EB388137F9.jpeg


I made a handy male -male barrel connector for pump or dosing unit
Off to the next set of things ...

2C982732-C122-413A-BB46-CFB0645B1268.jpeg
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Does anyone know what this email alert is caused by? The probe is still working so I am not sure why it says it failed.

20190910_100151.jpg
It means the sensor reading has failed crc check. Sometime this happens due to bad probe or connection issue , which results in data corruption causing failure in checksum . Pi indicates this by “yes” when checksum verification pass. Reef-pi is just showing that error , and complaining that it’s expecting a yes at the end of the reading file. This also means the sensor is present and detected , and reef-pi is also able to read it.
 

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
291
Reaction score
617
Location
Australia
Rating - 0%
0   0   0
It means the sensor reading has failed crc check. Sometime this happens due to bad probe or connection issue , which results in data corruption causing failure in checksum . Pi indicates this by “yes” when checksum verification pass. Reef-pi is just showing that error , and complaining that it’s expecting a yes at the end of the reading file. This also means the sensor is present and detected , and reef-pi is also able to read it.
Thanks @Ranjib . Do you mean a physical wiring connection or something to do with the data connecting?

I am also getting these email alerts occasionally. Also sometimes a negative temperature of something silly like -1000 degrees. Temps are in C.
out of range.png



Here is my temperature page in reef-pi. Does it look correct? Just ignore all of the graph before the heater readings, this was when I had a failed probe. You can see the spike where it alerted me to 85 degrees.
sump.png
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Those spikes look similar to what i was getting when i had the wonky power supply throwing interference.

@Ranjib means the data is getting corrupted occasionally. This could be from loose wiring, or some type of interference. Check and double check the wiring. Also check the routing of your sensor wiring. Keep it away from any AC wiring or motor/pump wires.
 
Last edited:

burningbaal

Active Member
View Badges
Joined
Aug 13, 2019
Messages
232
Reaction score
257
Location
Near Seattle
Rating - 0%
0   0   0
Anyone know of a black box LED that is controllable? I want to get a few black box LEDs for my future 180g, but want to be able to ramp each unit (expecting 3-6 of them, depending on wattage) up individually, and to control an actinic type apart from the daylight. two channels would be fine for me, I just want to control the brightness of each of the two channels individually so I can get a white sunrise, then bring in the blues, then ramp the whites down for dusk and run a little blues until my bedtime
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Anyone know of a black box LED that is controllable? I want to get a few black box LEDs for my future 180g, but want to be able to ramp each unit (expecting 3-6 of them, depending on wattage) up individually, and to control an actinic type apart from the daylight. two channels would be fine for me, I just want to control the brightness of each of the two channels individually so I can get a white sunrise, then bring in the blues, then ramp the whites down for dusk and run a little blues until my bedtime
There are several posts here in r2r on controlling viparspectra and mars aqua lights using reef-pi, search for those
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
There are several posts here in r2r on controlling viparspectra and mars aqua lights using reef-pi, search for those

Here's a couple worthwhile reads.


 

zab34

Active Member
View Badges
Joined
Jan 23, 2012
Messages
335
Reaction score
71
Location
Orlando
Rating - 0%
0   0   0
So going to venture into a reefpi build. I want to use one of ML Hats but it looks like v3 is sold out.

Will I have any limitations going with a v2? Will I encounter any limitations with a pi zero vs a pi 3?

Any builds you would recommend that used the ML hat.

Ideally I would like:

Relay power control
ATO from float sensors
Temperature monitoring and heater control
Macros for feed and water change
 

AbjectMaelstroM

Valuable Member
View Badges
Joined
Jul 21, 2019
Messages
1,530
Reaction score
1,811
Location
RVA
Rating - 100%
1   0   0
So going to venture into a reefpi build. I want to use one of ML Hats but it looks like v3 is sold out.

Will I have any limitations going with a v2? Will I encounter any limitations with a pi zero vs a pi 3?

Any builds you would recommend that used the ML hat.

Ideally I would like:

Relay power control
ATO from float sensors
Temperature monitoring and heater control
Macros for feed and water change

The V2 hat has exactly the same functions as the V3 hat, the only difference being smaller connectors and Status LEDs on the board. For longevity, that V2 hat is the way to go.

I have to V2 hats and it is an awesome product and will easily be able to implement the functions like you listed.

As far as Raspberry Pi zero vs The 3B, if you are going to run it as a headless unit without a ton of sensors and equipment, the zero will work just fine. 3B just has more muscle and LAN capability.

I use 3Bs with my build.
 

PHopkins

New Member
View Badges
Joined
Sep 12, 2019
Messages
13
Reaction score
6
Rating - 0%
0   0   0
I just installed reef pi on a rasberry pi zero w. When i try and test the jack for the pwm control I am getting the error message

{"error":"Failed to update. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500

When I try and change User name and Password it is giving me this error

Failed to initialize i2c. Error:eek:pen /dev/i2c-1: no such file or directory

any help getting this working would be greatly appreciated
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Here's a couple worthwhile reads.


Thank you @Schreiber :hugs:
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I just installed reef pi on a rasberry pi zero w. When i try and test the jack for the pwm control I am getting the error message

{"error":"Failed to update. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500

When I try and change User name and Password it is giving me this error

Failed to initialize i2c. Error:eek:pen /dev/i2c-1: no such file or directory

any help getting this working would be greatly appreciated
Enable i2c using raspi-config, and reboot. Which version you are using? use 2.5 if you are unsure.
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top