Temperature-Controlled Fan
Here's the walkthrough with those two refinements folded in:
Power block: 12V-IN, +12V, GND
Power comes in through the 12V-IN connector onto the +12V and GND rails. Everything below is referenced to these two rails.
Reference block: R1 — the threshold-set divider
R1 is a 10k trimmer wired end-to-end between +12V and GND, with its wiper feeding the op-amp's non-inverting input. This just creates an adjustable reference voltage — turning the trimmer sets exactly what voltage the comparator will treat as "the trip point." Nothing here reacts to temperature; it's a fixed (but adjustable) reference.
Sensing block: R2 + R6 — the temperature divider
R2 (4.7k) sits between +12V and the sensing junction; R6 (the NTC thermistor) sits between that same junction and GND. That junction feeds the op-amp's inverting input. As temperature rises, R6's resistance drops, so more of the +12V drop falls across R2 — meaning the junction voltage (the inverting input) falls as it gets hotter.
Comparator block: IC1 (LM358)
The op-amp is wired open-loop, so it acts as a comparator: reference voltage on the non-inverting input, temperature-dependent voltage on the inverting input. As temperature climbs and the inverting input drops below the reference, the output swings high. Below threshold, output stays low. There's no feedback path back into either input here, which is worth noting — this comparator has no built-in hysteresis, so right around the trip point it could in principle chatter a little rather than switch cleanly.
Zener threshold/offset block: D2 + R4
The comparator's output doesn't drive the transistor directly — it goes through a 3V zener (D2) first, then R4 (1k) into the base. The zener's cathode faces the op-amp output; its anode faces R4. When the output is low, the zener simply blocks — no base current, transistor stays off. When the output swings high enough to exceed the zener's breakdown voltage, it conducts and passes the excess through R4 into the base. This builds in a fixed voltage threshold before the transistor gets any drive, rather than reacting to the very first millivolt of comparator swing — though it's worth keeping in mind that a zener's breakdown voltage isn't a precise, fixed number; it shifts a bit with current, temperature, and part tolerance, so "3V" here is approximate rather than exact.
Switching block: Q1 (BC547)
Q1's emitter is grounded, base comes from the zener stage above, and its collector is the relay coil's low side. When base current flows, Q1 turns on and pulls the coil's low side down toward ground, completing the circuit (the coil's other end is tied straight to +12V) and energizing the relay.
Relay block: K1 + flyback diode D1
D1 (1N4004) sits across the coil — cathode on +12V, anode on the switched (collector) side — as a flyback diode, clamping the inductive kick when Q1 turns off so it doesn't damage the transistor. On the switch side, the relay's common pole is tied to +12V, and its normally-open contact feeds the fan. So energizing the coil is what actually connects +12V through to the fan.
Output block: FAN connector
The fan's positive side comes from the relay contact (so it only gets power when the relay is energized); its return goes straight to GND. So: hot enough → comparator trips → transistor pulls the relay coil low → relay closes → fan gets +12V and spins.
Indicator: LED1 + R3
This is on its own separate branch — R3 (1k) from +12V straight into the LED, cathode to GND. It has no connection to the comparator, transistor, or relay at all, so it's simply a "power is on" indicator, not a "fan is running" indicator.
Net effect
Temperature rises above setpoint: NTC resistance falls → sensing voltage falls → inverting input drops below the reference → output goes high → Q1 turns on → relay energizes → fan gets +12V.
Temperature falls back below setpoint: NTC resistance rises → sensing voltage rises → inverting input goes back above the reference → output goes low → Q1 turns off → relay de-energizes → fan stops.
Unlike your latch circuit, this one has no memory — the fan just follows the thermistor directly, with no feedback path from the output back into the sensing or reference network. That also means no deliberate hysteresis: if the temperature sits right at the threshold, the relay can potentially chatter.
-
old you tube link with files :
https://www.youtube.com/watch?v=ngJHaid4X3Q
temperature activated fan (උෂ්ණත්ව සංවේදී විදුලි පංකාව)

No comments:
Post a Comment