Monday, November 8, 2010

iButton electronic lock

Since iButton DS1990A introduced in market from Dallas Semiconductor (MAXIM), it has been used in many applications concerning security, access control systems etc. In this project we will use iButton as a key to an electronic lock. This electronic lock can use many different kinds of iButtons and can store up to 9 different keys. One of the keys is the master key and is permanent stored in memory. With the use of master key we can add or remove slave keys.
This electronic lock can be used with any type of iButtons you may already have, since the only thing needed is the internal serial number, that's different for every iButton. The command used to read the serial number is the same for all iButtons. The iButton family code that goes with every iButton, can be anything and is calculated as part of the whole serial number. We must also notice that DS1990A series iButtons are the cheapest.
 
 
This electronic lock designed to work stand-alone and it's easy to construct. What the user sees (outside of the door for example) is a iButton socket and a led. From inside the door, we can open it using a simple push button. For the actual lock of the door a solenoid and a bold are used. Solenoid must be rated at 12Vdc. iButtons serial numbers stored in memory can be removed and updated when needed. One master key is used to manage the rest of them. Totally a number of 9 different keys can be stored in memory.
Schematic diagram is shown at figure 1. The circuit is build around an Atmel AT89C2051(U1) microcontroller. The port 1 (P1) of mcu is used to connect a 7-segment common anode led display. This led display will be used on the programming of additional keys. For the same reason a push-button labelled SB1 is connected on P.3.7. Storage of iButtons serial numbers is done on a 24C02 EEPROM (U3). It is connected on P3.4 (SDA) and P3.5 (SCL) of U1. The external iButton socked is connected on port P3.3 via XP2 pin array. The rest of components VD4, R3, VD5 and VD6 are used for protection of mcu ports. One pull-up resistor R4 is used as required from 1-wire protocol. An additional iButton socket is connected parallel with the predefined at pins XS1. This one is used for programming the keys. The door OPEN button is connected on P3.2 through XP1 connector, using the same protection components as above. The solenoid that does the lock is connected on XT1 connector. Solenoid is controlled from a power MOSFET IRF540 (VT3). Diode VD7 is added to protect MOSFET from voltage strikes due to solenoid inductance. Transistor VT3 is controlled from VT2, which reverses the logic state that's appears on P3.0, so on VT3 we have output 0V and 12V. This additional transistor is useful as it translates the mcu logic levels to 0V and 12V, capable to drive the solenoid.

3V LED Chaser


General

There are many 9V chaser circuits that seem to waste about 7V when driving LEDs that are only about 2V. This project is unique, because it uses only two inexpensive alkaline battery cells totaling 3V for power. Since most of the waste is eliminated, the cells last a long time.
Unlike the other circuits, this one flashes the LEDs for only about 30ms each, further extending the battery life. For user convenience, it has a stepper speed control and a brightness control. At slower speeds and with reduced brightness, the battery life is further extended considerably. Mounted in a circle, the LEDs appear to rotate as they step from one to the next.

Specifications
� Battery: Two alkaline cells (AA size were used in the prototype)
� Battery Life: AA cells C cells D cells
Minimum speed and brightness 8 months 2 years 4.9 years
Medium speed and brightness 6 months 1.5 years 3.6 years
Maximum speed and brightness 2 weeks 1.5 months 3.6 months
� Stepper speed: 2 LEDs/sec to 2 revolutions/sec
� Brightness: Controlled with Pulse Width Modulation, from very dim to 161mcd (very bright)
� Pulse Width Modulation frequency: 1.4KHz very bright to 6KHz very dim
� LED current: 15mA pulses, reduced to 10.5mA at maximum Pulse Width Modulation
� LED voltage drop: 1.76V (measured, not rated) @ 10.5mA
� Minimum battery voltage (total of both cells): <1.24V, circuit is running but LEDs are not lit
1.6V, LEDs are very dim at maximum brightness
2.0V, LEDs reach almost full brightness, battery replacement is recommended.
� Radio interference: None

Circuit Description
The 74HC Cmos ICs are rated for a 2V to 6V power supply for high-speed logic circuits. They continue to operate at a much lower voltage but no longer meet high-speed logic specifications. To reach high speeds, their output current can momentarily exceed 400mA (low voltage drop) but thermal considerations limit maximum continuous output current to 20mA. Perfect for driving LEDs!

� IC2 is a 10 stage Johnson counter/decoder. On the rising edge of each clock pulse its outputs step one-at-a-time. It drives the anode of each conducting LED toward the positive supply.
� IC1a is a standard Cmos inverter Schmitt-trigger oscillator with C3 and C4 totaling 800nF for a very slow step rate. R2 is the speed control pot with R1 limiting its maximum speed. It clocks IC2 and feeds the inverters/drivers. D1 and R3 reduce its output high time to 30mS.
� IC1d, IC1e, IC1f and IC1b are paralleled inverter/drivers for a low output voltage drop and drive the emitter of T1 to ground.
� IC1c is another standard Cmos inverter Schmitt-trigger oscillator. R5 is its Pulse Width Modulation control and with D3 performs dimming of the LEDs. D2 and R4 extend the PWM�s maximum pulse width.
� T1 is a transistor that is used as a PWM switch. R7 limits maximum LED pulse current.
� C1 bypasses the battery�s supply voltage at low frequencies and C2 bypasses at high frequencies.

Construction
The ten LEDs mount on a Compact-Disc which is glued to a plastic box with contact cement. The box houses the Veroboard circuit in its lower main part with the battery holder in its lid. Multiconductor ribbon cable joins the LEDs to the circuit. The pots mount on the sides of the box.
 

ATMEL 89 Series Flash Microcontroller

 

Open GPS Tracker

  The Open GPS Tracker is a small device which plugs into a $20 prepaid mobile phone to make a GPS tracker. The Tracker responds to text message commands, detects motion, and sends you its exact position, ready for Google Maps or your mapping software. The Tracker firmware is open source and user-customizable.

The current supported hardware platform is:

* Tyco Electronics A1035D GPS module
* Motorola C168i AT&T GoPhone prepaid mobile phone
* Atmel ATTINY84-20PU AVR microcontroller

Project requires no interface chips! All you need is a GPS module, a phone, an ATTINY84, a voltage regulator, a PNP transistor, and a few passive components. This is a commercial grade tracker and is currently a second-generation stable beta V0.17.

This version stores messages while out of GSM coverage, and forwards them when it regains coverage.
 
 The current supported hardware platform is:
  • Tyco Electronics A1035D GPS module
  • Motorola C168i AT&T GoPhone prepaid mobile phone
  • Atmel ATTINY84-20PU AVR microcontroller