ESP8266=> I2c=> PCA9685 => 12 Servos

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jdoESP
New user
Posts: 2
Joined: 26 Oct 2015, 18:00

ESP8266=> I2c=> PCA9685 => 12 Servos

#1 Post by jdoESP » 26 Oct 2015, 18:13

Hi!

I have got a PCA 9685 ADAfruit compatible board...
http://www.adafruit.com/datasheets/PCA9685.pdf
attached via i2c (gpio 0=> SDA, gpio 2 => SCL) configured in ESPEasy to my ESP8266-01

The i2c bus scan returns:
0x9
0xc
0xe
0x10
0x11
0x13
0x15
0x17
0x19
0x1b
0x1e
0x20 PCF8574, MCP23017, LCD Modules
0x22
0x24
0x26
0x28
0x2a
0x2c
0x30
0x32
0x34
0x38
0x3c
0x40
0x41
0x43
0x45
0x48 PCF8591 ADC
0x4a
0x4d
0x50
0x53
0x55
0x59
0x60
0x62
0x65
0x69
0x70
Unknow error at address 0x71

==> How can I control servo1 on this bus?

http://www.esp8266.nu/index.php/GPIO tells me I should use
==> http://<ESP IP address>/control?cmd=Servo,1,0,90

But this is only when I access the servos directly via the GPIO port and not via i2c bus...
My suspicion is, that I have to tell the easyesp config that I am using this special i2c module similar to:
http://www.esp8266.nu/index.php/MCP23017

But: for this module i have not found an appropriate "driver" / setting.
can anyone point me in the right direction?

i'm new to using i2c and arduino - so please forgive me ...

Thank you very much!

BerndJ
Normal user
Posts: 86
Joined: 28 Sep 2015, 06:57

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#2 Post by BerndJ » 26 Oct 2015, 20:58

Hi,

there are no driver, but u can create one, test it and make a pull request.

If the test would be fine these boys integrate these output modul, make a new revision and i´m also bee happy.

possible basic Drivers can be found here:

https://github.com/adafruit/Adafruit-PW ... er-Library

best wishes

BerndJ

PS:
@martinus did u plan to integrate these IC

I had also some of these parts, specs:
16x LED PWM driver, resolution 12-bit !!, better than the normal 8,
also alternative 16x servos
problem 1: startaddress 40, we had 40 and 41 in use, also 42 as start or a solution to solve these conflicts,
6 hardware adress pins !!
address 70 as "Broadcast" for all 9685

you are so fit in I2C programming

u can get these modules also from chinese, round about 3-4 €. Adafruit is another price level.
no "so" case available, only these small one, self soldering is not recommend.

jdoESP
New user
Posts: 2
Joined: 26 Oct 2015, 18:00

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#3 Post by jdoESP » 26 Oct 2015, 22:26

Hi Bernd,,
Mmm I'm afraid I'm not so fit yet ;)
But willing to learn.
so what would I need to start off, except for the GitHub you mentioned and the stuff I have got already?
Is there a tutorial somewhere? Howt-To video ...?
Thx.

BerndJ
Normal user
Posts: 86
Joined: 28 Sep 2015, 06:57

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#4 Post by BerndJ » 26 Oct 2015, 23:42

Hi jdoESP,

Sorry, but:

Mmm I'm afraid I'm not so fit yet ;) , also ;) ;)

Take a look of the kind they are programming (source code), it´s fantastic and u can learn a lot.

And then test to prog by yourself. I haved done it for more Times:
PCA9532, PCA9685 and PN532.
Now i take a look to prog 433 MHz, only sending module, next would bee APDS9960.

By the way, I´m not a softie, my way is to create PCB´s Layouts in harmony with quick&dirty homecontrolling.

BerndJ

Martinus

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#5 Post by Martinus » 22 Nov 2015, 13:33

R44 now has basic support for the PCA9685 PWM controller. Added to the wiki pages:
http://www.esp8266.nu/index.php/PCA9685

videobelu
New user
Posts: 5
Joined: 11 Feb 2016, 17:22

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#6 Post by videobelu » 24 Oct 2016, 22:20

A question for the team....it is possible to connect 2 or more PCA9685 board to drive more than 16 channel of PWM outputs???
If not....are planning to implement this feature???

Thanks

Fabrizio

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#7 Post by moelski » 25 Oct 2016, 06:47

Hi !
....it is possible to connect 2 or more PCA9685 board to drive more than 16 channel of PWM outputs???
I think it´s not possible at the moment. The I2C address is hardcoded:

Code: Select all

Wire.beginTransmission(PCA9685_ADDRESS);
If not....are planning to implement this feature???
I think no - even if I am no developer of ESPEasy.
They are fixing bugs for the next stable release. And if I understand this posting correctly ...
viewtopic.php?f=6&t=2167
... something will change in general ;)
regards
Dominik

videobelu
New user
Posts: 5
Joined: 11 Feb 2016, 17:22

Re: ESP8266=> I2c=> PCA9685 => 12 Servos

#8 Post by videobelu » 25 Oct 2016, 09:15

moelski wrote:Hi !
....it is possible to connect 2 or more PCA9685 board to drive more than 16 channel of PWM outputs???
I think it´s not possible at the moment. The I2C address is hardcoded:

Code: Select all

Wire.beginTransmission(PCA9685_ADDRESS);
If not....are planning to implement this feature???
I think no - even if I am no developer of ESPEasy.
They are fixing bugs for the next stable release. And if I understand this posting correctly ...
viewtopic.php?f=6&t=2167
... something will change in general ;)
Thank you very much for the answer......

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 45 guests