Project tutorial
Arduino Based Custom Exhaust Button

Arduino Based Custom Exhaust Button © GPL3+

Custom button powered via Arduino controls aftermarket exhaust flaps!

  • 2,871 views
  • 1 comment
  • 4 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
×1
FQP30N06L
Mosfet
×2
HK19F-DC 3V-SHG
×2

About this project

Finished Project:

The finished project is a custom aftermarket valved exhaust controlled by a button inside the cabin powered by an Arduino Uno!

Arduino Based Exhaust Control

Purpose:

An aftermarket exhaust with variable flaps was installed in a Hyundai Genesis Coupe that could only be actuated via a RF remote control. While cool, I love physical buttons, and the idea to have a button part of the car factory interior seemed like a fun challenge.

Thus, the project was to use an existing button location in the car to control the car's exhaust. An Arduino Uno handles the logic for this project, so that when the button is pressed the exhaust opens, and when pressed again, it closes.

Examining exhaust module:

The first step involved examining the circuit for the stock FR unit. This is what receives the button press from the remote and actuates the exhaust valves.

The circuit is simple in that it involves two relays, one to open, and one to close the exhaust. I was able to create my circuit by manipulating these relays.

By completing the circuit on the coil side of the relay to ground I was able to manually activate each relay. The photo shows the wires added to the relay coil. This takes care of how to make the motors move, since the motors are controlled forward and backwards by these relays.

Examining car button:

The next step involved the cars button module. In the US market the Genesis has a location for an additional button that was only intended for the European market. Therefor, in the US, the button was replaced with a non-movable blank button. Essentially, we have a button location that doesn't move but has the possibility, electrically, of having a button, since the same circuit board was used in both the US and EU market. The objective now is to make it move.

After removing the button blank, sanding free some of the plastic, and adding a 3D printed spacer, the button was now able to move freely.

While the button moves now, we still need to make it work electrically. After examination of the circuit, a surface mount button was added to the free solder pads intended for the EU button location. Two wires were also cut on the wiring harness to the board. These two wires will serve as the wires for reading our button state on the Arduino.

Hardware:

The main hardware for our project includes two relays and two mosfets. The Uno I/O pin will activate the gate of the mosfet which in turn will allow current to flow to the coil side of our added relay. When this relay is active it will complete the circuit that we modified on the exhaust module. Thus, our relay will complete the coil side circuit of the exhaust module, which in turn will active the exhaust module relay and active our exhaust flaps!

Coding:

The code for our project is quite simple. Essentially we will read the button state of our new button and if a change is detected we will active our relays to open and close the exhaust.

Car mounting and wiring:

First the Arduino module and wiring harness was made and connected to the original exhaust module. The Arduino module is protected by a 3D printed case, with power button and status lights.

Then the units where installed in the car. Finally the button was wired up to the Arduino, completing our circuit.

Finished Project:

The finished projected is a custom aftermarket valve exhausted controlled by a button inside the cabin powered by an Arduino Uno.

This was a fun and satisfying project and adds a new level of enjoyment while using the exhaust system.

Happy coding all!

Code

Exhaust CodeC/C++
//Program for opening and closing exhaust
//Version 1
//
//2.19.2021
//By: Ken Zimny

//==========================//
//Included Libraries
//==========================//

//EEPROM
#include <EEPROM.h>


//==========================//
//Definitions
//==========================//

//I/O pins
#define openRelay D2
#define closeRelay D1
#define exhaustButton D5


//==========================//
//Vars and Constants
//==========================//

//Debounce int
int buttonState;             // the current reading from the input pin
int lastButtonState = LOW;   // the previous reading from the input pin
int buttonReading;
unsigned long lastDebounceTime = 0;  // the last time the output pin was toggled
unsigned long debounceDelay = 70;    // the debounce time; increase if the output flickers

//exhaust open/close logic
bool exhaustState = 0;

//button pressed logic
bool buttonPressed = 0;

//OAT
const char* ssid = "";
const char* password = "";


void setup() {
  // put your setup code here, to run once:

  Serial.begin(9600);
  EEPROM.begin(512);
  pinMode(openRelay, OUTPUT);
  pinMode(closeRelay, OUTPUT);
  pinMode(exhaustButton, INPUT_PULLUP);

  //  EEPROM
  exhaustState = EEPROM.read(0);
}


void loop() {
  // put your main code here, to run repeatedly:

  //Read the exhaust button from the car
  if (digitalRead(exhaustButton) == LOW) {

    //reset the debouce
    if (digitalRead(exhaustButton) != lastButtonState) {
      lastDebounceTime = millis();
    }
    //debouuce the buttons
    if ((millis() - lastDebounceTime) > debounceDelay) {

      //Open or close the car exhaust
      if (exhaustState == 0 && buttonPressed == 0) {
        Serial.println ("Exhaust opening ");
        openExhaust();
        exhaustState = !exhaustState;
        EEPROM.write(0, exhaustState);
        EEPROM.commit();
        Serial.println ("Written to memory");
        buttonPressed = 1;
      }

      else if (exhaustState == 1 && buttonPressed == 0) {
        Serial.println ("Exhaust closing");
        closeExhaust();
        exhaustState = !exhaustState;
        EEPROM.write(0, exhaustState);
        EEPROM.commit();
        Serial.println ("Written to memory");
        buttonPressed = 1;
      }

    }
  }
  else {
    buttonPressed = 0;
  }
}

//Exhaust open/closed functions
void closeExhaust() {
  digitalWrite(closeRelay, HIGH); //active the close relay
  delay(2000);                    //wait 3 seconds to fully close the flaps
  digitalWrite(closeRelay, LOW);  //power off the relay
  delay(100);                     //delay added as pause between next button press
}

void openExhaust() {
  digitalWrite(openRelay, HIGH);  //active the close relay
  delay(2000);                    //wait 3 seconds to fully close the flaps
  digitalWrite(openRelay, LOW);   //power off the relay
  delay(100);                     //delay added as pause between next button press
}

Schematics

Exhaust Schematic
Exhaust uno schematic uxjkyrwifh

Comments

Similar projects you might like

One Button Click Artificial Intelligence Based Home Monitor

Project tutorial by Geeve George

  • 9,484 views
  • 1 comment
  • 44 respects

Arduino - Use Reset Button Like a Push Button

by RoHa

  • 13,913 views
  • 0 comments
  • 13 respects

Slack Away Button with Wia Dot One and Button Module

Project tutorial by Team Wia

  • 1,883 views
  • 0 comments
  • 8 respects

GSM based Home Automation

Project tutorial by Team Brink.IO

  • 47,280 views
  • 56 comments
  • 81 respects

RFID Based Attendance System Using Arduino

Project tutorial by Asim Zulfiqar and High Voltages

  • 31,312 views
  • 3 comments
  • 29 respects
Add projectSign up / Login