Mackay BurkeGabe Hay
Published

2014 Ford Fiesta Remote Start

This project will start a 2014 Ford Fiesta remotely

IntermediateShowcase (no instructions)Over 4 days15
2014 Ford Fiesta Remote Start

Things used in this project

Hardware components

Argon
Particle Argon
×1
Photon
Particle Photon
×1
Carloop
Carloop
×1
1 Channel DC 3/3.3V Optocoupler
×2
1 Channel 12V Relay with Optocoupler
×2

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE

Hand tools and fabrication machines

Digital Mulitmeter
Soldering iron (generic)
Soldering iron (generic)
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Story

Read more

Schematics

Particle Photon Schematic

Particle Photon to Car Schematic

Particle Argon Schematic

Battery Voltage Graph

Code

Argon- Controller

C/C++
This code in on the Particle Argon which is the control module. When the button is pressed the program digitally toggles an integer called "state" between 1 and 0. There is an if statement that detects when the state has been changed and only publishes an event whenever the state changes. This program is also subscribed to an event called voltage that monitors the status of the vehicle's voltage to confirm whether it has been successfully started or not.
int State = 0;
int OldState = 0;
int green = D3;
int red = D5;
int butt = D2;

void setup() {
Particle.subscribe("voltage", status, MY_DEVICES);
pinMode(green, OUTPUT);
pinMode(red, OUTPUT);
pinMode(D7, OUTPUT);
pinMode(butt, INPUT_PULLDOWN);
}

void status(const char *event, const char *data)
{
    float battVoltage = atof (data); // "atof" function converts data type (d-t) *const char" to d-t *float
    Serial.printf("%.3f",battVoltage);
if (battVoltage > 13)
    {
    digitalWrite(green,HIGH); // If the battery voltage is greater than 13 Volts the green status light turns on, car is on
    digitalWrite(red,LOW);
    }
    else
    {
    digitalWrite(green,LOW); // If the battery voltage is less than 13 Volts the red status lights turns on, car is off
    digitalWrite(red,HIGH);
    }
    
}


void loop() {
if (digitalRead(butt) == HIGH)
    {
    State = !State;
    }
   
   
if (State == 1 && OldState == 0) // Digitally toggles a button and overcomes debounce
    {
        digitalWrite(D7, HIGH);    
        Particle.publish("start_car", PRIVATE); // Starts car
        delay (1000);
        digitalWrite(D7, LOW);
        OldState = State;
    }
    else if (State == 0 && OldState == 1)
    {
        digitalWrite(D7, HIGH);
        Particle.publish("stop_car", PRIVATE); // Stops Car
        delay(1000);
        digitalWrite(D7, LOW);
        OldState = State;
        
    }

}

Photon- Vehicle Device

C/C++
This is the code that was on the Particle Photon and was running through Carloop the device. It uses the CanBus to detect the battery voltage and other pins on the OBDII port to power and ground the board. The program controls multiple relays that fool the car into starting. These relays are turned on or off via an event from the cloud (start_car OR stop_car). It is also publishing the vehicles voltage back to the cloud as a verification that he vehicle is started.
// This #include statement was automatically added by the Particle IDE.
#include <carloop.h>


Carloop<CarloopRevision2> carloop;

int LED = D7;
int EngStart = D6;
int EngOn = D5;
int ClutchSwitch = D3;
int bypassA = A3;
int bypassB = A2;



void setup() {
Particle.subscribe("start_car", startcar, MY_DEVICES);
Particle.subscribe("stop_car", stopcar, MY_DEVICES);

carloop.begin();


pinMode(LED, OUTPUT);
pinMode(EngStart, OUTPUT);
pinMode(EngOn, OUTPUT);
pinMode(ClutchSwitch, OUTPUT);
pinMode(bypassA, OUTPUT);
pinMode(bypassB, OUTPUT);
}


void startcar(const char *event, const char *data)
{
    delay(5000);
    digitalWrite(bypassA, HIGH);
    digitalWrite(bypassB, HIGH);
    digitalWrite(ClutchSwitch, HIGH);
    digitalWrite(EngOn, HIGH);
    delay(1000);
    digitalWrite(EngStart,HIGH);
    delay(1000);
    digitalWrite(EngStart,LOW);
    
    digitalWrite(LED, HIGH);
    
}

void stopcar(const char *event, const char *data)
{  
    digitalWrite(bypassA, LOW);
    digitalWrite(bypassB, LOW);
    digitalWrite(ClutchSwitch, LOW);
    digitalWrite(EngOn, LOW);
    digitalWrite(LED, LOW);
}

void loop() {
carloop.update();

float battVoltage = carloop.battery();


if (battVoltage >= 13)
    {
        String voltage = String(battVoltage);
        Particle.publish("voltage", voltage, PRIVATE);
        delay(1000);
    
    }
    else 
    {
        String voltage = String(battVoltage);
        Particle.publish("voltage", voltage, PRIVATE);
        delay(10000);
    }
}

Credits

Mackay Burke

Mackay Burke

0 projects • 1 follower
Gabe Hay

Gabe Hay

0 projects • 1 follower
I like to work on cars and small robotics, but really anything with moving parts peaks my interest. A.K.A. Diehard Mechanical Engineer

Comments

Add projectSign up / Login