--Active Grille Block--
Here are some details on the prototype Active grille bock:
The systems consists of an arduino UNO board, motor shield and a control panel to activate 2 steppers motors, independently. The vane mechanism is a vent miser, as seen in this thread :
http://ecomodder.com/forum/showthrea...ore-29966.html
I took apart the vent miser and kept only the core and added a stepper motor for greater control and torque. A servomotor can also be used and it would provide position feedback, which isn't the case with stepper motors.
I wrote a few lines of code for the arduino+motor shield and it works pretty good.
Arduino Code :
PHP Code:
#include <AFMotor.h>
// Connect one stepper motor with 200 steps per revolution (1.8 degree)
AF_Stepper motor(200, 2); // to motor port #2 (M3 and M4)
const int buttonPin = 2; // the pin that the pushbutton is attached to
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button
void setup() {
pinMode(buttonPin, INPUT); // initialize the button pin as a input
Serial.begin(9600); // set up Serial library at 9600 bps
motor.setSpeed(60); // 30 rpm
}
void loop() {
buttonState = digitalRead(buttonPin); // read the pushbutton input pin
if (buttonState != lastButtonState) { // compare the buttonState to its previous state
if (buttonState == HIGH) {
Serial.println("MICROSTEP steps");
motor.step(50, FORWARD, MICROSTEP); //CLOSE GRILLE VANE
delay(500);
}
else {
Serial.println("MICROSTEP steps");
motor.step(50, BACKWARD, MICROSTEP); //OPEN GRILLE VANE
delay(500);
}
lastButtonState = buttonState; // save the current state as the last state for next time through the loop
}
}
Below are a few design sketches and the actual arduino code for the grille block.
Here is a basic overall diagram of the system (still in design):