Let's Make Robots!

Small Alarm Wiring questions

Hello people, I am in doubt for this little project I thought about. This was the main question: Is it right? Mainly about the fact I have no resistors for the switches, I saw some schematics and when using 3v they use no resistors. The connections are: The two separate pads are for a reed switch. The ones on the left side of the PIC are for a small speaker The ones in front of the PIC are the power ones. Right one is VSS and left one is VDD I would be pleased if you could take a minute of your time, look at it and answer my small question. GT

AttachmentSize
Small_alarm.brd5.83 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The main reason to include resistors on a switch is to stop the input "floating around", and makes sure that its quickly tied to its respective logic level , in short it depends on the pics internal impedance.  (with arduino you can switch internal resistors for this)

Omitting the resistor can lead to unpredictable results - sometimes you can get away without them, (google Tristate)

"Pull up" means connecting a resistor from positive line to your input pin , then your switch from ground to input pin, this means when the switch is open contact the resistor pulls the pin up to positive supply rail (meaning logic 1), when the switch is operated it shorts the input pin to ground (meaning logic 0)

"Pull Down" means connecting a resistor from ground line to your input pin , then your switch from positive supply to input pin, this means when the switch is open contact the resistor pulls the pin down to ground supply rail (meaning logic 0), when the switch is operated it shorts the input pin to supply (meaning logic 1)

I have used reed switches on many projects and its always good to place a capacitor across the contacts (it debounces and helps presevere the reeds contacts if its carrying "much" current).

 

So, I should put the resistors to debounce and get better results. Thats okay

Now I was interesed about the campaciter between the reed´s leads, around what value should I use, would a 100uf 16v electrolytic cap be ok?

Thank you very much,

GT

I use 0.1uf non-electrolytic (electrolytic would work provided the polarity is observed ) for debounce .

NB :- debounce can be done in software .....however a quick cap across the switch is easier.