Go Down

Topic: PWM cable lenght (Read 9389 times) previous topic - next topic

raschemmel

#15
Dec 24, 2015, 12:42 am Last Edit: Dec 24, 2015, 12:42 am by raschemmel
I use these.

You can send a 5V signal 4000 FEET (3/4 MILE)

Wawa

I think it's best if OP draws up a diagram, so it can be checked.
Cat-6 (or Cat-5), cable resistance and capacitance have to be taken in account.
e.g when a PWM pin will be driving LED, it's wise to have the current limiting resistor on the Arduino side.
So the Arduino pin does not drive the cable capacitance.

If it was me I would use two PCA9685 boards where the lights are, and have 32channels available there.
Could also be less wiring.
Leo..

raschemmel

Quote
driver goes up to 1MHz (datasheet).
 
I don't see how this is relevant when driving leds. Standard video minimum is 26 frames per second.
Recent technology has gone from 60hz to 240 hz, None of these require 1 Mhz for pwm. The human eye can only distinquish so much. What good does 1 Mhz do you ? Do you have a 1000 leds you need to pwm ?

Wawa

#18
Dec 24, 2015, 02:57 am Last Edit: Dec 24, 2015, 03:08 am by Wawa
1Mhz is the max I2C data transfer rate.
That short data burst sets the 16 PWM registers.

PCA9685 has a default PWM frequency of 200hz. Perfect for 12-bit PWM.

Default I2C data rate is 100khz.
At that rate, and with the right value pullup resistors, Fm+ bus (wire) capacitance can be 4000pF.
AFAIK the original I2C standard was 3mA/400pF.
Leo..

raschemmel

#19
Dec 24, 2015, 03:10 am Last Edit: Dec 24, 2015, 03:19 am by raschemmel
I'm not seeing how I2C got in the discussion. I looked at the datasheet and see the "DIM" input but didn't see any reference to I2C nor any SDA & SCL pins on the driver. So why are you talking about I2C ?
What did I miss ?

FYI,
I know the PCA9685 is I2C but how does that help ? It doesn't OUTPUT PWM. It PWMs the LED loads (16 of them). So if the  reference to 1 Mhz is in reference to the PCA9685, and the OP is not driving 1000 leds with 63 PCA9685s, how would the 1 Mhz capability be in any way relevant to the OP's application ?

With 63 PCA9685s, using the 1 Mhz frequency, that would allow over 15 khz /PER PCA9685.
PWMing LEDS with anything over 200 hz is pointless. The human eye will not distinguish the changes.

Wawa

Post#0 already mentioned the use of a PCA9685.
OP asked in post#9 for the baud rate.
Question about I2C being out of spec in Post#13 was answered with the Fm+ specs (here the 1Mhz popped up).

The chip does output a PWM signal, much like the Arduino PWM pins, with source and sink capabilities.
PWM frequency can be set between 40 and 1000hz, but defaults to 200hz on power-up.

1Mhz bus speed is not relevant to OP's project. Most I2C libraries I know default to 100khz.
I2C speed can be important e.g. for fast dimming.
Every dim step has to be written to the chip.
Leo..

raschemmel

Quote
The PCA9685 is an I2C-bus controlled 16-channel LED controller optimized for
Red/Green/Blue/Amber (RGBA) color backlighting applications. Each LED output has its
own 12-bit resolution (4096 steps) fixed frequency individual PWM controller that operates
at a programmable frequency from a typical of 24 Hz to 1526 Hz with a duty cycle that is
adjustable from 0 % to 100 % to allow the LED to be set to a specific brightness value.
All outputs are set to the same PWM frequency.
Each LED output can be off or on (no PWM control), or set at its individual PWM controller
value. The LED output driver is programmed to be either open-drain with a 25 mA current
sink capability at 5 V or totem pole with a 25 mA sink, 10 mA source capability at 5 V 
The source capability is only 10mA. I suppose that's more than enough for the led driver he linked.

Is he using this ?

MrGlasspoole

