View Single Post
Old 09-12-2015, 01:48 PM   #8 (permalink)
CigaR007
Master EcoModder
 
CigaR007's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 679

GreenTurtle (Retired) - '01 Toyota Echo Sedan
90 day: 44.85 mpg (US)

Zulu - '14 Honda CR-Z
90 day: 49.05 mpg (US)
Thanks: 149
Thanked 236 Times in 147 Posts
--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(2002);        // 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(buttonPinINPUT);     // 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(50FORWARDMICROSTEP);    //CLOSE GRILLE VANE
      
delay(500); 
    }
    else {
      
Serial.println("MICROSTEP steps");
      
motor.step(50BACKWARDMICROSTEP);   //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):

  Reply With Quote
The Following 7 Users Say Thank You to CigaR007 For This Useful Post:
aerohead (09-12-2015), BabyDiesel (10-02-2015), Cd (09-12-2015), Daox (09-14-2015), iveyjh (09-12-2015), MetroMPG (09-14-2015), Xist (09-16-2015)