I must say WOW! Thanks for all the posts!
I read them all, which was quite challenging! and now I'm full of questions.. haha, it was difficult understanding some of it, but it does make sense.
1. can you please explain "MOSFET" i have never heard of it :/
2. why do you draw your resistors in a zic-zac line :s
Thanks
Great, I'm glad you are interested in learning. I wish I had been as interested at your age, it took me too long to mature
OK, 1) a MOSFET.
I will give you a brief explanation, but I challenge you to use a search engine with MOSFET as the keyword and read as much as you can. You'll find technical as well as layperson discussions and will glean a lot.
A MOSFET is a type of FIELD EFFECT TRANSISTOR. (Metal Oxide) Just like the LEDs and PIC in your original circuit, it is a solid state electronic device, or semiconductor. In short, it has three terminals called the "GATE", "DRAIN", and "SOURCE". In the diagram of the N-channel Mosfet in my schematic, the Gate is to the left, connected to the switch. The Drain is connected to Vcc and the transducer (alarm sounder), and the Source is connected to ground potential.
There are two types of MOSFETS, P and N channel. The N-channel is characterized by switching ON when a proper positive voltage is applied to the gate with respect to the ground reference at the source terminal. In a power MOSFET this might be 12 volts. So, when Vcc is applied to the GATE through the "pull-up" resistor, the gate collects an electrostatic charge at the same Vcc potential. The gate is insulated from the Drain and Source, but the electric field produced by the charge influences the conductive state of the Drain and Source. In the case of N-channel, the D-S junction will conduct with almost zero resistance, not unlike a closed switch. This is only possible when the door switch is OPEN.
This is because a closed door switch brings the gate to GROUND POTENTIAL, meaning zero volts. You may think, why? The Vcc is still connected. Yes, but through a 10 megOhm resistor, which "drops" the voltage across it to the potential that ground provides. When there is no ground potential (switch is open), there is no where for the Vcc to go, therefore Vcc is presented to the gate terminal and the MOSFET switch conducts and energizes the alarm sounder.
A P-channel MOSFET works quite the opposite but still based on the same principals. A ground potential will turn the MOSFET switch ON and Vcc will turn it OFF. Other than that, the concept is the same. N-channels are schematically identified by the arrow pointing toward the gate, whereas P-channel points away from the gate. That is, in most standard schematics.
There is lots more to say here, and I will go into why the "reset" switch, capacitor, and diode are needed later. But I suggest you read further on the basics of MOS technology.
2)
The resistor? That is technically the standard symbol for a resistor, though sometimes a rectangular shape is used. As you browse the internet for MOSFET information you'll see it illustrated both ways.