Looking for programable low freq PWM chip

Duxthe1

Joined Sep 27, 2008
9
I'm looking for a chip that can output a low freq, ~10 hz, pwm signal that I can control with a microcontroller via serial or similar. I've tried to search but "PWM" is a keyword that's too common to be useful. Its a control signal only so current handling isn't an issue. Prefer thru hole but not opposed to SMT if it can do what I need. I'm sure a part like this exists but I don't know how to find it. Any help appreciated.

Lestraveled

Joined May 19, 2014
1,946
Why don't you use your microcontroller to generate the PWM signal? That is a very easy task.

Duxthe1

Joined Sep 27, 2008
9
My microcontroller will have to bit bang such a low freq PWM. I'd prefer it monitor the inputs and do the calculations and only have to serial out a byte (or so) to a dedicated PWM chip which will always need to output a signal, even for "off".

GopherT

Joined Nov 23, 2012
8,012
My microcontroller will have to bit bang such a low freq PWM. I'd prefer it monitor the inputs and do the calculations and only have to serial out a byte (or so) to a dedicated PWM chip which will always need to output a signal, even for "off".
What microcontroller frequency do you need? If you can live with 100kHz Microcontroller speed, a 1:16 prescaler setting will allow 10Hz - assuming a PIC or a chip with similar abilities.

Last edited:

Sensacell

Joined Jun 19, 2012
3,011
This chip will not exist, there is no market need for such a thing- people make chips to make money.
Do it in software, as suggested. If your PWM frequency is only 10 Hz, the timing jitter resulting from the MCU doing other tasks could be insignificant, if you code it correctly.

benta

Joined Dec 7, 2015
101
The CDP68HC68W1 will do what you want, but it's a very old part and may not be available any more.

Benta.

atferrari

Joined Jan 6, 2004
4,632
How precise those 10 Hz have to be?

Are you sure you cannot select a micro with a built in PWM peripheral?

dannyf

Joined Sep 13, 2015
2,197
There are a few pwm chips, from NXP, ti, or WS. But they don't go down to that low of a frequency.

A more realistic solution is to code a mcu as a dedicated pwm controller. Assuming that you aren't looking for super high resokytuin, 10hz is doable even for a slow MCU.

jpanhalt

Joined Jan 18, 2008
11,088
I favor the microcontroller approach that has been mentioned, since you want to control the PWM with a serial link. You can run many chips at 32kHz and lower. If you take a chip with built in PWM (e.g., 12F1840), you will have built in serial (MSSP and EUSART) and PWM functions. Just use a watch crystal for your system clock. You can go even go slower. At 32.768 kHz , Tcy will be 8192 Hz (122 us) Your baud maximum rate will slower that 9600, but still usable.

John

dannyf

Joined Sep 13, 2015
2,197
To show how you could do it via a mcu, I repurposed this little piece of code I wrote (4-ch of pwm for motor speed controllers and 2-ch of pwm for leds) to deliver 9 channels of pwm (two of which are complimentary: RC0 / RC5, and RA2 / RA5). ~100ms period, 7+bits of resolution (can be higher). On a 1MIPS PIC, it takes less than 100KIPS to run the code (all in a isr).

Here is the entirely of the main loop.

Code:
void main(void) {
mcu_init();                            //reset the mcu
//IO_OUT(LED_DDR, LED);
pwm1_init(TMR1PS_2x);               //initialize the pwm1 module
pwm1_setdc(_pwm_pr/10 * 1);           //set up duty cycle
pwm2_setdc(_pwm_pr/10 * 2);           //set up duty cycle
pwm3_setdc(_pwm_pr/10 * 3);           //set up duty cycle
pwm4_setdc(_pwm_pr/10 * 4);           //set up duty cycle
pwm5_setdc(_pwm_pr/10 * 5);           //set up duty cycle
pwm6_setdc(_pwm_pr/10 * 6);           //set up duty cycle
pwm7_setdc(_pwm_pr/10 * 7);           //set up duty cycle
pwm8_setdc(_pwm_pr/10 * 8);           //set up duty cycle
pwm9_setdc(_pwm_pr/10 * 9);           //set up duty cycle
ei();
while (1) {
//IO_FLP(LED_PORT, LED);
}
return;
}

