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

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hi all,

Word of warning for all Reef Pi users. I went away for a couple of weeks with a neighbour watching over my tank and feeding every couple of days together with close my close monitoring via Reef Pi. He alerted me that the tank was a little quiet a couple of days ago, I tried to logon to Reef Pi (via VNC) but it didn't work (I didn't think anything of it and I assumed it was something with VNC). Unfortunately I retuned last night to a tank at 35/95 Celsius/Farenheight and full of dead livestock.

I tried logging into the app via the usual home WIFI - but I still couldn't and had to power cycle the whose raspberry pi and which point I was able to login and I received a flurry of emails that the temperature was too high.

It appears the app/raspberry pi crashed with the heater in the 'on' position. For reference, I'm using a full system built by robo-tank (although to be clear this wasn't hardware related - the relay is working perfectly).

This isn't a complaint or moan I am very grateful to Ranjib and all the other developers of this free platform but:

1. I would strongly advise everyone to invest in an audible temperature alarm (can be bought off Amazon for < $10). I have literally lost 000's of dollars by not having this.
2. I would advise against using a non-thermostatic heater (i had a 500W titanium heater)
3. I would be happy to share any files/more information from my Reef Pi instance that would help prevent this happening again
I'm really sorry to hear of your lose, some people here are good at spotting things in the logs, if you can post them maybe the why could be answered.
 
Last edited:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
FYI I just wanted to throw this out there, YMMV and this is just my .02 but I had an issue long ago with pca9685 that was stuck in the on position on my doser port, in my case I was around when it happened and caught it but even a reboot and the port still runs...I still have that board and its still in the stuck position, no idea why but that was a valuable lesson at least for me, I no longer have my dosers hooked up to PCA/PWM ports since there are just IMHO to many failure modes that they can get stuck on. I have gone to outlet/timer controlled dosers and will not use the PCA9685 for anything but lights, if a light gets stuck on big deal but I will not use them for dosing ports. I have some posts that should what I am using for dosing but by choosing the rpm of the motor and swapping tubing I can dial in the rates that I need, I have nano tanks and doesn't take a lot to throw them off and a stuck doser is bad juju...:)

If anyone wants to know more about how I have things setup, I have extensive timers that force stuff off when it should be off regardless, timer/cron is great at that. :)
I think the pca9685 is a great chip, I don't ever remember hearing of an output going bad except in your case. :( The I2C communications can make it unreliable especially in DIY setups where wires are involved or if some piece of equipment is causing lots of interference such as an LED driver that was mentioned the other day. When a command is sent to the pca9685 it's basically figures crossed it made it in tact so it understands what it should do, if not the pin won't switch until another command is sent. I've played extensively with I2C in the past and quickly learned one shouldn't get carried away with too many devices connected and extra checks in the code is needed to verify things along the way. It is possible to read the state of any output and verify the command sent actually did what it was supposed to, here's a post explaining. If this was implemented chances of a pin not switching would be greatly reduced. Unfortunately I wasn't able to add it to reef-pi.




EDIT: It just hit me, I think the reason your doser port is stuck on is due to the mosfet. You must have something like that being driven by the pca9685 pin. If those are unprotected and get hit with ESD they will get stuck on even if the signal is LOW, I've seen this many times when I was still working out bugs in the controller. I would bet if you removed the mosfet that pin would read 0v.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
I think the pca9685 is a great chip, I don't ever remember hearing of an output going bad except in your case. :( The I2C communications can make it unreliable especially in DIY setups where wires are involved or if some piece of equipment is causing lots of interference such as an LED driver that was mentioned the other day. When a command is sent to the pca9685 it's basically figures crossed it made it in tact so it understands what it should do, if not the pin won't switch until another command is sent. I've played extensively with I2C in the past and quickly learned one shouldn't get carried away with too many devices connected and extra checks in the code is needed to verify things along the way. It is possible to read the state of any output and verify the command sent actually did what it was supposed to, here's a post explaining. If this was implemented chances of a pin not switching would be greatly reduced. Unfortunately I wasn't able to add it to reef-pi.




