![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I would like some help in putting together a circuit for controlling fans through pwm. Does the attached circuit makes sense? I have added the npn amplifier and mosfet as the pic (16f628a) is not capable of driving the fans (2x12V) directly. I should probably also isolate the CCP1 pin using an optocoupler. This is first itteration, once this is working, the next step would be to add temperature sensing (Dallas DS18B20). For those interested, the aim is to produce an "automagical" way of controlling fans used to cool the primary mirror of a newtonian telescope. Thanks for your help | |
| |
| | (permalink) |
| What's T1 for?. Also, I would suggest putting the diode across the fan, and not across the FET. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | ||
| Quote:
| |||
| |
| | (permalink) | |||
| Quote:
I should be able to utilise the pwm output to control the voltage to > peltier device > step motors (in place of a chopper circuit) Greatly appreciate your input Nigel. | ||||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | ||
| Quote:
Quote:
Thank you for your help. | |||
| |
| | (permalink) | ||
| Quote:
__________________ Len | |||
| |
| | (permalink) |
| You don't need the 1 k as the PIC switches between Vdd and gnd.
__________________ Len | |
| |
| | (permalink) |
| Thank you Len, I am attaching the modified circuit. Thanks again to you and Nigel for your help. | |
| |
| | (permalink) |
| You're welcome. Its nice to be appreciated, some don't bother.
__________________ Len | |
| |
| | (permalink) |
| You don't need to use 7805 for the PIC. A 78L05 the size of a TO-92 transistor is suffice and it don't need a heatsink. The value of capacitors(C1 & C2) at the input and output of the regulator is a bit low consider that you are driving a DC motor. You'll get better reliability against motor noise by using 100uF or higher for C1 and 10uF for C2. I would also add a 100K resistor from the gate of IRF510 to Vss as the PIC would reset to open circuit(high impedance) regarding its port pins.
__________________ L.Chung | |
| |
| | (permalink) |
| I dunno about the 100 ohm inline with the gate ... I guess it can't hurt, since the gate only requires microamps to switch off to on however, I would recommend a pulldown between the gate and ground (easy way is your source pin is ground, just connect a 10k resistor between pins 1 and 3 on the fet) the pull down prevents the mosfet from entering linear or resistive mode should something happen to the control signal from the pic (for example PIC browns out or resets or locks up or whatever) without a pulldown to ground, the gate could be left floating, meaning the mosfet would be partily conducting, and incur massive power dissipation. this way, the pulldown forces the switch off unless the pic specificly tells it to be on also, check the datasheet for your mosfet ... most of the IRF5xx are in the International Rectifier HEXFet series, and have internal clamping diodes, eliminating the need for D1... in fact, page two of the IRF510 datasheet clearly describes the internal protection diode last thing... the RdsON of that fet is pretty poor, compared to what's available now ... that device is not what I'd call a "logic level" mosfet ... depending on the load being switched, it might not make a difference... but if you're trying to pwm some monster fan you probably won't see full voltage at the fan, since the 5v from your PIC won't be enough to fully switch the mosfet. this also means your mosfet will be getting pretty warm, since it's in resistive mode and not switching the full current. | |
| |
| | (permalink) | |
| Quote:
__________________ L.Chung | ||
| |