PWM using controller

Thread Starter

RenesasT1

Joined Jul 6, 2017
107
I have tried R=1k and C=47uF
R=4.7k and 69uF

here I got good dc o/p for 100Hz(80% duty).

The values are too high.
I am worried if I change the frequency then again fluctuations came then what I do?

Also the o/p I am getting is 3.6V. It is very less.

Please suggest
 

jayanthd

Joined Jul 4, 2015
945
I have tried R=1k and C=47uF
R=4.7k and 69uF

here I got good dc o/p for 100Hz(80% duty).

The values are too high.
I am worried if I change the frequency then again fluctuations came then what I do?

Also the o/p I am getting is 3.6V. It is very less.

Please suggest
Why do you think 3.6V is less ? It can be read with a 10-bit adc and if there is fluctuation of lsb then can you shift the adc result 1 or 2 bits to right and see if that helps.
 

Thread Starter

RenesasT1

Joined Jul 6, 2017
107
I wanted at least 4.8V for my project.

This pairs are not giving fluctuations for 100Hz 88% duty.

Suppose they give fluctuations at other duty then ?
 

jayanthd

Joined Jul 4, 2015
945
I wanted at least 4.8V for my project.
Reason ?

This pairs are not giving fluctuations for 100Hz 88% duty.

Suppose they give fluctuations at other duty then ?
Don't have Proteus to test ? I will test it in Proteus and provide the results. What values are you using for R and C ?

Are you not able to scale the 3.6V to pwm duty. If voltage is less can't you shift the adc result 1 bit left ?
 

jayanthd

Joined Jul 4, 2015
945
Cost saving and smaller. Also wanted to save PCB spacing.
You can very well use SMD version of PIC12F1840 (8 pin PIC) for your purpose. SMD version for production and DIP version for breadboard testing.

If you can use PIC18F46K22 then I will provide you a code.
 

jayanthd

Joined Jul 4, 2015
945
Please share the code. I will order for the samples.
Ok. Did you decide the R and C values ?

My code will use mikroC PRO PIC ADC and PWM libraries. You cannot use it for AVR.

To scale the adc reading to pwm duty I need to know the adc input voltage you are getting for different PWM frequency and duties.
 
Last edited:
Top