EDIT: It just hit me, I think the reason your doser port is stuck on is due to the mosfet. You must have something like that being driven by the pca9685 pin. If those are unprotected and get hit with ESD they will get stuck on even if the signal is LOW, I've seen this many times when I was still working out bugs in the controller. I would bet if you removed the mosfet that pin would read 0v.
Ok you know me I just know enough to be semi dangerous but which mosfet....https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs and the schematic is hosted there too, I do have spare parts and can replace whatever is on the board but I am intrigued now as to whit component you think went south.

Here is the annotated pic with the pins that i was using, I do not see a mosfet in relation to these pins, looks like the traces do go through a resistor, can't remember which pin it was but it was one of these:

2019-11-03T18_49_19.928Z-goby-front-annotated.jpg
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Ok you know me I just know enough to be semi dangerous but which mosfet....https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs and the schematic is hosted there too, I do have spare parts and can replace whatever is on the board but I am intrigued now as to whit component you think went south.

Here is the annotated pic with the pins that i was using, I do not see a mosfet in relation to these pins, looks like the traces do go through a resistor, can't remember which pin it was but it was one of these:

2019-11-03T18_49_19.928Z-goby-front-annotated.jpg
Hmm, you are right. There doser pins are fed directly by the PCA9685 through a 220Ohm resistor. Supposedly only by the 3.3V from the PI‘s regulator as well.

Although I think the output of the PCA9685 has to be generated internally from VDD by a MOSFET as well, so the internal MOSFET might be shot.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Hmm, you are right. There doser pins are fed directly by the PCA9685 through a 220Ohm resistor. Supposedly only by the 3.3V from the PI‘s regulator as well.

Although I think the output of the PCA9685 has to be generated internally from VDD by a MOSFET as well, so the internal MOSFET might be shot.
Yeah I actually think the pca9685 is shot, I have spares and I was going to replace the resistor first and then the pca9685 but my guess its the pca9685 thats bad, now how that happened I have no idea...
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Ok you know me I just know enough to be semi dangerous but which mosfet....https://www.tindie.com/products/ranthalion/ml-reef-pi-hat-goby/#specs and the schematic is hosted there too, I do have spare parts and can replace whatever is on the board but I am intrigued now as to whit component you think went south.

Here is the annotated pic with the pins that i was using, I do not see a mosfet in relation to these pins, looks like the traces do go through a resistor, can't remember which pin it was but it was one of these:

2019-11-03T18_49_19.928Z-goby-front-annotated.jpg
Now I'm confused. I would have guessed you were using the outputs in the bottom right corner as those go through the ULN2803A. The doser connector you circled is 3 PWM outputs which can only handle very little current and only put out 3.3v, definitely no motors connected directly would work. Did you have a circuit between the board and the pump? What pump are you using, is it PWM controllable?



EDIT: Just noticed he has a dosing adapter, that also has the ULN2803A which explains things. Have you checked the voltage coming out of the plug you circled, if it's stuck on 3.3v there then yeah either resistor or more likely the pca9685 output.
 
Last edited:

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Now I'm confused. I would have guessed you were using the outputs in the bottom right corner as those go through the ULN2803A. The doser connector you circled is 3 PWM outputs which can only handle very little current and only put out 3.3v, definitely no motors connected directly would work. Did you have a circuit between the board and the pump? What pump are you using, is it PWM controllable?



EDIT: Just noticed he has a dosing adapter, that also has the ULN2803A which explains things. Have you checked the voltage coming out of the plug you circled, if it's stuck on 3.3v there then yeah either resistor or more likely the pca9685 output.
Yup he had a uln2803a module coming off the pwm pins which was also fed 12v. I never measured voltage all I know is if I hook it up its on, always on. Could the resistor failing cause that or is it most likely the pca9685? My other question is what would have caused it to go belly up....
 

geekengineer

Active Member
View Badges
Joined
Feb 10, 2019
Messages
427
Reaction score
538
Location
South Aurora
Rating - 0%
0   0   0
Just realized that pi pico has a wifi variant. I‘ll get it and get started with the driver development. If you can wait, don’t buy esp32, ill get this done,
thank you for calling this out. I don’t know how I missed it , I guess I was just aware of esp32 and didn’t pay attention to pi pico family
I was just curious how was your esp32 driver project going and if you were still going to do a driver for the pi Pico W as well?

Also is it possble or a plan to be able to interface with another rasberry pi via wifi? Sort of in a simmilar manor to the ESP32 or pi pico W. I was wondering if it would just be a matter of coding a slave interface up on the raspberry pi even. I was thinking of a few things I could do remotly in my water mixing area that might need some more CPU horse power to do.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
985
Reaction score
1,325
Location
Edmonton, Canada
Rating - 0%
0   0   0
Yup he had a uln2803a module coming off the pwm pins which was also fed 12v. I never measured voltage all I know is if I hook it up its on, always on. Could the resistor failing cause that or is it most likely the pca9685? My other question is what would have caused it to go belly up....
Based on that I think it's more likely the ULN2803A is damaged, either by ESD or high kickback voltage. If you check the 3 PWM pins on doser plug with the ground all 3 should read 0v, if so it'll be the ULN. To verify if you turn the pumps on those 3 pins on doser plug should be 3.3v.
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,349
Reaction score
1,724
Location
Missouri
Rating - 0%
0   0   0
Based on that I think it's more likely the ULN2803A is damaged, either by ESD or high kickback voltage. If you check the 3 PWM pins on doser plug with the ground all 3 should read 0v, if so it'll be the ULN. To verify if you turn the pumps on those 3 pins on doser plug should be 3.3v.
Thats a good idea and I can do that, will do that this weekend and see what I find out...thanks for the clarity. :)
 

dadarara

Community Member
View Badges
Joined
Nov 16, 2020
Messages
88
Reaction score
38
Location
Israel
Rating - 0%
0   0   0
last night we had a summer time change. moved 1 hour back. since this morning , the lights are not switching on per the schedule.
if the setting in lights configuration is manual, then its working. so its not electrical issue
the date/time in linux is ok.
rebooted
upgraded to reefpi5.3 from 5.2

what else should I check ?
reinstall from scratch ?
 

Martin Lowry

Community Member
View Badges
Joined
Sep 19, 2017
Messages
60
Reaction score
66
Location
Dover, NH
Rating - 0%
0   0   0
So I need to figure out a automatic feeder for when I need to leave things unattended, I know @robsworld78 has a diagram for wiring up the Ehiem but was wondering if anyone else had done something differently. Havent made up my mind yet but would be nice to be able to time shutting the pumps off etc when feeding, just thought I would ask. :)
If it's of any value, I used Robs EHEIM diag with one that I had laying around and it works great. I have a single feeding instance macro set up and I also set the EHEIM to feed once a day as well just in case anything goes sideways with the RPi macro while I'm away.
 
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
last night we had a summer time change. moved 1 hour back. since this morning , the lights are not switching on per the schedule.
if the setting in lights configuration is manual, then its working. so its not electrical issue
the date/time in linux is ok.
rebooted
upgraded to reefpi5.3 from 5.2

what else should I check ?
reinstall from scratch ?
are you using wifi based setup? reload reef-pi after reboot, in case this is a network driver loading related issues. Do you see anything in log? or error in the ui?
 
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 was just curious how was your esp32 driver project going and if you were still going to do a driver for the pi Pico W as well?

Also is it possble or a plan to be able to interface with another rasberry pi via wifi? Sort of in a simmilar manor to the ESP32 or pi pico W. I was wondering if it would just be a matter of coding a slave interface up on the raspberry pi even. I was thinking of a few things I could do remotly in my water mixing area that might need some more CPU horse power to do.
its working ok. Graphs do show occassional blips in temperature reading, but the whole unit has been pretty much functional.
esp32-temperature.png

this also tests the new transform functionality, that im using here to convert reading in C-> F.

driver config, i have used this one with 4 outlet, 2 inlet, 2 pwm, 1 ds1820 (as analog input) connectors.
esp32-reef-pi.png


while the entire setup is working as expected (including light, equipment, temperature and ato control), i do not like the fact that reef-pi has to constantly communicate with the esp32 unit. ideally i want the esp32 unit to run independently and with full manual fall back capabilities on hardware. From what i understand we can only run two control loops , unless we use evenloop like libraries. I have learn those bits. and this will take some time.

