YNNOK: Unterschied zwischen den Versionen

Aus LaborWiki
Wechseln zu: Navigation, Suche
Keine Bearbeitungszusammenfassung
 
(66 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{ProjektInfoBox
{{ProjektInfoBox
|name       = YNNOK  
|name=YNNOK
|status     = stable
|status=stable
|image       = 10072_621793727869575_160964232_n.jpg
|image=10072_621793727869575_160964232_n.jpg
|description = NFC Door opening mechanism.
|description=NFC Door opening mechanism.
|author     = A.B.
|username=Bilex
|username    = Bilex
|author=A.B.
|version    =
|platform=Sophistication
|update      =
|update=
|platform   = Sophistication
|tags=Bewegung und Mechanik
|license    =  
|download    =  
}}
}}
== Information ==
== Information ==


'''YNNOK'''  ('''Y'''ou '''N'''eed '''NO''' '''K'''ey) 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.
'''YNNOK'''  ('''Y'''ou '''N'''eed '''NO''' '''K'''ey) 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.


==Mechanics==
==Mechanics==


The mechanical heart of YNNOK is a low-budget DC gearmotor. It operates with 12V and is connected to a L293D motordriver IC.
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.
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 motorcurrent grows above a certain level the motor will turn to its normal position again.
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.


YNNOK was designed with Autodesk Inventor and most parts were manufactured with the DAS-LABOR CNC-Fräse.
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 [https://www.das-labor.org/wiki/CNC-Fraese CNC-Fräse]
<gallery>
<gallery>
Housing.JPG|CNC-Milled housing & bearings
Ynnokexpl1.png
Gears.JPG|Gears
Ynnokexpl2.png
Drill.JPG|Screw without hopper
Cap.jpg
</gallery>
</gallery>


==The Machine==
==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 [http://www.murata-ps.com/datasheet?http://www.murata-ps.com/data/power/oki-78sr.pdf 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.


===Motor & Gear & Housing===


First tests were made with a low-budget gearmotor found on ebay. Those are advertised with high torque rates. A closer look at the data sheet  shows that sometimes these numbers are the stall values. That means: No rotation at given load. The required torque for proper operation was not known before and there was no clue how to calculate it. The motor not only needs to press the material through the pipe and the die, sometimes the drill needs to cut pellets on their way from the hopper inside the heating pipe. That means that the required power depends on the used material.  The first test-material was a gift from the plastic lab of the University Duisburg Essen. They gave us a whole 25kg bag for testing purpose.  Unfortunately the material was not suitable for processing it in a selfmade-extruder due to its low [http://en.wikipedia.org/wiki/Melt_flow_index MFI] (Melt-flow-index) value. Even with very high temperatures the material did not become liquid as expected. Even without a die the first testing drivetrain nearly stalled.
<gallery>
caseynnok.jpg| YNNOK en detail
</gallery>


After that failure I met Helmut at the Labor. Helmut is a polymere expert. He advised me to try a PE with a higher MFI. He recommended me to contact a well-known local plastic company in order to ask for a helping hand. A few days later another 25kg PE bag with PE pellets inside (amazing: PE pellets packed in a PE bag.) arrived at the Labor. Within these days I found a 120V gearmotor in the Labor basement. Someone told me it was used as mechanical switch in a high voltage application. This means: The device temperature may increase during continuous operation.  Finally the motor was operated with 15V and there where no thermal problems at all.  Although the motor is very big and seems to be very powerful (no datasheet or further information available) a gear box was added to increase torque by lowering the speed of rotation. The gearbox was manufactured by using the Labor [https://www.das-labor.org/wiki/CNC-Fraese CNC-Fräse]. This was the most intense adventure I experienced with the machine so far. Proper gears and a solid housing are important to handle the power of the transmission.  According to the power consumption and the speed of rotation the torque is approx. 10Nm during normal operation and using the high MFI LD-PE.
==Illumination==
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.  


<gallery>
<gallery>
Housing.JPG|CNC-Milled housing & bearings
IMG 4700.jpg
Gears.JPG|Gears
IMG 4701.jpg
Drill.JPG|Screw without hopper
IMG 0116.JPG
</gallery>
</gallery>


===Heating Unit===
== 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. <b>Update:</b> Kitchen light can be controlled via Wifi. <br />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!
 
<gallery>
<gallery>
First test.JPG|First test
ynnokrouter.jpg| TL-WR1043ND and Teensy Board
Testing.JPG|25V / 8,37A 
</gallery>
</gallery>


===Die===
== FAQ ==
 
'''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.


===Shaping Unit===
'''What happens during power blackout?'''


== Distribution ==
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...


[[Datei:Haufen.JPG|250px|thumb|left|Final Band storage]]
'''How many people are using YNNOK?'''
[[Datei:Shopping.JPG|250px|thumb|left|Band in shopping trolley]]
 
Five.
 
'''Whats the actual doorcount?'''
 
776 (14.04.2014)<br />
3796 (19.08.2014)<br />
5946 (18.12.2014)<br />
6821 (18.02.2015)<br />
'''10.000''' (28.08.2015)<br />
13742 (27.04.2016 - Two Year Mark!)<br />
16527 (21.12.2016)<br />
18464 (18.05.2017)<br />
'''20.059''' (13.10.2017)<br />
 
'''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?'''
 
<s>The status LED illumination needs some improvement.</s> <b>Update: </b> Done.<br />A nice web GUI and an Android App/Widget would be nice. <b> Update: </b> A python-script running on the router makes YNNOK listen to [http://hexler.net/software/touchosc TouchOSC]


== Video ==
== Video ==


Video on [http://www.youtube.com/watch?v=OmV4TNrrzQA Youtube]
To be done..
 
== Download CAD Data ==
 
[http://das-labor.org/w/images/9/92/YNNOK.zip Here] you can download the mechanical part of the game in *STEP and *IGES data.
 
== Helpful Links ==
 
[http://ediy.com.my/index.php/blog/item/40-send-message-to-serial-port-or-router-using-lua Sending Message to Serial Port of Router using Lua]
 
[http://www.cse.dmu.ac.uk/~sexton/ENGD2003/openwrt/arduino%20teensy%20openwrt.html  Teensy/Arduino WiFi with ser2net and OpenWRT]
 


[[Kategorie:Mechanik]]
[[Kategorie:Mechanik]]

Aktuelle Version vom 13. Oktober 2017, 19:56 Uhr

     
YNNOK

Release status: stable [box doku]

10072 621793727869575 160964232 n.jpg
Description NFC Door opening mechanism.
Author(s)  A.B. (Bilex)
Platform  Sophistication



Information[Bearbeiten | Quelltext bearbeiten]

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.

Mechanics[Bearbeiten | Quelltext bearbeiten]

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

Electronics[Bearbeiten | Quelltext bearbeiten]

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.


Illumination[Bearbeiten | Quelltext bearbeiten]

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.

WiFi access[Bearbeiten | Quelltext bearbeiten]

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!

FAQ[Bearbeiten | Quelltext bearbeiten]

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?

Five.

Whats the actual doorcount?

776 (14.04.2014)
3796 (19.08.2014)
5946 (18.12.2014)
6821 (18.02.2015)
10.000 (28.08.2015)
13742 (27.04.2016 - Two Year Mark!)
16527 (21.12.2016)
18464 (18.05.2017)
20.059 (13.10.2017)

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

Video[Bearbeiten | Quelltext bearbeiten]

To be done..

Download CAD Data[Bearbeiten | Quelltext bearbeiten]

Here you can download the mechanical part of the game in *STEP and *IGES data.

Helpful Links[Bearbeiten | Quelltext bearbeiten]

Sending Message to Serial Port of Router using Lua

Teensy/Arduino WiFi with ser2net and OpenWRT