![]() |
![]() |
![]() |
|
|
|||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Hello,
I am trying to build a circuit to convert a PWM signal into a DC voltage that correspond to the duty cycle of the PWM signal. I am not sure how to chose the optimal values for R and C depending on the frequency. is there a relation i can use to approximately find suitable values for R and C I found this page on wiki, i think my answer may reside inside.. http://en.wikipedia.org/wiki/RC_circ...considerations or maybe you can provide me with the info i need.. that would be very kind of you guys! a smal explanation would be a plus! thx a lot EDIT: After further readings on the web, maybe the right question to ask is: Do i have to build my RC circuit so that it's central frequency match the one of the PWM signal? EDIT 2: No i think i am wrong, accoding to this page http://ontrak.net/pwm.htm the frequency of the PWM is much more important than the banpass frequency of the filter.... Last edited by ikalogic; 25th October 2007 at 12:00 PM. |
|
|
|
|
|
|
(permalink) |
|
Higher frequency will allow you to use smaller caps and still get good filtering. Common frequencies are 20khz-100khz. If you use too large of a resistor/cap combination the repsonce will be slugish when the duty cycle changes. You want to find the best value that will provide a low rippple but enough responce so you can change the signal at your desired rate.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." |
|
|
|
|
|
|
(permalink) | |
|
Quote:
now is there a way to calculate it rather than finding it by trial an error? |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Just as important is the load impedence of the circuit that is going to measure or see the output of the L/C low pass filter, it needs to be a much higher impedenace to not effect the true DC value. OP amp buffer stages are often used in that application. Lefty
__________________
Measurement changes behavior |
||
|
|
|
|
|
(permalink) |
|
Check the MicroChip application notes, if I recall correctly, there are two explaining just what you want!.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
http://ww1.microchip.com/downloads/e...tes/00823a.pdf but it does'nt have what i search.. can you assist me further more? thx |
||
|
|
|
|
|
(permalink) |
|
Attached is a circuit I designed and built for a friend some years ago. The purpose and circuit description are included in the attachment.
It includes a PWM to DC conversion, see Figure 2. It works at the mains frequency (50 Hz) but it could be altered for other frequencies. Signals A & B are PWM signals whose mark/space ratios are proportional to the phase differences. These signals are converted to "DC" by the averaging circuits around IC6a & IC6b. See the description for more detail.
__________________
Len |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) | |
|
Quote:
Thank you very much. |
||
|
|
|
|
|
(permalink) |
|
hello.. it's me again..
after reading the pdf proposed by Nigel Goodwin, i understood how to chose the right frequency for my PWM signals with regard to the bandwidth of my orriginal signal... however i dont quite understand why... Let me put it this way: according to that PDF by microchip, i have to design the RC filter with a cut-off frequency equal to the frequency of the orriginal signal. i guess this is the way to get the best response/filtering ratio, right? Then, what i really don't get, the PWM signal is chosen to have 5 times the frequency of the orriginal signal, why? how pwm signals having a frequency 5 times higher than the cut-off frequency pass through the filter?? can anyone explain it to me in a simple way? |
|
|
|
|
|
|
(permalink) |
|
The PWM frequency doesn't pass through the filter, that's the whole point!, the filter is there to remove it.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
thanks again Nigel. |
||
|
|
|
|
|
(permalink) |
|
The word 'filter' might cause a bit of confusion. A filter that we might use in a water line traps the particles and at some point the particles are discarded with the filter cartridge (or flushed) - the important thing is that they do not reappear in any form downstream.
A simplification that might help to clear things up: some or all of the components of a filter, such as capacitors and inductors, serve to store energy. In the case of the RC filter the 'C' stores energy that is returned to the output. In the case of the PWM the 'C' fills in the off time - so unlike the water filter example the energy that is trapped, in a manner of speaking, does appear downstream at a slightly different time. Current flow thru the 'R' does dissapate some energy so it's not returned.
__________________
stevez |
|
|
|
|
|
|
(permalink) |
|
I get the feeling that just confuses the issue further?.
|
|
|
|
|
|
|
(permalink) |
|
Nigel - not sure, it all depends on where the original poster is at. What I described helped me sort some things out with a young man who is now my mentor (for electronics anyway). As a mechanical engineer I was visualizing a PWM signal on the input - with even more gaps or holes on the output because I was stuck on the idea that the filter only removed energy as a mechanical filter would remove particles. From my point of view the filter, in the PWM case, serves to move the energy around over time rather than just trapping and discarding.
__________________
stevez |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Can you help me for Isolated DC to DC | gbmewada | General Electronics Chat | 7 | 15th October 2007 07:00 AM |
| Help: Mains Powered DC Motor | bobledoux | Electronic Projects Design/Ideas/Reviews | 4 | 10th October 2007 09:30 PM |
| PWM control of BLDC motors (brushless DC motors) | jhanus | Micro Controllers | 6 | 1st October 2007 04:32 PM |
| Writing measured voltages to LCD | Tamil.selvam | Micro Controllers | 1 | 5th September 2006 11:47 AM |
| Practically converting AC voltages | Scubasteve | Electronic Projects Design/Ideas/Reviews | 5 | 9th April 2003 01:05 PM |