Author Topic: Filtering PWM to smooth DC  (Read 23977 times)

0 Members and 1 Guest are viewing this topic.

Offline RapseyTopic starter

  • Contributor
  • Posts: 25
  • Country: be
Re: Filtering PWM to smooth DC
« Reply #50 on: September 30, 2018, 04:32:13 pm »
It means pulling to GND as well, not leaving open circuit.
Sorry, I still don't get it. I thought my last 2 circuits were closed. I only put the GND in because LTSpice requires it.

It sounds like a really fun discussion but are you sure you're not going a little OTT just to stop a fan whining?  :)

Presumably the PWM changes in response to some kind of temperature sensing, so as long as the fan control range is able to keep up, then is there a problem?

Just asking.  :)
On the contrary, I'm sure I'm going completely over the top. At this point it's mostly just a fun learning exercise.  ;)

The PWM doesn't actually adjust to temperature, it's purely software-controlled and it can be configured at will. This is the part cooling fan of a 3D printer, it blows air over the molten filament exiting the nozzle.

A common example would be to print the bottom layer with no cooling to improve adhesion to the print bed. After that you would use a middle-of-the-road fan speed depending on the temperature you're printing at and the material you're using. The bottom few dozen layers would still be printed at a higher fan speed to compensate for their proximity to the heated bed. If there is any bridging in your model you would use 100% fan speed for those lines because the faster they cool and become solid, the less hanging there will be. So yea, it varies throughout the print.

The bottom line is that pretty much the entire spectrum of the speed control gets used, and that most of the time you're not running at 100% which means the whining noise is always there. It doesn't matter what the duty cycle is, the noise is caused by the PWM frequency so it makes a constant ~500Hz tone at any speed below 100%. Not ideal to have next to your bedroom during a 24h+ long print.
 
The following users thanked this post: Gyro

Online wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: Filtering PWM to smooth DC
« Reply #51 on: September 30, 2018, 05:01:24 pm »
It means pulling to GND as well, not leaving open circuit.
Sorry, I still don't get it. I thought my last 2 circuits were closed. I only put the GND in because LTSpice requires it.
Your last 2 circuits are LC. What I mean is that you both charge and discharge the capacitor through resistor. If there is no any significant load at the output, like when controlling IC as you mentioned, output voltage will be completely proportional to PWM duty cycle.

 

Offline RapseyTopic starter

  • Contributor
  • Posts: 25
  • Country: be
Re: Filtering PWM to smooth DC
« Reply #52 on: September 30, 2018, 07:29:43 pm »
Aha, I think I get what you're saying now. But then you do need something to switch that GND discharge on & off inversely to the PWM duty cycle. I've used another one of these conditional resistors to simulate it here, not sure which solution would be best for that.





EDIT: In hindsight, better to use a much smaller capacitor and a much larger resistor. (plot remains the same)

« Last Edit: September 30, 2018, 07:38:09 pm by Rapsey »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Filtering PWM to smooth DC
« Reply #53 on: October 01, 2018, 08:10:52 am »
Aha, I think I get what you're saying now. But then you do need something to switch that GND discharge on & off inversely to the PWM duty cycle. I've used another one of these conditional resistors to simulate it here, not sure which solution would be best for that.
To make it shorting, simply remove the Rsw component. The default behaviour of the pulsed voltage source is shorting and Rsw was added to make it non-shorting. Unfortunately this will not model your circuit correctly, which will just be a single transistor in series with the fan, which leaves it open circuit, when off. Another transistor will need to be added to short the output, when the input goes low.
 

Offline RapseyTopic starter

  • Contributor
  • Posts: 25
  • Country: be
Re: Filtering PWM to smooth DC
« Reply #54 on: October 01, 2018, 05:19:16 pm »
I also came across this article which offers a more complex circuit to convert PWM to linear voltage to reduce acoustic noise. I'm still trying to wrap my head around it. It's interesting that he was able to do it without resorting to large capacitors even though his PWM frequency is a measly 93.5Hz. I'm not sure why he inverted the output though (100% PWM = 0V), that's something I could do without.

 

Online wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: Filtering PWM to smooth DC
« Reply #55 on: October 01, 2018, 06:09:12 pm »
I also came across this article which offers a more complex circuit to convert PWM to linear voltage to reduce acoustic noise. I'm still trying to wrap my head around it. It's interesting that he was able to do it without resorting to large capacitors even though his PWM frequency is a measly 93.5Hz. I'm not sure why he inverted the output though (100% PWM = 0V), that's something I could do without.
This is what I was suggesting. Convert PWM to DC for control and go linear. In your case you can do it simpler. You don't have tachometric output from the fan so you can control voltage on the GND side as well.
Quote
It's interesting that he was able to do it without resorting to large capacitors even though his PWM frequency is a measly 93.5Hz
Nothing interesting. Just normal design contrary something abnormal you tried to do.
« Last Edit: October 01, 2018, 06:14:03 pm by wraper »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Filtering PWM to smooth DC
« Reply #56 on: October 01, 2018, 10:53:27 pm »
I also came across this article which offers a more complex circuit to convert PWM to linear voltage to reduce acoustic noise. I'm still trying to wrap my head around it. It's interesting that he was able to do it without resorting to large capacitors even though his PWM frequency is a measly 93.5Hz. I'm not sure why he inverted the output though (100% PWM = 0V), that's something I could do without.


It also requires an extra power wire, which I thought you wanted to avoid.

Here's another possibility which will give as lower voltage loss as possible, using only jelly-bean parts. It does this by using a common emitter amplifier on the output and a differential pair input. The simulation says it can go from 0.6V to 11.58V, with a 12V input. If lower loss is required, the Schottky diode can be replaced with an ideal diode MOSFET rectifier circuit.
« Last Edit: October 02, 2018, 11:05:54 am by Hero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf