Making Things Interactive

February 12, 2008

Linear Actuator & Computer Fan

Filed under: 5: Making Motion,Brian Kish — bkish @ 2:50 pm

http://www.youtube.com/watch?v=fft-9HAuGLw

This is a very simple project that controls a computer fan and a linear actuator. It is able to turn each device on and off. The linear actuator is supposed to use 24V DC and I do have a 24v Lambda power supply to power it. However, I still am not to good at this and the 24v kind of scares me :) I nearly welded the ground and positive wire together and fried an LED and I think possible one of the servos I borrowed :( Therefore, I am now powering it off of a 9V battery.

The next step I would like to take is to understand how to use an H-Chip or the DC Motor Controller that I borrowed so that I could use it to make the linear actuator go in and out (it only goes in right now). I also attempted to use a servo, but every time I connected, the Arduino just shut off.

/*  This is a simple system that is used to control a computer fan and a linear actuator. It currently is only able to make the actuator retract.
*/
int fanPin = 10;                      //  powers fan
int actuatorPin = 12;                 //  powers actuator
int statusPin = 13;                   //  flashing LED tells when the system is running
int highSpeed = 255;                  //  set the speed to 'maximum'
int lowSpeed = 0;                     //  set speed to 'off'
void setup()
{
pinMode(fanPin, OUTPUT);              //  sets the fanPin as an output
pinMode(statusPin, OUTPUT);           //  sets the status pin to output
pinMode(actuatorPin, OUTPUT);         //  sets the actuatorPin to output
}
void loop()
{
analogWrite(fanPin, highSpeed);      //  tells fan to spin at 'maximum' when on high
analogWrite(actuatorPin, highSpeed); //  telss actuator to move at 'maximum' when turned to high
digitalWrite(statusPin, HIGH);       //  turns status LED on
digitalWrite(actuatorPin, HIGH);     //  turns actuator on
digitalWrite(fanPin, HIGH);          //  turns fanPin on
delay(5000);                         //  waits 0.5 seconds
digitalWrite(statusPin, LOW);        //  turns status LED off
digitalWrite(actuatorPin, LOW);      //  turns actuator off
digitalWrite(fanPin, LOW);           //  turns Fan off
analogWrite(actuatorPin, lowSpeed);  //  tells fan to spin at 'off' when on Low
analogWrite(fanPin,lowSpeed);        //  tells actuator to move at 'off' when turned to low
delay(5000);
}

Advertisements

2 Comments »

  1. […] unknown wrote an interesting post today onHere’s a quick excerptThis is a very simple project that controls a computer fan and a linear actuator. It is able to turn each device on and off. The linear actuator is supposed to use 24V DC and I do have a 24v Lambda power supply to power it. … […]

    Pingback by Teste » Linear Actuator & Computer Fan — February 12, 2008 @ 3:12 pm | Reply

  2. We’d like to see, in addition to the code, a photo of the project, circuit schematic, and perhaps a video. Code alone is not enough.

    Comment by mdgross — February 13, 2008 @ 7:10 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: