Lasted main problem: controlling the central locking of my car using arduino (see down)
This month i discovered arduino and because i know some programming and also a little, little bit of electrics i tought about some features that would be easy and cool to add them to my car.
1.[Locking car using RFID]
First of all my car radio key is broken and it costs me too much to repair it (x10 arduinos) and i tought that with a RFID module i can unlock my car more easly then inserting the key, today i opened the door to see how my locking sistem works and it have 3 wires.
1- ground
2- lock 0.10V
3- unlock 0.10V
Whenever 2 or 3 touch the ground the car is opened or closed, a single touch is enough but the car is keeping that connection continious.
something like this:
Where the switch is the main door locking switch by hand or key
so, what i think is that the car know from what wire i drow the current and also i can't just drow current from both of them, there might be a problem trying to control it but i'll figure it out if you don't know too.
I'm thinking to use MFRC522 as a RFID module. after a lot of google searches for 1+ m RFID module which costs a lot from what i founded
2.[Alarm using Piezo Vibration module]
From an old broken car alarm i recovered the vibration sensor which have a piezo sensor and can give me digital sign whenever it detects even a big clap (it also have a potentiometer)
For this feature will be real simple to code but the biggest problem is to detect whenever the car is locked or not.
What i writed so far is just a few because i was focused on the car itself and how it works, diagrams...
here's only the alarm, very simple, not tested, maybe i'm embarrass myself with this but anyway
[OUTDATED]
// Car alarm project @2016
const int statusOFFPin=12; // status led for alarm
const int statusONPin=11; // status led for alarm
const int sensorVPin=13; // piezo vibration sensor module - alarm
const int sensorPPin=0; // PIR sensor module - autolocking if unlocked, no movement, autolocking button - on
const int triggerPin=0; // horn, lights, car wipers ...
const int carlockPin=0; // car locked ?
int alarmtime=5000 // time for horn, light to turn off
void setup()
{
pinMode(statusONPin, OUTPUT);
pinMode(statusOFFPin, OUTPUT);
pinMode(sensorVPin, INPUT);
pinMode(sensorPPin, INPUT);
pinMode(triggerPin, OUTPUT); //relay
pinMode(carlockPin, INPUT); //with resistor
}
void loop()
{
//check for sensors if car is locked
delay(100)
if (carlockPin > 0)
{
digitalWrite(statusONPin, HIGH)
digitalWrite(statusOFFPin, LOW)
if (digitalRead(sensorVPin) > 0)
{
digitalWrite(triggerPin, HIGH)
delay(alarmtime) //alarm time
}
else
{
digitalWrite(triggerPin, LOW)
}
}
else
{
digitalWrite(statusOFFPin, HIGH)
digitalWrite(statusONPin, LOW)
}
}