Re: PWM signal detection
Dear sir
I believe PIC microcontrollers with a 'CCP' module can perform that task. It stands for 'capture, compare, PWM'. It can be used to generate PWM, or analyse the duty cycle of external signals (ie: measure your incoming PWM). I'm just starting to realise the applications for this, it relaly is quite useful. ALso, there are many PIC devices that have this peripheral, and they're cheap
You could use it to accurately measure the
period of the PWM signal, and then, as long as the period remains constant, you then use this value to measure the duty cycle (ie: ON time).
Or....you could read in software. If you know for a fact that the PWM signal is 160Hz, and fixed. Then its just a case of using timers, with the appropriate pre/post scalers.
Example: Wait for 'rising edge'. Then start timer, wait for falling edge. stop the timer. THis will give you 'how long' the ON time was. Because you know the period, you can now calculate the PWM. Its thena case of using the PIC's CCP module to produce a new PWN signal, at 240Hz.
It sounds really complicated, but taken in stages, it shouldn't be that hard. And...there are many ways to do, some using dedicated hardware, or all in software. Thankfully..the signals you are dealing with a fairly low frequency. If you wish to use a microcontroller JUST for this task, its easy
Hope this helps in 'some' way.
BuriedCode.