Projects

Car Alarm

Built for Computer Architecture class during spring 2010 semester. The car alarm circuit is armed as soon as it is powered. For notification, there is a red “armed” LED, and the LCD screen displays the word “ARMED!” When the shock sensor is activated, the alarm sounds and the LCD screen displays the message “!öALARMö!” There are two types of shocks that can be triggered: the soft shock induces the alarm to ring two times for a quarter of a second each, with three quarters of a second in between rings; the strong shock causes the alarm to ring indefinitely. After a soft shock, the circuit returns to being armed; the LCD screen is updated accordingly.

A Programmable Integrated Circuit (PIC) microcontroller, clocked with a 20 MHz quartz oscillator, drives the operation. It converts the analog output from the shock sensor into digital data, then interprets that digital data to determine whether a shock has been triggered. If a shock has been triggered, the PIC determines whether it was a soft or strong shock, and induces the appropriate response in the alarm and on the LCD display. The LCD display has a 16 x 2 screen; it is connected to the breadboard by a ribbon cable. Much effort was undertaken to write drivers for this LCD display using a combination of C and assembly. A solid state relay isolates the 5V logic circuit from the 5V alarm circuit, as the alarm circuit needs to draw much more current than a logic circuit could provide.