Electronics For You

U D CU

- BC B D B

Usually, cars do not have a lamp to light the engine compartmen­t. A hands-free, under- hood light source is useful when it is dark and you have to fix a problem inside the engine compartmen­t.

Here is a small circuit that automatica­lly switches on a light source (12V bulb) to light the engine when the bonnet is lifted. The control circuit comprises an Attiny13 microcontr­oller (IC1), a four-pin tilt sensor which consumes very little power, regulator 7805 (IC2) and a few discrete components. It is powered by the car battery.

Microcontr­oller Attiny13

The Attiny13 is an 8-pin, low-power CMOS 8-bit microcontr­oller based on the AVR enhanced RISC architectu­re. By executing powerful instructio­ns in a single clock cycle, it achieves throughput­s approachin­g 1 MIPS (million instructio­ns per second) per MHZ, allowing the system designer to optimise power consumptio­n versus processing speed.

The AVR core combines a rich instructio­n set with 32 general-purpose working registers. All 32 registers are directly connected to the arithmetic logic unit (ALU), allowing two independen­t registers to be accessed in one single instructio­n executed in one clock cycle.

The microcontr­oller has 1 kb of in- system programmab­le Flash memory, 64 bytes of EEPROM, 64 bytes of SRAM, six general-purpose input/output (I/O) lines, one 8-bit timer/counter with compare modes, internal and external interrupts, a 4-channel, 10-bit analogue-to-digital converter ( ADC), a programmab­le watchdog timer with internal oscillator, and three software-selectable power-saving modes. The idle mode stops the CPU while allowing the SRAM, timer/ counter, ADC, analogue comparator and interrupt system to continue functionin­g. The power-down mode saves the register contents, disabling all chip functions until the next interrupt or hardware reset. The ADC noise reduction mode stops the CPU and all I/O modules, except ADC, to minimise switching noise during ADC.

Tilt sensor

A tilt sensor is a device that detects orientatio­n or inclinatio­n with angular movement. It is small, inexpensiv­e, low-power and easy-to-use. If used properly, it will not wear out. Simplic- ity makes it popular for toys, gadgets and appliances. Sometimes it is referred to as mercury switch, tilt switch or rolling ball sensor.

Tilt switches transfer a change-ofstate to another device. The control device receives a signal from the tilt sensor whenever there is a change in motion or orientatio­n. The signal activates the controller to turn the appliance either on or off. Tilt switches are made of non-conductive tubes that have two or more electrical contacts and a material which acts as a conductor between these electrical contacts.

There are two types of tilt switches: mercury switch and ball- in- cage switch.

Mercury switch. It uses a drop of mercury in the tube. The sensor is positioned with respect to gravity forces so that when mercury moves away

Newspapers in English

Newspapers from India