me3281 take-home lab kit me4054w senior design · me3281 take-home lab kit me4054w senior design ....

33
2013 ME3281 Take-Home Lab Kit ME4054W Senior Design University of Minnesota 05/07/2013 Team Members: James Crist Jeremy Littlefield Kibaek Kim Paul Kruse Benjamin Sohn Kenneth Strauss Advisor: Professor William Durfee

Upload: vodang

Post on 09-May-2018

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

2013

ME3281 Take-Home Lab Kit

ME4054W Senior Design

University of Minnesota

05/07/2013

Team Members: James Crist Jeremy Littlefield Kibaek Kim Paul Kruse Benjamin Sohn Kenneth Strauss

Advisor: Professor William Durfee

Page 2: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

i

Executive Summary ME 3281 “System Dynamics and Control” is a course at the University of Minnesota

focused on the fundamentals of system dynamics and control. The topics covered in this course are often abstract, and can be difficult for students to visualize. To facilitate their learning, a lab kit was proposed to provide of physical representation of the mathematical models presented in class.

The kit consists of a simple mass-spring-motor system, as shown in Figure 1. An optional damping element is also included so students may observe the effect of damping on system dynamics. A graphical user interface (GUI) was written in Matlab to allow the student to easily control the system and sample data. The Matlab program communicates via serial with an Arduino microcontroller, where the sensor measurements, control loops, and motor commands are generated. To measure position and velocity, hall effect sensors are used to measure the magnetic field of a magnet placed concentric with the motor shaft. After a simple calibration routine, this sensor configuration was found to be accurate.

Previous models of this kit have suffered from high cost – so reducing this was a major driving factor. The use of an Arduino instead of the previous PIC chip drastically reduced the complexity of the PCB, allowing students to solder their boards together themselves. As the students should already own an Arduino from their ME 2011 course, this removes a major cost from the kit. Also, the use of custom components was minimized, as stock components are generally less expensive. Only the PCB and the pulley shaft are custom, and have minimal cost when ordered in large batches.

Improved functionality was also a main goal. The previous designs rubber band was replaced by light extension springs, resulting in a more robust design. The inertial component was also replaced with several washers so that the effect of differing masses can be more easily explored. Further, a removable damping element was added so that the effect of different damping factors can be observed. Finally, the software was streamlined to improve sampling speed and accuracy, as well as usability.

Two main labs were designed into the software: PID control, and frequency response. Both of these modules were tested to compare theoretical and experimental performance. After testing it was found that the system frequency response was close to that of the theoretical model, with a small difference in resonant frequency. Also, the system responded adequately to P, PI, and PID control when input with a step response. With both of these labs working, the kit is deemed successful.

Figure 1: Overview CAD model of the 2013 take home kit

Page 3: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

ii

Contribution pages James Crist

1) Created & conducted survey of previous ME 3281 students to gain insight into design requirements.

2) Researched & tested Arduino serial data transfer rate capabilities, and Arduino to Matlab interface.

3) Researched hall effect sensors, chose current sensor model. 4) Wrote Arduino server software: position measurement, velocity measurement, sensor

calibration. Helped Paul some with other code. 5) Wrote Matlab GUI software: theoretical bode plot generation 6) Created mathematical model of system, performed all system dynamics calculations,

and all theoretical performance calculations. 7) Wrote full search optimization code to choose best kit dimensions, as well as spring

and mass components. Optimized for cost as well as system performance. 8) Helped assemble and test prototypes, refined design. 9) Writing contributions: Volume 1 section 4 for hardware, and section 5 for position

accuracy. Volume 2 sections 1.3, 2.1.3, & 3.1 for position accuracy.

Jeremy Littlefield

1) Designed and fabricated damper. 2) Developed and conducted test procedure to determine damper linearity. 3) Conducted frequency response evaluation. 4) Designed initial PCB layout and obtained price quotes. 5) Researched existing commercial lab kits for design ideas and patent information. 6) Assembled earlier draft of report, wrote sections 1.1, 1.2, 2.1.1-2.1.4, 5.1-5.2 (freq.

response only). 7) Researched new kit designs (e.g. extended board w/o legs) to reduce cost and number

Kibaek Kim

1) Researched former generation of the lab kit and commercial lab kit to get ideas and information.

2) Researched various spring configurations for the lab kit and chose the best spring configuration with experiments.

3) Made own prototype of syringe damper model, but not chosen. 4) Made CAD files of all the components and entire model. 5) Assembled the prototype together. 6) Ran durability test. 7) Found and purchased newly decided parts together (spring, nylon machine screw and

washers). 8) Helped PID control test. 9) Wrote my responsible parts of the assignments [(Midproject: spring configuration section),

(Volume 1: part 2 of technical review, evaluation of durability) and (Volume 2: component list, procedure drawing, implementation procedure, evaluation of durability)].

10) Assembled all the assignments of volume 1 and volume 2 and made layout for the final report.

Paul Kruse

1) Researched and planned software strategy using Arduino and Matlab.

Page 4: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

iii

2) Performed project management tasks: planned and lead meetings, assigned and tracked status of tasks, divided up writing tasks and updated google site.

3) Brainstormed and contributed to hardware design. 4) Wrote Arduino server software: Frequency Response, PID, implemented position

measurement, calibration and serial communication. 5) Wrote Matlab GUI software: Frequency Response, PID, Hardware connection interface and

serial communication protocol. 6) Assembled and modified/refined hardware prototype 7) Writing contributions: Software block diagram, software sequence diagram, 4.2.2 for

software and 5.3 (Volume I), Bibliography entries, 1.4, 1.5, and 2.2.4 for software in Volume II.

Dongguy Benjamin Sohn

1) Researched previous generations and commercial lab kit to get ideas for our kit. 2) Researched various damper designs. 3) Selected spring and mass. 4) Researched/selected power supply. 5) Assembled the final prototype 6) Ran frequency response and PID control test for the evaluation 7) Designed PCB 8) Designed circuit and made circuit schematic 9) Helped make CAD files 10) Helped test damper 11) Wrote parts of the report (Volume 1: technical review, evaluation of PID control, Volume2:

procedure drawing implementation procedure, evaluation of PID control) Kenneth Strauss

1) Examined physical orientation of components, leveraging previous and existing kits 2) Aided in component selection 3) Designed pulley assembly for component mounting 4) Performed student testing to determine the ease of setup parameter 5) Writing contributions volume one sections 2, 3.1, 3.3, 5.1 and 5.2 ease of setup 6) Volume 2 sections 2.1.1, 2.1.4, 3.1, 3.3 7) Helped assemble prototypes and managed supplies

Page 5: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

iv

Table of Contents 1. Problem Definition

1.1 Problem Scope……………………………………………………………………………1 1.2 Technical Review………………………………………………………………………...1 1.3 Design Requirement……………………………………………………………………..9

2. Design Description 2.1 Summary of the Design………………………………………………………………..10 2.2 Detailed Description

2.2.1 Functional Block Diagram……………………………………………………...11 2.2.2 Functional Description…………………………………………………………..11 2.2.3 Overview Drawing………………………………………………………………24

2.3 Additional Uses………………………………………………………………………...24

3. Evaluation 3.1 Evaluation Plan………………………………………………………………………..24 3.2 Evaluation Results……………………………………………………………………..25 3.3 Discussion………………………………………………………………………………27

4. References…………………………………………………………………………………...28

Page 6: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

2

1. Problem Definition 1.1 Problem Scope

For students, system dynamics and control presents many concepts that can be difficult to understand. Many of the concepts are abstract and theoretical, and without a physical interpretation of what they read in a textbook and are told in class, cannot be truly understood and internalized. Therefore, a lab component is of the greatest importance to the success of students and to their real understanding of the material, to reinforce core concepts in a way that is cognitively digestible. A take home lab kit is proposed, to provide the students with this tool for learning, without requiring extra in-class time or additional classroom space. Kits have been implemented in the past, but they suffered from high cost and low reliability.

1.2 Technical Review

1.2.1 Field Background

Every mechanical engineering student at the University of the Minnesota is required to take ME3281, “System Dynamics and Control.” To improve student’s understanding of system control and to gain a better sense of physical systems, there have been several take-home lab kits in the past. Unlike formal lab sections that are performed at a school laboratory, these kits allow student to perform experiments at home and to customize the experiment with their own learning style, at their own pace. The take-home kit provides the same or better learning benefits as a formal lab section, but for lower cost and smaller use of university resources.

The 2006 take home lab kit covered concepts of frequency response, and PID control, using a small rotational mechanical system. It is a second-order, rotary mass-spring-damper system. Using gears, the motor operates a potentiometer which can read the angular displacement of the system. The gear is attached to the motor, and connected to the rubber band that acts like the spring. The internal friction of the system acts as an approximate rotary damper. The kit is able to read and send data from and to a host computer by a graphical user interface.

The flaws of the 2006 take-home lab kit have been discovered over the time. There were several issues with this kit, the main one being durability. Parts such as rubber bands and suction cups revealed a durability problem over time. To be specific, a rubber band loses its elasticity and a suction cap loses its shape as time goes by. This results in periodic part replacement, often changing the system dynamics in the process. The 2006 kit also lacked the ability to change kit parameters. To understand the concept of the system dynamics, experiments in various conditions should be supported. However, the previous kits did not have a method by which to change their system properties such as mass, damping coefficient, and spring coefficient. On the software side, operating system compatibility was a major issue. The user interface was written in visual basic, resulting in it only working for the Windows operating system.

The objective of the 2013 take-home kit project is to improve the lab kit’s reliability and functionality, while keeping the cost down. The lab kit is designed to be used in the current classroom. Therefore, it is important to design a lab kit without any failures and errors. Through this project, a physical kit with all necessary software and documentation will be developed to help students understand the concepts covered in System Dynamics and Control (ME3281).

1.2.2 Prior Art

Generation 1 of the ME3281 take-home lab kit was developed by a group of students who were enrolled in the senior design course (ME4054) in the spring of 2003. The kit has three modules, which are analog filtering module (AFM), mass spring damper module (MSD) and position control

Page 7: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

3

module (PCM), used for demonstrating how system models and equations relate to real world systems.

First, a position control module (PCM) is used as a motor control kit. With this module, students are able to perform PID control on a simple system, by adjusting proportional, integral, and differential gains (𝐾𝑝,𝐾𝑚, and 𝐾𝑟). Students have the option to choose a step input for the system, and also can change the input knob to allow for reference tracking. The second module is an audio filtering module (AFM) that students can use to play sound files, directed through interchangeable filters. By toggling a switch, student can quickly change between filtered and non-filtered sound. This module is for understanding first order RC filtering, cutoff frequency and roll-off. The last module is mass spring damper module (MSD). A Hall-effect sensor is used for checking displacement of the beam and then displaying on the screen. The motor can be used to create vibrations for frequency response or manually for step response, which operates the mass, spring and damper system. Through these exercises, students gain a better understanding of the physical representation of their modeling equation. These three modules need a peripheral interface controller (PIC) box which is used to link between the modules and the computer, running a Visual Basic program.

Figure 1-1: The position control module (left), and the analog filtering module (right)

Figure 1-2: The mass spring damper module

Page 8: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

4

Figure 1-3: PIC box

The next generation was designed by David Waletzko for his master thesis project under the supervision of Prof. William Durfee and Prof. Perry Li. The basic idea behind this kit is a quarter car model. This represents a linear, 4th order system. As it can be seen in Figure 1-4, the system is composed of 2 springs, 1 damper, and 2 masses. The MSD (mass, spring, and damper) system helps students understand the principles of time and frequency response, resonant systems, and the effect by parameter changes on a system. The method used to create linear motion is implemented with a crank-slider mechanism. A motor drives a spinning disk which has a link attached to it in an asymmetric manner. The link is connected to a slider on an aluminum rod. Therefore, when the motor rotates, the slider moves up and down 1 cm vertically. The speed of the slider can be adjusted by changing the rotational speed of the motor. The angular velocity can be determined by using a photo reflector that is attached on the board. This configuration is made to simulate a bumpy road typically encountered by a car suspension. By increasing the rotational speed of the motor, an increased forward velocity of the car can be simulated.

The first spring attached to the slider represents the elasticity of a tire. Since the tire is made of rubber, the tire has an associated spring property which can be assigned a spring constant. The first mass follows the first spring. The mass represents the weight of the tire. The mass is composed of two parts: the first one is a cylinder mass and the second one is a magnetic. The magnet is used to estimate the position with the Hall Effect sensors. Following the model of the tire is the suspension model. The model of the suspension is composed of a spring, a mass, and a damper. The mass and the spring are used in the same way as the model of the tire. The damper can be seen in Figure 1-4, where foam is located at the top. The magnitude of the damping coefficient can be determined by sliding resistance of the foam on the rod. This value can be adjusted by putting a rubber band on the foam to further inhibit sliding.

