back to
www.audiodesignguide.com

To get more information contact me at: webmaster@audiodesignguide.com


Car Alarm system

Simple, Secure, Fast and Cheap.

ATTENTION: This system cannot prevent any kind of attempted theft so I suggest to use also a good lock pedals

Introduction

This project born to protect my new car.

SEAT IBIZA Sport 1.9 TDI citrus yellow

This car has been choiced to have the same technology and reliability of Volkswagen/Audi at lower cost.

Probably not all know that Seat, Skoda, Volkswagen and Audi use the same mechanical parts.

My previous experience with SEAT Leon 1.9 TDI has been positive, 230000Km with a unique problem at mass air flow sensor.

This previous car still run without problems and now I have sell it.

Sensors

Utrasonic Sensor with One Arming LED and Three Triggering LEDs - HT-S05

Key Specifications/Special Features:
- SMT design
- Compatible with most car alarm
- LED alert
- Detects object movement
- Built-in quartz-controlled ultrasonic volumetric
- Protection sensor
- Ultrasonic sensitivity adjustable

produced by Zhongshan Hongmao Electronics Co. Ltd 
got on
SM E-COMMERCE Ebay at 12 euro

   
Tilt sensor HT-S12C

Key Specifications/Special Features:
-Analysis of all pitches and data motion
-Three-dimension high technology digital movement sensing
- Best sensor for detecting the jacking up or theft of the wheel
- Sensitivity adjustable
- Working voltage: 8V-24V
- Static current: <3mA (When at 12V)
- Max. work current: <6mA (When at 12V)

produced by Zhongshan Hongmao Electronics Co. Ltd
got on
SM E-COMMERCE Ebay at 18 euro

Sounder

6-Ton-Alarm-Sirene, Alarmsirene, Hupe, Signalhorn, Horn 

got on SM E-COMMERCE Ebay at 5.9 euro
The best alarm system use self-powerer siren but I don't' think this increase the security level because if the
bonnet will be opened it is very easy to suppress the sound of the siren.

 

Transmitters

All the functions of this Home Alarm system will be activated and deactivated by this little Rolling Code transmitter show in the photo (buy at: http://www.e-madeinchn.com or Ebay shop).

The Rolling Code is the most secure method to transmit data and reduce risk of scan.
With this method the serial number of any transmitter is stored in the receiver at the learning time.
This serial number is composed by many bits so to find it with a scanner it is impossible because it need many time.

Four button for these functions:
A) manual start of sound and light alarm
B) enable protection of the system
C) send help sms (future characteristic)
D) disable protection of the system

Receiver

Model No.: RM4SHR-L(Latch Mode)
Operating Voltage: 5 VDC
Operating Current: 5 mA
Receiving Sensitivity: -101 dbm
Type of Modulation: AM
Type of Output: TTL
Operating Frequency: 315 MHz 
Coding Type: Rolling Code
Module Dimension: 37mm x 25mm x 8mm

This project use these components:

  • PIC 16F876A DIP Enhanced Flash microprocessor
  • RM4SHR-L 4 channel Rolling Code Superheterodyne Receiver Module with decoder
  • 3 x BC337 transistor
  • 3 x automotive pcb relay Onron G8QN
  • 2 x red micro leds
  • 1 x microswitch 2 way 2 positions
  • 1 x 7805 Positive Voltage Regulators
  • 1 x 1N5406 diodes
  • 5 x 1N4004  diodes
  • 2 x 560ohm 1/4w
  • 3 x 4700ohm 1/4w
  • 3 x 10Kohm 1/4w
  • 2 x 18pF ceramic capacitors
  • 1 x 20MHz quartz
  • 1 x 0.1uF 63v poliester
  • 1 x 100uF 25v electr. capacitor.
  • 1 x 28 pin socket

Alarm module hardware

contact me by email to have the Eagle files

Alarm module firmware

To program the 16F876A Microchip microcontroller I have used the PICKIT 2 USB Development Programmer/Debugger (cod. PG164120 or DV164121) with a cost about 40-50$

I love the C language because it is very simple if compared to assembler.

The my C source has been compiled with HI-TECH PICC-Lite Compiler.

