PCA9685 pwm signal not working

LeonTheLion

New Member
View Badges
Joined
Jan 6, 2022
Messages
8
Reaction score
1
Location
Germany
Rating - 0%
0   0   0
Hi all,

I‘m new here so first of all big thanks to the dev and everyone who is giving advice.

Currently I‘m setting up a small nano reef tank and I‘m trying to get the lights to work (Kessil A80).

I‘m using a PCA9685 board and can‘t get reef-pi to change the pwm signal.

The console output however confirms the settings i did in the ui.

The PCA9685 is recognized and with the code in the attached image i manage to change the pwm output.

I‘m Running version 5.1 on a Pi 4.

Thanks in advance

Edit: I‘m following the instructions from the official guide
E4B1710E-1A43-46DC-9BFF-84C49F9ABE89.jpeg
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
are you using a scratch build? can you read the voltage at pca9685 end and npn transistor end to check what voltage they are showing when you set it to 50% intensity through the light UI?
 
OP
OP
LeonTheLion

LeonTheLion

New Member
View Badges
Joined
Jan 6, 2022
Messages
8
Reaction score
1
Location
Germany
Rating - 0%
0   0   0
Through the light ui i get 6mV, no matter the setting (npn output is 9.9V)

When using the script i mentioned above i get roughly 2.5V from the pca9685 and 5V from npn.

Here is a picture from my build. I‘m using seperate power supplies for pi and the rest of the controller. The transistors are 2N2222
 

Attachments

  • C7699A96-E23F-41A0-8FD9-570FBD47B65F.jpeg
    C7699A96-E23F-41A0-8FD9-570FBD47B65F.jpeg
    245 KB · Views: 66

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
do you have dev mode enabled by any chance? its under configuration -> settings. make sure its disabled/unchecked
 
OP
OP
LeonTheLion

LeonTheLion

New Member
View Badges
Joined
Jan 6, 2022
Messages
8
Reaction score
1
Location
Germany
Rating - 0%
0   0   0
No, dev mode is disabled. Is there perhaps an underlying driver issue/missing dependency?
I have the Rasbian Lite image.

I‘m also wondering why the pins under the „Connectors“ tab have Rasperry Pi (active low) behind them.
If I edit the values the pca9685 driver is correctly set.

D1F411A9-FBBF-4358-9F4A-8E0912306928.jpeg 60258FF4-008A-4248-A7CC-6657563BF634.jpeg 02F01AE9-92FD-4F68-96D9-57E8F99DA76B.jpeg
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
it could be an i2c bug in reef-pi driver, or some i2c connectivity issue or pca9685 issue(hardware). we can check for each of these, if you have not already.
If with python script pca9685 is working, then its for sure reef-pi side. if not, its either i2c connectivity /wiring (hardware) or pca9685 itself being fried.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
it could be an i2c bug in reef-pi driver, or some i2c connectivity issue or pca9685 issue(hardware). we can check for each of these, if you have not already.
If with python script pca9685 is working, then its for sure reef-pi side. if not, its either i2c connectivity /wiring (hardware) or pca9685 itself being fried.
Notice in the picture @LeonTheLion posted how the Jacks show Raspberry PI as the driver even though it was saved as PCA9685 being driver. A couple people recently have contacted me about the same thing and I've seen it personally however on my end it still seemed to work correctly but on there end not. Something definitely isn't right with it showing wrong driver but I'm unsure if it's just visual or functional issue. When I've been contacted I've been told ports being driven by the pca9685 just stop working all of a sudden and they noticed drivers seemed to change. I believe one person went back to 4.3 and the issue was solved but unsure on the other.

I think I managed to clear it up with 5.1 on a fresh install, seems like maybe during update this happened. Tomorrow I will play with it again and report exactly what I find. This was last couple weeks so I can't remember all the details. I still haven't updated my manuals to install the 5.1 so most people I'm still putting on 4.3.
 
