Looking for programable low freq PWM chip

Thread Starter

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.
 

Thread Starter

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
2,567
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.
 

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
9,403
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;
}
16f pwm_sw.PNG
 

Thread Starter

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.
 

ian field

Joined Oct 27, 2012
6,539
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.
 

jpanhalt

Joined Jan 18, 2008
9,403
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:
upload_2016-7-10_5-48-8.png

2) Moreover, the serial communication may be severely limited to about 50 baud:
upload_2016-7-10_5-51-12.png

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,539
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:
Top