sabato 11 gennaio 2014

How to hack a desk lamp ..

Una sera mi sono trovoto a fissare la mia lampada da scrivania ormai vecchia di molti anni e come dire sono stato illuminato ...l'hacker che c'è in me si e' risvegliato .... perche non portarla nel nuovo millenio e convertirla a LED , risparmiando energia ma soprattutto eliminando quel fastidioso  "flicherio" che fanno le vecchie lampade al neon quando vengono accese ..




Ecco come si presentava la lampada prima dell'intervento..









Per prima cosa è stato necessario eliminare tutta l'elettronica..  sempre se lo starter e il reattore si possono definire  elettronica :-)





Eliminati tutti i vecchi collegamenti elettrici, il cablaggio è satto  molto semplice, è basta portare  il 220V fino all'interrittore posto sopra la lambada 

          


Completato il semplice cablaggio e' stato necessario trovare il giusto power supply che avesse le caratteristiche di potenza e il fattore di forma corretto per poter essere alloggiato nella lampada.

Dove se non su  Ebay, si proprio su Ebay  si possono trovare tanti modelli con varie potenze per led da 1-3-5-10W

                

Per il progetto della lampada ho impiegato LED da 1W incollati su un disco di alluminio tagliato della dinsione corretta per poter entrare nell'alloggiamento del vecchio neon.
I collegamenti tra led e led sono stati eseguiti con cavi di rame con diametro 1,5 mm .

Ecco le foto della sequenza di assemblaggio e saldatura LED :



Consiglio di incollare i led alla base di alluminio con una colla bicomponente termoconduttiva per migliorare la dissipazione termica dei led le migliori sono quelle con componente di argento


    

Una volta completati tutti i collegamenti dei led e prima di installare tutto nell'alloggiamento della lampada ho collaudato il tutto collegando il relativo pawer supply.

   

Visto il buon risultato tutto e' stato integrato nella lampada andando a sostituire il neon originale ..


                    




Ed ecco la lampada finita e' stata trasformata a led con un risparmio energetico di 25W passando da un consumo di 33W  a 8W  un quarto della potenza originale con una luminostà comparabile .

Questo e' la prima lampata che ho convertito ma ormai il neon nel box e molte luci in casa sono state trasformate a led ..




Cheers ..
       Francesco 


mercoledì 8 gennaio 2014

Access control with Arduino Mega & Wiegand RFID Card Reader

The needed was replace the old key access connected to my automatic access gate , during the investigation on internet the decision was to upgrade  all the access of  my house with RFID access control .
I'm a maker so I don't like by a system and install, I wand do it as i like.
First of all need to do some shopping ... ebay is my preferred market place and for electronic ICs_Processors_Store is the best, so put all the necessary  in your basket : 

N. 3 Waterproof Security Door Black ID Wiegand 26 RFID Card Reader 125KHz EM4100




N .1 Mega 2560 ATmega2560-16AU Board Arduino-compatible ( Arduino team sorry this is not the original one .. :-( ....) 






N.5pcs RFID Tokens 125Khz EM4100



This is the minimum required  for start .. sure you need a laboratory with a minimum set of  component and knowledge of Arduino programming a Electronics.

I have start my project using Arduino library developed from Monkey Board
http://www.monkeyboard.org )

You can download the original library from : https://github.com/monkeyboard/Wiegand-Protocol-Library-for-Arduino.git

Unfortunately this library is able to manage only one reader and so only one access can be managed, the library is built on the hardware capability of the Arduino UNO , only two interrupt available on pin,  both used for the two line communication used from Wiegand protocol.

Thanks  Arduino Mega more interrupt available  on external pin if you use due the limit is the number of pin ..
From Arduino web site http://arduino.cc/en/Reference/attachInterrupt is possible compare the interrupt capability for each boards :

Boardint.0int.1int.2int.3int.4int.5
Uno, Ethernet23
Mega25602321201918
Leonardo32017
Due(see below)
The Arduino Due board has powerful interrupt capabilities that allows you to attach an interrupt function on all available pins. You can directly specify the pin number in attachInterrupt().

With six external interrupt on pin change  Arduino Mega can manage three RFID readers and consequently three doors/gate, but the library need some modification for manage all the interrupt and for recognize from which readers come the request.

In the modified library the command WIENGAND.getGateActive(); was added in the WIENGND class for recognize the gate from where the request come .

Library can be download from : https://github.com/ugge75/Wiegand-Protocol-Library-for-Arduino-MEGA-2560

I will update the blog  with the first release of software in the coming weeks.

Cheers..

Francesco