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

OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
did not try that but everything scales the same up and down.. I mean the easy way around this (which is common for lots of software) Android bad about this kind of Bug..
Just add a extra row in the dashboard add the temp prob and then reduce the rows.. Its not something that is a issue but something that can be over come in ui . maybe making the dialog box scroll able. As more items are added to it such as ORP , Salinity prob and so on it will then be a issue. NOW ITS not
Yeah.. I have no clue how we'll deal with this in 3.0, with clustering, we can have many more charts.
 
Nutramar Foods
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
IMG_20181104_093215.jpg
Information please. My rasberry pi zero arrived today, I tried to test it to connect to 5v power, positive purple cable negative blue cable, but led power [which is circled in red does not turn on] I tried connecting to the monitor with HDMI. Monitor blank. Is this board error. Thank you
Did you try to power it up with micro usb cable first? Your wiring looks ok. Check with multimeter that its indeed 5v on those two pins (the bottom side of Pi zero, has the male header pins bottom ends). If its brand new, i suspect the power is not going, or its bad. I have fired pi zero/pi three which resulted in this. I have also once screwed the green led, and ran pi where it will run but the led wont work, but in that case monitor/keyboard etc will work
 

theatrus

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 26, 2016
Messages
1,555
Reaction score
2,865
Review score
+0 /0 /-0
Location
Sacramento, CA area
Apologies if this is insulting but did you er... plug it in? Like with the MicroUSB next to the power LED? The GPIO power and ground pins are outputs.

It’s worth testing with another supply or USB, but the Pi can be powered up from the 5V pins on the header.
 
Nutramar Foods
Orphek OR3 reef aquarium LED bar

Joseph Lim

New Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 6, 2018
Messages
21
Reaction score
23
Review score
+0 /0 /-0
should work just fine. I'd recommend using uln2803 in between pi GPIO and relay input pins, to keep the current draw from GPIO at minimal.

28cgdqw.jpg
@Ranjib I used used an lm2596 to drop voltage from 12v to 5v.

1. If i connect 5v and ground from gpio together with power from lm2596 to the uln2803 the relays work fine

2. If i just connect 5v from gpio to the uln2803 and the ground from lm2596 to the relay board, the led light turns on but the relay doesnt trigger.

3. If i just follow the diagram exactly, nothing works.

BTW, i dont have a pi proto hat yet so i'm doing this all on a breadboard.
 

Des Westcott

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
May 29, 2018
Messages
634
Reaction score
1,022
Review score
+0 /0 /-0
Location
Durban - South Africa
@Ranjib I used used an lm2596 to drop voltage from 12v to 5v.

1. If i connect 5v and ground from gpio together with power from lm2596 to the uln2803 the relays work fine

2. If i just connect 5v from gpio to the uln2803 and the ground from lm2596 to the relay board, the led light turns on but the relay doesnt trigger.

3. If i just follow the diagram exactly, nothing works.

BTW, i dont have a pi proto hat yet so i'm doing this all on a breadboard.

I think the grounds need to be linked like here

https://www.reef2reef.com/threads/r...troller-based-on-raspberry-pi.289256/page-241
 
Nutramar Foods

Erica-Renee

Valuable Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,286
Review score
+0 /0 /-0
Location
lost
This is exactly Correct and his issue with lights and no action was happening to me in my testing.. Also the power supply power for the relay board does not have to be shared with the uln .They all just need a Common ground.. Using db9 i used the red wire as ground to uln on my pi hat board and then ran ground from relay board to the power supply for relay..
 

Michael Lane

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,122
Review score
+0 /0 /-0
The circuit is in heatshrink but if I remember correctly it's a just a 10k resistor splitting the ground wire.

Here's the main bit of the python script...

Code:
def my_callback(channel):
    if GPIO.input(8) == GPIO.HIGH:
        print('\n FLOAT at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('OK | Last flipped at ' + str(datetime.datetime.now())), file = log)
    else:
        print('\n SINK at ' + str(datetime.datetime.now()))
        log = open("current_water_level.txt", "w")
        print (('Low | Last flipped at ' + str(datetime.datetime.now())), file = log)

GPIO.setmode(GPIO.BCM)
GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(8, GPIO.BOTH, callback=my_callback)

It's run every few minutes via cron and the status is broadcast via mqtt to my home assistant server which can send out alerts & trigger the top off. I'd prefer getting it into reef-pi so I can trigger the top off directly.
The python script seems to configure the IO with pull down instead of pull up. This makes it seem like the switch should be wired to 3v3 and GPIO.
 

pickupman66

5000 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 10, 2010
Messages
6,032
Reaction score
1,159
Review score
+0 /0 /-0
Location
Winchester, TN
Yes, wavemaker is definitely a thing for 3.0 . Theres an existing issue on providing finer grain pwm (say 12bit) control as well. I have already mentioned there that we want to incremenet/decrement interval customizable as well. Together this two will allow us to generate any arbitrary pwm profile. I think we'll introduce a wave profile similar to light profile.
Even in 2.0 reef-pi will provide a jack control api , i.e. users can write a script to directly control the PWM values and generate pretty much anything. at that level (connectors), reef-pi does not really know its light or pump, user can do whatever they want.
@ranjib can you provide some direction on where I can learn to write such a script and how to apply it with reef pi?
 
Koral King: Rare Corals for Sale

Johan Fe Scheepers

New Member
Review score
+0 /0 /-0
View Badges
Joined
Nov 4, 2018
Messages
16
Reaction score
27
Review score
+0 /0 /-0
Location
Drummond, KZN, South Africa
Hi,

I am new to the build , have thought looked and followed it for sometime. I am now starting my build and need a bit of help please.

How doe you restart the reef-pi?

Have run "sudo systemctl restart reef-pi.service"

But still getting

* reef-pi.service - raspberry pi based reef tank controller
Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2018-11-04 20:54:19 SAST; 11s ago
Process: 1509 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)
Main PID: 1509 (code=exited, status=1/FAILURE)
Nov 04 20:54:19 Tank systemd[1]: reef-pi.service: Unit entered failed state.
Nov 04 20:54:19 Tank systemd[1]: reef-pi.service: Failed with result 'exit-code'.


Running attest Noobs and reef-pi-2.0.0-beta-pi3.deb
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Hi,

I am new to the build , have thought looked and followed it for sometime. I am now starting my build and need a bit of help please.

How doe you restart the reef-pi?

Have run "sudo systemctl restart reef-pi.service"

But still getting

* reef-pi.service - raspberry pi based reef tank controller
Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2018-11-04 20:54:19 SAST; 11s ago
Process: 1509 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)
Main PID: 1509 (code=exited, status=1/FAILURE)
Nov 04 20:54:19 Tank systemd[1]: reef-pi.service: Unit entered failed state.
Nov 04 20:54:19 Tank systemd[1]: reef-pi.service: Failed with result 'exit-code'.


Running attest Noobs and reef-pi-2.0.0-beta-pi3.deb
Welcome to reef2reef, you'll love it here :) . We need bit more of the logs to understand why reef-pi is failing. Can you run:
Code:
journalctl -u reef-pi.service
 
Tidal Gardens
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Welcome to reef2reef, you'll love it here :) . We need bit more of the logs to understand why reef-pi is failing. Can you run:
Code:
journalctl -u reef-pi.service
Also share any details around the build you may have: like reef-pi version, pi version, circuit etc.
 

sfgabe

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 7, 2018
Messages
139
Reaction score
236
Review score
+0 /0 /-0
I don't see anything suspicious here. Things should work. Is is possible for you to check the log? Like, declare an inlet with GPIO 8 and associate it with an ATO, and set the check interval to 5 second (for example), and see what reef-pi says, when you put the float switch in and out of water
Code:
journalctl -fu reef-pi.service
It gives a float value of 1, regardless of the actual float position.
Code:
ReefControlPi reef-pi[25376]: 2018/11/04 14:27:07 ato sub-system:  sensor Float1 value: 1

(running 2.0.0-rc2)
 
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
Avast
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,537
Reaction score
16,518
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
It gives a float value of 1, regardless of the actual float position.
Code:
ReefControlPi reef-pi[25376]: 2018/11/04 14:27:07 ato sub-system:  sensor Float1 value: 1

(running 2.0.0-rc2)
This means reef-pi is reading it always on... I think its highly unlikely that we have a driver bug in reef-pi, and we are missing something else here, likely configuration related. Did you already shared your configuration screenshot? If not please do, connectors (inlet GPIO 8 ?? ) and ato details (check interval, control pump etc). I just tested ATO again with master (rc-2) release, and I could not find a bug. I am doing a whole lot of field testing now, and will hate to ship reef-pi with bugs like this (if it turns out) :-( . If your issue does not resolve, then I'll create a dedicated issue on this in github and I'll try to reproduce this with actual circuit. I have spare float switches, so no issue on getting this physically verified.
 

How much do you love or hate zoanthids?

  • LOVE LOVE LOVE

    Votes: 148 42.4%
  • Like them

    Votes: 119 34.1%
  • Neither like or dislike

    Votes: 52 14.9%
  • Don't like them

    Votes: 18 5.2%
  • HATE HATE HATE

    Votes: 12 3.4%
TCK Corals
Top