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

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
I agree, just buy a quality SD card, and look into a RTC chip to add so raspian dont get corrupted with improper time stamped files. If the pi loses network it loses time keeping without a RTC

I remember you adding that, I would like to look into that for the new build but I remember you had some words of caution based on the unit that you purchased, do you happen to have those instructions handy?

:)
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
I remember you adding that, I would like to look into that for the new build but I remember you had some words of caution based on the unit that you purchased, do you happen to have those instructions handy?

:)
its on my build thread. Basically those boards have a charging circuit for a 2032 sized RECHARGABLE lithium battery, however they ship with a NON rechargable. Charging a NON rechargable is bad(akin to crossing the streams in Ghostbusters) and the battery can explode. I just desoldered and removed a resistor which disables the charging circuit and use a cheap non rechargeable 2032 and replace it yearly.
You could also keep the charging circuit in place and buy a RECHARGABLE 2032.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
its on my build thread. Basically those boards have a charging circuit for a 2032 sized RECHARGABLE lithium battery, however they ship with a NON rechargable. Charging a NON rechargable is bad(akin to crossing the streams in Ghostbusters) and the battery can explode. I just desoldered and removed a resistor which disables the charging circuit and use a cheap non rechargeable 2032 and replace it yearly.
You could also keep the charging circuit in place and buy a RECHARGABLE 2032.

Thanks I will look through your build thread, will have to think about doing that for this build, might add some reliability to the setup.

:)
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Need some opinions since we have been discussing wavemakers/powerheads. Thats one of the decisions I am working through at the moment. I have ordered 2 Aqamai KPS units for my 30g tank but starting to wonder and looking at only one of the new Red Sea Wave 25 vs the 2 Aqamai KPS. I had also looked at the innovative marine units and the nero 5. The vortech's are out of my price range since I think I should have 2 of them.

Any feedback would be welcome, thanks!
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Oh one more thing, I ordered one of the TP link hs300, I think it has usb ports on it, anyone using it to provide power to reefpi?

Thanks

:)
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,811
Rating - 0%
0   0   0
Thanks I will look through your build thread, will have to think about doing that for this build, might add some reliability to the setup.

:)
It does. I get frequent power outages and network issues living in a rural area. Normally when the pi boots it looks for internet time to set its clock. If it boots and the internet isnt up it sets the time to a default which can corrupt the underlying linux filesystem.
Adding the rtc per my instructions makes the pi look to the rtc to set time at boot and if internet is available it adjusts the RTC as well. If internet is not available the pi gets the RTC time which is close enough to not corrupt the filesystem.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,409
Reaction score
1,726
Location
Missouri
Rating - 0%
0   0   0
Tom, I may in the future, but my ReefPi has a 12v that I buck convert down to 5v for the pi and feed my Goby HAT 12 and 5v to.

Yeah I have that mocked up also, but if I move the connection from the buck to the HS300 I can remove the buck converter and use the 12v to feed ML pi hat for the uln2803 and the doser module and anything else that might need 12v. Looks like the output on the HS300 is 2.4amps so it should be enough to run just reefpi.

Would free up some room, decisions decisions. :)
 

cnidus

Community Member
View Badges
Joined
Mar 19, 2020
Messages
67
Reaction score
79
Rating - 0%
0   0   0
This might be a dumb question...

I saw that the reef-pi hs300 driver should support power monitoring? Where is that exposed? Can we use that as a trigger for alarms/macros etc?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
148
Rating - 0%
0   0   0
Not sure if anyone is interested or not but I seem to have fixed my multiple temp probes issue. With a one wire device they need to be linear not a star when going longer distance and adding more probes. My setup is now running 4 sensors for almost 24hrs with no issues. Before it would only run for a hour or two max. I still have one more I would like to add to the chain but as of now my setup is as follows. I used 25' of 4 wire phone wire and spaced the sensors every 5ft along the length of wire (not currently using the end Tap). I also had to change the resistor to a 3.3k with the 4.7k the first sensor would drop out. I am thinking when I add the fifth I might have to drop down again to say a 2.2k. I had to use sensors with a 3M cable on them because of the distance from the trunk line, with shorts lengths you may not have all these issues but I have equipment spaced over my basement and 1st floor.

This is the page I gathered most of my information from.

 

Bliff

