Question:
Micro-controller Unit as a switch?
2009-12-18 21:40:47 UTC
I am a hobbyist learning about Micro-controller Unit (MCU) and I hope someone can help me answer this question:

Since it is a controller, how can I use it as a switch to, say turn on a mini-fan with input voltage of 12V(standard fan in CPUs)?

The input voltage for the MCU is around 5V so does this mean I need another external voltage source?
Five answers:
?
2009-12-18 22:47:50 UTC
The micro controller can be used to turn on a transistor that would then turn on the fan. The fan would have one wire tied directly to 12 volts, the return fan wire would go to the collector of the transistor switch. The transistor's emitter is tied to ground and the base is turned on by the output of the micro controller via a base resistor. The transistor acts as a switch and protects the micro controller from the fan's higher current requirements.
mr.splooge
2009-12-19 03:46:25 UTC
It sure does mean you an external source of 12V!

You can however, use the 12V source to power the MCU. Use a regulator to reduce the voltage to the MCU to 5V (or whatever source voltage it requires).



If you are only after a Fan controller, then I have to perfect circuit for you. Check out the TC649B chip from Microchip. It will control fan speed and it has fault detection and auto shut off features. You can order samples from Microchip too. (samples.microchip.com I think)



The datasheet for the TC649B is very clear and well written, it even details the complete circuit, and if you have problems, the forum is a good source of info. You would learn a lot.
emactan
2009-12-19 00:43:22 UTC
Yes you most certainly can use an MCU to switch fans (and even lights, motors, heaters, air conditioners, etc.). Although if you're just going to simply want the fan on and off by manually switching the MCU then you'll be better off getting a mechanical switch.



However if you want to turn on the fan and let it run for a certain period after which it turns off automatically, or if you want the fan to turn on when the temperature reaches a certain point and turns off when it goes below a certain value, then an MCU would be most applicable.



Remember you need to program an MCU. You need programmer (hardware) for that. So you need to factor that into your cost.



As for voltages, yes you will need two-- a 5VDC for your MCU and a 12VDC for the fan. You will have to use transistors (BJT or FET) to directly switch the fan or you can have the transistor switch a relay which in turn does the switching of the fan.
ceilingfan
2009-12-18 21:55:32 UTC
Get a STSP relay, and connect a digital out pin and ground to it's control part. Then connect the 12V up like regular switch, and when you set the pin to HIGH, the relay should close, and the fan should spin.



If you need the fan to go both directions, you will need that relay and then also a DTDP to reverse the polarity.



http://www.digikey.com/ is a great place to find parts.



Have fun :).
?
2016-05-26 10:36:49 UTC
The has to be some kind of a signal in your system that becomes active when the thyristor is to be switched on. Just use that signal to trigger a circuit that applies a current to the gate of the thyristor.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...