Académique Documents
Professionnel Documents
Culture Documents
WEARABLE EUIPMENT
ANTENNA
Accelero Wireless
meter MCU Transmitt
er
DRIVER UNIT
ANTENNA
Wireless Receiver
ULN200
Voice Device
MCU 3 Relay
Controller Relays
Drivers
SPEAKER
Fig 2.2 Driver Unit Block Diagram
2.2 Microcontroller
A microcontroller is a microprocessor system which contains
data and program memory, serial and parallel I/O, timers, and external
and internal interrupts—all integrated into a single chip that can be
purchased for as little as two dollars. About 40 percent of all
microcontroller applications are found in office equipment, such as
PCs, laser printers, fax machines, and intelligent telephones. About
one third of all microcontrollers are found in consumer electronic
goods. Products like CD players, hi-fi equipment, video games,
washing machines, and cookers fall into this category. The
communications market, the automotive market, and the military
share the rest of the applications.
EIE DEPARTMENT 3 KMEA ENGINEERING COLLEGE
A microcontroller is a single-chip computer. Micro suggests that the
device is small, and controller suggests that it is used in control
applications. Another term for microcontroller is embedded
controller, since most of the microcontrollers are built into (or
embedded in) the devices they control.
A microprocessor differs from a microcontroller in a number of
ways. The main distinction is that a microprocessor requires several
other components for its operation, such as program memory and data
memory, input-output devices, and an external clock circuit. A
microcontroller, on the other hand, has all the support chips
incorporated inside its single chip. All microcontrollers operate on a
set of instructions (or the user program) stored in their memory. A
microcontroller fetches the instructions from its program memory one
by one, decodes these instructions, and then carries out the required
operations. Microcontrollers have traditionally been programmed
using the assembly language of the target device. Although the
assembly language is fast, it has several disadvantages. An assembly
program consists of mnemonics, which makes learning and
maintaining a program written using the assembly language difficult.
Also, microcontrollers manufactured by different firms have different
assembly languages, so the user must learn a new language with every
new microcontroller he or she uses.
Microcontrollers can also be programmed using a high-level
language, such as BASIC, PASCAL, or C. High-level languages are
The HT 12D ICs are series Decoder of CMOS LSIs for remote
control system applications. These ICs are paired with each other. For
proper operation a pair of encoder/decoder with the same number of
address and data format should be selected. The Decoder receive the
Encoder
1. 18 PIN DIP
2. Operating Voltage : 2.4V ~ 12V
3. Low Power and High Noise Immunity CMOS Technology
4. Low Standby Current and Minimum Transmission Word
5. Built-in Oscillator needs only 5% Resistor
6. Easy Interface with and RF or an Infrared transmission medium
7. Minimal External Components
Decoder
Applications
1. Burglar Alarm, Smoke Alarm, Fire Alarm, Car Alarm, Security System
2. Garage Door and Car Door Controllers
3. Cordless telephone
4. Other Remote Control System
General Description:
Features:
Description
@SAW RESONATOR
@ASK
Applications
PinOut
Device
Fig 2.5.2
Unit Transmitter
Flow Pin Diagram
STAR
T
SHIFT Y IF
LED E MO
RIGHT VE
RIG
N
O
SHIFT Y IF
LED LEFT E MO
AND VE
LEF
N
O
EIE DEPARTMENT 11 KMEA ENGINEERING COLLEGE
IF N
DO O
EIE DEPARTMENT 12 KMEA ENGINEERING COLLEGE
Head Unit Flow Chart
START
TRANSMIT YES
RIGHT = 1 IF X AXIS <
LEFT = 0 135
DOWN = 0
NO
TRANSMIT
RIGHT = 0 YES IF Y AXIS >
LEFT = 1 184
DOWN = 0
NO
TRANSMIT
RIGHT = 0 YES IF Y AXIS <
LEFT = 0 145
DOWN = 1
NO
TRANSMIT
RIGHT = 0
LEFT = 0
DOWN = 0
The total circuit is powered from 9V battery. Diode D5 protects from the
supply voltage reversal. C17 and C18 filter the DC supply. The IC3 7805 is a
5V voltage regulator. It regulates the input voltage to fixed 5V which is used for
microcontroller and the accelerometer. The 5V is further filtered by the C19 and
C20.
Device Unit
The Voice controller circuit works on 3.3V Pin 8 and 9 is the supply pins.
The command to the controller is shifted through Clock and data pins by the
MCU. Additionally reset and busy lines are also fed to the MCU. Reset pin is
for resetting the voice controller and busy line is for knowing whether the voice
controller is currently playing sound or not. Audio output is taken from the Pin
14 it is for connecting external amplifier. External amplifier is connected on J2.
Transistor Q1 and Q2 mutes the amplifier when the voice controller is not
playing sounds. C1, R1, C2 converts the PWM output from the controller to
analog sound signals.
MMA7361L
Features
• 3mm x 5mm x 1.0mm LGA-14 Package
• Low Current Consumption: 400 μA
• Sleep Mode: 3 μA
• Low Voltage Operation: 2.2 V – 3.6 V
• High Sensitivity (800 mV/g @ 1.5g)
• Selectable Sensitivity (±1.5g, ±6g)
Typical Applications
• 3D Gaming: Tilt and Motion Sensing, Event Recorder
• HDD MP3 Player: Freefall Detection
• Laptop PC: Freefall Detection, Anti-Theft
• Cell Phone: Image Stability, Text Scroll, Motion Dialing, E-Compass
• Pedometer: Motion Sensing
• PDA: Text Scroll
• Navigation and Dead Reckoning: E-Compass Tilt Compensation
• Robotics: Motion Sensing
ULN2003
FEATURES
• High-Voltage Outputs: 50 V
EIE DEPARTMENT 23 KMEA ENGINEERING COLLEGE
• Output Clamp Diodes
• Relay-Driver Applications
7805
Description
Features
• Output Current up to 1 A
LM317
Features
• TO-220 Package
Description
A type of relay that can handle the high power required to directly control
an electric motor or other loads is called a contactor. Solid-state relays control
power circuits with no moving parts, instead using a semiconductor device to
perform switching. Relays with calibrated operating characteristics and
sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protective relays".
When the coil is energized with direct current, a diode is often placed
across the coil to dissipate the energy from the collapsing magnetic field at
deactivation, which would otherwise generate a voltage spike dangerous to
semiconductor circuit components. Some automotive relays include a diode
inside the relay case. Alternatively, a contact protection network consisting of a
capacitor and resistor in series (snubber circuit) may absorb the surge. If the coil
is designed to be energized with alternating current (AC), a small copper
"shading ring" can be crimped to the end of the solenoid, creating a small out-
of-phase current which increases the minimum pull on the armature during the
AC cycle.
Wearable unit
#define X_Axis 0
#define Y_Axis 1
#define Z_Axis 2
void main()
setup_adc_ports(AN0_AN1_AN2_AN4_VSS_VREF);
setup_adc (ADC_CLOCK_DIV_64);
while(TRUE)
X_Value = ADC_Convert(X_Axis);
Y_Value = ADC_Convert(Y_Axis);
output_high(TX_Right);
output_low(TX_Left);
output_low(TX_Down);
output_low(TX_Right);
output_high(TX_Left);
output_low(TX_Down);
output_low(TX_Right);
output_low(TX_Left);
output_high(TX_Down);
output_low(TX_Right);
output_low(TX_Left);
output_low(TX_Down);
int16 Result;
set_adc_channel(Axis);
delay_ms(1);
return(Result);
int8 relay_output;
void main()
int8 Select_Bit,i;
output_b(0);
delay_ms(1000);
setup_timer_1(T1_INTERNAL|T1_DIV_BY_8); //104 ms
overflow
enable_interrupts(INT_TIMER1);
enable_interrupts(GLOBAL);
Select_Bit = 0;
output_a(0b11111110);
output_high(Voice_Reset);
delay_ms(500);
output_low(Voice_Reset);
delay_ms(500);
send_command(20);
send_command(0);
if(read_eeprom(0) == 0xFF)
write_eeprom(0,0);
relay_output = read_eeprom(0);
Turn_Relay_On_Off(relay_output);
while(TRUE)
if(input(RX_Right))
Select_Bit--;
if(Select_Bit == 255)
Select_Bit = 5;
if(input(RX_Left))
Select_Bit++;
if(Select_Bit == 6)
Select_Bit = 0;
Shift_Dev_LEDs(Select_Bit);
if(input(RX_Down))
On_Off_Device(Select_Bit);
Blink_Dev_Led(Select_Bit);
if(bit_test(Input,0))
output_high(Dev_1);
else
output_low(Dev_1);
if(bit_test(Input,1))
output_high(Dev_2);
else
output_low(Dev_2);
delay_ms(250);
if(bit_test(Input,2))
output_high(Dev_3);
else
output_low(Dev_3);
delay_ms(250);
if(bit_test(Input,3))
output_high(Dev_4);
else
output_low(Dev_4);
delay_ms(250);
output_high(Dev_5);
else
output_low(Dev_5);
delay_ms(250);
if(bit_test(Input,5))
output_high(Dev_6);
else
output_low(Dev_6);
int8 i;
int16 Temp;
Temp = command;
again:
output_low(Voice_Clk);
delay_ms(3);
for(i=0;i<16;i++)
output_low(Voice_Clk);
delay_ms(1);
output_low(Voice_Data);
else
output_high(Voice_Data);
command<<=1;
output_high(Voice_Clk);
command = Temp;
delay_ms(50);
if(input(Voice_Busy)==0)
delay_ms(500);
output_high(Voice_Reset);
delay_ms(50);
output_low(Voice_Reset);
delay_ms(500);
goto again;
while(input(Voice_Busy));
switch(Bit_no)
case 0:
if(bit_test(relay_output,0))
bit_clear(relay_output,0);
output_low(Dev_1);
send_command(13);
else
bit_set(relay_output,0);
output_high(Dev_1);
send_command(7);
break;
if(bit_test(relay_output,1))
bit_clear(relay_output,1);
output_low(Dev_2);
send_command(14);
else
bit_set(relay_output,1);
output_high(Dev_2);
send_command(8);
break;
case 2:
if(bit_test(relay_output,2))
bit_clear(relay_output,2);
output_low(Dev_3);
send_command(15);
else
bit_set(relay_output,2);
output_high(Dev_3);
send_command(9);
break;
case 3:
if(bit_test(relay_output,3))
bit_clear(relay_output,3);
output_low(Dev_4);
send_command(16);
else
bit_set(relay_output,3);
output_high(Dev_4);
send_command(10);
case 4:
if(bit_test(relay_output,4))
bit_clear(relay_output,4);
output_low(Dev_5);
send_command(17);
else
bit_set(relay_output,4);
output_high(Dev_5);
send_command(11);
break;
case 5:
if(bit_test(relay_output,5))
output_low(Dev_6);
send_command(18);
else
bit_set(relay_output,5);
output_high(Dev_6);
send_command(12);
break;
write_eeprom(0,relay_output);
int8 Shift,i;
for(i=0;i<4;i++)
Shift = 0b11111111;
output_a(Shift);
Shift = 0b11111111;
bit_clear(Shift, Bit_no);
output_a(Shift);
delay_ms(250);
while(TRUE)
break;
delay_ms(50);
int8 Shift;
Shift = 0b11111111;
bit_clear(Shift, Bit_no);
output_a(Shift);
send_command(Bit_no+1);
while(TRUE)
break;
delay_ms(50);
#int_TIMER1
void TIMER1_isr(void)