PCA9685 wiring
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 35
- Joined: 05 Feb 2016, 07:33
PCA9685 wiring
Hi, I am unable to run PCA9685. On i2c see him. And I have this wiring: https://blog.adafruit.com/2013/03/29/po ... pberry_pi/, on ESP of course. Is it right?
-
- Normal user
- Posts: 507
- Joined: 21 Nov 2015, 15:03
- Location: SW-Netherlands, NB
Re: PCA9685 wiring
When you do a I2C scan you should see address 0x40 with something like "SI7021 Temp/Hum Sensor, INA219, PCA9685" as description.
After adding this device you can use this command to set one output at a time.
http://<ESP IP address>/control?cmd=pcapwm,<pin>,<Level>
After adding this device you can use this command to set one output at a time.
http://<ESP IP address>/control?cmd=pcapwm,<pin>,<Level>
-
- Normal user
- Posts: 35
- Joined: 05 Feb 2016, 07:33
Re: PCA9685 wiring
costo: thx, of course I read it.
But on the wiki is not mentioned involved LEDs.
According to the datasheet it may be Fig 13., Fig 14. and Fig 15., on page 29.
https://www.adafruit.com/datasheets/PCA9685.pdf
Fig 13. and Fig 15. is not working for me.
But on the wiki is not mentioned involved LEDs.
According to the datasheet it may be Fig 13., Fig 14. and Fig 15., on page 29.
https://www.adafruit.com/datasheets/PCA9685.pdf
Fig 13. and Fig 15. is not working for me.
-
- Normal user
- Posts: 507
- Joined: 21 Nov 2015, 15:03
- Location: SW-Netherlands, NB
Re: PCA9685 wiring
I understand your problem, it is not really ESPEasy related but about electronic fundamentals.wutu wrote:costo: thx, of course I read it.
But on the wiki is not mentioned involved LEDs.
According to the datasheet it may be Fig 13., Fig 14. and Fig 15., on page 29.
https://www.adafruit.com/datasheets/PCA9685.pdf
Fig 13. and Fig 15. is not working for me.
The easyest way is to start with only one single small led. The PCA9685 can source/sink 25mA, enough to control one single bright LED.
If you have that working you have to find out yourself how to connect a RGB strip, the adafruit site explains it all, just follow exactly the examples .
https://learn.adafruit.com/rgb-led-strips/usage
edit: make sure to have a small resistor of about 100ohm in series with the single led to limit the current to max 25mA.
-
- Normal user
- Posts: 35
- Joined: 05 Feb 2016, 07:33
Re: PCA9685 wiring
Thank you, but it's a matter ESPEasy, the program depends on what mode will control the output.
values:
INVRT
OUTDRV
P.S. I have education in electronics and telecommunications. Needless to lecture me about the basics.
values:
INVRT
OUTDRV
P.S. I have education in electronics and telecommunications. Needless to lecture me about the basics.

-
- Normal user
- Posts: 507
- Joined: 21 Nov 2015, 15:03
- Location: SW-Netherlands, NB
Re: PCA9685 wiring
That is why I suggested you try it first with one single LED to see how that works.wutu wrote:Thank you, but it's a matter ESPEasy, the program depends on what mode will control the output.
values:
INVRT
OUTDRV
P.S. I have education in electronics and telecommunications. Needless to lecture me about the basics.
The plugin initialises the PCA9685 with default values that will work for most situations and that's it.
You can not set or control any parameters of the PCA9685 from within ESPEasy.
From the plugin:
Code: Select all
// default mode is open drain ouput, drive leds connected to VCC
Plugin_022_writeRegister(PCA9685_MODE1, (byte)0x01); // reset the device
delay(1);
Plugin_022_writeRegister(PCA9685_MODE1, (byte)B10100000); // set up for auto increment
Plugin_022_writeRegister(PCA9685_MODE2, (byte)0x10); // set to output
MODE2 binary 00010000 only bit4 =1 which is the INVRT bit
INVRT = 1
OUTDRV = 0.
Hopefully this helps.
If you want other parameters you can change the byte of MODE1 and/or MODE2 register and recompile it for yourself.
-
- Normal user
- Posts: 35
- Joined: 05 Feb 2016, 07:33
Re: PCA9685 wiring
costo: Thank you, that is exactly it. Afternoon test it and let you know.
Setup is:
Plugin_022_writeRegister(PCA9685_MODE2, (byte)B00000101);
Thank you again. FETs are already hot.
Setup is:
Plugin_022_writeRegister(PCA9685_MODE2, (byte)B00000101);
Thank you again. FETs are already hot.

-
- New user
- Posts: 6
- Joined: 29 Jul 2017, 00:53
Re: PCA9685 wiring
Hello!
I have the same problem. How is the solution in detail.
Please help.
lg
wolfgang
I have the same problem. How is the solution in detail.
Please help.
lg
wolfgang
-
- Normal user
- Posts: 35
- Joined: 05 Feb 2016, 07:33
Re: PCA9685 wiring
Download EASPEasy. Open it in ArduinoIDE. On tab _P022_PCA9685 change
this line
Plugin_022_writeRegister(PCA9685_MODE2, (byte)0x10); // set to output
to
Plugin_022_writeRegister(PCA9685_MODE2, (byte)B00000101); // set to output
Compile and upload to ESP.
this line
Plugin_022_writeRegister(PCA9685_MODE2, (byte)0x10); // set to output
to
Plugin_022_writeRegister(PCA9685_MODE2, (byte)B00000101); // set to output
Compile and upload to ESP.
-
- New user
- Posts: 6
- Joined: 29 Jul 2017, 00:53
Re: PCA9685 wiring
Hallo!
Unfortunately, I can not cope with the IDE. You should simply install this parameter in ESPEASY. But have no idea who can be asked here.
lg
Wolfgang
Unfortunately, I can not cope with the IDE. You should simply install this parameter in ESPEASY. But have no idea who can be asked here.
lg
Wolfgang
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: PCA9685 wiring
+1 for that.
The PCA 9685 can do much more then ESPEasy allows atm.
The PCA 9685 can do much more then ESPEasy allows atm.
Regards
Shardan
Shardan
-
- New user
- Posts: 6
- Joined: 29 Jul 2017, 00:53
Re: PCA9685 wiring
Hallo wutu!
Thank you I made it.
lg
Wolfgang
PS:Nevertheless, the parameter should be adjustable. Would enrich ESPEASY.
Thank you I made it.
lg
Wolfgang
PS:Nevertheless, the parameter should be adjustable. Would enrich ESPEASY.
Who is online
Users browsing this forum: Anthropic Claude Bot [bot] and 13 guests