Hacker News new | ask | show | jobs
by dv_dt 76 days ago
One could go farther and complain that it's a waste of a microcontroller at all to control a fan when an analog circuit for fan speed vs temperature would work fine.
2 comments

True, a very simple analog circuit would be enough.

However the bane of analog circuits was that they age, so a control circuit that works perfectly today will drift and no longer work as intended after some years.

The second problem is that analog circuits need adjustments to set them at the exact desired parameters.

Adjustments can be done either by using an adjustable element in the circuit, e.g. an adjustable resistor or capacitor or inductor, or by measuring many resistors and/or capacitors and/or inductors and selecting the ones with the right values to be used by your device.

Redoing periodically the adjustments also solves the aging problem. However, both the initial adjustment and any periodic readjustments need a lot of work, so they are no longer acceptable in the industry.

When doing something for yourself, you may make an analog controller and the initial adjustment would not be a problem, but even in this case it would be annoying to keep track and remember something like having to readjust a fan controller every 6 months, to be sure that it still works as intended.

You're over thinking it. If the application is very simple and needs to do one thing, an analog system works fine. Once you start needing sequencing, multiple adjustments, and maybe a little smarts then a CPU can get involved.

I worked at a shop that had an old closed loop water-air chiller for a laser. The water temperature controller was a small PCB with an op-amp chip with some passives and the temperature was set by a potentiometer. That thing ran fine until the compressor died and it sent to scrap.

My analog fan control comment was a bit tongue-in-cheek, but turning a knob on a potentiometer to adjust fan speed has some personal appeal - no digging around for a sw utility, no poking interfaces to see if the motherboard mfr bios exposed the control, of if it exposed it but doesn't actually hook the right plug, no adjusting to see if the right temp input is reading correctly. Fewer layers of things to go wrong can be so nice.
Analog control circuitry is also really hard to patch in production, or to adjust to different behavior during design.

Oh, you need a quadratic fan curve instead of a linear one? Have fun starting from scratch!

You can definitely make a PID controller just with opamps and potentiometers.
I bet you can. But you can't turn a simple single linear amplifier into a PID controller with zero physical changes, can you?

My point was that, if you want additional behavior, you need to bake that in from the start. With an MCU you can trivially switch it in-the-field to literally anything you can imagine.

Nah, it's a much lower part count and much simpler to put a microcontroller in. If you're concerned about cost cheaper parts are available.
Yup. You could use a quad opamp to build a PWM controller with closed loop control but then you need all the passives to setup the oscillator and so on.

I went through this years ago making a fan driver for my vehicles HVAC blower. The analog setup was fun to make but you use more board space, higher BOM count, and really, higher BOM cost vs a micro-controller.

It's crazy how far technology has advanced. A μc with RAM and a bunch of input and output ports and some code is cheaper today than a pile of analog components.