#22
Dec 24, 2015, 04:24 am Last Edit: Dec 24, 2015, 04:26 am by MrGlasspoole
The PCA9685 is in the new Fast-mode Plus (Fm+) family.
Ok, did not know there are different standards for I2C cause normally I2C is short distance and thats the reason things like P82B96 exist.

Thats is what i found:
Quote
Shielded 22 AWG twisted pair cables have capacitance in the range of 100-240 pF/m. So the maximum bus length of an I2C link is about 1 meter at 100 Kbaud, or 10 meters at 10 Kbaud. Unshielded cable typically has much less capacitance, but should only be used within an otherwise shielded enclosure.
AND NOW ATTENTION PLEASE
Stop mixing the I2C question with the question about cable length to drive LEDs directly via PWM from the Arduino.

If it was me I would use two PCA9685 boards where the lights are, and have 32channels available there.
Sure but then i use only 2 pins on the Arduino and the others are wasted.
And then i have the situation that brought up my question: I need to put the PCA9685 in a location where it is not accessible.

From a craftsman view (me) who has to lay the cables the ideal solution would be:

PT4115 > 3 meters 16AWG > LED (9.75V/1A)
Arduino > 4 meters CAT6 > 6x LED (3.2V/20mA)
PCA9685 > 4 meters CAT6 > 14x LED (3.2V/20mA)

Wawa

#23
Dec 24, 2015, 05:47 am Last Edit: Dec 24, 2015, 07:38 am by Wawa
The source capability is only 10mA. I suppose that's more than enough for the led driver he linked.
The PT4115 LED driver OP linked to has a 200k pullup resistor to the LED driver's own 5volt rail.
So the LED driver only uses a sink current of 25uA. Nothing.

OP should use the larger sink capability of the PCA9685, so all LED anodes to 5volt.

Posting a diagram could prevent mistakes.
You should look at a piece of cable as a part with resistance and capacitance.
Where that part is in the circuit could be important.
Leo..

MrGlasspoole

#24
Dec 24, 2015, 10:59 am Last Edit: Dec 24, 2015, 11:08 am by MrGlasspoole
Just to be clear: The PT4115 has nothing to do with the PCA9685.
The PT4115 question is already answered.

Schematic in the attachment...

Wawa

Why the relay/drivers.
A single 10k resistor from each PT4115 DIM to ground does the same (or 3k3 for all).
A PT4115 draws <100uA when dimmed to zero.
Why not drive them from three separate PWM outputs.
Why two MCUs.

Drawing mistake in the 12volt detector circuit.
Leo..
 


MrGlasspoole

#26
Dec 24, 2015, 01:54 pm Last Edit: Dec 24, 2015, 02:00 pm by MrGlasspoole
<100uA is not nothing. I prefer to have a real switch. Here some mA and there some mA and the power bill crows. Everywhere it is recommended to turn your stuff really off because of standby power consumption, unplug your chargers...

Often you can read in forums that people laugh about others why they think about the power consumption of there hard drives. But the people who are laughing think the electricity price is everywhere the same.
In Germany electricity is not cheap...
Electricity costs in Germany is like Hawaii and is rising...

Two MCUs because this are two different applications.
Also I'm not a programming god and scared the code will not fit on one.

Why not drive them from three separate PWM outputs.
Something i did not think about because they all get the same PWM.
Also i see no benefit driving them separately.

aarg

You are joking, right? You think you could see 100uA on your electricity bill? Do the math.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

MrGlasspoole

#28
Dec 24, 2015, 06:42 pm Last Edit: Dec 24, 2015, 07:08 pm by MrGlasspoole
Sorry was reading/thinking mA.

Hm, somehow I'm old school and don't feel good if the connection is not really cut *lol

My head is still thinking analog most of the time and i tend to overcomplicate.
But hey if you guys say i don't need the relays i remove them -> attachment

D10 and D11 are connected to read the dimming level (PWM feedback).

Wawa

Running one MCU could save the most power.
Programming two sequences into one MCU is not that hard, and there is plenty of help here.
Using Cat-6 for the Cree LEDs could also save you some money for power. 1.5mm for <1Amp is overkill.

Why did you connect D10 and D11 to the LED drivers.
One ~500hz PWM pin is enough.
Leo..

Go Up