[Diao Ye learns programming] Arduino hands-on (54)---big button micro button module

insert image description here

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensor and actuator modules on hand, in accordance with the concept of true knowledge (must be hands-on), for the purpose of learning and communication, here I am going to try and do more experiments one by one. Whether it is successful or not, it will be recorded ——Small progress or unsolvable problems, I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiment (data code + simulation programming + graphics programming)
Experiment 54: button module electronic building blocks light touch switch big button micro button compatible with arduino raspberry pie

insert image description here
Knowledge point: key switch (switcher)
is also called tact switch, micro switch, which first appeared in Japan (called: sensitive switch). , When the pressure is removed, the switch is disconnected, and its internal structure is realized by the force change of the metal shrapnel. The tact switch is composed of inserts, bases, shrapnel, buttons, and cover plates. Among them, the waterproof tact switch adds a layer of polyimide film on the shrapnel.

The key switch has the advantages of small contact resistance, precise operating force error, and diversified specifications. It is widely used in electronic equipment and white goods, such as audio-visual products, digital products, remote controls, communication products, and household appliances. , security products, toys, computer products, fitness equipment, medical equipment, currency detector pens, laser pointer buttons, etc. Because of the environmental conditions of the tact switch (the elastic force less than 2 times the pressure/environmental temperature and humidity conditions and electrical performance), large-scale equipment and high-load buttons are directly replaced by conductive rubber or dome switch metal shrapnel, such as medical equipment, TV remote control etc.

Commonly used 12 12 7.5 series
This is a tactile key switch product that can be equipped with key caps imitating Omron switches. It consists of four positioning columns and four pins. The switch size is 12*12mm. Widely known as 12x12 waterproof tact switch. The conventional cap color of the switch is black and yellow; the key force is divided into three standard force levels: 250gf, 180gf, and 160gf.

insert image description here
insert image description here
Basic parameters of key switch
1. Resilience: 50gf min
2. Stroke: 0.25±0.1mm
3. Rating: 50mA 12VDC
4. Contact Resistance: 50mΩ max(initial)
5. Insulation Resistance: 100MΩ (minDC 250V)
6. Dielectric Strength: AC250V(50/60Hz for 1minute)
7. Electrically Life: 100,000 times
8. Environment temperature: -25℃~+105℃
9. Operating Force: 180/230(±20gf)
10. Heat distortion temperature Seal temperature: 250℃-280℃

insert image description here
The key switch is connected (pressed) and disconnected (released)
. The key switch consists of 4 pins, which can be divided into two groups. The two pins are always connected. When the switch is pressed, the Diagonal connection. As can be seen from the figure below: when the button is not pressed: pins 1 and 2 are connected, and pins 3 and 4 are connected. When the button is pressed, pins 1, 2, 3, and 4 are all connected.

insert image description here
Several circuits using key switches

insert image description here
insert image description here
insert image description here
insert image description here
Precautions for using the key switch
1. When welding the key switch terminals, if a load is applied to the terminals, there may be looseness, deformation and deterioration of electrical characteristics due to different conditions. Please pay attention when using it.
2. When using a through-hole printed circuit board or a circuit board other than the one recommended, it will change due to the influence of thermal stress, so please fully confirm the soldering conditions in advance.
3. When welding twice, please do it after the first welding part returns to normal temperature. Continuous heating may cause deformation of the peripheral part, loosening of the terminal, falling off and deterioration of electrical characteristics.
4. Regarding the setting of welding conditions, it is necessary to confirm the actual mass production conditions.
5. The product is designed and manufactured on the premise of DC resistance load. When using other loads [inductive load, capacitive load], please confirm separately.
6. For the mounting hole and pattern of the printed circuit board, please refer to the recommended size recorded in the product drawing.
7. The switch should be used in a structure that is directly operated by a human being. Please do not use it for mechanical detection functions.
8. When the tact switch is operated, if a load above the specified value is applied, the switch may be damaged. Be careful not to apply more than the specified force to the switch.
9. Please avoid pressing the operation part from the side.
10. For the flat shaft type, press the center of the switch as far as possible. For the hinge structure, the shaft press position will move when pressed, please pay special attention.
11. After the switch is installed, if the adhesive of other parts is hardened, etc., please contact a professional when it passes through the heat storage hardening furnace.
12. If the surrounding materials of the whole machine using the switch produce corrosive gas, it may cause poor contact and other phenomena, so please fully confirm in advance.
13. The carbon contact point has the characteristic that the contact resistance changes due to the pushing load. When using it in a voltage divider circuit, etc., please use it after sufficient confirmation.
14. For models other than the sealed type, please pay full attention to the intrusion of foreign matter.

