03-19-2024, 03:44 PM
|
#1 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Arduino UNO-based Active Grille Block
I have been working on integrating an active grille into the fibreglass partial grille block.
I went the COTS (commercial-off-the-shelf) route as to speed up the construction. The grille vane assembly is from a Chevrolet Bolt, or Malibu ? It includes only the plastic frame, no actuator-motor. It is a generic brand bought on amazon.
I basically cut it half, added a servo motor and a pair of micro switches (top and bottom).
Pretty basic functionality for the time being (OPEN/SHUT), but I will be integrating the micro switches and an LCD display. Below is the active grille block in action.
Stay tuned for more updates in the coming days.
Cheers.
|
|
|
The Following 9 Users Say Thank You to CigaR007 For This Useful Post:
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
03-21-2024, 05:42 AM
|
#2 (permalink)
|
aero guerrilla
Join Date: Oct 2008
Location: Warsaw, Poland
Posts: 3,747
Thanks: 1,327
Thanked 749 Times in 476 Posts
|
Nice!
Now I am interested in how the Arduino will control it.
__________________
e·co·mod·ding: the art of turning vehicles into what they should be
What matters is where you're going, not how fast.
"... we humans tend to screw up everything that's good enough as it is...or everything that we're attracted to, we love to go and defile it." - Chris Cornell
[Old] Piwoslaw's Peugeot 307sw modding thread
|
|
|
The Following User Says Thank You to Piwoslaw For This Useful Post:
|
|
03-21-2024, 12:24 PM
|
#3 (permalink)
|
Master EcoModder
Join Date: Jan 2008
Location: Sanger,Texas,U.S.A.
Posts: 16,265
Thanks: 24,389
Thanked 7,360 Times in 4,760 Posts
|
' control '
Quote:
Originally Posted by Piwoslaw
Nice!
Now I am interested in how the Arduino will control it.
|
Do the OEM devices use an analog reference voltage input signal at an A-Gate terminal on the circuit board, from which the digital CP decides if any 'action' is to commence or not, based on internal look-up menus, and if so, the digital signal is processed into an analog voltage signal at the output gate, out to the motor, which, when de-energized, is spooled backwards under spring tension at the shutters? With 'fail-wide-open' safety protection?
__________________
Photobucket album: http://s1271.photobucket.com/albums/jj622/aerohead2/
|
|
|
03-21-2024, 05:04 PM
|
#4 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Quote:
Originally Posted by aerohead
which, when de-energized, is spooled backwards under spring tension at the shutters? With 'fail-wide-open' safety protection?
|
From what I have seen and read thus far, there does not seem to be fail-safe OPEN mechanism in current grille shutters. I could be wrong though...In their OEM state, all they do is throw a CEL code if there is an issue.
As it stands, there is no spring tension to accommodate a fail-OPEN state, as it would be difficult to use with a servo motor.
Quote:
Originally Posted by Piwoslaw
Nice!
Now I am interested in how the Arduino will control it.
|
The arduino control code will evolve over time. For the time being, given my limited coding knowledge, it will be pretty basic.
I managed to integrate a micro switch to detect the shutter position. A 1602 LCD was also integrated to monitor the OPEN/SHUT status.
Things I want to integrate into the code, eventually :
- Coolant temperature
- Ambient temperature
- Rain/Snow sensor
Below is the LCD display and microswitch in action.
Arduino Code :
PHP Code:
#include <Servo.h>
#include <ezButton.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27, 16 column and 2 rows
// constants
const int BUTTON_PIN = 7; // Arduino pin connected to button's pin
const int SERVO_PIN = 9; // Arduino pin connected to servo motor's pin
const int LED_PIN = 2; // green LED connected to digital pin 2
const int POS_SWITCH = 4;
Servo servo; // create servo object to control a servo
// variables
int angle = 0; // the current angle of servo motor
int lastButtonState; // the previous state of button
int currentButtonState; // the current state of button
int val = 0; // variable to store the read value
void setup() {
Serial.begin(9600); // initialize serial
pinMode(BUTTON_PIN, INPUT_PULLUP); // set arduino pin to input pull-up mode
pinMode(LED_PIN, OUTPUT);
pinMode(POS_SWITCH, INPUT);
servo.attach(SERVO_PIN); // attaches the servo on pin 9 to the servo object
servo.write(angle);
lcd.init(); // initialize the lcd
lcd.backlight();
}
void loop() {
lastButtonState = currentButtonState; // save the last state
currentButtonState = digitalRead(BUTTON_PIN); // read new state
if(lastButtonState == HIGH && currentButtonState == LOW) {
digitalWrite(LED_PIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_PIN, LOW); // turn the LED off (LOW is the voltage level)
delay(500); // wait for a 0.5 second
// change angle of servo motor
if(angle == 0)
angle = 90 ;
else
if(angle == 90)
angle = 0;
servo.write(angle); // control servo motor arccoding to the angle
}
delay(1000); // wait for a second
val = digitalRead(POS_SWITCH); // read the input pin
if(val == HIGH){
lcd.clear(); // clear display
lcd.setCursor(0, 0); // move cursor to (0, 0)
lcd.print(" GRILLE SHUTTER"); // print message at (0, 0)
lcd.setCursor(2, 1); // move cursor to (2, 1)
lcd.print(" [ SHUT ]"); // print message at (2, 1)
}
else {
lcd.clear(); // clear display
lcd.setCursor(0, 0); // move cursor to (0, 0)
lcd.print(" GRILLE SHUTTER"); // print message at (0, 0)
lcd.setCursor(3, 1); // move cursor to (2, 1)
lcd.print(" [ OPEN ]"); // print message at (2, 1)
}
}
Cheers !
|
|
|
The Following 4 Users Say Thank You to CigaR007 For This Useful Post:
|
|
03-22-2024, 03:00 AM
|
#5 (permalink)
|
aero guerrilla
Join Date: Oct 2008
Location: Warsaw, Poland
Posts: 3,747
Thanks: 1,327
Thanked 749 Times in 476 Posts
|
Quote:
Originally Posted by CigaR007
Things I want to integrate into the code, eventually :
- Coolant temperature
- Ambient temperature
- Rain/Snow sensor
|
I would add A/C on/off, so you have good air flow over its condenser.
__________________
e·co·mod·ding: the art of turning vehicles into what they should be
What matters is where you're going, not how fast.
"... we humans tend to screw up everything that's good enough as it is...or everything that we're attracted to, we love to go and defile it." - Chris Cornell
[Old] Piwoslaw's Peugeot 307sw modding thread
|
|
|
The Following User Says Thank You to Piwoslaw For This Useful Post:
|
|
03-25-2024, 06:06 PM
|
#6 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Are there any downsides to tapping the sensors wiring ? I am inclined to tap near the PCM as to minimize any potential losses. The sensors are mainly outputting a 0-5Vdc, according to the wiring shematics and Honda service manual.
|
|
|
03-26-2024, 09:59 AM
|
#7 (permalink)
|
Somewhat crazed
Join Date: Sep 2013
Location: 1826 miles WSW of Normal
Posts: 4,369
Thanks: 528
Thanked 1,193 Times in 1,053 Posts
|
Input resistance of the arduino may or may not affect the original circuit. You won't know until you try it. I'm not fluent in arduino. Adding a very high impedance switch would have a negligable effect by using a mosfet as an isolator since the sense current would be very small.
__________________
casual notes from the underground:There are some "experts" out there that in reality don't have a clue as to what they are doing.
|
|
|
The Following 2 Users Say Thank You to Piotrsko For This Useful Post:
|
|
03-28-2024, 07:47 PM
|
#8 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Work in progress
Quote:
Originally Posted by Piotrsko
Input resistance of the arduino may or may not affect the original circuit.
|
Turns out that an input can be set to high-impedance; so it should be ok.
Cleaned up a bit of the wiring and made more permanent circuit board to accommodate the servo, LCD display and various switches.
The LCD now has a 3D-printed case, which will make it easier to mount on the centre console.
As it stands, it is a fully functional prototype.
|
|
|
The Following 3 Users Say Thank You to CigaR007 For This Useful Post:
|
|
03-31-2024, 06:50 PM
|
#9 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Making some progress on the arduino code.
Here is a summary of the code :
Button Press: If the button is pressed, the servo motor angle is adjusted based on the current angle (0, 45, 90 degrees).
Position Switch: Reads the state of the position switch and displays a message on the LCD indicating whether the grille shutter is shut (0), half-open (45), or fully open (90).
Position Error Detection: Reads the state of the position error switch and displays an error message on the LCD if the position is between certain angles and the error switch is triggered
Fully manual for the time being. Sensor integration (coolant and ambient temperatures) will be done after the grille shutter has been installed on the car.
|
|
|
The Following 2 Users Say Thank You to CigaR007 For This Useful Post:
|
|
04-07-2024, 06:08 PM
|
#10 (permalink)
|
Master EcoModder
Join Date: Jul 2010
Location: Canada
Posts: 706
Thanks: 152
Thanked 267 Times in 162 Posts
|
Cleaned up the wiring and made the permanent control panel.
I am using shielded cat5 cable as the main wiring harness. The wiring from the shutter grille will be custom-made as to make it more waterproof using special connectors.
The connections to the Control panel and board are made using a detachable screw-Terminal to RJ45 connector. Pretty handy for quickly disconnecting the cables and make the necessary changes or troubleshooting, if needed.
Control Panel using a blank housing plate from my CR-Z.
Next step is to work on the shutter grille and install more permanent components such as the waterproof limit switches and Servo motor.
Last edited by CigaR007; 04-09-2024 at 12:42 AM..
Reason: .
|
|
|
|