Pages: 1 [2]   Go Down
Author Topic: PWM control of many LED's from arduino  (Read 2275 times)
0 Members and 1 Guest are viewing this topic.
California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I like shiftPWM for when I need the rest of my arduino pins but you are likely to get the same results as softPWM if not worse.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't see in the first picture clearly due to the glare, but the pin below the "0" on the chip labeled "1360", the ZXLD1360, should be floating (soldered to a pad that goes nowhere) currently. Wire the bulb with +12V and GND, then connect to that pin through a resistor (~10K) and to a PWM output on the Arduino. Voila.

Good detective work, however the datasheet says that for PWM use, the ADJ pin should be driven from an open-collector or open-drain output.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 587
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah right so maybe instead of PWM'ing I would be better off trying to mod the IC's? What is a open collector or open drain output and how would I connect one?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To drive it from an open-collector output, use a small signal NPN transistor. Connect the emitter to ground, base to the Arduino PWM pin through a resistor (10K will do in this case), and collector to the ADJ pin of the IC. The IC and the Arduino need to have a common ground. You may need to bypass the bridge rectifier to achieve this.

Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 587
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks DC I will think about trying that. What kind of signal transistor should I use? Although it will be bit of work and I would have to run 3 cables to each bulb instead of just two.

I'm now testing with a TLC which should have a fast PWM rate. If I can't notice the LED's flashing should I just stick with that or is it likely to damage the drivers in the bulbs?
Logged

Pages: 1 [2]   Go Up
Jump to: