U D CU

Electronics For You - - Construction - BC B D B

Usu­ally, cars do not have a lamp to light the en­gine com­part­ment. A hands-free, un­der- hood light source is use­ful when it is dark and you have to fix a prob­lem in­side the en­gine com­part­ment.

Here is a small cir­cuit that au­to­mat­i­cally switches on a light source (12V bulb) to light the en­gine when the bon­net is lifted. The con­trol cir­cuit com­prises an At­tiny13 mi­cro­con­troller (IC1), a four-pin tilt sen­sor which con­sumes very lit­tle power, reg­u­la­tor 7805 (IC2) and a few dis­crete com­po­nents. It is pow­ered by the car bat­tery.

Mi­cro­con­troller At­tiny13

The At­tiny13 is an 8-pin, low-power CMOS 8-bit mi­cro­con­troller based on the AVR en­hanced RISC ar­chi­tec­ture. By ex­e­cut­ing pow­er­ful in­struc­tions in a sin­gle clock cy­cle, it achieves through­puts ap­proach­ing 1 MIPS (mil­lion in­struc­tions per sec­ond) per MHZ, al­low­ing the sys­tem de­signer to op­ti­mise power con­sump­tion ver­sus pro­cess­ing speed.

The AVR core com­bines a rich in­struc­tion set with 32 gen­eral-pur­pose work­ing reg­is­ters. All 32 reg­is­ters are di­rectly con­nected to the arith­metic logic unit (ALU), al­low­ing two in­de­pen­dent reg­is­ters to be ac­cessed in one sin­gle in­struc­tion ex­e­cuted in one clock cy­cle.

The mi­cro­con­troller has 1 kb of in- sys­tem pro­gram­mable Flash mem­ory, 64 bytes of EEPROM, 64 bytes of SRAM, six gen­eral-pur­pose in­put/out­put (I/O) lines, one 8-bit timer/counter with com­pare modes, in­ter­nal and ex­ter­nal in­ter­rupts, a 4-chan­nel, 10-bit ana­logue-to-dig­i­tal con­verter ( ADC), a pro­gram­mable watch­dog timer with in­ter­nal os­cil­la­tor, and three soft­ware-se­lectable power-sav­ing modes. The idle mode stops the CPU while al­low­ing the SRAM, timer/ counter, ADC, ana­logue com­para­tor and in­ter­rupt sys­tem to con­tinue func­tion­ing. The power-down mode saves the reg­is­ter con­tents, dis­abling all chip func­tions un­til the next in­ter­rupt or hard­ware re­set. The ADC noise re­duc­tion mode stops the CPU and all I/O mod­ules, ex­cept ADC, to min­imise switch­ing noise dur­ing ADC.

Tilt sen­sor

A tilt sen­sor is a de­vice that de­tects ori­en­ta­tion or in­cli­na­tion with an­gu­lar move­ment. It is small, in­ex­pen­sive, low-power and easy-to-use. If used prop­erly, it will not wear out. Sim­plic- ity makes it pop­u­lar for toys, gad­gets and ap­pli­ances. Some­times it is re­ferred to as mer­cury switch, tilt switch or rolling ball sen­sor.

Tilt switches trans­fer a change-of­s­tate to an­other de­vice. The con­trol de­vice re­ceives a sig­nal from the tilt sen­sor when­ever there is a change in mo­tion or ori­en­ta­tion. The sig­nal ac­ti­vates the con­troller to turn the ap­pli­ance ei­ther on or off. Tilt switches are made of non-con­duc­tive tubes that have two or more elec­tri­cal con­tacts and a ma­te­rial which acts as a con­duc­tor be­tween these elec­tri­cal con­tacts.

There are two types of tilt switches: mer­cury switch and ball- in- cage switch.

Mer­cury switch. It uses a drop of mer­cury in the tube. The sen­sor is po­si­tioned with re­spect to grav­ity forces so that when mer­cury moves away

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.