NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » supplying power and controlling 12V motors/fans

October 12, 2010
by JerseyGun
JerseyGun's Avatar

hi guys. i am extremly new to electronics and programming AVR's. the nerdkit is great and i went through the whole manual in a day. i've done some playing around on my own and am just looking for more "items" to work with. i've been reading up on timer/counters and PWM which brings me to my question. I have no specific project in mind, but have a lot of computer fans laying around. i want to be able to control the fan, first just on/off and then control the speed of the fan. the first thing that comes to mind is that all these fans are 12V DC and of course the atmega168 is 5v. so i was wondering what your preferred methods of supplying 12v is and your preferred method of controlling 12v devices is. more specifically...

1) do you have a 12v supply that goes to the 7805 to power the microcontroller and a seperate connection from the 12v supply that goes to power the other device? or do you "create" 12v from the 5v supply something like how they do in the tutorial to power the backlight of the lcd?

2) i have done some reading on how you can use 5v to control 12v, but there seems to be different ways. do you personally do it using relays, transistors, h bridges, or a combination of many things?

forgive me if i sound like i have no idea what i am talking about, but the fact is, i really don't know what i am talking about! haha! i am however a person who likes to figure things out on his own, so just point me in the right direction and i'll take it from there.

October 12, 2010
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hey JerseyGun,

Welcome to the NerdKits forums!

I'd suggest you take a look at our Motors and Microcontrollers 101 video tutorial. This shows how to use one (or more) of the 2N7000 n-channel MOSFETS, four of which are included with the USB NerdKit, to control a DC motor. This works perfectly fine with driving the fan from 12V because it essentially uses the MOSFET as a switch on the "low side" -- between the motor and ground.

You should use an external 12V DC power supply (or battery) to connect to the input of the 7805 and to the fan. (Stepping up the voltage with a switched power supply, like the backlight project, is not trivial when you need enough current to spin the fan.) When using a transistor to switch the "low side" of your circuit, it's important that there is a common ground point. In contrast, if you used a relay, the microcontroller side of the circuit could be totally independent of the motor side (and electrically "floating" with respect to one another).

Mike

October 12, 2010
by JerseyGun
JerseyGun's Avatar

mike, thanks so much for the quick reply. i watched the video on that tutorial a while ago and totally forgot about it. hopefully i'll get this fan spinning tonight!

Post a Reply

Please log in to post a reply.

Did you know that you can turn a $20 digital scale into a live weight sensor using our kit with a few extra parts? Learn more...