AC : THE UBIQUITOUS MICROCONTROLLER IN MECHANICAL ENGINEERING: MEASUREMENT SYSTEMS

Similar documents
Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

AC : A LOW-COST LABORATORY EXPERIMENT TO GEN- ERATE THE I-V CHARACTERISTIC CURVES OF A SOLAR CELL

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

Training Schedule. Robotic System Design using Arduino Platform

Teaching Mechanical Students to Build and Analyze Motor Controllers

Industrial Automation Training Academy. Arduino, LabVIEW & PLC Training Programs Duration: 6 Months (180 ~ 240 Hours)

Real-time Real-life Oriented DSP Lab Modules

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

Understanding the Arduino to LabVIEW Interface

AC : TECHNOLOGIES TO INTRODUCE EMBEDDED DESIGN EARLY IN ENGINEERING. Shekhar Sharad, National Instruments

AC : MICROPROCESSOR BASED, GLOBAL POSITIONING SYSTEM GUIDED ROBOT IN A PROJECT LABORATORY

EE 314 Spring 2003 Microprocessor Systems

Mechatronics Laboratory Assignment 3 Introduction to I/O with the F28335 Motor Control Processor

Using Signal Express to Automate Analog Electronics Experiments

ICTCM 28th International Conference on Technology in Collegiate Mathematics

1 Introduction. 2 Embedded Electronics Primer. 2.1 The Arduino

Intelligent Systems Design in a Non Engineering Curriculum. Embedded Systems Without Major Hardware Engineering

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Quanser Products and solutions

TETRIX PULSE Workshop Guide

PART 1: DESCRIPTION OF THE DIGITAL CONTROL SYSTEM

CHAPTER 7 HARDWARE IMPLEMENTATION

ME 4447 / ME 6405 MICROPROCESSOR CONTROL OF MANUFACTURING SYSTEMS / INTRODUCTION TO MECHATRONICS

5 Common Mistakes to Avoid When Buying a Low-cost Oscilloscope

BS in. Electrical Engineering

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

Laboratory Experiment #1 Introduction to Spectral Analysis

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

DASL 120 Introduction to Microcontrollers

Embedded & Robotics Training

A New Approach to Teaching Manufacturing Processes Laboratories

Simulations of Analog Circuits in Multisim Software Suite

Lab 3: Embedded Systems

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

Programming and Multi-Robot Communications

Board Of Education, Revision C (28150)

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Wireless Digital Communication using LabVIEW and ZigBee

PC-based controller for Mechatronics System

Key Words Interdisciplinary Approaches, Other: capstone senior design projects

PC s and Micro-Controllers in Mechatronics Education. Santosh Devasia and Sanford Meek

Fig. 1. NI Elvis System

LABORATORY 5 v3 OPERATIONAL AMPLIFIER

Teaching Mechatronics & Controls using NI Technology

Experiment #3: Micro-controlled Movement

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Embedded & Robotics Training

Autonomous Robotic Vehicle Design

AC : A CIRCUITS COURSE FOR MECHATRONICS ENGINEERING

Lab 2: Blinkie Lab. Objectives. Materials. Theory

HIL Simulation Lab Work

Instructional Demos, In-Class Projects, & Hands-On Homework: Active Learning for Electrical Engineering using the Analog Discovery

Design of LVDT Based Digital Weighing System

Physics 472, Graduate Laboratory DAQ with Matlab. Overview of data acquisition (DAQ) with GPIB

A Virtual Instrument for Automobiles Fuel Consumption Investigation. Tsvetozar Georgiev

LabVIEW Based Instrumentation and Experimental Methods Course

LabVIEW and MatLab. E80 Teaching Team. February 5, 2008

INTELLIGENT HOME AUTOMATION SYSTEM (IHAS) WITH SECURITY PROTECTION NEO CHAN LOONG UNIVERSITI MALAYSIA PAHANG

University of Florida Department of Electrical and Computer Engineering Intelligent Machine Design Laboratory EEL 4665 Spring 2013 LOSAT

Arduino An Introduction

ISSN: [Singh* et al., 6(6): June, 2017] Impact Factor: 4.116

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

PCB & Circuit Designing (Summer Training Program) 6 Weeks/ 45 Days PRESENTED BY

SynthNV - Signal Generator / Power Detector Combo

ZX Distance and Gesture Sensor Hookup Guide

ITT Technical Institute. ET275 Electronic Communications Systems I Onsite Course SYLLABUS

Proposal Smart Vision Sensors for Entomologically Inspired Micro Aerial Vehicles Daniel Black. Advisor: Dr. Reid Harrison

ET 438B Sequential Digital Control and Data Acquisition Laboratory 4 Analog Measurement and Digital Control Integration Using LabVIEW

Hashemite University Faculty of Engineering Mechatronics Engineering Department. Microprocessors and Microcontrollers Laboratory

An Incremental Measurements and Data Acquisition Project

Experiment 5.B. Multifunction Wireless Control. ECEN 2270 Electronics Design Laboratory 1

Mech 296: Vision for Robotic Applications. Logistics

CEEN Bot Lab Design A SENIOR THESIS PROPOSAL

Big Blue Mars Final Report

Name: Resistors and Basic Resistive Circuits. Objective: To gain experience with data acquisition proto-boards physical resistors. Table of Contents:

Laboratory set-up for Real-Time study of Electric Drives with Integrated Interfaces for Test and Measurement

Sensors Fundamentals. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

Week 8 AM Modulation and the AM Receiver

Easy Transfer Function Measurements with LabVIEW 6i (Lab Skill Exercise X-1)

Undefined Obstacle Avoidance and Path Planning

Motor Control Demonstration Lab

ELG3336 Design of Mechatronics System

General Purpose Controller Software for Controls Lab

Design of PID Control System Assisted using LabVIEW in Biomedical Application

PHY 351/651 LABORATORY 5 The Diode Basic Properties and Circuits

Radar Shield System Design

Mechanical Engineering

AC : DEVELOPING A MATLAB/SIMULINK RTWT BASED HYDRAULIC SERVO CONTROL DESIGN EXPERIMENT

Pin Symbol Wire Colour Connect To. 1 Vcc Red + 5 V DC. 2 GND Black Ground. Table 1 - GP2Y0A02YK0F Pinout

Matlab Data Acquisition and Control Toolbox for Basic Stamp Microcontrollers

Name & SID 1 : Name & SID 2:

TEACHING PLC IN AUTOMATION --A Case Study

Real Time Implementation of Power Electronics System

Hobby Servo Tutorial. Introduction. Sparkfun:

Auntie Spark s Guide to creating a Data Collection VI

EE 300W 001 Lab 2: Optical Theremin. Cole Fenton Matthew Toporcer Michael Wilson

Experiment 5.A. Basic Wireless Control. ECEN 2270 Electronics Design Laboratory 1

ET275P Electronic Communications Systems I [Onsite]

Introduction To Embedded Systems: Using ANSI C And The Arduino Development Environment (Synthesis Lectures On Digital Circuits And Systems) Ebooks

Transcription:

AC 8-1513: THE UBIQUITOUS MICROCONTROLLER IN MECHANICAL ENGINEERING: MEASUREMENT SYSTEMS Michael Holden, California Maritime Academy Michael Holden teaches in the department of Mechanical Engineering at the California State University Maritime Academy. American Society for Engineering Education, 8 Page 13.175.1

The Ubiquitous Microcontroller in Mechanical Engineering: Measurement Systems Introduction This paper will describe a project aimed at integrating microcontrollers in several classes throughout the mechanical engineering curriculum at the California State University Maritime Academy (CMA). The goal is to give our students useful skills that will help distinguish them from other job candidates. Microcontroller technology is new enough that recent graduates can successfully compete with more senior engineers who have never learned to design with microcontrollers. Microcontrollers are becoming ubiquitous in many modern products and machinery, due to their ability to perform complex electronic functions for low cost, and understanding how to use these systems is a valuable skill set for any engineer. While some projects will require an electrical engineer to implement the microcontroller design, having the ability to design simple microcontroller systems will give a mechanical engineer the ability to be responsible for the entire design of many mechatronic devices, as inexpensive microcontrollers replace discrete electronic component designs. For example, a microcontroller may be used to read an analog sensor and control an output display or actuator, a simple task ideally suited to an inexpensive microcontroller, and one that can be implemented with only basic microcontroller experience. The goal of the project is to design microcontroller hardware, software, and courseware that will be used in several classes in the ME curriculum, so that the students gain familiarity with common microcontroller systems and applications without taking a special elective. The hardware design must be useful for classes and laboratories including programming, electronic circuits, measurement systems, control systems and mechatronics. Finding a common platform to use in many classes allows the instruction time devoted to microcontrollers to be distributed so that the new topic can be added without cutting significantly into the existing curriculum. Rather than taking one microcontroller class near their senior year, the students will be exposed to microcontrollers as early as their freshman or sophomore years, and will gain experience with the same hardware in several classes. There are several advantages to this approach compared to adding a standalone technical elective to the curriculum. The primary advantage is that students learn the material early in their education and have a developed skill set ready to apply to capstone design projects. There is not much prerequisite knowledge needed to learn microcontrollers (such as calculus or dynamics). Assuming that microcontroller programming (programming in C) will be taught as part of the microcontroller curriculum, only basic computer skills are needed from the students. Most incoming students have the knowledge to get started in microcontrollers. Another advantage is that the students learn the skills without adding classes to the curriculum. At CMA, as in most engineering programs, the student course load is at a maximum and to add material requires removing other material. There simply isn t room in the curriculum for another class, so either electives must be traded or the microcontroller skills must be taught in existing classes. Page 13.175.

The disadvantage to the integrated approach is that more faculty must buy in to the program and be able to teach microcontroller applications, and that some material in each course will be squeezed out in order to teach microcontrollers. This paper will measure student perceptions of the approach taken in order to measure whether the advantages outweigh the disadvantages. Method As a starting point, an inexpensive microcontroller system is being developed with the following specifications: Cost less than $75 per lab station, and less than $5 per student unit. Be used to teach programming in a traditional programming class Be used for laboratories in an electronic circuits course Be used as a measurement device (DAQ) with Labview as well as a standalone data logger in a measurement systems course. Be the cornerstone of mechatronics laboratory robotics work. There are many systems that could satisfy these requirements. For example, the Basic Stamp [1] is a popular microcontroller for educational uses. Simple systems like the Atmel Butterfly [], GumStix [3] computers, and the Brainstem controller [4] would all work, although some can be more costly than specified. But it is so easy to design a new microcontroller system that a custom circuit board is also an attractive solution. A circuit board to support a microcontroller does not need many components and is inexpensive and easy to assemble. A microcontroller experiment board that was inspirational to the author is that developed by Hugh Jack and Jeff Roberts at Grand Valley State University [5]. Shown in Figure 1, it is USB powered and brings the bulk of the IO pins to a useful header, while maintaining a form factor that is compact for many creative applications. Figure 1: Grand Valley State University Microcontroller Board The author has also created similar designs, such as the one in Figure. This was an autopilot board for a GPS-guided model car [] that contains a serial interface for a GPS and a user interface consisting of an LCD display and some buttons. Page 13.175.3

Figure : Microcontroller Autopilot Developed by the Author This paper describes the first attempt at integrating microcontrollers in a class devoted to other topics. As an initial step, it was decided to use a very crude form of microcontroller board. For the results given in this paper, the microcontroller system was assembled using a proto-board. The circuit is simple enough that it is not very difficult to build on a proto-board, and this assembly technique shows the students exactly how they could put a system together. Figure 3 shows the proto-board system. Students who build this system in lab will not need any assistance to assemble their own units after they graduate or for a senior project. The drawbacks to a proto-board setup is that the system is somewhat fragile and bulkier than if a dedicated board was designed and soldered together. Figure 3: Protoboard Microcontroller DAQ The system is comprised of an Atmel Mega 1 microcontroller, with a MAX-33 RS-3 converter chip (or a N Transistor for the most simple version), and a DB-9 serial Page 13.175.4

connector. In the laboratory 5V power supplies are used to power the chip, a USB programmer is used to program the chips, and a serial port extension cable is used to connect to the PCs in the lab. A schematic of the system is shown in Figure 5. The schematic shown uses a N transistor as an inverter instead of the MAX-33 chip; this does not meet the RS-3 standard but nearly always works for serial transmission. The system as used is able to read 8 analog inputs ( to 5V with 1 bit precision) and send the data over the serial port to Labview, thereby creating an inexpensive DAQ device. The microcontroller software is very simple. The main infinite loop is shown in Figure 4: it consists of just 1 lines of code. Each of the 8 A/D channels is sampled in turn, the reading is converted to Volts, and the measurement is printed to the serial port (the Codevision compiler [7] maps the standard i/o device to the UART). Figure 4: DAQ Microcontroller Code Programming Pins }8 Analog inputs +5V 1K N {5V Gnd Gnd 5V DB9 Serial Connector Gnd Figure 5: Microcontroller DAQ Schematic Page 13.175.5

Measurement Systems Class The Measurement Systems course at the California State University Maritime Academy includes a laboratory to give the students hands-on experience with sensors, signal-conditioning circuits, and data acquisition systems. The lab has traditionally used Labview [8] to acquire data on a PC. The National Instruments data acquisition devices range from internal cards with high speed and precision to inexpensive USB units. The goal of adding microcontrollers to the Measurement Systems course was to create a data acquisition device of our own. This would allow the students to leverage their knowledge of Labview graphical interfaces while using the analog-digital converters and serial port on the microcontroller to measure data. To gather the data in Labview, the Instrument I/O Assistant was used to read and decode the string from the serial port on the PC. The assistant makes parsing the data simple although it sometimes has a mind of its own. The block diagram for the Labview data acquisition process is shown in Figure. The data is displayed according to the desires and needs of the student; a simple front panel that plots one channel and displays the others is shown in Figure 7. Figure : Labview DAQ Block Diagram Page 13.175.

Figure 7: Labview DAQ Front Panel This very basic system is a starting point for data acquisition using a microcontroller. The system could be modified to suit different projects by changing the displays, or scaling the data in the microcontroller to reflect the units of the sensor being measured. The microcontroller could also store the data as it is measured, and dump it into labview later, for self contained data logging. The freedom to modify the software to suit the project is one of the biggest advantages to using a microcontroller over a traditional DAQ unit. The DAQ system compares quite favorably to the commercial units, especially considering the parts cost (without the breadboard) is less than $. A printed circuit board for this design would be small and likely to cost less than $1, so the system cost would be reasonable if assembled into a dedicated device. The data is logged with less precision (1 bits vs. 1 or 1 on the National Instruments DAQ devices), and the data is logged slower (4 Hz vs. up to 1 Hz for the more expensive NI units), but the speed and accuracy are sufficient for many applications. For example, all but of the 1 labs performed by the students in the Measurement Systems lab using NI devices could have been run using the microcontroller-based DAQ without modification; the exceptions need a fast sample rate for FFT analysis of sound signals. The software to create the DAQ using an Atmel microcontroller as well as the Labview serial acquisition VI are available from the author s web site: www.holdentechnology.com. Course Details The introduction of microcontrollers did require that the format of the course change somewhat. Approximately weeks of lecture time was devoted to introducing microcontrollers, in particular teaching the students to read C code, as the students learn Matlab in the required programming class. Enough of the elements of C were covered in lecture so that the students could hack existing code and understand the general structure of a C program for microcontrollers. The Page 13.175.7

remaining lecture time was devoted to the particulars of setting up and using microcontroller chips. Plenty of example code is made available to give students a starting point. Three additional labs were added to the laboratory portion of the course. These labs consisted of an introduction to the compiler and simulator, where the students programmed the chips to blink an LED; a demo program that exercised the various on-chip peripherals such as the A/D and UART; and finally the DAQ application described in detail above. Assessment The students in the labs were asked to complete a survey to assess their perceptions of the value of the microcontroller portion of the class. The questions attempted to measure the value of the material to the students, the amount of time that should be devoted to microcontrollers in a Measurement Systems class, and the skills the students hope to use after they graduate. The students were asked to rate their level of agreement or disagreement with statements on the survey. The first statement, Microcontroller data acquisition seems appropriate in a measurement systems class, shows that the students clearly believe the material is relevant and fits with the other material in the class. 1. Microcontroller data acquisition seems appropriate in a measurement system class. 18 1 14 1 1 8 4 18 5 1 Strongly Disagree Disagree Neutral Agree Strongly Agree Figure 8: Assesment 1 The second statement, I would rather have spent more class time on sensors and signal analysis and less time on microcontrollers and programming, received a mixed response, with a negative majority. This is interpreted as supporting the addition of the material in the class, but it is worthwhile to note that some students would have preferred less time spent on the new material. Page 13.175.8

. I would rather have spent more class time on sensors and signal analysis and less time on microcontrollers and programming. 1 9 8 7 5 4 1 Strongly Disagree Disagree Neutral Agree Strongly Agree Figure 9: Assessment The third statement, More time should have been spent explaining how microcontrollers work reinforces the conclusion of the previous statement. Most of the students would have liked more time spent on microcontrollers, with a few who disagree. 3. More time should have been spent explaining how microcontrollers work. 14 1 1 8 4 1 9 1 Strongly Disagree Disagree Neutral Agree Strongly Agree Figure 1: Assessment 3 The fourth statement, I hope to use the microcontroller skills from this class in my career, received all positive or neutral responses. This shows that the students see how the microcontroller skills could help their careers, and that they would be agreeable to working in this industry. Page 13.175.9

4. I hope to use the microcontroller skills from this class in my career. 1 11 1 8 4 7 Strongly Disagree Disagree Neutral Agree Strongly Agree Figure 11: Assessment 4 The fifth statement, I hope to use my labview skills in my career, had a less positive response; although the majority are in agreement, there are a few dissenters who disliked labview. 5. I hope to use my labview skills in my career. 8 7 5 4 3 1 7 7 5 3 Strongly Disagree Disagree Neutral Agree Strongly Agree Figure 1: Assessment 5 Conclusions Incorporating microcontrollers with a Measurement Systems class was successful. The students valued the material and it fit nicely within the traditional curriculum. The class did have to be streamlined somewhat to fit the microcontroller material, but overall I feel, as the instructor, that the added material is more worthwhile than the lost material, and the surveys show that the students agree. The DAQ application is a natural one for teaching microcontrollers, as it combines a simple program with the peripherals on the chip to create a compelling and useful example. The students who completed the microcontroller portion of the class were in general excited about using them in other projects such as their senior capstone project. The approach of adding short microcontroller modules to existing lower-division classes would seem to be a good one, as it allows the students to gain useful skills without taking extra units. Page 13.175.1

With the success of this class, plans are being made to incorporate microcontroller topics in the Computer Programming as well as the Circuit Analysis courses. The hardware will evolve during this work, ultimately to a custom circuit board, to be assembled and owned by the students themselves. Future papers are planned to document the use of the system in these classes, and the hardware and software designs that support them. References 1. www.parallax.com. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=314 3. www.gumstix.com 4. www.acroname.com 5. Barakat, Nael; Jack, Hugh; A Student Owned Microcontroller Board American Society of Engineering Education general conference, June. Holden, M. Low-Cost Autonomous Vehicles Using Just GPS, Computers in Education Journal, American Society of Engineering, Vol XV, No. 3, July-September 5 7. www.hpinfotech.ro 8. www.ni.com Page 13.175.11