HI-TECH Software has provided a  freeware HI-TECH PICC-Lite compiler as a tool for hobbyists and students, but the licence allows its use for commercial purposes as well. It is ideal as a teaching tool for an introduction into the 'C' language and embedded programing on a Microchip device.

Follows the source file to compile with this command:

picl -16F877 Antifurto_ver6b.c

#include  <pic.h>
#include  <string.h>
#include  <stdio.h>
#include  <stdlib.h>


#define PIC_CLK 20000000
#include "delay_alternative_enhanced_precision.h"

//__CONFIG(WDTDIS & XT & UNPROTECT & LVPDIS);	// freq. clock 4MHz
//__CONFIG(WDTDIS & HS & UNPROTECT & LVPDIS);	// freq. clock 20MHz
__CONFIG(WDTDIS & PWRTEN & HS & UNPROTECT & DEBUGDIS & BORDIS & LVPDIS); 

#define PORTBIT(adr, bit) ((unsigned)(&adr)*8+(bit))

static bit ALR     @ PORTBIT(PORTA, 0);
static bit RDY     @ PORTBIT(PORTA, 1);
static bit CAL     @ PORTBIT(PORTA, 2);
static bit LGT     @ PORTBIT(PORTA, 3);

static bit IN0     @ PORTBIT(PORTA, 4);
static bit IN1     @ PORTBIT(PORTB, 0);
static bit IN2     @ PORTBIT(PORTB, 1);

static bit PUD     @ PORTBIT(PORTB, 2);
static bit PUC     @ PORTBIT(PORTB, 3);
static bit PUB     @ PORTBIT(PORTB, 4);
static bit PUA     @ PORTBIT(PORTB, 5);

#define MIN1	(60*10)
#define SEC10	(10*10)

void DelayMs(int cnt);
void Alarm_long(void);
void Alarm_prog(void);


void Strobe()
{
    DelayMs(200);
    LGT = 1;
    DelayMs(150);
    LGT = 0;
    DelayMs(200);
}

void Blink()
{
    Strobe();
    DelayMs(200);
    Strobe();
}

void main()
{
    TRISA   = 0b00010000;  // All port A are output
    TRISB   = 0b11111111;  // All port B are input
    TRISC   = 0b00000000;  // All post C are output
	
    ADCON1  = 0x06;	   // All posts AN4-7 to digital

    PORTA   = 0b00000000;
    PORTC   = 0b00000000;


    RDY  = 0;
    ALR  = 0;
    LGT  = 0;

    DelayMs(250);

    //##################################################
    //# main loop
    //################################################## 	
    while(1)
    {
	if (RDY == 0)
	{
	    //********************************************
	    //* A button
	    //*   Start Alarm
    	    //********************************************
	    if (PUA == 1)
	    {
		ALR = 1;
		RDY = 1;
		Strobe();
	    }
	    //********************************************
	    //* B button
	    //*   Enable Alarm system
    	    //********************************************
	    else if (PUB == 1)
	    {
		RDY = 1;
		Blink();
   	    }
	}
	else
	{
	    //********************************************
	    //* D button
	    //*   Disable Alarm system
	    //********************************************
	    if (PUD == 1)
	    {
		RDY = 0;

		if (ALR == 1)
		{
		   ALR = 0;
		   Strobe();
		}
		else
		{
		   Blink();
		}
	    }
	    //********************************************
	    //* Senson Alarm
	    //********************************************
	    else if (IN1 == 0 || IN2 == 0)
	    {
		ALR = 1;
		Strobe();
		Alarm_long();
		ALR = 0;
		Strobe();
	    } 
	}
    }
}

void Alarm_long(void)
{
    int i;

    //*******************************************
    //* create 3min loop
    //*******************************************
    for (i = 0; i < SEC10; i++)
    {
    	DelayMs(100);

	if (PUD == 1) break;
    }

}

void DelayMs(int cnt)
{
    unsigned char	i;

    do {
	i = 4;

	do {
		DelayUs(250);
	    } while(--i);
    } while(--cnt);
}


Installation

On new SEAT Ibiza to switch on the direction lights it is necessary to connect a cable to the central buttons console of the car.

There are 20 wires on the red connector and if you connect the white-green wire to the ground for a second the direction lights start or stop to blink