New Member
View Badges
Joined
Apr 6, 2020
Messages
18
Reaction score
41
Rating - 0%
0   0   0
Restarting the thermometer without having to power cycle the pi
Ok this is kinda alpha stages, but I have come up with a solution that should work. When it drops out again I can test properly.

The problem is that for some reason, my almost certainly fake/knockoff DS18B20 drops out on occasion. The only way to reset it so far has been to power cycle the pi - and that's an annoyance.

Instead of powering it from the 3v3 rail, I have it powered from a GPIO pin, and since it uses a very minimal amount of current this is supposed to be ok.
I can then control that GPIO pin, and effectively cut power to the sensor without restarting the pi.

My thermometer is connected with the DATA pin to GPIO4, the default 1-wire input line
VCC is connected to BCM 17 (physical 11)
GND is connected to any ground lead; I used physical 9 since it's right next to the others

In /etc/rc.local I have:
Code:
#turn on GPIO Pin 17 to power the thermometer with 3.3V
/usr/bin/gpio -g mode 17 out
echo "GPIO pin BCM17 set to OUTPUT"
gpio readall | grep 'GPIO. 0' | grep '\(IN\|OUT\)'
/usr/bin/gpio -g write 17 1
echo "GPIO pin BCM 17 turned ON"
gpio readall | grep 'GPIO. 0' | grep '\(IN\|OUT\)'
(gpio -g uses BCM numbering to refer to a particular pin)
(The gpio readall lines are just there to provide some visual feedback of what's going on, they aren't strictly needed)
This is to make sure that on startup the pin is high (+3.3V), so that the thermometer is on at restart.


I have a bash script in the home folder that checks for the presence of my particular probe by checking if its directory is present, and power cycling the GPIO "VCC" pin for a few seconds if it is not:
Code:
#!/bin/bash
echo "Restarting that stupid thermometer"

DIR="/sys/bus/w1/devices/28-xxxxxxxxxx/" #folder for the themometer device
if [ -d "$DIR" ]; then
        echo "directory at  $DIR exists. No restart needed."
else
        echo "directory  $DIR exists"
        gpio -g mode 17 out && echo "Pin 17 set to OUT mode"
        gpio -g write 17 0 && echo "Pin 17 LOW - power off"
        echo "Sleeping 3 seconds" && sleep 3
        gpio -g write 17 1 && echo "Pin 17 HIGH - power on"
        echo "listing devices dir" && ls /sys/bus/w1/devices/
fi
(replace 28-xxxxxxxxxx with your specific probe hardware address)

I then have a cron job that calls this script on 00 minute of each hour.
crontab -e
Code:
#check and restart the thermometer
00 * * * *      /home/pi/restart_therm.sh


Maybe I could actually do this another way, manually. If I create an output on pin 17 in reef-pi, I could then make an equipment entry and toggle that like you would an LED or relay signal within reef-pi. What would make this more fancy is if there was a way for reef-pi to detect a crazy temperature (eg > 80°C or < 0°C), and then call a macro to power cycle the thermometer equipment.
What I don't know is how to get reef-pi to "if some condition x then execute macro y". Yet.

Edit: crontab mistake
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
I am just wondering if anyone else is using xfinity X1 WiFi with the raspberry? I have had a slew of problems since switching from being hardline Ethernet to my router over to WiFi about 6 months ago when we moved. Some Of the problems I have had

reefpi would not load in browser. Refresh or trying later sometimes worked

reefpi would load but Only loaded the equipment and health widget. Sensor and everything else missing. Even though I could not see in the interface all programmed functions where operating (ATO, Dosers, etc).

reefpi would load but buttons where slow to respond

I would get to the password page but no passwords worked.

In troubleshooting I found rebooting my router sometimes helped but only temporarily. I do have 20 + WiFi objects on my router but several devices peloton, Roku tv, Firestick, Apple TV, windows tablet, phone, work computer, reefi lights, etc are all on WiFi In the same room as my tank with no issues. In the end I have a netgear WiFi extender with an Ethernet jack. I put it behind my tank and have the raspberry connected to that Via cat 5 and all issues have been resolved. Anyone else have WiFi issues like this?
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,321
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Hardwire is always going to be better than WiFi. WiFi has limited bandwidth, so the more devices connected, the less bandwidth you'll have for any one device. For anything mission critical, hardwire is the way to go.
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
I have noticed that when I use more than 3 DS18B20 temp sensors I am no longer able to properly read them. IDoes anyone else has experienced this problem. I wanted to monitor temperature of the DC power supply's for my LED lights but run into an issue when 4, and 5 sensor was added. After I remove them everything goes back to normal. Also tried different sensors just to make sure they are not faulty? BTW they read fine if there is only 3 max.

