Contact us
Contact: Miss Wei +86-18002932564
Phone: +86-769-85168706
Fax: +86-769-85168706
E-mail: 2573495894@qq.com
QQ: 2573495894
Address: No.84, Xinsan Road, Xin'an Avenue, Fanshen Village, Ludong Community, Humen Town, Dongguan City
Talking about the working principle of the circuit of the dip switch!
2018-12-09
The dip switch has four output terminals and a common terminal in each digit of the dial switch. When the decimal password is set to a binary number, all bits containing 1 will be connected to the common terminal, while all bits containing 0 will be in a floating state. In fact, the function of a switch is to connect all the one bits to the common terminal. The device for locking the door is also an electromagnet. There is a core in the center of the electromagnet, and the position of the core is not exactly in the middle of the electromagnet. One end of the core is outside the electromagnet. When the electromagnet is powered on, it will produce magnetism, which will attract the core and make the part of the core outside the electromagnet move towards the center of the electromagnet. Then, a spring is used to press the other end of the electromagnet, so that when the electromagnet is powered on, one end of the core can move from the outside to the inside. After power is cut off, the core moves from the inside to the outside due to the action of the spring. This is like a regular lock. When the key is twisted, the lock bolt will retract into the hole, and when the key is released, the lock bolt will pop out. This achieves the method of replacing ordinary locks with electromagnets.
Knowing the principles of toggle switches and locks, we can set up a circuit that uses toggle switches to control relay unlocking, which is the electronic password lock control circuit of toggle switches, thus achieving the function of electronic locks. We can use a binary password that converts all the 1s in the door handle to decimal, and finally output a signal to control the on/off of the transistor and the on/off of the electromagnet. When the input password (converted binary password) contains a number of ones equal to the number of ones set in the circuit, the unlocking function can be achieved. This allows for the implementation of some simple passwords, but there may still be the problem of duplicate codes. Careful analysis of binary numbers from 0 to 9 will reveal that some values have the same position of 1 but different numbers, such as 6 (0110) and 7 (0111), where the position of 1 in the middle two digits is equal but 7 has an additional 1. If the password is set to 1, then when entering password 7, the function of 6 can also be achieved, and the door can still be opened. Moreover, passwords with 0 cannot be set. This needs improvement. We can add a NOR gate to the circuit, which means that if there is an input of 1, it outputs 0, and if there are all 0s, it outputs 1. This solves the problem of duplicate codes and also solves the problem of not being able to set a 0 password. Combine the NOR and NOR gates with AND gates, and then use the output signal to control the transistor. By connecting all the one signal to the AND gate and the suspended signal to the NOR gate, a relatively perfect circuit can be set up, so that problems such as duplicate codes will not occur.

