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

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
118
Reaction score
152
Rating - 0%
0   0   0
Some pca9685 boards only work with Max frequency of 1000
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
@Schreiber The error message seems a bit suspicious.

Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error

Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
475
Reaction score
594
Location
Knoxville
Rating - 0%
0   0   0
@Schreiber The error message seems a bit suspicious.



Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?

I tested with the adafruit board, but this is an entirely separate PCA9685 chip. I don't have the adafruit board connected anymore, just this one. DevMode is not enabled & I'm running 2.5.

EDIT: @Michael Lane , I just downloaded the schematic for the adafruit board & the only real differences I see between my setup & their is for the address jumpers...

For my address pins A0-A5, they have 10k ohm resistors between them & ground... Are these actually necessary? I simply have mine connected straight to ground. I have A1-A5 connected directly to ground & A0 connected directly to VCC.
 
Last edited:

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,679
Reaction score
2,227
Location
Columbia MD
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
I had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?
 

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 had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?

I honestly think it’s hardware related. It only happens once every 2-3 weeks and my box is pretty far from any pumps. I can try moving it further.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
640
Location
United States
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?

I've not had any wifi issues on my build. It's been rock solid since January. One thing to watch for- microwave ovens can cause 2.4GHz Wifi problems, since most ovens operate in that approximate frequency range too.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
I honestly think it’s hardware related. It only happens once every 2-3 weeks and my box is pretty far from any pumps. I can try moving it further.
I experienced this with an older rpi using a USB wifi dongle, and more recently with rpi 3. In my case, it seemed to be a power related problem. The wifi modules weren't able to pull enough power to stay connected to the weak wifi signal. I upgraded my power supply and no longer experience that issue.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
I tested with the adafruit board, but this is an entirely separate PCA9685 chip. I don't have the adafruit board connected anymore, just this one. DevMode is not enabled & I'm running 2.5.

EDIT: @Michael Lane , I just downloaded the schematic for the adafruit board & the only real differences I see between my setup & their is for the address jumpers...

For my address pins A0-A5, they have 10k ohm resistors between them & ground... Are these actually necessary? I simply have mine connected straight to ground. I have A1-A5 connected directly to ground & A0 connected directly to VCC.
Connecting directly to ground is fine. The 10k pull down is only required if you might use a jumper to connect to 5v.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,121
Rating - 0%
0   0   0
I have A0 connected directly to 5V... Based in this, I'm assuming that was a bad idea & it needs the pulldown resistor for A0? Could that be causing my issue?
That's fine. I don't expect that to be an issue. It's essentially the same thing that happens on the breakout board when you bridge an address pin.
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
475
Reaction score
594
Location
Knoxville
Rating - 0%
0   0   0
So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?

Double Edit: I tried my PCA9685pw at address 0x40 & it worked flawlessly. It's definitely a bug.
 
Last edited:

Matevz Savarin

Active Member
View Badges
Joined
Dec 5, 2018
Messages
209
Reaction score
163
Rating - 0%
0   0   0
Hi all! One question my optical sensor on mikes hat v2 doesnt work, float works ok. Do I need to put resistors on power and signal side? 1k and 10 k ohms? Thanks!
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Hi @Ranjib - I had the latest 2.5 build up and running for a few weeks and today I changed some minor settings, hit reload through the UI, now I'm getting the following:
Code:
Process: 750 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)

I tried resetting the database, and as soon as I added some settings and hit reload again the same thing happened.
What's the best way to troubleshoot?
Do I just need to reinstall?
 
Last edited:

buddy.

Active Member
View Badges
Joined
May 16, 2018
Messages
293
Reaction score
604
Location
Australia
Rating - 0%
0   0   0
So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?
I went from 2.2 to 2.5 and had some minor problems with my pca (leds didnt turn off). I found that 2.3 works best for me. Not sure if it is relevant to you though.
 

Mandelstam

Well-Known Member
View Badges
Joined
Oct 29, 2017
Messages
688
Reaction score
1,066
Location
Malmö, Sweden
Rating - 0%
0   0   0
One is really a diy freak when you start to pick up random stuff off the street and think "Hmmm.. this connector looks interesting, wonder if I can use it in a reef-pi build..?"

