The project my son decided we should work on is an alarm system for his room. The first alarm we built is based on the lessons that we learnt using the conrad starter kit. It is based on the same components – a 9v battery, resistors, LEDs and an NPN transistor. The circuit can be seen in the image below.
The only components I added are a piezo buzzer, marked as buzzer in the circuit diagram, which you can buy for about 1 euro at most electronics retailers, and two switches marked as on/off and door in the diagram. For the on/off switch we used a lock switch which mean that the alarm can only be turned on or off with a key. For the door switch we used two power strips with multi.core wire stuck to them and then covered in aluminum foil – when the door opens, the contact is broken and the alarm is activated. The description for the circuit is below – give it a try! Please note that in the diagram I used an LED symbol as Circuit Simulator doesn’t have a buzzer component. The code for the circuit is listed below. Just copy and import the code into the free Java Circuit Simulator to get a feeling for the circuit.