Development of a Digital Controller for Motor Control (Electrical/Electronics Project)

Get this Project:

Fields with * are mandatory

ABSTRACT

A digital motor controller for student lab use is designed, built, and tested. The controller uses an encoder for position measurement, and an H-bridge to drive the electromechanical plant. A user interface is created to enhance usability of the device. The user interface is able to display key parameters of the control algorithm as well as the state of the system.

It is also used to modify the gains and sample rate of the control algorithm. The design of the system is refined, and 10 units are built for the EE472 Digital Controls Lab. The lab manuals for the first 4 experiments are revised to match and support the new system. The possible future for the project is described with some suggestions for improving the system.

DESIGN REQUIREMENTS

The replacement controller was required to match or exceed the functionality of the previous system in all ways, while increasing ease of use to allow a student to easily function in the new lab environment. The following sections will detail both specific hardware requirements as well as softer goals for the project, and will cover aspects such as size and shape, ease of use, suitability for future experiments and labs, ease of repair, and educational value.

HARDWARE DESIGN

Figure 5 : Hardware Layout

Figure 5 : Hardware Layout

Figure 6 : Closed Loop Block Diagram for new Control Box

Figure 6 : Closed Loop Block Diagram for new Control Box

The new Control Box was designed to completely eliminate the need for the Motomatic console. It includes modern hardware capable of replacing that found in the Motomatic console. It can perform all the functions of both the previous digital controller and the Motomatic console; its hardware layout is shown in Figure 5. Figure 6 shows the new closed loop system block diagram for a typical experiment with an undetermined control algorithm.

SOFTWARE DESIGN

Figure 14 : EE472 digital Control Box UI

Figure 14 : EE472 digital Control Box UI

It is capable of displaying all the variables and constants declared for the student, modifying the constants and sample period while the control algorithm is running, and many other functions. Figure 14 shows the current version of the UI, updated for experiment 4.

Figure 15: Serial port configuration window

Figure 15: Serial port configuration window

The last part of the UI, shown in Figure 15, consists of the drop down menu and secondary window used to configure the serial port and connect to the controller. This window can modify most of the parameters of the serial connection such as COM port, baud rate, and data bits. However, the UI will typically recognize the controller on initialization and default to the right settings.

CONTROLLER VERIFICATION

Figure 16 : Relationship between ADC input voltage and output value

Figure 16 : Relationship between ADC input voltage and output value

The input voltage to output value relationship for the ADC circuit is shown in Figure 16, along with the ideal relationship. This graph shows two main types of error present in the conversion, slope and offset. The presence of offset error means that the conversion function does not intersect the origin.

Figure 18: Worst-case step input signal switch bounce

Figure 18: Worst-case step input signal switch bounce

The quality of the step input signal is critical to obtaining a useful step response for the lab experiments. If the step input signal contains too much noise, the step response will be corrupted and the students will be left without an acceptable way to verify their controller designs. The largest source of step input noise is mechanical switch bounce from the step input switch. This causes the step input voltage to swing rapidly between 0V and the step input voltage. A worst-case example of step input signal switch bounce is shown in Figure 18.

ENCLOSURE FABRICATION

Figure 19: Complete Control Box

Figure 19: Complete Control Box

Figure 20: Control Box top plate

Figure 20: Control Box top plate

The enclosure for the Control Box consists of two parts, both made from acrylic, the top plate to which all of the components are mounted and the bottom shell. The bottom shell mounts to the top plate with 4 aluminum standoffs. The bottom shell is easily removable, allowing easy access to service the Control Boxes. Both the top plate and bottom shell were machined and assembled by hand. Figure 19 shows a complete Control Box, Figure 20 shows the top plate with components installed, and Figure 21 shows the bottom shell.

FUTURE WORK

While the current versions of the digital controller hardware and software are sufficient for labs 1-4, there are a number of improvements that could be made. These improvements and additions improve the functionality of the controller, add features, and improve the user experience.

SUMMARY AND LESSONS LEARNED

Design requirements for a new digital controller for the EE472 Digital Controls Lab were selected. A controller was then built to those specifications, and duplicated for each lab bench. Software was written for the Control Boxes with the Arduino IDE. A UI was developed to communicate with the Control Boxes using Qt Creator. The Control Boxes were then tested by a whole quarter of student use in the EE472 lab and proved to be robust and effective. Students were able to quickly and easily complete the labs.

The Control Boxes had some limitations during the first quarter, including power supply overvoltage shutdown and non-ideal ADC performance. Neither of these issues disrupted the student’s ability to complete the labs. There are a number of improvements that could be made to the hardware and software to support current and future lab activities. Some of these options were explored in Chapter 8. Without any additions or improvements, the new Control Boxes are ready to continue being used for Experiments 1-4 of the EE472 Digital Controls Lab.

Source: California Polytechnic State University
Authors: Jeffrey David D’Amelio

Download Project

Get this Project:

Fields with * are mandatory

Leave a Comment

Your email address will not be published. Required fields are marked *