Duxthe1

Joined Sep 27, 2008
9
Benta, I checked out the datasheet on that chip and it is exactly what I'm looking for. Thanks a million. There are literally a couple on Ebay right now from international sellers.

I appreciate all of the replies, thank you guys. For this project its a better solution to serial the data into the chip and not worry about the PWM output again until the code requests a change in PWM.

JWHassler

Joined Sep 25, 2013
294
Out of curiosity, what is the application for such a low PWM frequency?

ian field

Joined Oct 27, 2012
6,536
I'm looking for a chip that can output a low freq, ~10 hz, pwm signal that I can control with a microcontroller via serial or similar. I've tried to search but "PWM" is a keyword that's too common to be useful. Its a control signal only so current handling isn't an issue. Prefer thru hole but not opposed to SMT if it can do what I need. I'm sure a part like this exists but I don't know how to find it. Any help appreciated.
DDS is the alternative to using a PIC/AVR with PWM outputs.

benta

Joined Dec 7, 2015
101
Duxthe1, glad to help.
When I read your post I was reminded of a similar project some 20 years ago, so the device popped into my mind, though it is not well known.

Good luck with your project.

Benta.

Duxthe1

Joined Sep 27, 2008
9
Out of curiosity, what is the application for such a low PWM frequency?
It's just a control signal going to a motor speed controller.

atferrari

Joined Jan 6, 2004
4,632
Maybe PIC 18F4431, designed precisely for motor control. All you need, and more.

jpanhalt

Joined Jan 18, 2008
11,088
There are probably details in the datasheet for the CDP68HC68W1 chip that I missed, but two aspects stand out:
1) With an expected PWM frequency of 10 Hz, the clock frequency (input) to the chip will be limited to 5100 Hz:

2) Moreover, the serial communication may be severely limited to about 50 baud:

Neither of those specifications provides an advantage over any of the MCU chips that have been mentioned. For example, a 12F1840 with a system clock of 170 kHz will allow 10-bit PWM resolution at 10 Hz. An estimate of the maximum baud rate for serial communication is 600 baud.

There is often a reason that chips are obsoleted and become very expensive at secondary sources.

John

ian field

Joined Oct 27, 2012
6,536
Maybe PIC 18F4431, designed precisely for motor control. All you need, and more.
A real simple route is to use an SMPSU control chip and drive the PWM control with an analogue level via a DAC.

That on its own isn't programmable like the TS asked, but the DAC can be driven by an MPU or some simple "glue logic".

The SMPSU chip has to be chosen carefully because many have UVLO - for example; the UC 384x family come in two UVLO ratings, the lowest of which is somewhere around 9V or so.

benta

Joined Dec 7, 2015
101
There are probably details in the datasheet for the CDP68HC68W1 chip that I missed, but two aspects stand out:
1) With an expected PWM frequency of 10 Hz, the clock frequency (input) to the chip will be limited to 5100 Hz:
View attachment 108948

2) Moreover, the serial communication may be severely limited to about 50 baud:
View attachment 108949

Neither of those specifications provides an advantage over any of the MCU chips that have been mentioned. For example, a 12F1840 with a system clock of 170 kHz will allow 10-bit PWM resolution at 10 Hz. An estimate of the maximum baud rate for serial communication is 600 baud.

There is often a reason that chips are obsoleted and become very expensive at secondary sources.

John
1: Generating a clock signal of 5100 Hz will probably speak straight to the hearts of the 555 fans on this site:

2: This is not true. There is no relationship between the CLK signal (for the PWM) and the SCK signal for the serial interface. You can run the SPI at 1 MHz if you like with no consequences for the PWM. Please read the datasheet carefully.

Benta.

Last edited:

jpanhalt

Joined Jan 18, 2008
11,088
My apologies, I missed the SCK part in my brief read.

John