Push button

Status
Not open for further replies.

schneiderj

New Member
Hello

I have a discussion with a friend about the push button I have on my application. These push button are connected to ground through a 10 k resistor. And when activated they are connected to + 5 V through a 2 k resitor.

He tell that not a good choice : the best one is to reverse that connection (innactive mode to + 5 V through the 10 k).

Can you tell me what is the choice for a good electronics guy ?

Thanks you for your help,
Jean-Marie
 
What purpose of the 2k resistor?

A pull down is normally required (10k in this case) but no other resistors are required.

It sounds like any momentary SPST switch will do so long as it meets other criteria you might have such as size, temperature range, operating force etc.
 
The configuration for a switch is either an active low or active high using either a pull up or pull down resistor arraignment. See the images. Your choice of which one to use depends on the logic circuit it is being coupled to.

**broken link removed**
 
Hi schneiderj,

please check the attached schematic. You might use one pullup or one pulldown resistor to change level when pressing a pushbutton. Your method means one wasted resistor and absolutely no function. (Check S3 wiring)

Boncuk
 

Attachments

  • PULLUP-DOWN..gif
    9.4 KB · Views: 180
Last edited:
Thanks you for your explanations.

The press button is connected to PORTB to control the stepper motor (I am unable to find the good English word : "fin de course" in French).
So I am using to many resistors... I will modify my scheme accordingly.

I see also some example where there is a capacitor between the PORTB and Ground (if the default is Ground). When is that necessary (push button are not on the same CI at a distance of 1 or 2 meters for example) ?
 

The capacitor on your Port B is likely there to prevent "switch bounce".

Ron
 
I have run into problems using a pull down resistor and a switch to +5 V, as well as a debounce capacitor. Immediately after the switch is pressed the capacitor can draw a lot of current as it charges, pulling down the +5 V supply and causing problems with the rest of the circuit(microcontroller reset). Adding a smaller value high side resistor (I used 330 ohm) will prevent this from happening.
Maybe this is not necessary if you have a better power supply circuit.
 
With a micro controller input, You need not worry about de bouncing a switch, Your software can do it for you.
See the Ganssle paper.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…