OP
OP
LeonTheLion

LeonTheLion

New Member
View Badges
Joined
Jan 6, 2022
Messages
8
Reaction score
1
Location
Germany
Rating - 0%
0   0   0
Ok, After downgrading to 4.3, deleting the jacks and lighting and recreating them it now works.

Notice that i had to delete the ligthting that used these jacks first. Otherwise the jack driver would always revert to Raspberry Pi.

Edit: I now upgraded to 5.1 again and ist still works (the driver is also correctly shown as pca9685 instead of rasperry pi)

There must have been an issue with the driver being locked to raspberry pi when the jack was being referenced elsewhere?
 
Last edited:

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I think it’s an ui bug. I am encountering bugs like that , and I can’t reproduce them successful, always. Which makes it bit harder.
like the journal log shows some validation issue if I entered value with point in it, but only in iPhone :-( . Does not happen from computer or iPad. So.. I suspect there could be some more like this.. specific to reef-pi versions sometimes
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
I think it’s an ui bug. I am encountering bugs like that , and I can’t reproduce them successful, always. Which makes it bit harder.
like the journal log shows some validation issue if I entered value with point in it, but only in iPhone :-( . Does not happen from computer or iPad. So.. I suspect there could be some more like this.. specific to reef-pi versions sometimes
Yeah something is happening, I played yesterday with this and was able to get it once, then took what I thought were same steps and it didn't happen and couldn't get it to happen again. It seems random. Yesterday I had another person experience this, he updated to 5.1 things were good for a few days and then broke. Not really sure what he might have done maybe changed a connector related to the driver. He went back to 4.3 and back in business.
 

MosBronco

New Member
View Badges
Joined
Jun 6, 2020
Messages
23
Reaction score
16
Rating - 0%
0   0   0
Thank you for this. I upgraded to 5.1 and all was well then all of a sudden no lights.. I swapped pi's thinking after more then a year of being in a box it kicked the bucket. nope, I replaced the pca module and noticed low voltage so replaced the ac adapter and nothing. I finally downgraded to 4.3 after reading your post and re made all my connections. all of a sudden the pi could see the pca module and my reef is no longer suffering from an eclipse.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So it was a reef-pi version issue ? If that’s the case I have take a look at it and squash any bug we may have :-(
 

Smin

New Member
View Badges
Joined
Apr 25, 2019
Messages
23
Reaction score
19
Rating - 0%
0   0   0
I'm having this issue as well on 5.0.

Rebooted the pi with no updates or changes today (lights off for cleaning). When I turned it back on it has changed the driver for the pwm to hs303 on the jacks. No idea why.. I can edit and save, but it just changes back to the wrong driver afterwards.

trying to delete and create a new jack gives:
Code:
[HEADING=1]Something went wrong.[/HEADING]
TypeError: Cannot read properties of null (reading 'analog-input')
   in l    in div    in div    in div    in div    in div    in l    in Connect(l)    in div    in div    in l    in div    in l    in c    in div    in div    in div    in div    in l    in Connect(l)    in l    in l
[LIST]
[*]Documentation |
[*]Sun Mar 13 20:52:45,
[*]running 5.0, on Raspberry Pi Zero W Rev 1.1
[*]since 8 minutes ago |
[*]IP 192.168.0.7 |
[*]API |
[*]Errors(0)
[/LIST]
Mar-12-14:28, 2022
 

Just grow it: Have you ever added CO2 to your reef tank?

  • I currently use a CO2 with my reef tank.

    Votes: 8 5.4%
  • I don’t currently use CO2 with my reef tank, but I have in the past.

    Votes: 5 3.4%
  • I have never used CO2 with my reef tank, but I plan to in the future.

    Votes: 8 5.4%
  • I have never used CO2 with my reef tank and have no plans to in the future.

    Votes: 122 81.9%
  • Other.

    Votes: 6 4.0%
Back
Top