Hot answers tagged

29

A low-current method I used once was to connected a switch between two microcontroller I/O pins. One I/O was configured as an output (SWO). The second was configured as an input (SWI) with its programmable internal pull-up enabled. The switch state was sampled infrequently (every 10 ms) by a software interrupt routine. The reading sequence was: drive SWO ...


28

There is a conductive pad on the bottom side of the button that "shorts" out the spiral. Usually dark grey since it is carbon based. The spiral just give you a higher probability that the pad will touch both sides at the same time.


23

A SPDT (Single Pole Double Throw) button would be your ultra efficient button. Source: http://www.ni.com/white-paper/3960/en/ In your case the 1P would go to the MCU, the 1T to VCC, the 2T to GND.


19

ESD from fingers is diverted to shield for 15kV test. Confirmed in spec • Ground terminal available to protect against static electricity. • Beware path inductance 1nH / mm (typ) and avalanche static discharge rise time can cause ground shift relative to IC unless over PCB ground plane or further protection of signals and Gnd to IC. Anecdotal My 3rd ...


17

Actually, if you look closely you see that many of these holes connect switch channels with their common signal (ground or supply). So this is simply to test the fabrication of the FPC itself, before it is put through the expensive process of trying to put relatively large switches onto a flexible substrate. Happens quite often that an FPC features special ...


15

I have managed to complete the aforementioned task using timers, however, since then, I have used all timer registers (and match resisters that are available) for more important tasks within the same project. In that case, you're going about this all wrong. Unless you absolutely need the high resolution, low jitter, or other hardware features of the ...


15

Can multiple Schmitt triggers in series fully debounce a switch? A single Schmitt trigger with a analog filter in front of it can be used for debouncing. However, after that Schmitt trigger, the signal is fully digital. Any additional Schmitt triggers won't change that. Ideally they will preserve the signal. On a separate topic, debouncing in firmware ...


15

