Page 1 of 1
Low frequency using PWM
Posted: Mon Jul 09, 2012 5:28 pm
by Xavier
H Guys
I was wondering is it possible to have the period of the PWM to run from 50ms up to 100ms ? Should this be the case could you tell me how should I go about it. I'm afraid that I have not used the PWM yet and am at a total loss.
All the best
Xavier
Re: Low frequency using PWM
Posted: Mon Jul 09, 2012 5:47 pm
by brandonb
does it matter if its delay based rather than tmr based?
Re: Low frequency using PWM
Posted: Mon Jul 09, 2012 8:48 pm
by Xavier
Hi Brandonb
No it does not matter at all.
All the best
Xavier
Re: Low frequency using PWM
Posted: Tue Jul 10, 2012 5:33 am
by brandonb
this is a hack concept i came up with, its delay based.... default time period is 200ms... switches from left to right... (1)increment pwm% (2)decrement pwm% (3)increase frequency (4)decrease frequency..... if this is what your looking for, i can change it to reflect your needs, i think jan came up with a timer based version that would work better, not sure if it goes this low of a frequency though
Re: Low frequency using PWM
Posted: Tue Jul 10, 2012 7:15 am
by Xavier
Thanks Brandonb
I will toy with the idea and see what I can come up with. There was one more thing that I wanted to ask. I know that it's possible to make a sine wave is there an example that I could have a look at that you know off?
All the best
Xavier
Re: Low frequency using PWM
Posted: Wed Jul 11, 2012 3:07 am
by brandonb
I know that it's possible to make a sine wave is there an example that I could have a look at that you know off?
what kind of application? you could use a ccp pwm module to do something like in the referance sheet below, i have a bunch of ccp pwms for different frequencies, or are you just trying to create a frequency and just make it a sine wave
Re: Low frequency using PWM
Posted: Wed Jul 11, 2012 7:18 am
by Xavier
Hi Brandonb
The sine wave would be used for a VLF metal detector. At first I will make it using only one frequency of 4Khz but the goal is the have it running at a multitude of frequencies lest just say for argument sake 4Khz 8Khz and 16Khz. I don't know if you have had to deal with metal detectors but basically the 4Khz would be for depth and the higher frequencies for smaller non ferrous items closer to the surface. My previous question about PWM is for a PI detector hence the reason why I'm after such a slow period but that has already been solved even though new problems have arise but I'm having fun trying to solve them by my self up till now LOL Thanks for posting the PDF I will be taking a closer look at it.
All the best
Xavier