Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey 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
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Automatic Missile Launcher Angle Controller

By Ashutosh Bhatt August 3, 2015

Most of you might have got the idea from the project title itself that what kind of project it may be. The project is the demonstration of automatic missile launcher that sets missile to correct launching angle before its actually launched (fired).

In actual automatic missile launcher system, the position of missile (means launching angle) is first set and then missile is fired so as it will hit the target. The missile angle is set in horizontal plane (azimuth angle) and vertical plane (elevation angle)

In the given demonstration model the missile angle is set for horizontal plane (azimuth angle) only. The angle can be set from 0o to 350o in step of 10o. A micro stepping stepper motor is used to set missile angle. The stepper motor rotates missile to set angle (azimuth). The project is build using AT89C52 micro controller and it uses push buttons to take user input to set angle and LCD to display missile angle.  

Circuit description:

As shown in above figure the circuit is build using micro controller AT89C52, stepper motor driver chip ULN2003, LCD and few additional components like push buttons, crystal, capacitors, resistors etc.

·  Three push buttons are connected to port P1 pins P1.0 to P1.2 as shown. When push button is pressed, the pin is connected to ground so it will get logic 0 input when switch is pressed

·  Port P3 pins P3.4 – P3.7 drives stepper motor through ULN2003 chip. These pins are connected to inputs of ULN and outputs of ULN are connected to motor coil terminals. Because its 4 pol unipolar motor it has 4 input terminals.

·  The common terminal of ULN and two common terminals of stepper motor are connected to supply as shown

·  Port P0 drives data bus D0 – D7 of LCD. Two control pins Rs and En of LCD are connected with port P2 pins P2.7 and P2.6 respectively. Third control pin RW is connected to ground to make LCD write always enable

·  One pot is used to vary the brightness of LCD. Its sliding terminal is connected to Vee pin of LCD to provide it variable voltage. Other two fixed terminals of pot are connected with Vcc and Gnd

·  A 12 MHz crystal is connected between crystal input terminals XTAL1 and XTAL2 to provide basic clock signal to micro controller for all its internal operation. Two 33 pF capacitors are connected with crystal as shown for biasing and stability

Circuit operation:

·   When the circuit power is switched ON, the stepper motor is at rest. This missile (mounted to the shaft of motor) position is marked as 0o or reference. 

·   The message is displayed on LCD as “Set target angle” and the circuit prompts user to enter desire missile launching angle. The user has to set the angle by pressing inc angle / dec angle push buttons

·   Each time when user presses inc angle or dec angle push buttons, the angle is incremented or decremented by 10o and it is displayed on LCD

·  Once desire angle is set, the user has to press rotate missile button. As the user presses this button, the micro controller starts sending pulses to motor to rotate it clockwise or anticlockwise. Also the set angle is displayed on LCD as “Target angle is set to XXo”

·  The micro controller calculates desired number of pulses to be given to motor to rotate it to exact degree of angle. If the new set angle is greater than previous angle of motor than motor rotates CW and vice versa

·  Motor stops rotating when micro controller stops applying pulses and it reaches to desired angle.

·   Again it prompts user to set target angle and displays current angle of motor. User can either increment or decrement this angle by pressing buttons and rotate missile to new angle

Software program:

For complete circuit operation, the software program is written and embedded into internal memory of micro controller. The program performs following tasks

·  It displays various messages and set angle – actual angle of missile on LCD

·  It takes user inputs through push buttons to set angle and to rotate missile

·  It calculates required number of pulses to be given to motor to rotate it to exact degree

·  It decides direction of rotation of motor either CW or CCW as per new set angle and current motor angle

The program is written in C language. It is compiled using KEIL (IDE) software tool. This software generates HEX file when the program is compiled successfully. This HEX file is downloaded into internal FLASH (EEPROM – memory) of micro controller using EEPROM programmer software and hardware tools.

The most important function of software program is to calculate number of pulses that should be given to stepper motor to rotate it to exact degree. The stepper motor used here is micro stepping (as i said earlier) motor. Its specifications are

Prototype of 8051 Microcontroller based Automatic Missile Launch Angle Control Circuit

Fig. 1: Prototype of 8051 Microcontroller based Automatic Missile Launch Angle Control Circuit

Motor type – unipolar, 4 phase, 5 terminal

Max operating voltage – 5 V

Max rated current – 50 mA

Max RPM – 30

Step angle – 0.17o/ pulse aprox. (min rotation 0.70o)

So the motor has step angle of 0.17o. It rotates for complete 360o rotation when it is given 2048 pulses.

So for                                   360o rotation                                      2048 pulses required

Then for                                10 o rotation                                       require pulses are = 2048×10 / 360 = 56

So for 10 o rotation required pulses are 56. That means for every 10 o increment (or decrement) in angle the pulses are given to motor in multiples of 56. And because 4 pulses are given in loop the multiplying factor is 56/4 = 14.

Also the motor has to be rotated CW or CCW. Every time when new angle is set it is compared with previous set angle if its higher then motor should rotate CCW and if its lower, then it should rotate CW. For example motor angle is set to 50o from 0o. So the motor will rotate CCW. Now if new motor angle is set to 20o then the motor will rotate CW to reach 20o position.

Project Source Code

###