Still, I'll ship what I have, as I find this to be super awesome :), that we can augment reef-pi capabilities with esp32 based light, doser, ato, temperature controller. This reduces the circuit complexity required in a single unit. reef-pi 6.0 will unlock this and as we experiment, learn things we can build those specific capabilities in the esp32 driver side. Core reef-pi controller software also needs new set of feature (delegated control loops) for that world. Im excited :)
 
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
Meanwhile, i am taking some small pauses to reflect,

Jake's sudden departure kinda hit me hard. Some how i feel very sad about this. I learned a lot from his content. And his fearless, honest way of saying this, accepting failures is something i can relate to. And above all, calling for better coral husbandry, his love of this hobby was electric. His long endurance () He was perhaps the most inspiring person for me in this hobby. I had the opportunity to see him live in Aquashella. Many things i tried to do with reef-pi (focus on core reef keeping chores, coral requirement, avoiding hubris/un-needed complexity, focus on learning continuously) have huge influence from his work. RIP my friend. Our fearless and beloved reef keeper. Every time I'll spell a scientific name of a coral, you'll be in my mind.

A modern (not mid century) pico tank stand,
38553B9A-24B1-4711-8A82-8D873B179D92.jpeg

with two side doors for easy access of ato container and electronics . There’s a gap that is planned to be used for mounting panels with manual overrides.
217506F5-4220-4579-93A3-6A6D62A11AC0.jpeg

92E29A4F-4E29-4EC7-B1A1-0F527879DA82.jpeg


built from 3/4” plywood.
884DE3B0-4AE9-4426-A6E3-AA496B8D6DE8.jpeg

all joinery are dominos . And edge banding on all sides except back
67B89E15-B92E-4866-9008-1DA7F54BC717.jpeg


Soft close hinges for mounting doors.
753B5BFF-8F26-4F5A-9969-699B9A9A72C9.jpeg

3D printed parts are next, followed by mounting the electronics. -and finally one of the pico tank .

We’ll miss you Jake. your teachings will guide us always.
 

Attachments

  • C7835DC2-07F3-4F31-8F11-E381A8E7E2DB.jpeg
    C7835DC2-07F3-4F31-8F11-E381A8E7E2DB.jpeg
    265.3 KB · Views: 54
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
Hello folks
I have a puzzle, I'm missing something. See the photo
1667673017899.png
:-O where is configuration tab ?are you using a non english translation? I also dont see reef-pi version. how you installed and run reef-pi .. as in is it running on raspberry pi?
 

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
52
Location
germany
Rating - 0%
0   0   0
:-O where is configuration tab ?are you using a non english translation? I also dont see reef-pi version. how you installed and run reef-pi .. as in is it running on raspberry pi?
hello Ranjib@
thank you for your quick answer actually I haven't changed or reinstalled anything I can get into the configuration via the errors. I think my raspi is junk. USB is defective due to water.

89B192D6-DAD1-4111-A287-1AE48A29B706.png AFA0B419-CBAE-4D6D-870A-8D138A5A6354.png
 
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
hello Ranjib@
thank you for your quick answer actually I haven't changed or reinstalled anything I can get into the configuration via the errors. I think my raspi is junk. USB is defective due to water.

89B192D6-DAD1-4111-A287-1AE48A29B706.png AFA0B419-CBAE-4D6D-870A-8D138A5A6354.png
there are errors related to adafruit.io , try disabling it. Still not sure why its not in english or why its not showing any version details
 

eggi55

Community Member
View Badges
Joined
Sep 18, 2022
Messages
63
Reaction score
52
Location
germany
Rating - 0%
0   0   0
there are errors related to adafruit.io , try disabling it. Still not sure why its not in english or why its not showing any version details
since I live in Germany, I put it in German with adufruit. io doesn't bother me for now, I'm still considering closing the subscription. adufruit.io I wanted to deactivate some feeds, which also worked, but reactivating them didn't work. I'll take care of that later.
 
Back
Top