130 likes | 362 Views
The Motorcycle Alarm . By Matt Hawkins Vermont Technical College Electrical Projects. Project Description. The original circuit used a 555 timer and a variety of capacitors and transistors. Project Description.
E N D
The Motorcycle Alarm By Matt Hawkins Vermont Technical College Electrical Projects
Project Description • The original circuit used a 555 timer and a variety of capacitors and transistors
Project Description • I changed the idea of the circuit to use our micro controller and the use of a multi color LED as an indicator. • For controlling the alarm system I will use two switches, one will be hidden somewhere on the bike which will act as the activation switch and the other will be located on the kick stand mount which is what will set the alarm off.
Project Description • I will use 12 volts to supply the siren and also use a 7805 to step the voltage down for the micro controller and the multi color LED • I used a dual coil relay so that continuous power to the relay was not necessary only pulses from the micro controller are necessary to switch the relay. This will save power making the system more efficient.
Project Description • I am using a Piezo buzzer which is a 12 volt DC siren that has an output of 105 dB and a frequency range from 1500-3500 Hz • I'm using a multi-color LED from best Hong Kong electronics, There common anode and have a maximum current rating of 25 mA
Circuit Description OFF Blue LED on Siren off PB1 Open PB1 Closed TRIPPED Red LED on Siren Off PB1 Open ARMED Green LED on Siren Off TRIGGERED Red LED on Siren On! PB2 Open PB2 Closed
Circuit Design • To determine the values of resistance for maximum brightness to the LED i set up a circuit and tested values. • I determined that I would use 100 ohm resistors for the blue and green LED and I would use a 200 ohm resistor
Programming Using states make the code quite simple. This is my main loop that controls my main program. I created sub routines for each of the states.
Problems • I originally had two voltage regulators one for 5 volts and one for 3.3 volts • I had to use a 20 pin MC9SO8SH8 because freescale did not offer a 16 pin PDIP for a 5 volt application although I didn’t need any where near 20 pins
Problems Cont. I was stuck on my schematic for a long time with connection Like an idiot for some reason I forgot to put base resistors on the transistors that operate the LED.