Any ideas?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
148
Rating - 0%
0   0   0
I have noticed that when I use more than 3 DS18B20 temp sensors I am no longer able to properly read them. IDoes anyone else has experienced this problem. I wanted to monitor temperature of the DC power supply's for my LED lights but run into an issue when 4, and 5 sensor was added. After I remove them everything goes back to normal. Also tried different sensors just to make sure they are not faulty? BTW they read fine if there is only 3 max.

Any ideas?

I seem to have fixed my multiple temp probes issue. With a one wire device they need to be linear not a star when going longer distance and adding more probes. My setup is now running 4 sensors for almost 24hrs with no issues. Before it would only run for a hour or two max. I still have one more I would like to add to the chain but as of now my setup is as follows. I used 25' of 4 wire phone wire and spaced the sensors every 5ft along the length of wire (not currently using the end Tap). I also had to change the resistor to a 3.3k with the 4.7k the first sensor would drop out. I am thinking when I add the fifth I might have to drop down again to say a 2.2k. I had to use sensors with a 3M cable on them because of the distance from the trunk line, with shorts lengths you may not have all these issues but I have equipment spaced over my basement and 1st floor.
 

robsworld78

Valuable Member
View Badges
Joined
Feb 14, 2020
Messages
1,029
Reaction score
1,293
Location
Edmonton, Canada
Rating - 0%
0   0   0
Adding the rtc per my instructions makes the pi look to the rtc to set time at boot and if internet is available it adjusts the RTC as well. If internet is not available the pi gets the RTC time which is close enough to not corrupt the filesystem.

Where could one find your instructions?
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
I have done some reading on electronics boards, and I think the temp sensors can be a crapshoot because most are made with real Dallas Semiconductor DS18b20 chips, but many of the inexpensive sensors found on ebay etc are made in China with cheap knockoffs and seconds.

I agree with @Ranjib my temps in the tank hold just fine with reef-pi, there is more than a daily .2 degree variance in the Amazon River where most of my fish come from. I think shallow reef water has a diurnal variance as well.

I've been using DS18b20 ever since they were released by MAXIM. Over the years used many from Dallas as well including purchased form China in many different applications. Typically its not the sensor that dies its the salt water that kills them due to shorts, etc. Just an FYI.....
 

marekd1

Active Member
View Badges
Joined
Dec 24, 2019
Messages
133
Reaction score
199
Rating - 0%
0   0   0
I seem to have fixed my multiple temp probes issue. With a one wire device they need to be linear not a star when going longer distance and adding more probes. My setup is now running 4 sensors for almost 24hrs with no issues. Before it would only run for a hour or two max. I still have one more I would like to add to the chain but as of now my setup is as follows. I used 25' of 4 wire phone wire and spaced the sensors every 5ft along the length of wire (not currently using the end Tap). I also had to change the resistor to a 3.3k with the 4.7k the first sensor would drop out. I am thinking when I add the fifth I might have to drop down again to say a 2.2k. I had to use sensors with a 3M cable on them because of the distance from the trunk line, with shorts lengths you may not have all these issues but I have equipment spaced over my basement and 1st floor.

Linear or star does not matter, I have about 20 sensors on the OW-Server But resistor will matter. Forgot about the EOL termination. Thank you for reminding!!!!

Capture.PNG
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
Hardwire is always going to be better than WiFi. WiFi has limited bandwidth, so the more devices connected, the less bandwidth you'll have for any one device. For anything mission critical, hardwire is the way to go.

While the reefpi is technically hardwired. It’s still operating via WiFi extender which remedies all my issues. I’m thinking maybe the onboard WiFi adapter on the raspberry is not very robust.

255D2CBC-489F-4BF0-BEE2-4294DEFDC666.jpeg
 

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%
Free Phyto Promo
Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed Spend $39+ → free 16oz Phyto · Use code FREEPHYTO at checkout · $16.99 value · Densest 6-species blend · Free shipping on every order · 100% live arrival guaranteed
Shop Now Code: FREEPHYTO
Back
Top