-->
Page 1 of 2

Nodemcu (lolin v3) with pca9685 (16-Channel Servo Driver).

PostPosted: Thu Dec 29, 2016 12:04 pm
by NOVAGENIO
Hi, I hope you can help me.

I am working in a project to connect my nodemcu (lolin v3) with the module pca9685 (16-Channel Servo Driver).

I have a lot of experience with the pca96886 module and I already connected it with bluetooth and wifi modules (cc3000) successfully.

Now I encounter the problem, and I think the sda ​​and scl signal do not work correctly.
I am using the Adafruit_PWMServoDriver library and the definition:

"The default pins are defined in variants / nodemcu / pins_arduino.h the SDA = 4 and SCL = 5, but those are not pins number but GPIO number, so since the pins are D1 = 5 and D2 = 4." (RE: DEFAULT SDA AND SCL PINS ON NODEMCU V1.0) By martinayotte.

But the communication is not working.

The D1 and D2 (gpi05 and gpi04) always have 3,12v if I check that with a multimeter. ¿is correct that?

The code (already tested in other projects) and wiring is very simple, vcc. Gnd, sda and scl, respectively.

The module nodemcu correctly receives the data of my cell and generates the call to move the servos, but nothing.

You can help me find the problem. I can not find any other reference on the internet or in other forums trying to make this connection.

regards.

Re: Nodemcu (lolin v3) with pca9685 (16-Channel Servo Drive

PostPosted: Fri Dec 30, 2016 9:19 am
by martinayotte
(BTW, you can not check signal on I2C with a simple multimeter)
Do you have some 4K7 pullups on both SDA/SCL ?
Are all the address pins of PCA9685 connect to GND and defined accordingly in the sketch/library ?

Re: Nodemcu (lolin v3) with pca9685 (16-Channel Servo Drive

PostPosted: Fri Dec 30, 2016 10:59 am
by NOVAGENIO
No, I don't have any pullups. For what? In other proyect with pca9685 nevwer use that.

The PCA9685 have 5 pines, VCC, GND, conected to external power (5v) and SDA, SCL, connected to nodemcu module. And the aditional power v+ and gnd to external 5v power.

Here example, connected to a UNO:

http://www.naylampmechatronics.com/modu ... efault.jpg

Re: Nodemcu (lolin v3) with pca9685 (16-Channel Servo Drive

PostPosted: Fri Dec 30, 2016 11:08 am
by rudy
Are you powering the PCA9685 with 5 volts? If so then you probably are not getting an adequate high for the SDA & SCL inputs. The PCA9685 specifies that a high is 0.7 * Vcc and with a 5 volt supply that is 3.5 volts.

If that is your problem then you need to either power the PCA9685 with 3.3 volts or use a level translator. I have had this problem when I connect 5 volt powered character LCDs to my ESP modules. I use level translators since I don't have the option of using a lower voltage for the LCDs.