YNNOK
YNNOK Release status: stable [box doku] | |
---|---|
Description | NFC Door opening mechanism. |
Author(s) | A.B. (Bilex) |
Platform | Sophistication |
Information
YNNOK (You Need NO Key) is an AVR driven RFID door opening device. A small motor is directly attached to the lock and turns a shortened key like a human would do to lock or unlock the door. A 125khz RFID system detects transponders, reads the inner ASCII string and compares it to a list of valid strings. YNNOK is connected to a RS-484 databus to communicate with the local WiFi router. This makes the system accessible with your computer or any handheld device. Since this ability the NFC option is hardly used but still implemented.
Mechanics
The mechanical heart of YNNOK is a low-budget DC gearmotor. A small brass adapter with a 2mm groove grabs the key and turns it around. In order to give the AVR information about the position of the key a potentiometer was installed a the backside of the motor. A gear reduction between the motor and the poti shaft increases the operation range of the poti. Due to this trick a common poti can measure more than two total rotations which is important to lock the door twice. The accuracy of this simple feedback system is still satisfying enough to turn the key into three positions by reading the poti with a 10-Bit ADC.
The lock inside the door is old and creepy. Under normal conditions it works fine, but sometimes it stucks. Especially if a user tries to lock the door and pulls it at the same time. To prevent a mechanical damage, the motor current is measured. If the motorcurrent grows above a certain level the motor will turn to its normal position again.
After a few weeks of operation the open backside of the motor with touchable cables and solder contacts annoyed a few frequent YNNOK users. To make it more safe and to have a proper cable guidance a motorcap was printed with a 3D printer.
YNNOK was designed with Autodesk Inventor and most parts were manufactured with the DAS-LABOR CNC-Fräse.
Electronics
YNNOK works with a Atmega8 mikrocontroller programmed with avr-gcc. Next to that is a MAX485 to get data from outside into the device and a L293D motordriver IC to get the motor running. Since YNNOK works all day and night it is important to focus on efficiency. Instead of using a 7805 voltage regulator a DC/DC converter is used.
The RFID reader (OEM SR/MR-232) can be found here: http://www.rss-systems.de/ or on eBay. It is not metioned in the documentation but a MAX485 (SOIC-8) can make the board talk RS485 as there a suitable patterns on the PCB.
WiFi access
YNNOK uses a TL-WR1043ND WiFi router with OpenWRT to provide wireless access. The router comes with an USB port that is used to talk to a Teensy 2.0 Board programmed with Arduino. Several LUA scripts are used to send data via the serial port to the Teensy Board and then the data is transmitted via the RS-485 databus to YNNOK. The Teensy Board is redundant so far because the data could be easily transmitted via a USB -> RS-485 converter but in the future the board can do some more useful stuff like illumination dimming and so on. YNNOK has an inner counter that counts up if the door status changes to OPEN. After door opening it sends back the new value via the bus. To read the counter ser2net is used. Just listen to the right TCP port and get the actual door count!
FAQ
Is it safe?
Video
To be done..