PWM Pin Expansion on Arduino

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
Hey guys,

I want to expand my PWM pins on my Arduino GIGA R1 with the PCA9685-module.
How do I draw this schematic and what do I need to look out for?

Thanks Already!

Greets,

Rens
 

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
Hey guys,

Thanks for the advice,

I found this from the Adafruit PWM-expantion Module:
1721122553049.png

Looks correct to me, only I don't understand the Analog connections? Do I need to connect the analog connections to my Arduino?
 

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
You wire them directly to Vcc and GND to whatever slave address you choose. The corresponding slave address is transmitted in the I2C data.
Hi, I've been doing some reading in the datasheet of the PCA9685, and i get what you mean. So I either connect a analog pin to VCC or GND to form a unique combination to get form 62 different adresses.

How can i connect then multiple modules at one I2C connection, just connect it al to that connection?
Right now I come this far:
1721151853354.png
 
Last edited:

MrChips

Joined Oct 2, 2009
34,806
A5-A0 are slave device address pins. You can have as many as 62 slave devices.
On a generic production board, A5-A0 can be wired to DIP switches or PCB jumpers so that each board can be configured for a specific slave address.

Each slave will now have a unique physical address. The I2C data command includes a slave address so that only the intended slave will act on the received command.
 

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
A5-A0 are slave device address pins. You can have as many as 62 slave devices.
On a generic production board, A5-A0 can be wired to DIP switches or PCB jumpers so that each board can be configured for a specific slave address.

Each slave will now have a unique physical address. The I2C data command includes a slave address so that only the intended slave will act on the received command.
What are DIP switches?
And how can I make like 4 PCA9685 modules in the bus, how do i connect that?
By the way, I don't need pull up resistors on SDA and SCL right in my schematic?
 
Last edited:

MrChips

Joined Oct 2, 2009
34,806
DIP stands for Dual In-line Package. They fit on 0.3" width IC spacing on a PCB.

Examples of DIP switches
1721155950414.png

Get I2C communications working firstly with one PCA9685 before moving on to multiple devices.
 

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
Pull-up resistor value is not critical. 10k - 100kΩ will work for CMOS inputs.
Can i just connect the Pull-up resistors to my powersupply (so the arduino 3,3V)
And do I need pull-up resistors for every extra PCA9685 module?

I've got this schematic so far, how does it look:
1721157452096.png
 

MrChips

Joined Oct 2, 2009
34,806
Can i just connect the Pull-up resistors to my powersupply (so the arduino 3,3V)
And do I need pull-up resistors for every extra PCA9685 module?

I've got this schematic so far, how does it look:
View attachment 327083
Sorry, when you asked about pull-up resistors I thought that you were referring to the A5-A0 address select inputs.
For I2C SDA and SCL signals, you need to check for the recommended values. I don't have time to check this now.
No, you do not need pull-ups at every I2C device. I2C is a network and it requires the proper resistor for the whole network.
 

MrChips

Joined Oct 2, 2009
34,806
For I2C networks, the value of the pull-up resistor will depend on a number of factors, primarily, clock frequency, line capacitance, cable length, number of devices, supply voltage, power consumption. Typical resistance values range from 1kΩ to 10kΩ.

This article gives a specific example and arrives at a value of 1kΩ.

https://www.ti.com/lit/an/slva689/slva689.pdf
 

Thread Starter

Rensieboy223

Joined Feb 3, 2024
88
For I2C networks, the value of the pull-up resistor will depend on a number of factors, primarily, clock frequency, line capacitance, cable length, number of devices, supply voltage, power consumption. Typical resistance values range from 1kΩ to 10kΩ.

This article gives a specific example and arrives at a value of 1kΩ.

https://www.ti.com/lit/an/slva689/slva689.pdf
Thanks man, I think indeed a simple 10K ohm resistor will do. Do I need a level shifter when using the arduino Giga and the shown below chip with the setup?:
1721633018924.png
 
Top