#include<reg51.h>          // header file

#include <string.h>

 

#define lcd_data_bus P0

 

sbit rs = P2^7;

sbit en = P2^6;

sbit intr_led = P2^0;

unsigned int set_az_angle = 0,old_az_angle=0,actual_az_angle=0;

unsigned int az_motor_dir_flag=1,new_f=0;

void dly()

  {

    int a,b;                 

    for(b=0;b<20;b++)                   

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

  }

void delay_ms()

  {

      int k;

TL1 = 0x17;

      TH1 = 0xFC;

      TR1 = 1;

      for(k=0;k<3;k++)

        {

             while(TF1==0);

             TF1 = 0;

             TL1 = 0x17;

             TH1 = 0xFC;

        }

      TR1 = 0;

  }  

void lcddly()

 {

      int x;

      for(x=0;x<1500;x++);

 }

void lcd_send_cmd(unsigned char a)

  {

      lcddly();

      rs = 0;

      lcd_data_bus = a;

      en = 1;

      en = 0;

  }

void lcd_send_data(unsigned char b)

  {

      lcddly();

      rs = 1;

      lcd_data_bus = b;

      en = 1;

      en = 0;

  }

void lcd_print(unsigned char *s)

  {

      unsigned char l,i;

      l = strlen(s);

      for(i=1;i<=l;i++)

        {

             lcd_send_data(*s);

             s++; 

        }

  }

void display_angle(unsigned int a)

  {

      unsigned int t,t1,j;

      unsigned char ascii[3];

if(a>=100)

        {

             t=a%10;

             ascii[2] = t+0x30;

             a=a/10;

             t1=a%10;

             ascii[1] = t1+0x30;

             a=a/10;

             ascii[0] = a+0x30;

        }

      else

        {

             t1=a%10;

             ascii[2] = t1+0x30;

             a=a/10;

             ascii[1] = a+0x30;

             ascii[0] = 0x20;

        }   

      for(j=0;j<3;j++) lcd_send_data(ascii[j]);

      lcd_send_data(0xDF);

  }                

                          

void inc_az_angle()

  {

      if(set_az_angle<360) set_az_angle+=10;

      lcd_send_cmd(0xC0);

      display_angle(set_az_angle);            

   }

void dec_az_angle()

  {

      if(set_az_angle>0) set_az_angle-=10;

      lcd_send_cmd(0xC0);

      display_angle(set_az_angle);

  }

 

void rotate_missile()                                 

{

      unsigned int num,pulses,k;

      lcd_send_cmd(0x01);

lcd_print("Target angle set");

      lcd_send_cmd(0xC0);

      lcd_print("to:");

      display_angle(set_az_angle);            

      if(set_az_angle>old_az_angle)

      {            

             num = (set_az_angle-old_az_angle)/10;

             pulses = num*14;

             for(k=0;k<pulses;k++)

               {

                    P3 = 0x8F;

                    delay_ms();

                    P3 = 0x4F;

                    delay_ms();

                    P3 = 0x2F;

                    delay_ms();

                    P3 = 0x1F;

                    delay_ms();                      

               }

       }           

      else

      {

             num = (old_az_angle-set_az_angle)/10;

             pulses = num*14;

             for(k=0;k<pulses;k++)

               {                 

                    P3 = 0x1F;

                    delay_ms();

                    P3 = 0x2F;

                    delay_ms();

                    P3 = 0x4F;

                    delay_ms();

                    P3 = 0x8F;

                    delay_ms();

               }

             }     

             old_az_angle = set_az_angle;

       }    

            

void initialize()

  {

      P0 = 0x00;

      P2 = 0x00;

      P2 = 0x0F;

      P1 = 0xFF;

      P3 = 0x0F;

      TMOD = 0x10;

  }  

            

void main()

  {

      initialize();

      lcd_send_cmd(0x3C);

      lcd_send_cmd(0x0E);

 back:if(new_f==0)

        {

             lcd_send_cmd(0x01);

             lcd_print("Set target angle");          

             lcd_send_cmd(0xC0);

             display_angle(set_az_angle);                                 

        }

        P1=0xFF;

        while(P1==0xFF);

        switch(P1)

          {

             case 0xFE:

               new_f=1;

               inc_az_angle();

               dly();

               break;

             case 0xFD:

               new_f=1;

               dec_az_angle();

               dly();

               break;

             case 0xFB:

               rotate_missile();

               new_f=0;

               break;

          }                 

      goto back;

  }

###

 


Circuit Diagrams

Circuit-Diagram-8051-Microcontroller-Launch-Angle-Control-Prototype

Project Video


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

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.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

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!


RSS EDABOARD.com Discussions

  • mosfet driver problem in regeneration mode
  • What is the purpose of this relay?
  • Industrial Relay Board Design for Motorcycle Use
  • ADEM III ECM — No CAN Signal & Power Supply Issue
  • Snooping Around is All

RSS Electro-Tech-Online.com Discussions

  • Pic18f25q10 osccon1 settings swordfish basic
  • Sump pit water alarm - Kicad 9
  • Anyone jumped from Easyeda std to Easyeda pro?
  • turbo jet fan - feedback appreciated.
  • More fun with ws2812 this time XC8 and CLC

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 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

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey 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
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe