Everyone probably faced freezing of keyholes, and I am not an exception. The past winter was warm, which is good, but the castle on the gate tortured me. The temperature outside the window jumps around zero, and the mechanical part thaws and freezes. Run, warm up, lubricate tired, and I decided to end it. Since I have an electromechanical lock that opens beautifully from the intercom, in any weather, I decided to hang a RFID reader on it. I ordered the RFID module RDM6300 (125Khz), a dozen keys, a pair of stm8s003f3p6 and st-link. Why stm8s003f3p6 - personally, my desire to get acquainted with this MK, that is, to kill two birds with one stone. What I wanted to get in the end:
The device that stored 6 ID-Schnick keys;
Ability to overwrite stored ID-Schnick;
Simplicity: a pair of buttons, a pair of LEDs, without displays and external interfaces.
Our goals are clear, objectives are defined. For the work, comrades!
I started with the case: I did not find anything ready, I made it myself. The front panel was made of transparent plastic, placed an RGB LED in the middle, of course there was no assembly at hand and it was too lazy to make an order for it, so I replaced it with singles , around which I made a drawing (ala engraving) with a drill. ')
The case was made of white plastic, installed the coil of the reading room, after altering the conclusions, as China, and filled it with epoxy resin. Filled not in the case, anything happens, maybe you have to shoot. Glued the front panel. Started to the hardware.
Threw a scheme in the eagle.
A brief explanation of the connectors: leds - RGB LED with common anode, SWIM - st-linka connector, RFID - connector for RDM6300, BUT - two control buttons with a common cathode (BUT1 - “mode” button, BUT2 - “reset”.
The power supply turned out a little tricky, made from improvised means.
He spread the board to the size of the case, corroded it and assembled it.
The principle of this. The display on the panel in the normal mode: blue - standby, green / red - respectively, the key came up / did not fit. When you press the "mode" button, the lock goes into the key recording mode, on the panel the blue quickly flickers, waits for the key to be entered. We bring the key, lights up green - the key is recorded and automatically switches to the normal mode.
And now the video work.
The project was created in ST Visual develop IDE, I think there is nothing complicated in it.