HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Useful guides, libraries, and example sketches to support our Arduino based products.
dlancas
Posts: 1
Joined: Thu Mar 07, 2024 9:36 am

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by dlancas » Thu Mar 07, 2024 9:47 am

Hello, is this still active? trying to download the HCPCA9685 library but cannot seem to find the download file.

andrew
Site Admin
Posts: 1422
Joined: Sun Aug 05, 2012 4:15 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by andrew » Thu Mar 07, 2024 3:03 pm

The link to the library is at the very bottom of the first post of this thread (under the heading 'Downloads'):

viewtopic.php?p=4956#p4956

Note you will need to be logged in to download it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

karma99
Posts: 3
Joined: Sat Nov 09, 2024 3:55 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by karma99 » Sat Nov 09, 2024 9:13 pm

Hi
I bought one of these boards this week but I just can't get the example sketch to function.

I'm using IDE 2.3.3, a Nano Every and have attached the SCL/SDA to A4/A5 and running a 2IC Scanner I get a response as expected from 0x40 so 2IC communication seems fine.
My servo (a standard 9g) is fine (tested using a normal PWM pin) it just doesn't respond at all to anything I pass to the controller. If I enable the serial monitor it shows 121 when setup runs.

I am baffled :?
Is there something obvious I'm missing, a particular setting for the Nano Every or a 9g servo etc.

karma99
Posts: 3
Joined: Sat Nov 09, 2024 3:55 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by karma99 » Sun Nov 10, 2024 12:57 pm

Further to the above, this morning I've measured the voltage on the power pins for various servo plugs and it is a hard 0.00 (normally background voltage on my multimeter is hovering in the low 0.1s). The Arduino is running on the USB to my PC, I'm using a separate 5v supply into the external power which works perfectly when I run the servo signal direct from the Arduino.

So no voltage is at least 1 reason why the servo on the controller isn't doing anything! Is this a user error that I haven't set something or do I have a faulty board?

Edit:
Further further...
I just ran the I2C scanner again (because at this point I'm just baffled) and it's now saying there are devices at 0x40 (good) and 0x70 (WTF!)

andrew
Site Admin
Posts: 1422
Joined: Sun Aug 05, 2012 4:15 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by andrew » Sun Nov 10, 2024 1:29 pm

Further to the above, this morning I've measured the voltage on the power pins for various servo plugs and it is a hard 0.00 (normally background voltage on my multimeter is hovering in the low 0.1s). The Arduino is running on the USB to my PC, I'm using a separate 5v supply into the external power which works perfectly when I run the servo signal direct from the Arduino.

I’m assuming you are using the example servo sketch to test your setup?

If you’re powering the servo via the module's screw terminal, and it’s convenient to do so could you give the following a try:

Could you try connecting the 5V servo supply to either the V+ pin found on the 6 way right-angled header, or to any of the servo header V+ pins to see if that works.

In the meantime, I’ll get one from our latest stock to test the library and check that the manufacturer of the module hasn’t changed anything.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

karma99
Posts: 3
Joined: Sat Nov 09, 2024 3:55 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by karma99 » Sun Nov 10, 2024 2:44 pm

andrew wrote:
Sun Nov 10, 2024 1:29 pm
I’m assuming you are using the example servo sketch to test your setup?

If you’re powering the servo via the module's screw terminal, and it’s convenient to do so could you give the following a try:

Could you try connecting the 5V servo supply to either the V+ pin found on the 6 way right-angled header, or to any of the servo header V+ pins to see if that works.

In the meantime, I’ll get one from our latest stock to test the library and check that the manufacturer of the module hasn’t changed anything.
I'm using a cut down version of the example - literally setting the value at 240 when I know it's at 0 to start with.
And yup, it worked putting the servo supply into V+ pin.
What does that mean? :D

andrew
Site Admin
Posts: 1422
Joined: Sun Aug 05, 2012 4:15 pm

Re: HCPCA9685 - Library for PCA9685 16ch 12bit PWM controller

Post by andrew » Mon Nov 11, 2024 9:06 am

I'm using a cut down version of the example - literally setting the value at 240 when I know it's at 0 to start with.
And yup, it worked putting the servo supply into V+ pin.
What does that mean? :D

I've been looking at the current batch, and it appears that a reverse polarity protection has been added to the terminal supply input. This protection consists of a P-channel MOSFET in series with the supply. However, I think the wrong type of transistor might have been used, which is preventing it from working correctly. Because it’s just on the terminal supply, it only affects the terminal input, so the V+ inputs seem to be functioning fine.

I've now removed this batch from sale while we resolve the issue, and I apologise for any inconvenience this may have caused you. If you email sales [at] hobbycomponents.com and reference this forum post, we’ll be happy to offer you either a refund or a working replacement.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Arduino”