System Design-Control Systems-Project Report, Study Guides, Projects, Research of Control Systems

This project report was submitted to Dr. Anbu Manghirmalani at Birla Institute of Technology and Science. this project helped students to learn concepts of Control Systems in Electrical Engineering. It includes: Mini, Blind, Control, System, Design, Mechanical, Electrical, Software, Testing, Matreial, Toools, Components

Typology: Study Guides, Projects, Research

2011/2012

Uploaded on 07/30/2012

badsha
badsha 🇮🇳

4.3

(28)

213 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
30-Dec-06 Mini Blinds Control System
2
TABLE OF CONTENTS
1. INTRODUCTION..............................................................................................................................................3
2. SYSTEM DESIGN.............................................................................................................................................3
Functions................................................................................................................................. 4
2.1 Mechanical design .......................................................................................................... 4
2.2 Electrical design.............................................................................................................. 7
2.3 Software design............................................................................................................. 12
2.4 System assembly........................................................................................................... 15
3. SYSTEM TESTING ........................................................................................................................................16
4. MATERIAL COST AND TOTAL EXPENSES............................................................................................16
5. CONCLUSION.................................................................................................................................................17
6. ACKNOWLEDGEMENTS.............................................................................................................................17
7. REFERENCES.................................................................................................................................................17
8. APPENDIX.......................................................................................................................................................18
8.1 Appendix A: Mechanical Components......................................................................... 18
8.1.1 Materials Used ......................................................................................................18
8.1.2 Tools Used ............................................................................................................18
8.2 Appendix B: Electronic components ............................................................................19
8.2.1 Materials and Components Used .......................................................................... 19
8.3 Appendix C: Software components .............................................................................. 20
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download System Design-Control Systems-Project Report and more Study Guides, Projects, Research Control Systems in PDF only on Docsity!

    1. INTRODUCTION.............................................................................................................................................. TABLE OF CONTENTS
    1. SYSTEM DESIGN.............................................................................................................................................
      • Functions.................................................................................................................................
    • 2.1 Mechanical design
    • 2.2 Electrical design..............................................................................................................
    • 2.3 Software design.............................................................................................................
    • 2.4 System assembly...........................................................................................................
    1. SYSTEM TESTING ........................................................................................................................................
    1. MATERIAL COST AND TOTAL EXPENSES............................................................................................
    1. CONCLUSION.................................................................................................................................................
    1. ACKNOWLEDGEMENTS.............................................................................................................................
    1. REFERENCES.................................................................................................................................................
    1. APPENDIX .......................................................................................................................................................
    • 8.1 Appendix A: Mechanical Components.........................................................................
      • 8.1.1 Materials Used
      • 8.1.2 Tools Used
    • 8.2 Appendix B: Electronic components
      • 8.2.1 Materials and Components Used
    • 8.3 Appendix C: Software components

1. INTRODUCTION

The team project was to design and build an automatically adjustable mini blind system. The blinds will open and close according to a user defined setting. The user will set a desired temperature or light intensity in the room where the blinds are installed. The system will maintain the temperature/light intensity in the room by opening and closing the blinds. The opening and closing mechanism of the mini blinds will be driven by a Shinano Kenshi STP- 42D241 stepper motor. This motor will be controlled by the MRK Board with the Motorola MC9HCS12 Microcontroller. The MRK board will be receiving inputs via the analog in pins from two PN 168 photo transistor light sensors and one TMP36 integrated circuit temperature sensor. The motor requires a control circuit that will be set up on a 3M solder less bread board. The team acquired and assembled a simple wooden frame with the mini blinds attached. The stand alone frame was constructed using 1 x 2 boards. A generic set of mini blinds measuring 24” x 48” were affixed to the frame. The completed setup is shown in Appendix A. The MRK board, bread board, and sensors were also attached to the frame.

2. SYSTEM DESIGN

Equipment

  • Microcontroller - Board with Motorola MC9HCS12 Microcontroller
  • Motor – Shinano Kenshi STP-42D241 stepper motor
  • Temperature Sensor – TMP36 Integrated Circuit Temperature Sensor
  • Light sensor – 2 PN 168 photo transistors
  • Mini blinds – Basic store bought mini blinds
  • Wood test stand – Fabricated basic wood planks

blind turning mechanism. Figure 3 shows the frame with the MRK board and 3M breadboard attached. Figure 4 shows the location of the 2 light sensors on the frame.

