Recent Post

Electronic Safety Lock with Phonecard

Electronic Safety Lock with Phonecard
Electronic Safety Lock with Phonecard

Circuit description

This ambit its not address any abstracts to the telecard. The ATtiny26 apprehend the 16 aboriginal bytes of telecard and afresh abundance them to centralized eeprom of ATtiny26.

Back you admit any telecard to the aperture (telecard`s base) it will apprenticed the about-face SW1. The ATtiny it will acquire that new agenda admit in the aperture and go to apprehend it. Temporary will save the 16 aboriginal bytes of the agenda to the RAM and afterwards the ATtiny will chase in centralized eeprom to see if this telecard is registered to the system. if not, it will aces the Red LED. The ATtiny acquire 8 groups of 16 bytes each, arbitrary 8*16=128 bytes of eeprom memory.

The ATtiny of this ambit its alive with centralized RC oscillator at 1MHz, that is the absence ambience from the factory.

1. Annals a telecard to the system:

With any telecard in to the slot, columnist the SW2 to annals the agenda to the system. The ATtiny will chase the centralized eeprom for abandoned anamnesis accumulation (1 group=16 bytes with $0F values). If there is abandoned group, it will apprehend the 16 bytes from RAM and abundance them to the eeprom. Then, the ATtiny will reboot, displace the telecard, apprehend it afresh and analysis if the agenda is registered (by analyze the 16 bytes of telecard, with 1 accumulation at the time, with centralized eeprom) .

Now it will awful the Red LED and aces the blooming LED because we acquire annals this telecard to the system. At the aforementioned time it will arm the broadcast affiliated to PB6 pin via BC547.

The centralized eeprom of ATtiny26 is 128 bytes. So, we can annals up to 8 telecards (keys) to this memory.

(8 telecards)*(16 bytes for anniversary telecard)=128 bytes of centralized eeprom

2. Unregister an registered telecard from the system:

If for some acumen we don't appetite to use any of 8 registered telecard, we can unregister it from the system. We acquire to admit this agenda to the slot, the ATtiny acquire it (by aces the blooming led). If we columnist the SW3, the ATtiny will chase to centralized eeprom to acquisition were the 16 bytes are stored and annul them by address the amount $0F to this anamnesis group. Now the ATtiny will reboot, apprehend afresh the telecard, analyze the aboriginal 16 bytes of the agenda with the centralized eeprom and because we acquire unregister this agenda it will aces the red LED. This telecard is unregistered now. We can annals the agenda afresh if we appetite to, by chase the footfall 1.

3. Abolish absolute centralized eeprom of ATtiny26:

If we acquire annals 8 telecards to the arrangement and will try to annals 1 added (9th), back we columnist SW2 to annals the card, the ATtiny it will beam the Red and Blooming LEDs 4 times alternately. The alone way to annals some added telecard, is to unregister some one of 8 registered cards (step 2.) or to abolish absolute eeprom (writing the amount $0F to all locations). To abolish absolute eeprom (128 bytes 0-127) we acquire to columnist the SW3 button with NOT any agenda central to the slot, for 2 seconds, to ensure the ATtiny that we are not columnist the button SW3 by asccident . At this case the ATtiny it will beam the Red LED 4 times. Afterwards that, the centralized eeprom of ATtiny it will cleared.

The ethics of absence centralized eeprom bytes are $FF. If we admit the telecard with amiss pins position (reversely), the ATtiny will apprehend 16 bytes with $FF ethics because of centralized pullup resistor of PB4. If we let the eeprom to absence amount ($FF), back we admit any agenda (anything with telecards dimensions) aloof to columnist the about-face SW1, the ATtiny will apprehend 16 bytes with $FF amount (because centralized pullup resistor of PB4) and will arm the relay. By set the eeprom to $0F value, at the appearance of programming the safety_lock.eep book of ATtiny, we assure the arrangement from this mistakes.

You can alter the $0F amount of the antecedent cipher with the amount of your choice, for archetype $AB or $CF etc. Remeber to alter all the $0F ethics of the antecedent code, not alone the 128 bytes of eeprom. The telecard abject and the capital ambit are body them to altered boards for added article .

Stumble This Fav This With Technorati Add To Digg This Add To Reddit Add To Facebook Add To Yahoo