Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Automatic Missile Launcher with UDM RADAR

By Ashutosh Bhatt

As the name suggests, this is a demonstration of one military application in which the system automatically launches a missile when any object is detected and it comes within the range. In the actual system, there is microwave RADAR that detects any object and immediately fires the missile to shoot the target.
 
 
Here in given system, it uses an ultrasonic sensor to detect any object. The sensor scans complete 360o circle by rotating continuously and when it detects any object that is within 2 feet (60 cm) range, it launches the missile. It is built using an AT89C51 microcontroller. It also uses LCD to display a different message as well as the distance of an object. 
 
Prototype of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR

Fig. 1: Prototype of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR

Circuit description

As shown in the figure the circuit is built with four major components microcontroller AT89C51, motor driver chip L293D, 16×2 LCD and ultrasonic sensor HC-SR04.
 
• HC-SR04 has 4 wire interface (1) Vcc (2) Gnd (3) Trigger input and (4) echo output. Vcc pin is given +5 V, Ground is connected with ground. Trigger input is connected with P3.6 pin and echo pin is connected to P3.4 pin
 
• Port P2 pins P2.0 to P2.3 pins drives two DC motors through L293D chip. All four inputs IN1 to IN4 of L293D are connected with P2.0 to P2.3 and outputs OUT1 to OUT4 are driving two motors as shown
 
• Data pins of LCD D0 – D7 are connected to port P0. Control pins Rs and En are connected to P2.6 and P2.7 respectively. RW pin is connected to ground to enable LCD write always
 
• A 1K pot is connected to VEE pin as shown to vary LCD contras
 
• A 12 MHz crystal is connected to crystal input pins along with two 33 pF capacitors
 
• One 100 nF capacitor is connected between Vcc and reset pin to provide power on reset and one push button is connected in parallel with capacitor to provide manual reset 
 
Here are the snaps of the circuit and other arrangements. 
 
Image of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR
 
Fig. 2: Image of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR
 
Image showing main parts of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR
 

Fig. 3: Image showing main parts of 8051 Microcontroller based Automatic Missile Launcher with UDM RADAR

Circuit operation:

• When the circuit is given power the initial message displayed on LCD as automatic missile launcher
 
• Then the UDM sensor is continuously given 10 us trigger pulse input at a rate of 5 Hz.  The sensor transmits ultrasonic sound burst of 40 KHz and tries to receive echo of transmitted burst
 
• The lower DC motor starts rotating clockwise and counterclockwise continuously. It rotates one revolution CW and one revolution CCW and thus UDM sensor mounted on DC motor scans complete 360o area in 6 sec
 
• When UDM sensor gets reflected echo from any object it gives echo signal to the microcontroller. The microcontroller calculates the distance of the object from the output pulse from sensor
 
• Then microcontroller checks the distance of the object and if it is less than 60 cm it displays object distance on LCD with message intruder detected. It stops rotating lower DC motor
 
• Immediately after this, the microcontroller rotates 2nd DC motor one revolution to trigger the missile. DC motor triggers the missile and missile is launched within 2 seconds. The message is displayed on LCD as- Missile Launched………   
 
• Once again lower DC motor starts rotating CW-CCW to detect a new object and above process continues.   
 

Project Source Code

###

//Program to 


#include<reg51.h>

#include<intrins.h>

#include <string.h>


#define ON 0;

#define OFF 1;

sbit trig = P3^6;

sbit echo_ip = P3^3;

sbit object_det_led = P1^2;

sbit rs = P2^7; 

sbit rw = P2^6; 

sbit en = P2^5;

sbit motor_ip1 = P2^0;

sbit motor_ip2 = P2^1;

sbit missile_trig_motor_ip1 = P2^2;

sbit missile_trig_motor_ip2 = P2^3;

unsigned long echo_pulse_time,distance,trig_count=0,motor_rev_count=0,motor_rev=0;


void delay_sec(unsigned int t)

  {

unsigned int x,y;

   for(x=0;x<20*t;x++)

     for(y=0;y<10000;y++); 

}

void delay_10us()

  {

     _nop_();

_nop_();

_nop_();

_nop_();

_nop_();

_nop_();

_nop_();

_nop_();

_nop_();

_nop_();

  }

void delay()

 {

   int i;

   for(i=0;i<2000;i++);

 }

void writecmd(unsigned char a)

{

delay(); // check for LCD is busy or not

rs = 0; // clear rs pin for command

P0 = a; // send command character

en = 1; // strob LCD

en = 0; 

}

void writedat(unsigned char b)

{

delay(); // check for LCD is busy or not

rs = 1; // set rs pin for data 

P0 = b; // send data character

en = 1; // strob LCD

en = 0; 

}  