Figure 1: Frame Assembly

Figure 2: Mounted Motor

Figure 3: Mounted MRK Board and Breadboard

The temperature and light sensors used in the system are shown in Figures Figure 6 andFigure 7. All three sensors were connected to separate channels on the ANALOG IN pins of the MRK board. The signals from the three sensors are converted using the A/D converter. The converted signals are then processed by the Motorola microprocessor according to the C++ code contained in section 2.3.

Figure 6: TMP36 Temperature Sensor

Figure 7: PN 168 Photo Transistor

Depending to the outcome of the program, the MRK board will send an output signal to the DIGITAL OUT pins to be received by the stepper motor shown in Figure 8. The motor is

connected to the DIGITAL OUT pins and its integrated controlling circuit via the bread board. The Motor receives its power via the LEFT MOTOR connection of the MRK board. In order for an adequate amount of energy to be received, the MRK board must be set on HIGH POWER mode. Further descriptions of electrical components can be seen in Appendix B.

Figure 8: Shinano Kenshi STP-42D241 Stepper Motor

The full electrical assembly of these components is seen in Figures Figure 9 and Figure 10.

Figure 9: Components Connected to MRK Board

ANAL OG I N

MRKBOARDPOWER

SERIALPORT

MOTOR(LEFT)

DIGITAL OUT

MRK BOARD

TO^ COMPUTERSERIAL PORTGROUNDPOWERSIGNAL GROUNDPOWERSIGNAL GROUNDPOWERSIGNAL

SIGNALS

LIGHTSENSOR 1 LIGHTSENSOR 2 TEMPERATURE

SENSOR

STEPPER MOTOR

ACPOWER

docsity.com

2.3 Software design

The two main functions of the program are to control temperature and light of the room. The first operation performed is a prompt to the user to select which mode to execute put the program in, light control or temperature control. Before the program displays the user menu, the blinds are opened 800 motor steps which place the blinds in the fully open position. Because of this, the blinds must always be place in the fully closed position in a particular direction before running the program.

For the light control mode, the user will select a desired light intensity level: low, medium, or high. These light levels will correspond to a predetermined light sensor value. Two light sensors are used to get a representative value of the light level in a room. The average of all the sensor readings is taken and compared to the user chosen light level. If the light intensity measured is higher than the desired, the blinds will be closed until the conditions met. If the measured intensity is lower than the desired, the blinds will open until the conditions are met. This operation will run continuously until the user ends the loop by hitting the ‘Q’ key, which will send the program back to the “main menu”. During a control process, the program will “remember” the number of steps taken by the motor. Because of this, the user can exit the program by pressing the ‘E’ key, after which the program will return the blinds to the fully closed position.

For the temperature control mode, the user will set the desired temperature of the room. One sensor is used to measure the temperature of the room. Like the light intensity mode, the measure temperature will be compared to the desired temperature and either open or close the

Motor Steps toFully Open Position Main Menu1. Light 2.3. TempExit

Light Intensity Mode Temperature Mode

  1. User Selects:High 2.3. MediumLow
    1. User Selects:Warmer 5.6. SameCooler

Averages the valuesSensor Value: from both sensor

Acquires Temp fromsensor

Steps motor incompensating direction (if needed)while recording position

Steps motor incompensating direction (if needed)while recording position

value is within +/- 50Checks if desired units of sensor value

value is within +/- 3°Checks if desired of sensor value

Motor Steps to fullyclosed position

User exits program

2.4 System assembly

Combining the mechanical and electrical components of the system was quite simple. The connection of the MRK microcontroller, bread board, and stepper motor and its corresponding integrated circuit were essentially laid out in the same manner as Lab 10 from the MENG 483 Lab. This system was modified to accept two types of sensors and move the stepper motor according to the code discussed in section 2.3.

Getting the stepper motor to move one way or another depending on the sensor inputs was proven to be much easier than expected. The major problem seen by the system was telling the program when the blinds were fully closed. Without a set of boundaries, the motor might continue to turn while the blinds are already closed, possibly breaking the rotational mechanism on the blinds or the stepper motor itself.

Difficulties met in the C++ code were mostly associated with program flow. Problems were met in getting the program to immediately start the “main menu” upon running. Another difficulty was getting the program to return to the main menu after a user exits a control mode instead of having to run the program each time a mode change is desired. Without a return to main menu, the MRK board would have to be reset and the program run fresh for each change. It would be much more convenient for the code to run continuously and allow changes without the need to reset the system.

5. CONCLUSION

The group was able to successfully create the circuitry necessary to drive the stepper motor and utilize the light and temperature sensors. The stepper motor was attached to the top of the frame using zip ties. To open and close the blinds, the shaft of the motor was taped to the rotation mechanism on the blinds. The program performs as desired for major system actions but requires further development for stability and limitation factors. Further coding and/or mechanical features will be needed to ensure that the motor does not keep trying to rotate the blinds beyond the fully closed and fully open positions. Also, the user input settings require further development to ensure functionality and practicality.

6. ACKNOWLEDGEMENTS

We would like to acknowledge our professor of the mechatronics class Dr. Zagrei, the teaching assistants Jonathan Berg, Hakan Cakan, and Jason Matthews for helping us with constructing our circuitry and providing us with the tools necessary to complete the project.

7. REFERENCES

Alciatore D.G. and Histand, M.B., (2005) Introduction to Mechatronics and Measurement Systems , McGraw-Hill, third edition. Bishop, R.H., (Editor) (2002) The Mechatronics Handbook , CRC press, first edition.

8. APPENDIX

8.1 Appendix A: Mechanical Components

8.1.1 Materials Used

  • Mini Blinds – A standard set of mini blinds for household use. Blinds measured 24” x 48” when fully lowered
  • Lumber – Standard 1” x 2” pine boards to create a stand for the mini blinds to simulate a window frame
  • Wood Screws – Standard 2 ¾” deck screws to assemble boards into frame
  • Wood Glue – Standard wood glue to add rigidity to wooden frame
  • Zip ties – Standard 8” zip ties to secure motor and breadboard to test stand
  • Electrical Tape – Standard electrical tape used in securing motor to rotation mechanism of blinds and used in splicing wire connections

8.1.2 Tools Used

  • Miter Saw – 10” electric Makita miter saw used to section wooden boards for frame
  • Screw Drill – 18V cordless DeWalt screw drill used to place deck screws in frame
  • Screw Drivers – Assorted sizes and types of screwdrivers for several uses

8.3 Appendix C: Software components #include "MRK.h" char void mode,c;crazy( void ) { mode = fgetchar(SCI0);} void menu(fprintf(SCI0,"Which control mode do you wish to use?\n\r"); void ){ fprintf(SCI0,"Light (L) or Temperature (T)\n\r",c);fprintf(SCI0,"Press q at any time to return to main menu.\n\n\n\n\r"); }

int temp_desired, state, high, low ; digital_value, light1, light2, light_level, light_desired, temp,

int main() {

//Light Intensity ControllingMode_______________________________________________

analog_in(RESOLUTION, 10);digital_in(OUTPUT,ALL); motor_out(LEFT,255); const char step_sequence[] = {0x01, 0x04, 0x02, 0x08}; while (1) { menu();crazy(); if ((mode=='L')||(mode == 'l')) {setup_sci(SCI0, INTERRUPT, &crazy); while (1) { delay (10);light_desired = 300; light1 = analog_in(IN,2);light2 = analog_in(IN,4); light_level = (light1+light2)/2;low = light_level - 50; high = light_level + 50;fprintf(SCI0,"Light Average:%R4u Press Q to return to menu\r",light_level); if (high >= light_desired) {state = state - 1; digital_in(OUT,ALL, step_sequence[state & 0x03]); } if (low < light_desired) {state = state + 1; digital_in(OUT,ALL, step_sequence[state & 0x03]);

} if (mode == 'q') {setup_sci(SCI0, INTERRUPT, 0); }^ break ; }}

//___________________________________________________________________________ //Temperature ControlMode______________________________________________________ if ((mode=='T')||(mode == 't')) {setup_sci(SCI0, INTERRUPT, &crazy); while (1) { temp_desired = 85; delay (10); digital_value = analog_in(IN,8);temp=(71 * digital_value) / 100 + 29; low = temp - 5;high = temp + 5;

menu\r",temp); fprintf(SCI0,"Sensor:%R4u Press Q to return to if (high >= temp_desired) {state = state - 1; digital_in(OUT,ALL, step_sequence[state & 0x03]); } if (low < temp_desired) {state = state + 1; digital_in(OUT,ALL, step_sequence[state & 0x03]); } if (mode == 'q') {setup_sci(SCI0, INTERRUPT, 0); }^ break ; } //___________________________________________________________________________

} } }