There were several advantages of this kit. The first advantage was that students could change all the components in the kit. By changing dampers and springs, students can run the kit in various conditions. This can help students understand the system more easily. Moreover, according to a survey made after the kit was used, most of students indicated that the kit helped their understanding of filtering, bode plots, and general concepts of the system.

There were also several disadvantages. The first one is the size of the kit. Since students take this kit to their homes and bring it back to the university, the size of the kit is important. However, this kit is not small enough to carry it in their backpacks. The kit was also rather expensive, due to the high cost of manufacturing. The software also proved troublesome to install; according to Waletzko’s survey, many students had problems when installing the software on a computer.

Page 9: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

5

Figure 1-4: Photo of summer 2004 work (2nd generation)

In 2006, the third generation was developed, based loosely on the first generation. The biggest change between the first and second generations was the conversion from a linear system to a rotary system. By making this change, it was possible to develop a position control exercise using PID control (Proportion-Integral-Derivative control), and a frequency control exercise. Additionally, by incorporating all the electronic components onto a central PCB board, the size of the kit decreased noticeably.

The third generation lab kit was a second order system, with one spring and one mass. No intentional damping is present in this system, although friction is present as a nonlinear damper. The input motor is attached to a potentiometer via a gear-train. This provides position measurements for feedback control. The inertial component is mounted on top of one of the gears. A rubber band is attached to a fixed mount point and wrapped around the gear providing the spring element. For the software, C and MATLAB were used to control the kit and provide a GUI for ease of use.

Page 10: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

6

Figure 1-5: The third generation module (PID control and frequency response)

The fourth generation (Figure 1-6) is very similar to the third generation (Figure 1-5). The biggest difference is a change in sensing methods. The potentiometer was replaced by two hall effect sensors to measure position. The hall effect sensors measure motor position by measuring the change of a magnetic field created by the rotation of a magnet. This change decreased the price of the kit; previously the potentiometer had been the most expensive component. This form of position measurement is a significantly more cost-effective method. This model is helpful when considering 2013 lab kit design, and provides good knowledge and experience that can be leveraged moving forward.

Figure 1-6: Fourth generation model

Page 11: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

7

A similar system dynamics and control take-home kit was developed by Musa Jouaneh and William Palm in University of Rhode Island. The kit consists of three components. The first is a hardware interface board. The second component is a Windows-based user interface that is installed on the student’s PC and is used to collect a data set. The third component is the sensor system used to perform the experiment.

The hardware interface board contains all the components that perform measurement, control, and communication. It was custom-designed and was built around a PIC18F4550 microcontroller. The board is mounted inside a plastic enclosure to protect from damage. To use the hardware students just connect the output of the 12 volt power supply adapter to the board. Powering the board causes the loaded program inside the microcontroller to run. The program will wait for user input from the user-interface program. The user-interface program was developed in Visual Basic Express 2008, and it communicates with the loaded program on the microcontroller. The embedded program was developed in C. The user-interface can transfer the experiment settings to the PIC microcontroller, and can also provide monitoring and control of the experiment progress. After the experiment is completed, the program saves the collected data to file. The last component which is sensor system has four experimental setups. These are a DC motor/tachometer system, a heater/temperature sensor system, a vibrating cantilever beam, and a temperature measurement system.

Figure 1-7: Hardware interface board (left) and User-Interface Program (right)

Figure 1-8: The motor-tachometer (left) and plate and heater experimental setup (right)

Page 12: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

8

Figure 1-9: Beam setup with the attached accelerometer (left) and temperature sensor (right)

SRV02 Base unit, which can perform a rotary control experiment, is an example of a commercial solution to the system dynamics and control educational objective. The kit consists of a DC motor in a solid aluminum frame. The DC motor operates the smaller pinion gear through an internal gear box. The pinion gear is fixed to a larger middle gear that rotates on the load shaft. There is a high resolution encoder that can measure the position of the load shaft. Also, the customer can choose between some options to improve kit performance, such as adding a potentiometer to measure the output shaft position, a tachometer to measure the velocity of the motor, or a slip-ring that allows a continuous 360 degree rotational operation. The kit can provide transfer function and frequency response representation for modeling topics, and provide PID and lead compensator for control topics.

In this kit, there are several advantages that can be considered. The solid square aluminum frame provides better stability. Students are able to use this kit easily due to full compatibility with MATLAB/Simulink & LabVIEW. Moreover, it provides a larger range of experiments than other alternatives. However, this module is too big for convenient transport, and overall has a significantly higher cost than is reasonable for student purchase.

Figure 1-10: SRV02 Base unit

ECP, the Industrial Emulator, is another, more elaborate commercial model than the Quanser SRV02. This model is designed to study control systems in an industrial or educational setting. The basic structure of the system is quite similar to the UMN generation 3 kit, in that it is based on a rotary model. This kit controls position and velocity by a proprietary feedback system. The biggest advantage of this kit is system diversity. As it can be seen in the Figure 1-11, it is able to change

Page 13: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

9

inertia by changing the mass. The user can also change the change gear ratio, disturbance torque, viscous or coulomb friction, backlash, and drive flexibility. This kit is helpful in understanding the practical control techniques that are used in industry. Because of this, it may not be appropriate for use in an educational setting, primarily due to the high cost and large size. However, the changeable components of this kit such as mass are an advantage and should be used as a reference for the 2013 take-home kit model.

Figure 1-11: ECP The Industrial Emulator / Servo Trainer

1.3 Design Requirements

# Requirement Importance

1 Will effectively teach ME3281 Curriculum 5

2 Will be reasonably priced 4

3 Will integrate Arduino microcontroller 3

4 Will be easy to construct 2

5 Will be reasonably sized 2

6 Will be reliable and rugged 4

7 Will improve student understanding 5

8 Will collect position data accurately 4

9 Will operate safely 5

10 Software is intuitive and easy to set up 4

11 Will utilize Matlab user interface 3

12 Software incorporates platform independence 4

13 Will determine velocity accurately 4

Table 1-1: Major Design Requirements

Page 14: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

10

Cost

Cost is a main driving factor in the design of this kit. Students will be required to purchase the kit along with their textbook and other materials. With the knowledge that students dislike spending money, it is necessary to produce the kit cheaply to minimize student backlash. In addition, the materials will be purchased by the University of Minnesota in lots of 200, and it is necessary that this investment be as small as possible.

Reliability

It is of the greatest importance that the kits be reliable. The curriculum will require the use of the kit throughout the duration of the semester, and the kit must be able to function despite time, wear, and minor damage. Furthermore, students can become discouraged and frustrated by a malfunctioning kit, negating the educational benefit of the labs. Most importantly, the kits must be able to return a repeatable and predictable result. If results obtained by the students do not reflect the ideal behavior they expect, to some degree the value of the lab is lost.

Ease of Setup

The purpose of ME 3281 is not to be a course in circuits or construction. With this in mind, the assembly of the lab kit must be simple and intuitive. It is not the intention of the labs to teach the students how to wire components, so circuits must be simple and fast to set up. Furthermore, the software should be intuitive to install and run. Communication between the computer and the kit should not require any additional training for the students, aside from simple instruction. Frustration can easily arise if students have trouble before they even start their lab.

Versatility

Versatility fulfills several of the requirements. The kit should be versatile in its configuration so that it can be used to illustrate the whole of the ME 3281 curriculum and maximize its usefulness for an entire semester. The kit will be able to provide a physical representation for system modeling, step and frequency response, and PID control. The kit must be able to provide position and velocity measurement and control. With this versatility, the number of concepts for which the kit can provide reinforcement, and therefore the educational value of the labs, is maximized. The kit must also be versatile in that it can be used on multiple computer platforms. Students own Macs as often as PCs, and the kit must, therefore, be compatible for use by all students.

2. Design Description 2.1 Summary of the Design

The ME 3281 take-home lab kit provides the student a unique approach to learning system dynamics and control. The kit is a low-cost combination of components that is purchased and assembled by the student. It uses that a student may likely already have, an Arduino microcontroller and a breadboard, to reduce the cost to an affordable level.

The take-home kit uses the Arduino microcontroller to interact with a rotary mass-spring-damper system. The position and velocity measurement is accomplished through the use of Hall Effect sensors and a magnet mounted on the rotational pulley. Coil springs are used, along with washers used to tune system mass, and friction damping, along with an optional fluid damper are used to provide system damping. A DC motor provides input torque. The student interacts with the kit through a MATLAB user interface, which communicates via serial communication to the embedded C program that runs on the Arduino.

The student is provided with six labs. First, the student uses their own measurements, along with some provided information, to perform system identification; finding the mass, inertia, spring

Page 15: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

11

constant and damping coefficient. The second lab is to perform system calibration and setup. An automatic routine is run to determine the input range for the Hall Effect sensors, connection with the Arduino is verified, and basic functions are tested. The purpose of this lab is to ensure the students have assembled the lab kit properly. Third, the student performs a frequency response experiment, where a Bode plot of the system is generated and compared with the theoretical model. The last two labs involve PID control, using feedback from the Hall Effect sensors to attain a specific rotational position or velocity.

By performing these exercises, a student is able to use the experimental system to learn more about how the system dynamics and control theory can translate to real-world systems.

2.2 Detailed description

2.2.1 Functional Block Diagram

Figure 2-1: Block Diagram of ME3281 Lab Kit

2.2.2 Functional Description

The lab kit consists of three subsystems: the dynamic system, the controller, and the GUI.

Dynamic System

The dynamic system encompasses all of the mechanical components of the system. It is composed of a motor, mass, spring, and damper.

Motor

The motor provides the input to the dynamic system. It applies a torque to the system, influencing the position, velocity, and acceleration of the mass. A DC motor was chosen due to simplicity of control and minimal cost. The transfer function for a DC motor is

Page 16: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

12

Ω(𝑠)𝑉(𝑠) =

𝑘𝑡(𝐽𝑅)𝑠 + 𝑅𝐵 + 𝑘𝑡2

(1)

where Ω(𝑠) is the angular velocity, 𝑉(𝑠) is the input voltage, 𝑘𝑡 is the torque constant, 𝐽 is the rotational inertia of the motor shaft, 𝑅 is the coil resistance, and 𝐵 is the damping coefficient of the motor. For the motor to provide an ideal input to the system, it should introduce minimal damping and inertial components to the system while providing a large enough torque to easily move the system through a large enough range of motion. Furthermore, as minimizing cost is a goal of this project, the motor should be cheap and use an easily obtainable voltage to minimize power-supply cost.

The Jameco motor #238473 was found to have the best torque-to-price ratio. The torque-speed curve for this motor is shown in Figure 2-2.

Figure 2-2: Jameco 238473 motor torque-speed curve (Mabuchi Motor Co LTD.)

As can be seen from Figure 2-2, the stall torque is 18.3 𝑚𝑚𝑚, with a stall current of 1.06 𝐴. Using this curve, the ideal torque constant 𝑘𝑡 is the inverse of the torque-current line. This results in

𝑘𝑡 = �

1.06 𝐴 − 0.026 𝐴0.0183 𝑚𝑚

�−1

= 17.7 𝑚𝑚𝑚/𝐴 (2)

Since the back-emf constant and the torque constant are equal in an ideal motor when using SI units, the velocity constant can be determined to be

𝑘𝑣 = 𝑘𝑒−1 ∗602𝜋

= 𝑘𝑡−1 ∗602𝜋

= 540 𝑅𝑃𝑀/𝑣𝑜𝑙𝑡 (3)

Because they are not provided by the data sheet, the intertial, resistive, and damping constants of the motor must be determined experimentally. These will be found later using system identification techniques.

To control the motor, an L293D H-bridge chip was used. The chip takes a PWM input from

Page 17: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

13

the Arduino and outputs a voltage to the motor. This chip was chosen due to its low price and ease of use. As the stall current of the motor is 1.06 A, the chip is capable of surviving stall currents without burning out.

Springs

Previous kit renditions used a rubber-band to provide the spring element of the system. While low in cost, the rubber band is not ideal. After a number of cycles the rubber-band stretches, changing its spring constant. Eventually the rubber-band breaks and a new one is required, having a different spring constant than the original.

To remedy this, several different spring methods were examined (see Volume II) and a configuration of extension springs attached at a single point was chosen.

Figure 2-3: Extension spring configuration

As shown in Figure 2-3, the springs are attached to a single mount point on one end and tie with string to a second point on the opposite side of the pulley. This allows the radial motion to be transmitted to extension of the springs. As the pulley turns from its 0° position, one spring is extended while the other contracts. This results in an extremely linear relationship over the range where neither spring is fully contracted. This max angular rotation can be expressed as

𝜃𝑚𝑚𝑚 =

√𝑑2 + 𝑟2 − 𝑥𝑚𝑚𝑚

2 ∗ 𝑟 (4)

where 𝑑 is the distance between the spring mount point and the pulley center, r is the pulley radius, and 𝑥𝑚𝑚𝑚 is the unstretched spring length. The largest 𝜃𝑚𝑚𝑚 that can occur is 90°, as all rotations beyond that point will exhibit a different spring geometry due to the rotation of the attachment point – resulting in a nonlinear relationship. The maximum rotational angle capable of being achieved by the chosen motor can be expressed as

Page 18: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

14

𝜃𝑚𝑜𝑡𝑜𝑟 𝑚𝑚𝑚 =𝑇𝑠𝑡𝑚𝑙𝑙

2 ∗ 𝑟2 ∗ 𝑘 (5)

This is due to the opposing force of the springs at this angle being equal to the stall torque of the motor. This angle needs to be at least 30° so that the position change is easily visible.

Using the system optimization methods discussed at the end of this section, McMaster spring #9654K412 was selected. It has a spring constant of 𝑘 = 0.17 𝑙𝑙/𝑖𝑖 and an unextended length of 1.5”. This results in a max rotation by the motor of

𝜃𝑚𝑜𝑡𝑜𝑟 𝑚𝑚𝑚 = 69.9° (6)

Since the spring configuration becomes nonlinear after 𝜃 = 45°, the motor is able to move the system fully through its allowable range of motion.

Mass

The mass used in the previous kits was a 1” diameter shaft collar, which cost $1.10 each. To save on cost this kit uses washers. This decreases the mass cost to $0.18 cents per kit and allows for different masses to be used so the effect can be seen in system dynamics.

Besides the washers, the inertial components also consist of the pulley/shaft/magnet assembly, as shown in Figure 2-4.

Figure 2-4: Inertial component assembly

The pulley is a stock McMaster component to keep cost at a minimum. The shaft is a 1.5 inch piece of 0.25” diameter acrylic rod. This is a custom part, but only requires one cutting and one drilling operation, so costs are minimized. The shaft is glued inside both the pulley and magnet bores, holding the assembly together. To keep the washers attached to this assembly, a rubber-band is wrapped around the top and cinched up next to the washers. This is a low cost solution but provides enough compressive force to keep the washers in place.

Damper

This kit incorporates an optional damping element. The damper consists of an impeller mounted on the top of the shaft, as shown in Figure 2-5.

Page 19: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

15

Figure 2-5: Optional damper design

The impeller is constructed from two 4” x 6” index cards, glued around a wooden dowel. Due to the simplicity of construction, the students will be able to assemble it themselves. This also allows for the students to experiment in damper design. To attach the damper to the top of the shaft, a 3/16” inner diameter vinyl tubing is pressed around the shaft and the wooden dowel. This allows the damper to be easily attached and removed so many different system configurations can be explored.

An ideal damper has a linear relationship between torque and velocity

T = b ∗ ω (7)

where T is the torque from the damper, b is the damping coefficient, and 𝜔 is the angular velocity. This damper was evaluated for linearity by measuring the torque while varying the angular velocity. The details of this experiment are found in volume 2. As shown in Figure 2-6, the torque-velocity curve of the damper is fairly linear, with 𝑟2 = 0.9682.

Page 20: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

16

Figure 2-6: Torque - Velocity curve of damper

The damper shown here has a damping coefficient of 𝑙 = 0.676 𝑚𝑚𝑚𝑟𝑚𝑟/𝑠

. As each damper will be different due to student construction, the damping coefficient found here won’t be the same as in the lab kits, but should be similar.

System Dynamics

To keep the dynamics of the system easily observable for frequency response, the natural frequency needs to be less than 10 Hz. To determine the natural frequency of the system, the system was modeled:

Figure 2-7: System dynamics of mechanical system for lab kit

Using this model, the characteristic equation for the system was found to be

𝐽�̈� +

𝑙𝐽�̇� +

2𝑟2𝑘𝐽

𝜃 (8)

Page 21: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

17

which has a natural frequency of

𝑓𝑚 =

12𝜋

�2𝑟2𝑘𝐽

(9)

As can be seen by equation 9, the natural frequency increases as the pulley radius or spring constant increase, and as the system inertia decreases.

System Optimization:

To determine the optimal configuration of components for the dynamic system, a full search system optimization method was used. A list of all feasible springs and washers was pulled from McMaster Carr and fed into an excel spreadsheet. All springs with unextended lengths of no more than 1.5” were considered, as well as all washers with inner diameters between 0.25” and 0.75”. A solver was then written that checks the following constraints:

1.) 𝑥𝑚𝑚𝑚 ≤ spring extended length 2.) 𝑥𝑚𝑚𝑚 ≥ spring compressed length 3.) 𝑇𝑠𝑡𝑚𝑙𝑙 ≥ 𝐹𝑚𝑚𝑚𝑠𝑝𝑟𝑚𝑚𝑔 ∗ 𝑟 4.) 𝜃𝑚𝑚𝑚 ≥ 30° 5.) 4 𝐻𝑧 ≤ 𝑓𝑚 ≤ 10 𝐻𝑧

All possible combinations of spring and washer were then iterated through and checked for validity. If the configuration met the constraints, it was scored based on cost (minimize), minimum required distance between pulley and spring mount (minimize), and maximum angle rotation (maximize). After running the optimization algorithm, the following part configuration was chosen:

1.) Spring: McMaster #9654K412 2.) Washer: 5 x McMaster #98032A492 3.) Distance of pulley center to spring mount = 2” 4.) 𝜃𝑚𝑚𝑚 = 69.9° 5.) 𝑓𝑚 = 9.295 𝐻𝑧

This total cost for 2 springs and 5 washers is $1.52, which is more than the previous kit iterations cost of $1.26 for the shaft collar and rubber-band. However, this design provides a more robust and linear system.

System Controller

The system controller consists of the sensor and the microcontroller. The sensor is used to provide feedback into the controller for PID loops, as well as output data to the GUI for the student to analyze. The controller implements all of the logic and control algorithms.

Sensors

For the controller to function properly, accurate sensing of position is required. However, low cost, low friction, and complexity are also important constraints. The method found best to fit these requirements uses linear hall effect sensors and a magnet mounted on the motor shaft. Hall effect sensors are inexpensive, simple to implement, and have no friction due to their non-contact nature.

The sensor configuration consists of a ring magnet placed concentric about the motor shaft, and two hall effect sensors placed 90° apart a small distance from that magnet, as shown in Figure 2-8.

Page 22: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

18

Figure 2-8: Hall effect sensors and magnet configuration

Linear hall-effect sensors measure the strength of a magnetic field and output a voltage proportional to that strength. As the shaft rotates, the sensor output is a sine wave. By measuring the field strength at two locations separated by 90°, the position of the shaft can be calculated as

tan−1 �

ℎ1 −ℎ1𝑚𝑚𝑚

2ℎ2 −

ℎ2𝑚𝑚𝑚2

� (10)

where ℎ1, ℎ2 are the hall effect sensor outputs, and ℎ1𝑚𝑚𝑚, ℎ2𝑚𝑚𝑚 are the maximum values output in one revolution. These max values are recorded and stored in EEPROM on the arduino during an initial calibration routine. To make sure quadrants are handled properly in the calculation of equation 9, the IEEE standard atan2() function is implemented. An example plot of simulated sensor output and determined angle is shown in Figure 2-9.

Figure 2-9: Hall effect sensor data and corresponding calculated angle

Controller

The controller implements the control algorithms, interprets commands from the GUI, and logs the output data for later analysis. Previous kit iterations have used PIC controllers to implement this logic. To simplify the kit and also cut down on electronics and fabrication costs, an Arduino was chosen instead. Because the Arduino compiler is smart enough to optimize the code for the various

Page 23: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

19

models, the student should be able to use any model. Students in ME 3281 should already possess an Arduino from their ME2011 course, and if not, they are a low cost and reusable board that they could purchase as an optional component. As the Arduino UNO is the current model, this is the one that will be sold as an optional component. The code structure is described along with the GUI code in the next section.

Software

In the new 2013 version of the ME3281 take-home kit, a similar approach to the 2010 project revision was used with some modifications. A change had been made to implement the GUI in MATLAB and call C code to interact with the PIC. An opportunity presented itself to use the MATLAB built-in serial library to communicate with the Arduino microcontroller, which is installed using a serial-over-USB driver onto a personal computer. This reduces some compatibility complications that remained with the dependency on C code and wraps another portion of functionality in the platform independent MATLAB software.

Once the student has the Arduino connected to their computer, MATLAB initialized and the ‘dlab.m’ file executed, they see the following screen shown in Figure 2-10.

Figure 2-10: Initial MATLAB GUI screen

On the initial screen, the student must select a port to which the Arduino is connected. This can be determined by inspecting the device manager; once Arduino drivers are installed it will associate the port with that device and it will be named as such. Knowledge of the port number will also be necessary for deploying the Arduino server software. In most cases, however, there will only be one port to choose from. Clicking on the appropriate button connects the Arduino and enables the software module buttons, as shown in Figure 2-11.

Page 24: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

20

Figure 2-11: Initial MATLAB GUI screen, Arduino connected

Clicking on a button for a software module launches the module and allows the student to complete the lab exercise. There is some commonality between all the modules. First, input parameters are sent to the Arduino via serial communication, preceded by a number which represents the current software module. This allows the Arduino to decipher any following information and use it for the specific task. The Arduino only returns one of two different parameters back to the host PC; position data or velocity data, depending on the module being executed. Following are brief descriptions of how each software module works.

The calibration module is engaged by clicking the ‘Calibration’ button. This module has no formal GUI, the student will know it is operating when the motor slowly starts rotating and continues for a few turns. The routine is finding the high and low point of each Hall Effect sensors, by which all measurements will be scaled to provide maximum accuracy. The prompt that the user encounters is shown below in Figure 2-12. This instructs the user to wait until the motor stops moving for calibration completion.

Figure 2-12: Calibration Prompt

The frequency response segment allows the student to select and provide oscillating stimulation to the system and view the rotational response as a function of time. The Arduino constructs a simple sinusoidal input that is translated into PWM parameters to move to the motor. Different frequency inputs change the period of this input wave. Position data is returned via serial communication to the host PC and MATLAB, which is graphed on the left-hand graph shown in Figure 2-13. For each trial using different frequencies, upper and lower bounds of the wave are selected with the sliders to the left and a point can be plotted on the bode plot to the right. Input J, K, B, and G parameters are also selected on the right-hand side. The bode plot calculations happen entirely on the host PC, this does not require any interaction with the Arduino.

Page 25: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

21

Figure 2-13: Frequency response module

The PID control software modules for both position and velocity share a very similar structure. The user selects Kp, Ki, and Kd parameters on the left, which are sent to the Arduino and used as inputs into the control equation that determines PWM output to the motor. The primary difference is that in one case, the velocity difference is used to determine error, and in the other case, only position is used. The user is shown a graph with either velocity or position shown as a function of time, as shown in Figure 2-14.

Figure 2-14: Overall PID module layout

The interaction of the Matlab software modules within ‘Dlab’ with the Arduino ‘DlabServer’

Page 26: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

22

server program begins with displaying the available ports for Arduino connection. After this has been selected, a lab module is selected. For each module, the general flow begins with user inputs for whatever configuration parameters are necessary; for PID this is Kp, Kd, Ki, and step amount and direction, for frequency response this is the desired input frequency and the system model parameters. These parameters are sent, which causes code to run on ‘DlabServer’ that uses the input parameters to drive the motor. For the PID modules, the control function is calculated using the input parameters, and a PWM value is selected and sent to the motor. For frequency response, an open loop sinusoidal input signal with the selected frequency is used to the drive the motor. At the end of the server code, the position is sent back over serial to the host PC regardless of what module is being run. Other modules can be implemented following a similar design pattern. See Figure 2-15 for a sequence diagram demonstrating this methodology.

Page 27: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

23

Figure 2-15: Overall software system interaction

Page 28: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

24

2.2.3 Overview Drawing

Figure 2-16: Kit overview drawing

2.3 Additional Uses

