I have been using the Arduino and a MOSFET circuit to dim lights using PWM and wanted to extend this to a motor or possibly consider an analog dimming method for the lights as well. Is there a circuit/method that would be recommended? The motor in a fan I am operating (12V 1.2A) doesn't like PWM (it makes a loud whining noise upon changing speeds using PWM only) and I will need to bring in approximately 6-12 volts to vary the speed. For lighting if I choose to use an analog dimming method as opposed to PWM I will need 0-10V change. I will be using some sort of external power supply (for the time being a lab bench supply to test the circuit, but eventually a 12v supply) and want to come up with a circuit to attenuate this voltage to what I will need and still be able to supply the 1.2A for the fan motor. My first thought was a transistor configuration (Common Emitter I believe), but was unsure if this was a wise decision. Any thoughts or assistance would be appreciated. Thank you
You haven't said what model fan this is. Maybe it isn't designed for PWM, or for a specific
PWM frequency range.
jengil:
The motor in a fan I am operating (12V 1.2A) doesn't like PWM (it makes a loud whining noise upon changing speeds using PWM only) and I will need to bring in approximately 6-12 volts to vary the speed.
Try increasing the PWM frequency. There are several pages on how to do this in the playground.
To generate a 0 to 10V signal to control the analog lighting dimmer, you will need to both amplify and smooth the Arduino PWM output. The attached schematic shows one way of doing it. Depending on the input resistance of the dimmer, you may be able to use an NPN transistor, a few resistors and a capacitor instead.
I believe this is the fan.
I will try increasing the PWM frequency and see how that works, but it seems that I may end up wanted to use something like the Op-Amp or transistor circuitry, I will try that as well. I can't really remember the best configuration of the transistor circuit but I will do some reading in my circuit books and try to piece it together. Thanks again, and let me know of any other ideas as well.
After changing PWM frequencies I still had the whining noise, and didn't find a good enough description on how to change the frequency beyond the 62.5KHz that pins 5 and 6 put out, being that I am horrible at writing code. I pieced together the given circuit (with the LM358) and can only get 10V out of it, regardless of the values I put in - there is only a 200 mV fluctuation in the given configuration. I really need to just be able to use this 0-5 volt (now filtered) signal to control a 12 v power supply and vary its voltage (only 6-12 V is necessary, but I have to be able to supply the 1.2 Amps as well), any good ideas would be helpful.
jengil:
After changing PWM frequencies I still had the whining noise, and didn't find a good enough description on how to change the frequency beyond the 62.5KHz that pins 5 and 6 put out, being that I am horrible at writing code.
Is the whining at a fixed pitch, or does the pitch vary?Are you certain that you used the correct commands to change the PWM frequency for pins 5 and 6? Post your code.
jengil:
I pieced together the given circuit (with the LM358) and can only get 10V out of it, regardless of the values I put in - there is only a 200 mV fluctuation in the given configuration.
It sounds that you have made a wiring error. Check the connections between the 47K resistor and the Arduino pin on one side and the non-inverting input to the LM358 on the other. Also check the LM358 ground connection. Post a photo of your wiring.
I just simply switched the pins (from 3 to 6) which from my reading was double the PWM frequency (all of the documentation I found on bitbanging and whatnot seemed confusing and I didn't understand how to increase the PWM to say 500KHz).
I got the LM358 circuit working and found I had a broken column in my breadboard which was why it wasn't working, the 0-10 volts works excellent. Now how can I get higher amperage from this controllable signal (to drive a fan or for a higher amperage dimming application) ? Thanks