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 Angle Controller

By Ashutosh Bhatt

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

 

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

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

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

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

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

  • Electrical Lenght of Microstrip Transmission Lines
  • Op amp non inverting amplifier not working
  • Making a ducted soldering fan?
  • Characterization values of a MOSFET in PDK
  • USBASP Programmer Mod

RSS Electro-Tech-Online.com Discussions

  • Need a ducted soldering fan for solder smoke extraction
  • How to search component to replace my burn RF inductor?
  • Question about ultrasonic mist maker
  • Someone please explain how this BMS board is supposed to work?
  • bluetooth jammer
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