The lab kit was primarily designed for students in ME 3281 but may have uses in other classes as well. As the Arduino is easily programmable, the kit could also be used in a higher level controls course where students have to code their own control algorithms. This allows students to understand the concepts of sampling rates as well as real world implementation of digital PID control loops. Additionally, as the Arduino and breadboard are intended to be reusable, they may be easily disconnected from the kit and used for other classes or student projects.

3. Evaluation 3.1 Evaluation plan

Position Accuracy

For the kit to function properly, the sensors must be accurate and reliable. Hall effect sensors were chosen due to their non-mechanical nature in the hope that they would be more robust than the previously used potentiometer. To test the sensing elements, a prototype of the kit will be assembled. Position measurements will then be taken every π/8 radians (22.5 degrees), and the actual angle compared with the measured angle.

Frequency Response

To ensure the system dynamics of the lab kit correspond with theory, the frequency response

Page 29: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

25

through the desired bandwidth needs to be analyzed. This will be measured by inputting a sin wave of known frequency into the system, and measuring the positional changes. By repeating this for several different frequencies, a Bode plot of the system can be generated. This bode plot will then be compared with the theoretical bode plot to determine if the system matches theory.

PID Control

Another important concept for the ME3281 lab kit is that it gives reliable results to student. To validate the PID control portion of the lab kit, P, PI, and PID control will be tested with varying gains, and the results compared with theory.

Durability of the Kit

Durability is also one of the important requirements of our kit. Because each student in ME 3281 is going to have an own lab kit and use the kit for whole semester, the kit should have good durability. During the semester, some students might drop the kit from their hand or table by mistake, so testing will be examined how high the kit can fall without any damages. Also, students might be required to bring the lab kit to class for several times, so fragile testing will be investigated for condition that the lab kit is in a backpack. Also, spring system will be loaded and unloaded many times, so fatigue test will be examined.

Ease of Setup

The design of this kit has been motivated, in many of its aspects, by the idea of simplicity. One important requirement of the kit is that it is approachable by students, bearing in mind that they all have varying levels of technical knowledge and skill. The construction of the kit therefore must be simple enough for any student. To ensure that this requirement has been met, testing will take place to gauge student reaction to the assembly of the kit. A group of students will be asked to perform the construction and provide feedback on qualitative metrics such as complexity of the work and their level of frustration, and on quantifiable metrics like the time to construct and the number mistakes made.

3.2 Evaluation Results

Position Accuracy

For the kit to function properly, the sensors must be accurate and reliable. Hall effect sensors were chosen due to their non-mechanical nature in the hope that they would be more robust than the previously used potentiometer. To test the sensing elements, a prototype of the kit was assembled. Position measurements were then taken every π/8 radians (22.5 degrees), and the actual angle compared with the measured angle. The angle measurements were found to be very accurate, with an average error of ±0.067 radians (±3.8°). This was deemed to be accurate enough not to effect kit performance.

Frequency Response

To characterize the system dynamics of the lab kit, frequency response through the desired bandwidth is need. This was measured by inputting a sin wave of known frequency into the system, and measuring the positional changes. By repeating this for several different frequencies, a Bode plot of the system was generated. After comparing the experimental Bode plot to the theoretical Bode Plot, it was found that the theory corresponded well. The experimental results are off by less than 5 dB at the low end of the frequency spectrum. The experimental resonant frequency was approximately 2 Hz larger than the theoretical value, showing an excellent correspondence with theory. After the magnitude peak, experimental results had an error of less than 2 dB and closely aligned with the theoretical response. The results were not only satisfactory but were much closer than expected. Because the lab kit uses very small components, especially the inert mass, even slight errors in

Page 30: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

26

calculations and measurements can greatly change results. The system’s transfer function was determined to accurately describe the system.

PID Control

In this test, it was verified that all proportional, integral, and derivative terms work well with velocity and position control. The first experiment was to test a proportional term. In MATLAB UI, 𝐾𝑝 was set to a 15 and the other terms to 0. Then, 𝐾𝑝 value was increased to 30. The data from these three experiments were compared with a theoretical trend. After the results were checked, the experiment was performed with bigger 𝐾𝑝 value to be compared with a theoretical value. The second test was to verify an integral term. In this test, the integral term was changed with fixed 𝐾𝑝. 𝐾𝑝 was set to 4 and the integral term was changed by increment of 2. With several tests, the results were compared with theoretical trend. The trend was well matched with a theoretical value. The third one was to verify the derivative term. 𝐾𝑝 and 𝐾𝑚 were fixed to 15 and 5. And 𝐾𝑟 values were changed to several values. The results from this test were compared with calculated value as before, and also found to correlate with theory.

Durability of the Kit

To test the durability of the kit, a test was created that contains three different branches: a dropping test, a fragility test, and a fatigue test. The dropping test was performed for several heights. The standard height of a table (30”) was set as the minimum and benchmark height in the test. The kit should be fine when falling from this height and 3 more tests were performed at different heights by an increment of 10”. During the dropping test, the kit was fine for every situation. It was shown that the kit can resist minimum impulse of 0.652Ns. The fragility test was examined by jumping in place with the lab kit in a backpack. The kit was placed with 3 different loads (a notebook, 3 notebooks, and 5 notebooks) in the backpack, and determined how long the kit remains in its normal condition. The kit was checked at every 100 times of jumping. In case of 1 notebook, the kit was fine until 1500 times of jumping. However, for the 3 notebooks and 5 notebooks situation, hall effect sensors started to be bent between 600 and 800 times of jumping. The fatigue test was performed by checking when failure of components occurs during numerous repeating processes of assembly and disassembly. The experiment was performed theoretically first and S-N curve gave us infinite life of the kit for the assembly and disassembly process. The experiment was also performed manually, and the kit was fine until 100 times of assembly and disassembly process.

Ease of Setup

Testing took place to determine students’ ability to construct the take home lab kit. Four student volunteers were asked to construct the kit. They were given written instructions on how to do so, and were given all of the components necessary. They were not, however, given any outside help. This method of testing was chosen in an attempt to simulate the worst case scenario for a student attempting to construct the kit at home and on their own. The students expressed a high level of confidence in their mechanical and electrical skill, but admitted to having little practical experience. After constructing the kit, the students were asked to give feedback on the complexity and difficulty of the construction. They unanimously agreed that they faced little to no confusion while building the kit, and admitted that the written instructions acted only secondarily to the picture of a finished kit, that was provided. None of the students made any mistakes in their construction and all completed the task in less than thirty minutes. The time to construct parameter is not perfectly accurate of the actual value due to the fact that, for a lack of materials, the students were asked not to solder any of the connections. However, all of the students expressed confidence in their ability to solder and agreed that it would not add more than five minutes, had they done it. Overall, testing showed that the setup of the kit posed no significant difficulty to students.