void writestr(char *s)

  {

   unsigned int l,z;

   l = strlen(s);

for(z=0;z<l;z++)

     {

      writedat(*s);

      s++;

     }

} 

 void display_value(unsigned int time) 

  {

   unsigned int tmp,tmp1,tmp2,tmp3,x;

float t;

unsigned char ASCII[3];

if(time>1000)

{

//ms_flag=1;

t = time/1000;

if(t<10.0)

{

tmp = t*10;

tmp1 = tmp % 10;

ASCII[2] = tmp1 + 48;

tmp2 = tmp/10;

ASCII[0] = tmp2 + 48;

ASCII[1] = '.';

}

else if((t>=10.0) && (t<100.0))

{

tmp = t*1;

tmp1 = tmp % 10;

ASCII[2] = tmp1 + 48;

tmp2 = tmp/10;

ASCII[1] = tmp2 + 48;

ASCII[0] = ' ';

}

else if(t>=100.0)

    {

      tmp = t*1;

    tmp1 = tmp % 10;

    ASCII[2] = tmp1 + 48;

    tmp = tmp/10;

    tmp2 = tmp % 10;

    ASCII[1] = tmp2 + 48;

    tmp3 = tmp/10;

    ASCII[0] = tmp3+48;

    }

} 

else

  {

//ms_flag=0;

tmp1 = time % 10;

  ASCII[2] = tmp1 + 48;

  time = time/10;

  tmp2 = time % 10;

  ASCII[1] = tmp2 + 48;

  tmp3 = time/10;

  ASCII[0] = tmp3+48;

} 

 for(x=0;x<3;x++) writedat(ASCII[x]); 

   } 

void timer0_ISR() interrupt 1

  {

trig_count++;

 motor_rev_count++;

 TH0 = 0x3C;

 TL0 = 0xAF;

if(trig_count==4)

{

trig_count=0;

//trig_led = ON;

trig = 1;

   delay_10us();

   trig = 0; 

}

if(motor_rev_count==100)

{

motor_rev_count=0;

motor_rev++;

if((motor_rev%2)==1){motor_ip1=0;motor_ip2=1;}

else {motor_ip1=1;motor_ip2=0;} 

 } 

} 

unsigned long get_timer_value()

  {

    unsigned char t1,t2,t3,t4;

unsigned long t;

t1 = TL1 & 0x0F;

t2 = TL1 & 0xF0;

t2 = t2>>4;

t3 = TH1 & 0x0F;

t4 = TH1 & 0xF0;

t4 = t4>>4;

t = t4*16*16*16 + t3*16*16 + t2*16 + t1;

return t;

  } 

void missile_trig()

  {

missile_trig_motor_ip1=1;

 missile_trig_motor_ip2=0;

 delay_sec(6);

 missile_trig_motor_ip1=0;

 missile_trig_motor_ip2=0;

 writecmd(0x01);

writestr("missile launched"); 

writecmd(0xC0); 

writestr("........"); 

 delay_sec(2);

  } 

 void main()

   {

TMOD = 0x11; 

IE = 0x82;

TH0 = 0x3C;

 TL0 = 0xAF;

P0 = 0x00;

P1=0x00; 

P1 = 0xFF;

P2=0x00;

trig = 0; 

echo_ip = 1;

writecmd(0x3C); // initialize LCD

writecmd(0x0E);

writecmd(0x06);

writecmd(0x01);

writestr("AutomaticMissile");

writecmd(0xC4);

writestr("Launcher");

delay_sec(3);

motor_ip1 = 1;

motor_ip2 = 0; 

trig = 1;

 delay_10us();

 trig = 0; 

while(1)

{

TR0 = 1;

TH1 = 0x00;

TL1 = 0x00;

while(echo_ip==0); 

TR1 = 1;

while(echo_ip==1);

TR1 = 0;

echo_pulse_time = get_timer_value(); 

distance = echo_pulse_time/58;

if(distance<=60)

{

object_det_led = ON;

motor_ip1 = 0;

motor_ip2 = 0;

TR0 = 0;

writecmd(0x01);

writestr("IntruderDetected"); 

writecmd(0xC0); 

writestr("distance:"); 

display_value(distance);

writestr(" cm"); 

missile_trig(); 

writecmd(0x01);

writestr("AutomaticMissile");

writecmd(0xC4);

writestr("Launcher"); 

if((motor_rev%2)==1){motor_ip1=0;motor_ip2=1;}

     else {motor_ip1=1;motor_ip2=0;} 

TR0 = 1;

}   

 }

  }        

   
###
 

Circuit Diagrams

Circuit-Diagram-8051-Microcontroller-Based-Automatic-Missile-Launcher-UDM-RADAR

Project Video


Filed Under: Electronic Projects

 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • What is a low power design?
  • Renesas partners with Tata to accelerate progress in advanced electronics
  • STMicroelectronics’ new touchscreen controller for smartphones enables longer runtime
  • Samsung unveils ISOCELL image sensor with industry’s smallest 0.56μm pixel

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Interfacing LCD with PIC16F877 using CCS C Compiler
  • Effect of variable gain amplifier and LNA on the input RF signal's phase
  • How do you find the angle made by two isosceles triangles in a kite?
  • MWO - EM Structure missing
  • HF preamplifier with threshold?

RSS Electro-Tech-Online.com Discussions

  • Lighting a .010 green fiber optic with led
  • Help wanted to power an AC120v induction motor ( edited from Brushless motor - thank you @SHORTBUS= )
  • HELP NEEDED
  • NOR gate oscillator in LTspice not working
  • intro to PI
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering