Laser/Lazzzorauth: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
K (TOC placement)
(16 dazwischenliegende Versionen von 5 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== Hardware  ==
+
== SYSTEM IS LIVE! Here is how it works ==
 +
[[Datei:Lazzzorauth snippet.jpg|300px|right]]
  
[[Datei:lazzzorauth.jpg|200px|thumb|left|done.]]
+
'''Important notes:'''
  
 +
'''You need a key, or a key owner to log in for you before you can lazzzor!'''
  
Consists of:
+
If you have lazzzor privileges but not yet a key, get in touch with [[Benutzer:mzeltner|mzeltner]], [[Benutzer:overflo|overflo]] or [[Datei:core.png]]!
- Raspberry Pi
+
- Arduino
+
- 16x2 LCD
+
- OneWire (iButton suport)
+
- 3 Leds for status indication
+
- 1 Button
+
- a 6-Port Network Switch
+
+
  
== Software ==
 
  
2012-07-15-wheezy
+
<font color='Red'>If you try to print '''without anyone being logged in, CorelDraw will freeze'''<br />and print jobs will have to be cancelled!</font> After deletion CorelDraw will unfreeze.
  
Node.js
 
  
Arduino code
+
Currently public list of people with lazzzor privileges:
 +
 
 +
{{Lasermenschen}}
 +
 
 +
=== Workflow / Howto ===
 +
* '''Logging in''': put in your key
 +
* Print as per usual!
 +
* '''Be externally responsible''': hold logout button for 3 seconds (display doesn't changes after 3s but after releasing the button)
 +
* External (i.e. not you!) print as per usual
 +
* '''Log out''': tap logout once (if you're done lazzzoring or overseeing lazzzoring!)
 +
__TOC__
 +
== Hardware  ==
 +
 
 +
Consists of:
 +
* Seagate Dockstar (because the Raspberry Pi SD cards died several times)
 +
* Arduino
 +
* RGB 16x2 LCD
 +
* OneWire socket (iButton support)
 +
* A red Button
 +
* a 6-Port network switch
 +
 
 +
== Software ==
 +
 
 +
* Dockstar linux distro from USB stick
 +
* Node.js Server / Database
 +
* Arduino code (because there was a spare Arduino laying around..)
  
 
== How ==
 
== How ==
  
 
Hardware documentation
 
Hardware documentation
[[Datei:Lazzzorauth_bb_small.png|200px|thumb|left|Breadboard aufbau (made with fritzing)]]
+
{|width="100%"
[[Datei:Lazzorauth sensor.jpg|200px|thumb|left|The hall effect sensor + Preamp]]
+
|width="33%"| [[Datei:Lazzzorauth_bb_small.png|340px|thumb|center|Breadboard Aufbau (made with fritzing)]]
 +
|width="33%"| [[Datei:Lazzzorauth.jpg|300px|thumb|center|wall mount box]]
 +
|width="33%"| [[Datei:Lazzorauth sensor.jpg|300px|thumb|center|The hall effect sensor + Preamp]]
 +
|}
  
  
There is a hall effect sensor placed right over the valve of the airassist.
+
There is a hall effect sensor placed right over the valve of the air-assist. This valve is opened to enable a static airflow as soon as a laserjob starts and is disabled when the job ends.
  
This valve is opened to enable a static airflow as soon as a laserjob starts and is disabled when the job ends.
 
  
 +
== Protocols ==
  
<p style="clear:both">
 
  
Software documentation
+
All states are now handled by the embedded system.
* tbd (pitfalls, config, buildprocess)
+
  
== Protocols ==
+
The Arduino only displays what the embedded system sends it.
  
 +
The arduino sends ibutton scans and pushbutton events.
  
''' this is partially wrong and needs correction'''
+
<pre>
 +
//this code is followed by the button id
 +
#define BUTTON_ID_SCANNED  'I'
  
Arduino SENDS:
+
// error is followed by error description (like CRC error)
 +
#define ERROR_CODE  'E'
  
 +
// when button is triggered
 +
#define LOGOUT_USER  'B'
 +
// when button is long pressed
 +
#define EXTERNAL_USER_RESPONSIBLE  'X'
  
{|
+
//button was removed, this event is ignored by embedded system
!align ="left" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"|<small>Code</small>
+
#define BUTTON_REMOVED  'L'
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Parameter<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Expected reply<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>What does it mean<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Example<small>
+
|-
+
|style="border:1px dotted lightgray;"| I
+
|style="border:1px dotted lightgray; text-align:center;"|<iButton ID>
+
|style="border:1px dotted lightgray; text-align:center;"| A, N
+
|style="border:1px dotted lightgray; text-align:center;"| IButton scanned
+
|style="border:1px dotted lightgray; text-align:center;"| I:33-000000000000
+
|-
+
|style="border:1px dotted lightgray;"| X
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| O
+
|style="border:1px dotted lightgray; text-align:center;"| Lazzzor shutdown button hit (eXit)
+
|style="border:1px dotted lightgray; text-align:center;"| X
+
|-
+
|style="border:1px dotted lightgray;"| P
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| P
+
|style="border:1px dotted lightgray; text-align:center;"| Ping! /Heartbeat
+
|style="border:1px dotted lightgray; text-align:center;"| P
+
|}
+
  
 +
// sensor from valve magnetic field
 +
#define LASERJOB_STARTED  'J'
 +
#define LASERJOB_FINISHED  'S'
 +
</pre>
  
  
Raspberry sends:
+
The embedded system sends:
 +
<pre>
 +
'A' followed by text for the FIRST line
 +
'B' folloowed by text for the second line
 +
'C' Turn color on LCD to
  
 +
GREEN =1
 +
RED =2
 +
BLUE =4
 +
</pre>
  
{|
+
== Where ==
!align ="left" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"|<small>Code</small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Parameter<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Expected reply<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>What does it mean<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Example<small>
+
|-
+
|style="border:1px dotted lightgray;"| A
+
|style="border:1px dotted lightgray; text-align:center;"|<username>
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Authenticated
+
|style="border:1px dotted lightgray; text-align:center;"| A:OVERFLO
+
|-
+
|style="border:1px dotted lightgray;"| N
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Not authenticated (invalid Button)
+
|style="border:1px dotted lightgray; text-align:center;"| N
+
|-
+
|style="border:1px dotted lightgray;"| O
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Off (in response to X)
+
|style="border:1px dotted lightgray; text-align:center;"| O
+
|-
+
|style="border:1px dotted lightgray;"| P
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Heartbeat / PING
+
|style="border:1px dotted lightgray; text-align:center;"| P
+
  
|-
+
LazzzorAuth runs @ 10.20.30.27
|style="border:1px dotted lightgray;"| E
+
|style="border:1px dotted lightgray; text-align:center;"| <Error>
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Some Error occured
+
|style="border:1px dotted lightgray; text-align:center;"| E:Network down!
+
  
 +
Its located right begind the Lazzzor station on the wall.
  
|}
+
== Links ==
 +
[https://github.com/Metalab/LazzzorAuth/ Arduino + Embedded system code on github]
 +
 
 +
== Gotchas ==
 +
The Arduino used is a Arduino UNO but it's bootloader is from an Arduino DUEMILANOVE.
 +
 
 +
Pick this as target when compiling a new firmware for it..
 +
 
 +
When the Arduino is plugged in it displays "Linux booting.. hang in there"
 +
 
 +
Once the embedded system is up it sends a welcoming message over serial and this flushes the display.
 +
 
 +
[[Kategorie:Howto]]
 +
[[Kategorie:Infrastruktur]]
 +
[[Kategorie:Lazzzor]]
 +
[[Kategorie:Metalab_OS]]
 +
[[Kategorie:Projekte]]

Version vom 26. März 2013, 06:29 Uhr

SYSTEM IS LIVE! Here is how it works

Lazzzorauth snippet.jpg

Important notes:

You need a key, or a key owner to log in for you before you can lazzzor!

If you have lazzzor privileges but not yet a key, get in touch with mzeltner, overflo or Core.png!


If you try to print without anyone being logged in, CorelDraw will freeze
and print jobs will have to be cancelled!
After deletion CorelDraw will unfreeze.


Currently public list of people with lazzzor privileges:


jain7th, Tie-fighter (Acryl, Holz, Leder, Latex), WSyS, Hetti (Acryl, Holz, Leder Gravur), meta, Emi, uniq, PK, Quinn5452, amir, Red667, Mind

Workflow / Howto

  • Logging in: put in your key
  • Print as per usual!
  • Be externally responsible: hold logout button for 3 seconds (display doesn't changes after 3s but after releasing the button)
  • External (i.e. not you!) print as per usual
  • Log out: tap logout once (if you're done lazzzoring or overseeing lazzzoring!)

Hardware

Consists of:

  • Seagate Dockstar (because the Raspberry Pi SD cards died several times)
  • Arduino
  • RGB 16x2 LCD
  • OneWire socket (iButton support)
  • A red Button
  • a 6-Port network switch

Software

  • Dockstar linux distro from USB stick
  • Node.js Server / Database
  • Arduino code (because there was a spare Arduino laying around..)

How

Hardware documentation

Breadboard Aufbau (made with fritzing)
wall mount box
The hall effect sensor + Preamp


There is a hall effect sensor placed right over the valve of the air-assist. This valve is opened to enable a static airflow as soon as a laserjob starts and is disabled when the job ends.


Protocols

All states are now handled by the embedded system.

The Arduino only displays what the embedded system sends it.

The arduino sends ibutton scans and pushbutton events.

//this code is followed by the button id
#define BUTTON_ID_SCANNED   'I'

// error is followed by error description (like CRC error)
#define ERROR_CODE  'E'

// when button is triggered
#define LOGOUT_USER  'B'
// when button is long pressed
#define EXTERNAL_USER_RESPONSIBLE  'X'

//button was removed, this event is ignored by embedded system
#define BUTTON_REMOVED  'L'

// sensor from valve magnetic field
#define LASERJOB_STARTED  'J'
#define LASERJOB_FINISHED  'S'


The embedded system sends:

'A' followed by text for the FIRST line
'B' folloowed by text for the second line
'C' Turn color on LCD to 

GREEN =1
RED =2
BLUE =4

Where

LazzzorAuth runs @ 10.20.30.27

Its located right begind the Lazzzor station on the wall.

Links

Arduino + Embedded system code on github

Gotchas

The Arduino used is a Arduino UNO but it's bootloader is from an Arduino DUEMILANOVE.

Pick this as target when compiling a new firmware for it..

When the Arduino is plugged in it displays "Linux booting.. hang in there"

Once the embedded system is up it sends a welcoming message over serial and this flushes the display.