I found a badly crushed run over controller for an ebike in the street the other day. The connectors looked interesting and I thought maybe I could save something from it so I took it home and did an autopsy. I saved a heatsink for 7 mosfets but otherwise no electronic parts. But the connectors looked really interesting, waterproof with a lot of pins. Sadly I only had female connectors.

I started to google the brand name I saw on one of them (Julet) and found a big world of ebike connectors opening up to me. IP67 connectors with up to 10 pins in a quite small form factor. For both signal and power. I haven't found a source for these connectors though, many seem to be OEM connectors not available for consumers but there seems to be a diy scene in the ebike community so all hope is not lost.

The one I'm holding in my hand has 6 pins. The larger two on the table has 10 pins. Everything is IP67 by the looks of it. Nothing is chassi mounted though, only in line (right term?).

I thought it was interesting and potentially useful if there are spare connectors available for a decent price. I'll keep looking. If anyone knows anything more please let me know! :)

48cn9li.png


rzEvGhI.png


3KMKhRi.png
 
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
Hi @Ranjib - I had the latest 2.5 build up and running for a few weeks and today I changed some minor settings, hit reload through the UI, now I'm getting the following:
Code:
Process: 750 ExecStart=/usr/bin/reef-pi daemon -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)

I tried resetting the database, and as soon as I added some settings and hit reload again the same thing happened.
What's the best way to troubleshoot?
Do I just need to reinstall?

Can you share the log , it may have details:
Code:
journalctl -u reef-pi.service

Sorry for your trouble, I really want to get rid of all such fatal failures that causes the controller to not even show UI
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
178
Reaction score
258
Rating - 0%
0   0   0
Can you share the log , it may have details:
Code:
journalctl -u reef-pi.service

Sorry for your trouble, I really want to get rid of all such fatal failures that causes the controller to not even show UI

So.... Has anyone actually tried re-addressing their PCA9685 on 2.5? I've been pulling my hair out troubleshooting my circuit. Adafruit's board at 0x40 worked but mine at 0x41 did not. Finally today, out of curiousity, I addressed Adafruit's PCA9685 to 0x41...and it errored out as well. Exact same error mentioning "mock I2C bus" in the journal. I'm reverting back to 2.4 now to see if it makes a difference.

Edit: No dice, 2.4 crashes with the same error as well. @Ranjib , is this a known issue with PCA9685 re-addressing?

As I'm looking at it closer it looks like @Schreiber and I are having the same issue. I can confirm that all was working with my current PCA9685 board at PWM 1500 until a reboot today. I removed the database, and started troubleshooting from scratch. Every time I enable the PCA9685 board and reload, reef-pi crashes and will not start again. I've tries setting the PWM to 1000 also with the same results.
 
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
One is really a diy freak when you start to pick up random stuff off the street and think "Hmmm.. this connector looks interesting, wonder if I can use it in a reef-pi build..?"

I found a badly crushed run over controller for an ebike in the street the other day. The connectors looked interesting and I thought maybe I could save something from it so I took it home and did an autopsy. I saved a heatsink for 7 mosfets but otherwise no electronic parts. But the connectors looked really interesting, waterproof with a lot of pins. Sadly I only had female connectors.

I started to google the brand name I saw on one of them (Julet) and found a big world of ebike connectors opening up to me. IP67 connectors with up to 10 pins in a quite small form factor. For both signal and power. I haven't found a source for these connectors though, many seem to be OEM connectors not available for consumers but there seems to be a diy scene in the ebike community so all hope is not lost.

The one I'm holding in my hand has 6 pins. The larger two on the table has 10 pins. Everything is IP67 by the looks of it. Nothing is chassi mounted though, only in line (right term?).

I thought it was interesting and potentially useful if there are spare connectors available for a decent price. I'll keep looking. If anyone knows anything more please let me know! :)

48cn9li.png


rzEvGhI.png


3KMKhRi.png
Thats awesome :-) . Nothing like scavenging electronics and reuse. During the 2.0 to 3.0 upgrade process I realized I rarely need to buy any new electronics, as pretty much everything except the enclosure and may be some perma proto board is reusable :-) . It turned out lot less expensive than I was anticipating.

Theres lot to learn just by observing different systems I feel.
 

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 26.8%
  • 100% dry rock + 100% live sand

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

    Votes: 32 22.5%
  • 75% live rock, 25% live sand

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

    Votes: 10 7.0%
Back
Top