Key switch module introduction
The key switch module is simply packaged key switch, it has 3 pins, namely VCC, OUT, GND. The button module is one of the most frequently used electronic components. It is composed of a pair of light touch dials. When pressed, it is closed and turned on, and when released, it is automatically disconnected. The key switch module is a digital input module (known as the simplest sensor), when the switch is pressed, OUT sends out a 1 (or 0) signal, and when the switch is released, the signal is 0 (or 1).

insert image description here
Name: button module
Size: 11*22mm
Color: red (blue) equicolor keycap
Voltage: 3.5, 5V
Output: digital level (press 1 or 0, release 0 or 1)
Interface: Arduino 3P interface SVG
platform: Arduino , MCU, ARM, Raspberry Pi, etc.

Two types of key switch modules
1. Pull-down resistor key switch module

insert image description here
Schematic diagram of the electrical principle of the pull-down resistor key switch module

insert image description here
Instructions for the use of the pull-down resistor key switch module:
Not pressing the switch - output 0V, low level, 0 state
Press the switch - output 5V, high level, 1 state
Note: When the key is not pressed, pins 1 and 2 are connected , Pins 3 and 4 are connected. When the button is pressed, pins 1, 2, 3, and 4 are all connected.

  1. Pull-up resistor key switch module
    insert image description here
    Schematic diagram of the electrical principle of the pull-up resistor key switch module

insert image description here
Instructions for the use of the pull-up resistor key switch module:
Not pressing the switch - output 5V, high level, 1 state
Press the switch - output 0V, low level, 0 state

Note: When the button is not pressed, pins 1 and 2 are connected, and pins 3 and 4 are connected. When the button is pressed, pins 1, 2, 3, and 4 are all connected.

Knowledge points
Pull-up and pull-down
Pull-up is to clamp an uncertain signal at a high level through a resistor, and the resistor acts as a current limiter at the same time; pull-down is to clamp an uncertain signal at a low level through a resistor; pull-up It is to inject current into the device, sink current, and pull down is to output current and pull current; weak and strong are just different resistance values ​​of the pull-up resistors, and there is no strict distinction.

The pull-up resistor means that one end of the resistor is connected to VCC, and the other end is connected to a logic level access pin (such as a microcontroller pin), which pulls an unknown level up to a stable high level state. The pull-down resistor means that one end of the resistor is connected to GND, and the other end is connected to a logic level access pin (such as a microcontroller pin), which pulls an unknown level down to a stable low level state.

The role of pull-up resistors and pull-down resistors
In digital logic circuits, a signal is either 0 or 1. It is because of this that the design of digital circuits is simple and reliable. Usually, a voltage of 5v (or close to 5V) is used to represent the on state, which represents a high level and corresponds to state 1. The off state is represented by a voltage of 0v (or close to 0v), which represents a low level and corresponds to state 0. Some development boards are based on 3,3V, so use 3.3V as high level.

If the voltage in a line is in an indeterminate state (such as when a pin is not connected to any other circuit), then we say that its voltage is floating, it will change over time, jump, and it is easy to be damaged. The influence of the external environment. Circuits in this indeterminate state are randomly interpreted as high or low. This phenomenon is also called electronic noise. However, the program must be strictly accurate, so the circuit design must avoid the line voltage in a floating state. We can use pull-up resistors or pull-down resistors to keep the voltage of the circuit in a certain state at any time, which is the role of pull-up resistors and pull-down resistors.

insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132233995