First time using a MOSFET.

Discussion in 'The Projects Forum' started by HarwoodD, Mar 4, 2012.

  1. HarwoodD

    Thread Starter New Member

    Dec 26, 2011
    Hey everyone,
    I’m a newcomer here. I’m just getting into electronics and I decided to build a simple project. I decided I wanted a fan to ventilate our cats litter box.
    Looking around, I found an old CPU fan that should do the trick and I set about designing a circuit that would turn on AFTER the cat left the box and run for 15 - 20 minutes. I have never used BJT’s, MOSFET’s or any ICs before so I decided to incorporate these into the circuit so I could learn about them.
    I’ve built the circuit and it works, but I’d like some input on different ways it could have been done or critiques of my design.

    The LTSpice schematic is attached. Here is a quick breakdown of how the circuit works…
    I powered the circuit with a regulated 12v DC power supply rated at 500ma.
    A “POWER ON” LED is powered directly from this supply.
    Potential is passed by the NC contacts of the SPDT switch.
    Potential is applied through the fan (which had been simulated by a resistor and an inductor) and is awaiting a ground at the drain of the MOSFET.
    Potential is also applied to the PNP transistor Q1, which remains off.
    When the cat enters the box, he actuates the SPDT switch which is attached to the bottom of the box. This action illuminates the “OCCUPIED” LED and charges capacitors C1 and C4. C1’s charging rate is controlled by R2 and takes about 60 seconds to fully charge. This ensures the circuit only operated if the cat spent some time in the box, and not by momentary actuation of the switch by scooping litter.
    Potential is also applied to the gate of M1, however, the switch has removed power preventing the fan from running while the cat is in the box. (He’s freaked out by the slightest noise)
    Potential is also applied through the NPN transistor (Q2) to the 555 IC LED blinking network.
    When the cat steps out of the box, the switch removes potential from the RC (C1) network.
    C4 discharges to the base of Q2 to ensure the homemade “SCR” receives a momentary voltage to keep it turned on.
    C1 now slowly discharges through R2 & R3 and applies its voltage to the gate of the MOSFET. The MOSFET (thus the fan) remains on as long as the gate voltage is above about 4 volts. C1 takes nearly 20 minutes to discharge to this voltage.
    I used a PNP and an NPN transistor to mimic an SCR which applies power to the 555 IC and its timing network. This way it remains on after the cat had departed and blinks a “GET THE SCOOP” LED.
    The whole thing can be reset anytime by pressing a momentary reset switch which grounds C1 through R6 (to stop the fan) and removes power from the “SCR” network to reset the blinking LED.
    This circuit is always ready for the next visit and notifies us when the box has been used.

    After building the circuit on a bread board, it worked as expected except for one very minor glitch. Sometimes (maybe 30% of the time) when actuating the reset switch, the “SCR” network would turn back on when releasing the switch. I added C5 between Q1 and Q2 and that seems to have resolved the problem…but I’m not clear on what exactly was happening or why that fixed it.
    Some component values have been changes from the schematic to accommodate the parts I could find.
    The whole circuit was built with 1/4W resistors for the LEDs and 1/8W everywhere else.
    The whole circuit draws about 350ma when the fan is running.