Arduino Servo Fan Control

Before you try to dr this, I have included a video to combat the tl crowd. You’re quite welcome. See below.

Now I’ll explain. I may even toss in a snippet…who knows.

Basically, I found myself with a few free hours, an Arduino, a bunch of random components in my lab (read: garage) at my disposal, and no real plan of attack. Result? Arduino/servo motor controlled fan.

Jump off component…silver spray painted Altoids can. Nice…chop that sucker up so I can smash a servo motor in there.

minty

+1 minty

Well done. See…

works well

dang, son

Lady Ada uses these for some random projects. If you can stomach a whole bunch of crappy mints, you have a nice little Arduino-sized metal casing. Of course, it poses a grounding threat, which I experienced working with my motor shield a while back. That said…keep a few around. I have put this one to use before.

Next step…testing the servo

wires

wires for the win

For this, I broke out my motor shield. It doesn’t have any features that would benefit this project…the servo areas are basically just power, ground, and control. Control pumps into the 16B 10 port, like a jumper…that works for my debug.

Next, implement a fan.

big fan

I'm a big fan.

I snagged this fan from an old tower, I think. I really don’t know. It seemed to react well to a 9V battery, so I tried it with a 5V source…same deal. Awesome. I used a zip tie to fasten this to that, that being the Altoids enclosure.

This thing needs a base…man-clamp to the rescue:

secured

man-clamp

I picked this up, to use it as a soldering base. That ‘x-tra’ hands piece of shit that I have previously posted in pictures didn’t cut it. This is the manly version. And, it works great for this project, I believe…you can decide based upon the vid. Here is what it looks like, with some more detail.

fan

clamp in action

Let’s add some code…oh no…sounds like we’ve reached the BALLIN ASS SNIPPET ZONE

#include

Servo myservo; // servo opbect

int pos = 0; // initialize

void setup()
{
myservo.attach(10); // digi pin 10

void loop()
{
for(pos = 0; pos < 180; pos += 1) // from 1 to 180 { myservo.write(pos); // moves servo delay(20); // waits 20 ms } for(pos = 180; pos>=1; pos-=1) // sweeps span between 180 and 1
{
myservo.write(pos); // moves servo
delay(20); // waits 20 ms
}
}

If that looks familiar, it is because it pretty much the sweep example from the Arduino IDE. No changes necessary…I like when that happens.

Here is the final product:

fan

I'm a big fan of this little fan. Sorry.

Not bad, for a quick slam-together exercise. It isn’t really robotic, since it has no sensors. I could bump this up a notch with some IR LEDs, or my PIR sensor, but that is for another time.

Blah blah blah, stay tuned, blah blah. Until then.

Motor Shield Assembly Steps

Good news…you don’t have to listen to me blather on. At least blather on too much…there will be some blathering.

I mentioned a few posts ago that I was feeling lousy about failing to post some junk. Junk and stuff…electronics…programming is uber-super…blathering again…et…cet…etcetera.

awesome lab

awesome lab...an absolute must

make a list

diagrams. come in handy.

clamp

asterixes astericies astericxses

soldering x3

doot doot doot doot deet deet doot deet doot deet deet

nipple clamp

BOOOOO

looks better

divert your gaze upward

fin

Fin.

donedee

crocodile done-dee

Soldering Station

Since I’m really dragging my feet in regards to posting anything of substance, take a quick look at my new Aoyue soldering station.

soldering station

also pictured: clutter

It works like a champ…pretty pumped that I heeded Lady Ada’s advice on this one.

I still need to post my Motor Shield assembly pics. I also really need to post some stuff about the Droid 2…which is constantly blowing my mind. Stick around…it’ll happen.

Servo Schmervo…Arduino Knob

Sweep is for breakfast around here…implement a knob or be gone.

Same principle as the Arduino sweep example from yesterday, but with a potentiometer doing the actual lifting. Lifting? Shifting…heavy shifting. I added a little potentiometer (little blue guy behind the RainBird sprinkler adjustment tool) to control the servo this go-around:

enhance

enhance...enhance

knob on arduino

more shame...more plugs

Another success. Dang. Looks like I’m going to have to whip out the soldering iron after all. Not looking forward to this effort; I have a bad feeling that I’m going to fail miserably with the project.

Maybe I’ll knock it out of the park. Life is a garden, dig it.

Lady Ada Would Be Pissed

My source for the Arduino Motor Shield would not approve of my soldering iron. Not by any means…

lady ada

fail

I still have the ‘made in china’ tag on this piece of shit. Poorly played.

In case any of my reader-base has taken an interest in microcontrollers, robotics, or awesome crap in general, Lady Ada has you covered. I recieved my motor shield in no time what-so-ever, and Limor’s prices smoke those of Amazon to boot. Don’t get me started about her tutorials…pretty bad ass.

I need to toss the pictured iron in the trash and get a real iron before I get after my motor shield project…I can say that the servos she shipped me are tits.