Release status: stable [box doku]
|Description||NFC Door opening mechanism.|
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-485 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.
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 at 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 motor current 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 CNC-Fräse
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.
Two LED bars are in use as a status indicator. A handful BI-Color SMD-LEDs (SMP4-SBC) are mounted behind a piece of acrylic glass. If the door is open they shine GREEN or RED when the door is locked. In normal operation (closed but not locked) the color of both LEDs is changing slowly with ~30% of total brightness to save power. Unfortunately I realized too late that you need a higher PWM resolution than 8-Bit to do cool fading things including gamma correction.
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. Update: Kitchen light can be controlled via Wifi.
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!
Is it safe?
No. The read-only transponders can be read while you wear them in your wallet and then it is possible to replicate them later. But compared to a normal lock this is more annoying than lock-picking which is not possible with YNNOK. Using the WiFi access in combination with an ordinary social-hack might be the easiest way to skip YNNOK.
What happens during power blackout?
YNNOK will not work as there are no backup batteries so far. Update: I got two nice 25Ah PB-batteries BUT some flatmates are scared of FIRE! This is the reason why they are safely stored and not in use...
How many people are using YNNOK?
Whats the actual doorcount?
Is this Open Source?
YES! Download the CAD data here or contact me at nihilist at online dot de.
Is there a to-do list?
The status LED illumination needs some improvement. Update: Done.
A nice web GUI and an Android App/Widget would be nice. Update: A python-script running on the router makes YNNOK listen to TouchOSC
To be done..
Download CAD Data[Bearbeiten]
Here you can download the mechanical part of the game in *STEP and *IGES data.