(attempt at) Oscillating Fan

Description

I wanted to make a fan that fights with its on/off switch (hence oscillating between on and off). I envisioned a balance-based switch (the paper shape) on top of a force meter. To turn on the fan, you balance the switch on the FSR. The fan turns on, but the breeze it produces pushes the switch off balance, turning the fan off. The switch then comes back to balance, turning the fan on again (and so it continues). A pot is used to control the fan speed.

Issues:

  1. I tried a few fan designs (paper pin-wheel, plastic bottle), but couldn’t get it to produce a strong enough breeze to tip the switch off balance, even at the max pot value. I suspect the blades were slipping on the motor shaft, but I wasn’t willing to glue to it directly.
  2. It was challenging to make switch heavy enough to trip the force sensor while still light enough to be tipped off balance. I would try a photosensor next time (mine are currently encased in my last project).

Components

  • Arduino
  • pot, FSR, DC motor, battery pack
  • resistors and hookup wires
  • paper (and plastic bottle).

Code

/*
* one motor (speed controlled by pot) turns on in response to
* force applied by a weighted sail. a fan on the motor blows the
* sail, removing the force. I didn't implement the lights.
*
* modified version of AnalogInput
* by DojoDave <http://www.0j0.org>
* http://www.arduino.cc/en/Tutorial/AnalogInput
* Modified again by dave
*/

int potPin = A0; // pot input pin
int forcePin = A1; // FSR input pin
int motorPin = 9; // motor pin

int redPin = 12;
int bluePin = 11;

int potVal = 0; // store the value coming from the pot
int forceVal = 0; // store the value coming from the FSR

void setup() {
pinMode(redPin, OUTPUT);
pinMode(bluePin, OUTPUT);

Serial.begin(9600);
}
void loop() {
potVal = analogRead(potPin); // read the pot value, between 0 - 1024
forceVal = analogRead(forcePin); // read the FSR value

digitalWrite(redPin, LOW);
digitalWrite(bluePin, LOW);

Serial.print("pot value: ");
Serial.println(potVal);
Serial.print("FSR value: ");
Serial.println(forceVal);

if (forceVal > 200) {
analogWrite(motorPin, potVal/4); // turn on the motor. analogWrite ranges 0-255
digitalWrite(redPin, HIGH);
digitalWrite(bluePin, LOW);
}
else {
analogWrite(motorPin, 0); // turn off the motor
digitalWrite(redPin, LOW);
digitalWrite(bluePin, HIGH);
}

delay(500);
}

Images

fan-pic

fan_video

Leave a Reply