What you are looking at is a rubber dome switch. These are typically custom parts, and the minimum order quantity (and design costs) are likely to be out of your price range. Depending on your requirements, you have a couple of options: Some rubber dome switches are available in standard PCB-mountable packages (containing both the rubber dome and the ...


14

Basically no substance is perfectly smooth, or inelastic. When two objects come together with any force, there is kinetic energy that needs to die down upon contact. So you get some "ringing", plus since the surface isn't smooth the contact makes/breaks a bit randomly until settling (e.g. even with a sliding switch the contact resistance will vary upon ...


13

It's a silicone rubber keypad. They're usually custom-made for the application (MOQ in the thousands or more if a mold has to be made). They require a matching PCB that is either gold-plated or printed with a carbon paint in order to form the key patterns. The rubber keys have a conductive silicone bit molded into the back of the keys that bridges the PCB ...


12

Using Schmitt triggers in series would not further reduce bounce. Consider the filter: The input is (U). The red line is a 50% threshold, the output of which is seen as signal (A). It bounces each time the input crosses. The green lines are something like 33% and 66%, as you had stated. But the output (B) only switches when the input (U) crosses from one ...


11

From a quick view into the datasheet, the "anti-tempering" is advertised as a feature of the microcontroller. The chip has hardware support for anti-tempering measures and the button is on the dev board for you to test and evaluate these features. See http://en.wikipedia.org/wiki/STM32#STM32_F2: Static RAM consists of 64 / 96 / 128 KB general purpose, 4 ...


11

Your question is wisely asked. In general, an AC-rated switch should be derated for DC use. AC ratings are usually higher than the DC rating, if available, for the exact same switch. There's a reason for that. AC has zeroes, twice per AC cycle. A manually opened (or closed) switch happens "randomly," relative to the AC cycle. Any "arcing" drawn out as the ...


10

Yes, debouncing in both directions is necessary if you want a guaranteed single edge each time the switch changes state. Fortunately, you don't need any additional hardware for debouncing if the switch is connected to a microcontroller. If the micro has a internal pullup, which many do, you need nothing more externally than the switch between the micro pin ...


10

How long will the button be pressed? If it is not a toggle switch (which keeps its state) but a momentary switch then the current flowing when the button is pressed is largely irrelevant due to the short time that the button is actually closed. Either of the two circuit you show is OK, it does not matter. You can assume that the input leakage and/or ...


10

One method I have used takes advantage of the capacitive nature of CMOS inputs. simulate this circuit – Schematic created using CircuitLab In the circuit above the switch, when closed, allows the pull-down resistor to charge/discharge the input capacitances of the GPIO down to ground level. The trick with this circuit is to use the bidirectional ...


9

The modern switches don't contain any magic. In fact, they are less complicated and expensive than real physical on/off switches. These switches are just inputs to a microcontroller. The microcontroller can tell when you push the button, and the rest is policy encoded in the firmware to decide what to do about it. The power is usually switched with ...


9

Torsten, yes, introducing a 40ms delay into the ISR is a wrong idea. Usually, buttons are polled in the main() loop. Interrupts are good when you have to detect an event with a very small latency, or when an event is very brief. Button presses occur on the scale of hundreds of ms. An operator will hold the button down for 50ms to 100ms. Then if your ...


8

It's a little SPST microswitch in the common Omron B3F form factor. They have various options for button height, actuating force, colour and, as you note, type of material for the mechanical "top". Specifically, yours looks like a B3F-1070.


8

You can have one 555 timer be the enable for a second 555 timer. One in mono-stable mode and the other oscillating at whatever frequency your pulses need to be at. Then just make the first 555's single pulse long enough to contain how ever many pulses of the second you want. simulate this circuit – Schematic created using CircuitLab Note the pin ...


8

The gold plated interlocking concentric "rings" are two contacts of a switch. When they are electrically connected by a resistance of less than say 10 k Ohms the circuit is activated. The white "rubber" has a conductive ring on it which is close to but not touching the gold contacts - it is probably held clear by small protrusions in the rubber moudling. ...


8

Another possibility is to disable features when assembling a "lesser" model. So you can use the same PC or flex circuit for a range of models and decide which options to implement during manufacture.


8

Debouncing is a FAQ. You should be able to find... nearly unlimited numbers of web pages on the topic. Smith commented about Jack Ganssle's widely read PDF on the topic, as well. And with all these answers you've got both hardware and software methods. I'll add to this "literature" just a little bit by mainly talking about ideas that aren't already covered ...


8

If your button is a piezo switch, then the only power required is the power generated by pressing the button. For example: R2/C1 collect the energy produced by pressing the piezo. D1 prevents the C1 voltage getting too high. R1 drains C1 when the button is released. The MCU GPIO must be in input, no pull mode. Voilà, button detect with zero current draw ...


7

I can't put code in a comment, hence an answer. My 'framework' for simple embedded systems is the main loop with polling. To minimize current consumption the main loop can wait let's say 50 ms in idle mode. I don't know which uC you use, I am familiar with PICs, which can awake from a sleep by an interrupt. set up an interrupt to wake me from sleep each 50 ...


7

I know that this posting is a "shopping" type question and falls outside the normal design type questions accepted here. But I know the frustration that can occur when a favorite mouse starts to get really flakey and the buttons lose their click!! This particular type of switch is commonly used in various types of computer mice and track ball units. I have ...


7

Here is a digital domain solution. There is not a name for a component that fits the function you describe, but you can use a synchronizer together with a finite state machine. simulate this circuit – Schematic created using CircuitLab Synchronizer First, your finger is not synchronized to the clock, so the button is assumed to be an asynchronous ...


7

The switch is probably a SPST-NO tact switch with an earth connection to the metal top (for ESD protection reasons). The earth connection would be the center connection on the right. If you want to simulate the switch closure you can short either of the two left to either of the two right (top/bottom) connections via a switch. There is no necessity to ...


7

The spirals are electrical contacts. Shorting the traces in a spiral causes the keypress to be detected. The backs of the keys have a layer of conductive rubber or plastic. Pressing that layer against the spirals closes the circuit just like you had use a piece of wire to make the connection.


Only top voted, non community-wiki answers of a minimum length are eligible