Page 31: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

27

3.3 Discussion

3.3.1 Strengths and Weaknesses

All things considered, the design and realization of the 2013 ME3281 take-home kit can be considered a success. The kit provides the student with a very affordable demonstration of concepts covered in class, with the overall price adding up to $30.09 for the students who own an Arduino and breadboard, which will likely be the majority. The physical hardware combines many off-the-shelf components with only two affordable custom pieces; the breadboard and the shaft adapter. A simple DC motor, washers, a plastic pulley, small springs, a magnet and bolts make up the other primary kit components. Kit software, both server and GUI, are implemented using software the student should already be familiar with and have easy access to. Matlab is used for other assignments in ME3281 and is also used for the GUI interface for this kit. Arduino software code, which is written in C, is deployed to the Arduino using a freeware IDE program. Software is developed in a way that will make for easy modification and enhancement in the future. Hall Effect position sensing provides very accurate measurements used by the PID and frequency response software modules to produce real-world results that align well with ideal.

The take-home kit does suffer from a few weaknesses, some of which were predicted and some were discovered during testing. While the hardware is cheap and simple, sometimes taking this approach reveals drawbacks. The magnet is very strong and causes the pulley some rotation resistance at certain points in pulley rotation when the magnet interacts with motor’s internal magnet. This is due to the close proximity of the two components and lack of proper shielding, and has negative consequences with regard to PID and frequency response software performance. However, it is minimal enough to be neglected. When running the frequency response software, there are noticeable minor harmonics at play. A second resonance can be seen at lower frequencies, around 3-5 Hz. It may be hypothesized that this is due to side-to-side movement of the springs, or the pulley being off-center and not totally balanced. It can be observed that even with careful manufacturing, there may be a slight wobble in the pulley. When reaching the primary resonant frequency, the kit may vibrate more than is desirable. This can have various negative impacts, including kit movement and falling from a table, as well as bolts and nuts rattling loose. Loose components be mitigated by using lock washers, and restricting the movement of the kit by hand or with books or other barriers. In addition, keeping the spring connection string the from moving relative to the pulley, as well as movement and rotation of the washers, is slightly difficult and could be improved upon. The current strategy consists of using tape or tightly wound rubber bands to inhibit movement.

Lastly, the software suffers from a few weak points. Serial communication with the Arduino is complicated to implement and suffers from occasional hiccups, which impacts all the software modules. The processing power and storage capacity of the Arduino is very limited and nearing its capacity, so further enhancement may encounter barriers. Matlab sometimes produces unpredictable behavior and may leave windows open with the inability to close them.

Over all, it would seem that the positive features of the take-home kit outshine the weaknesses, most of which can be mitigated with future work.

3.3.2 Next Steps

As with many multi-faceting projects, the work completed on the 2013 ME3281 take-home kit creates many avenues for further work and refinement. With regard to the hardware, continued work to increase robustness could include a better shielding technique or a larger distance between the motor and rotational magnet, an improved strategy to secure washer weights and spring connecting string, as well as further efforts to make the kit more stable and stay in place.

Unfortunately, with the time allowed and large project scope, not all deliverables were accomplished. Laboratory manuals, setup guides, and assignment materials need to be created before

Page 32: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

28

the kit can be used in the ME3281 course. Velocity PID and Velocity Step Input software modules should be completed. Further software bug fixing is required, mostly around the serial communication protocol. Additional student testing could verify the design and bring out other potential areas for improvement.

This kit should be considered a work in progress, however, a great beginning has been achieved and the framework has been created for a very useful tool in system dynamics and controls learning.

4. References [1] Durfee, Li and Waletzko, June, 2004 “Take-home Lab Kits for System Dynamics and

ControlsCourses”. Proceedings of the 2004 American Controls Conference.

[2] Durfee, Li and Waletzko, June, 2005 “At-home System and Controls Laboratories.”

Proceedings of the 2005 American Society of Engineering Educators Conference.

[3] Waletzko, D. December, 2005 “Distributed Laboratory Modules for System Dynamics and

Controls Courses”, A Plan A Master’s Thesis, University of Minnesota, Institute of Technology.

[4] ME4054 Work, Available:

http://www.me.umn.edu/dlab/ME4054work.html [Accessed: March 3, 2013]

[5] Jouaneh, M. and Palm, W., June, 2009 "System Dynamics Take-Home Laboratory Kits", In

Proceeding of the 2009 ASEE Annual Conference, Austin, TX.

[6] Quanser Inc, Available:

http://www.quanser.com/flippers/Rotary/2012/ [Accessed: March 3, 2013]

[7] Educational Control Product (ECP), “Industrial Plant Emulator”, Available:

http://www.ecpsystems.com/controls_emulator.htm. [Accessed: April 5, 2009].

[8] Distributed Laboratories, Available: http://www.me.umn.edu/dlab/ [Accessed: March 6, 2013]

[9] Ace Controls International, "Rotary Dampers," Available:

http://ace-ace.com/wEnglisch/pages/Produkte/index.php?IdTreeGroup=268&navid=1 [Accessed: March 6, 2013]

[10] Sparkfun Electronics "Optical Detector / Phototransistor – QRd1114," Available: https://www.sparkfun.com/products/246 [Accessed: March 6, 2013]

[11] Hirozumi, S., Takeaki, K., and Tok Bearing Co., Ltd. (2005). U.S. Patent No. 6121526.

Washington, DC: U.S. Patent and Trademark Office.

Page 33: ME3281 Take-Home Lab Kit ME4054W Senior Design · ME3281 Take-Home Lab Kit ME4054W Senior Design . ... Helped Paul some with other code. 5) Wrote Matlab GUI software: ... rotary mass-spring-damper

29

[12] Mabuchi Motor Co LTD. RF-370CA-15370 Motor Curve. 2013. Chart. Jameco, Belmont, CA. Web. 4 Mar 2013. <http://www.jameco.com/Jameco/Products/ProdDS/238473.PDF>.

[13] Close, Charles, Dean Frederick, and Jonathan Newell. Modeling and Analysis of Dynamic Systems. 3rd Edition. Hoboken: John Wiley and Sons, 2001. Print.