Recommendations please – I2C or SPI controlled 2 channel 12 bit PWM driver - Page 1
Forum section: electronics / beginners

author: Mr.B
author_rank: Unknown
timestamp: June 30, 2014, 04:20:07 am
content: Hi all,I don’t know if this is the appropriate place to post this…I have recently been working with the NXP PCA9685, an I2C controlled 16 channel 12 bit PWM driver.They are relatively cheap and easy to implement.A design I am currently working on requires only 2 channels and the board needs to be fairly small. The PCA9685 is a bit of overkill with its 16 channels, and a bit physically large (TSSOP-28).Can anyone recommend an I2C controlled 2 channel 12 bit (or more) PWM driver in a small SMD package?I have hunted through Mouser search and cannot find anything suitable.The device will be controlled by an ATmega328p-au, so the comms to the PWM chip can be either I2C or SPI.Background to the design: ATmega328p-au, nRF24L01 radio, PWM driver, Power MOSFET x 2.Forms the basis for a receiver module for dimmer control of 12vdc LED strip.Transmitter/Controller yet to be designed.Thanks in advance for any help.

author: Kremmen
author_rank: Super Contributor
timestamp: June 30, 2014, 04:43:37 am
content: Any reason why you can't do it directly from the MCU? The 328 has 6 pwm channels built in.

author: Mr.B
author_rank: Unknown
timestamp: June 30, 2014, 04:56:49 am
content: They are only 8 bit.The first 20 or so steps of fade up look terrible.Particularly if you are doing a slow fade - 0 to 100% over 10 seconds.Thanks for your response anyway.

author: PedroDaGr8
author_rank: Super Contributor
timestamp: June 30, 2014, 05:14:48 am
content: Quote from: Mr.B on June 30, 2014, 04:56:49 amWhat about the TLC5973. I just saw it mentioned in another thread.

author: Mr.B
author_rank: Unknown
timestamp: June 30, 2014, 05:28:45 am
content: Thanks for that.I will have a good look through the data sheet tonight.Cheers

author: Kjelt
author_rank: Super Contributor
timestamp: June 30, 2014, 08:32:38 am
content: In the same family there are also serial controlled devices (the TLC5973 is one wire protocol) like the TLC5970 which besides the 12 bit PWM has an additional 8 bit analog dimming.Edit: The package of the TLC5970 does not meet your requirements

author: Jeroen3
author_rank: Super Contributor
timestamp: June 30, 2014, 09:45:01 am
content: QuoteWhats wrong with timer/counter 2?And you need a log function pwm to get linear brightness for your eyes.

author: Kjelt
author_rank: Super Contributor
timestamp: June 30, 2014, 09:48:17 am
content: or a LUT a bit more costly but fast and precise.

author: miceuz
author_rank: Frequent Contributor
timestamp: June 30, 2014, 10:24:12 am
content: What if you just slap in another micro that has two PWM channels on 16bit timer? I guess you can find a lot sot23-6 packaged micros from Microchip or Atmel to do that.PCA9685 is an interesting part though, shame didn't stumble on it a while ago when I was looking for something like that, almost was going to do my own CPLD solution for that, luckily, the project didn't fly.

author: Jeroen3
author_rank: Super Contributor
timestamp: June 30, 2014, 12:26:49 pm
content: Great idea, keep rising the bill of material costs.

author: katzohki
author_rank: Frequent Contributor
timestamp: June 30, 2014, 04:29:45 pm
content: This is an app note from Micro, but the concept applies to any micro you would want to use. Might give you inspiration?http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en560120

author: filip_cro
author_rank: Regular Contributor
timestamp: June 30, 2014, 06:46:04 pm
content: You can use 2 channel PWM on OCR1A and OCR1B.

author: Mr.B
author_rank: Unknown
timestamp: June 30, 2014, 08:26:21 pm
content: Many thanks for all your input.It looks to me like the TLC5973 will do the job nicely.@katzohkiThanks for the link. I will need to upskill myself on micros a bit more before I was to jump in to that.However, the effort would be well worth it.

author: Mr.B
author_rank: Unknown
timestamp: July 02, 2014, 04:46:54 am
content: Quote from: filip_cro on June 30, 2014, 06:46:04 pmThanks for that suggestion.After a bit more research it appears that I should be able to implement it within the MCU.http://arduino.cc/en/Tutorial/SecretsOfArduinoPWMI haven't read the full article yet... Looks like Saturday will be spent working through this.