EEL 4924 Electrical Engineering Design (Senior Design) Preliminary Design Report 19 April 2011 Project Title: Team Name: Depth Perception Team Members: Name: Jared Korn Email: ex.malfunction@gmail.com Name: Alex Lizardo Email: alexliz@ufl.edu Abstract Our project consists of collaborating with the UF Human Powered Sub team to design, test, and build the electronics systems for the sub. The system supports control of six servo motors and a linear actuator as well as an LCD display for important real time information. Four servo motors are used for elevators at the front and back of the sub and on each side, two control the rudder. Two pressure sensors detect pitch and depth and the system compensates accordingly while a webcam with image processing hardware will track a string of lights on the floor of the pool to detect yaw. Manual electric control of the entire system via a joystick is used as an override in case of failure of software. The entire system is housed in a waterproof box and powered by a single three cell LiPo battery.
Page 2/12 Table of Contents Title/cover/abstract...Page 1 Table of Contents...Page 2 List of Tables and Figures...Page 2 Introduction...Page 3 Objectives...Page 3 Concept/Technology...Page 4 Hardware Block Diagram...Page 5 Software Control Flowcharts...Pages 6-9 Microprocessor Software...Page 10 Timeline... Page 10 Bill of Materials... Page 11 Appendix A... Page 12 List of Tables and Figures Figure 1...Page 3 Figure 2...Page 4 Figure 3...Page 4 Figure 4...Page 4 Figure 5...Page 5 Figure 6...Page 6 Figure 7...Page 7 Figure 8...Page 8 Figure 9...Page 9 Figure 10...Page 10 Figure 11...Page 12
Page 3/12 Introduction The UF team consists of several Mechanical Engineering students who are designing and building a submarine for a competition. Currently the entire project is funded through sponsorship so any electronics should be available to us at no cost. The sub is powered only by human power but contains several electrical components that were designed to control the sub. The project involves digital and analog hardware design including amplification and filtering as well as power supply design. All the software is written on one microcontroller unit. Lastly, the entire electronic system must be waterproof while still being connected to external sensors and motors. Figure 1 - Previous Human-Powered sub team and sub Objectives Automatic Pitch control - Two pressure sensors located in the front and back ends of the sub will sense the pitch of the sub and send this information to a microcontroller which will control 2 servo motors to correct the pitch. Manual Yaw control - A joystick will be accessible to the driver to manually turn the sub left and right. The joystick will send signals to the microcontroller to adjust servos attached to fins to turn left or right. Display - An LCD will provide important information to the driver. The information will include current depth, RPMs, and battery life. Other information may be displayed if a need arises. Power system - A 3 cell LiPo battery is available as the power source for the electronics. Regulation of voltage levels was designed to adequately provide appropriate power to all motors and electronics. Thrust efficiency - A reed switch connected to the microcontroller detects rotation of the driveshaft and software determines the RPMs. This data is used to adjust the linear actuator that changes the pitch of the prop. Manual Pitch Control - A joystick is used as a back-up for manual control of the sub s pitch. Two analog input indicating left/right and up/down are fed to a microcontroller which sends the necessary adjustments to the servo motors. Automatic Yaw control - A webcam attached to an on board computer with imaging processing software will view a string of lights on the bottom of the pool and send this information to a microcontroller. The microcontroller will then adjust servo motors to turn left or right depending on the location of the lights.
Page 4/12 Concept/Technology The LCD used is the same one from the Microprocessor and Junior Design courses. It was on hand, easily programmed and small enough to fit in the limited space the electronics are housed in. The main flight control Servos are high-torque, digital, water resistant servos from Traxxas. They each provide 125 oz-in torque and are controlled by PWM. Although there are six total servos, only three signals are needed since two servos will receive the same single (opposite sides of the sub.) This was helpful as the microcontroller can output up to three PWM signals. The linear actuator is an extremely powerful linear servo with position feedback and internal limit switches to stop the motor when it is fully extended or compressed. It is controlled applying 12V DC to the power pins to move in one Figure 2 - Traxxas 2075 Digital Servo direction and -12V DC to move in the Figure 3 - HDLS-2.00-2.00-12V Linear Actuator reverse. We used high power relays to digitally control the movement of the linear actuator. One relay controls power being supplied to the actuator while another reverses the leads to switch direction. Each relay is controlled by a digital output from the microcontroller. The two pressure transducers output a voltage on the order of 150 mv that varies linearly with depth. Both outputs are amplified using an LT1630 op amp and sent to the Analog to digital converter of the microcontroller. The joystick is a relic from the previous control systems for the sub. Each axis has its own analog output that is fed directly to the microcontroller s Analog to Digital pins to determine the direction to shift the servos. The software written to handle this accounts for a certain threshold so as to not misinterpret a small movement on one axis when attempting to actually move another axis. We used an MSP430 microcontroller as the main processor for our system. It is responsible for updating the LCD and controlling all the motors and linear actuator. It will also monitor all the sensors and perform the simple calculations for the LCD display values. Figure 4 - Analog joystick used for manual control The other processor is an embedded computer. We chose the Gumstix for its small form factor and features. A powered USB Hub provides the necessary power to the webcam and serves as an interface between the camera and the Gumstix embedded computer. Ideally we wanted the Gumstix to be able to do the image processing for automatic yaw control but at this time it is not fully functioning. The webcam to use for the image processing is a Microsoft HD-5000 lifecam. We chose it because it is compatible with the Gumstix and others have had success using it to do imaging processing for other
Page 5/12 projects. It does not receive its power through a direct USB connection with the Gumstix computer, but rather through an externally powered USB hub. The Gumstix USB ports are unable to source enough current to operate the camera. The entire power supply system is a simple network of voltage regulators that supply rails of DC voltage for each component. The different rails are 12V, 6V, 5V, and 3.3V. The Gumstix has its own 5V rail to prevent hardware failure in case of minor fluctuation in the power. One three cell LiPo battery fully charged puts out around 15 Volts DC which is stepped down by five voltage regulators to provide the appropriate voltages. Hardware Block Diagram Figure 5 - Main Hardware Block diagram
Page 6/12 Software Control Flowcharts Figure 6 - Main Control software flowchart
Page 7/12 Figure 7 - Pitch control software flowchart
Page 8/12 Figure 8 - RPMs and Linear actuator software control flowchart
Page 9/12 Figure 9 - Yaw control software flowchart
Page 10/12 Microprocessor Software There are five Analog inputs to the microcontroller as we as two digital ones from the Gumstix. Four of the analog inputs are from the two pressure sensors and each axis of the joystick. The last input is a scaled down supply voltage to determine battery life remaining. There are also two digital inputs from pushbuttons used to change from an initial state and to switch to manual control. The microcontroller outputs several digital pins for the LCD, a couple digital pins for controlling the linear actuator relays, and 3 PWM signals for the two elevators and rudder. Timeline Figure 10 - Gantt chart
Page 11/12 Bill of Materials (1) GUM3503T Embedded processor & expansion board - $229.00 (1) MSP430F2272 Processor - $2.20 (6) Stratax 2075 Servos - $234.00 (1) BC2004A 4-Line LCD Display - $19.95 (1) ksk-1a52-2025 Reed Switch - $1.50 (1) lifecam hd -5000 camera - $29.95 (2) 576-2221-ND 5Vvoltage regulators - $6.80 (1) 7812 voltage regulator - $0.65 (1) NJM7806FA 6V voltage regulator - $0.75 (1) 576-2219-ND 3.3V voltage regulator - $3.40 (1) HDLS-2.00-2.00-12V Linear Actuator - $80.00 (2) DS2E-S-DC5V RELAYS - $9.36 TOTAL - $617.56
Page 12/12 Appendix A - Schematic of entire system Figure 11 - Schematic of Entire system