Expanding the possibilities of an electromechanical lock
Everyone must have experienced keyhole freezing, and I am no exception. Last winter was warm, and that's good, but the castle on the gate tortured me. The temperature outside the window jumps around zero, and the mechanical part thaws, then freezes. I'm tired of running, warming up, lubricating, and I decided to end this. Since I have an electromechanical lock that opens perfectly from the intercom, in any weather, I decided to hang an RFID reader on it. Ordered the RFID module RDM6300 (125Khz), a dozen keys, a pair of stm8s003f3p6 and st-link. Why stm8s003f3p6 - personally, my desire is to get acquainted with this mk, that is, to kill two birds with one stone.
What in the end I wanted to get:
Our goals are clear, tasks are defined. To work, comrades!
He started from the building: I did not find anything ready, I did it myself. The front panel was made of transparent plastic, the RGB LED was placed in the middle, ofcourse, there was no assembly at hand and it was too lazy to make an order for it, so I replaced it with loners , around which I made a drawing with a drill (ala engraving).
The case was made of white plastic, installed the reader’s coil, after redoing the conclusions, since China, and filled it with epoxy. It was not poured into the case, anything can happen, it may be necessary to remove it. I glued the front panel. Proceeded to the hardware.
Threw a scheme in an eagle.
Brief explanation of the connectors: leds - RGB LED with a common anode, SWIM - st-linka connector, RFID - connector for RDM6300, BUT - two control buttons with a common cathode (BUT1 - button "mode", BUT2 - "reset".
Power supply I turned out a little tricky, made it at hand. I
spread the board to the size of the case, etched and assembled.
The principle of operation is this. The panel displays in normal mode: blue - standby mode, green / red - respectively, the key came up / did not fit. When you press the " mode »the lock goes into the key recording mode, on the panel the blue quickly flickers, about waiting for the key to be entered, hold the key, the green light turns on - the key is recorded and automatically goes into normal mode
.
The project was created in ST Visual develop IDE, I think there is nothing complicated in it.
Those interested can download the scheme and stvd project .
What in the end I wanted to get:
- A device that stored 6 key ID schnicks;
- Ability to overwrite stored ID-shnikov;
- Simplicity: a pair of buttons, a pair of LEDs, without displays and external interfaces.
Our goals are clear, tasks are defined. To work, comrades!
He started from the building: I did not find anything ready, I did it myself. The front panel was made of transparent plastic, the RGB LED was placed in the middle, of
The case was made of white plastic, installed the reader’s coil, after redoing the conclusions, since China, and filled it with epoxy. It was not poured into the case, anything can happen, it may be necessary to remove it. I glued the front panel. Proceeded to the hardware.
Threw a scheme in an eagle.
Brief explanation of the connectors: leds - RGB LED with a common anode, SWIM - st-linka connector, RFID - connector for RDM6300, BUT - two control buttons with a common cathode (BUT1 - button "mode", BUT2 - "reset".
Power supply I turned out a little tricky, made it at hand. I
spread the board to the size of the case, etched and assembled.
The principle of operation is this. The panel displays in normal mode: blue - standby mode, green / red - respectively, the key came up / did not fit. When you press the " mode »the lock goes into the key recording mode, on the panel the blue quickly flickers, about waiting for the key to be entered, hold the key, the green light turns on - the key is recorded and automatically goes into normal mode
.
The project was created in ST Visual develop IDE, I think there is nothing complicated in it.
Those interested can download the scheme and stvd project .