ME456:
Mechatronics
Prof. Clark J. Radcliffe
Mechanical Engineering
Michigan State University
http://www.egr.msu.edu/classes/me456/radcliff
Prof. Clark Radcliffe
• Office: 2445 Engineering
• Phone: 355-5198
• Email: radcliff@egr.msu.edu
• Web: http://www.egr.msu.edu/classes/me456/radcliff/
• Office Hours: WF 11:10-12:00 (after class..)
– OR by appointment
Joonho Lee, TA
email: leejoon8@egr.msu.edu
Office Hours: In 2200EB Lab
It is our intent to provide lots of office hours
Please use them…
Tuesday: 9:10am -10:10am
Wednesday: 9:10am -10:10am
Thursday: 2:00pm - 4:00pm
Friday: 9:10am -10:10am
Do you have the knack?
What’s Mechatronics?
The integrated design of products and processes
that include mechanical and electrical
components under intelligent control. The
underlying products are physical in nature
(electromechanical, hydraulic, magnetic,
etc). There are sensors and actuators for
interfacing with them. There is "intelligence"
through imbedded computing capability. All
these processes are highly integrated into
sophisticated products and processes.
Reference: National Science Foundation
Mechatronics
• The study of systems with
– Mechanical Engineering Components
– Electronic Sensors and Electrical Actuators
– Computer Controls
• Each necessary to successful performance
of the whole
Syllabus
• What’s a microcontroller
– The “BASIC Stamp” microcontroller
– Small Design Project (individual)
• Robotics
– A typical mechanical interface
• BIG Design Project (Group)
– Learn by doing
Grading
• Virtual Laboratory 30%
– Written + Check-off
• Biweekly Quiz 30%
– 5 minutes each on Lab
• 1st Design Project 15%
– After WAM book
• Final Project 25%
100%
Course Operation
• Two “lectures” per week (2 hr)
– Come prepared to ask questions
– Demonstrations of lab material
• Two lab exercises per week (6 hr)
– Each has write-up & check-off
– Use 2200EB terminals any time
– TA scheduled in lab
1st Assignment
• Find the Webpage
• www.egr.msu.edu/classes/me456/radcliff
– Download a check-off sheet
• What’s a Microcontroller? v3.0
– Do Chapter 1 (everything you can)
– Attach all code to the check-off sheet
– Demo action to a classmate
– Turn in next Friday
Homework Schedule
http://www.egr.msu.edu/classes/me456/radcliff/ME456_Schedule.html
ME456: Mechatronics Fall 2012 C. Radcliffe
(Assignments Due 1 week after assigned)
Computers
• Typical Computers
– CPU
– Monitor
– Keyboard & Mouse
– High Speed Random Access Memory (RAM)
– Long Term Memory (HDD, Tape, CD, …)
– Other peripheral devices (modem, printers, …)
Microcontrollers
• All around us without human interfaces
– Cars (as many as 20-30 today)
– Toys
– Phones
– Appliances (your microwave and VCR)
• Small for control of machines
• For connection to machines not people
• Inexpensive ($2.00 - $5.00 or less)
BASIC Stamp II
• An integrated microcontroller system
• Programmed in BASIC, Postage Stamp Size
2k byte
EEPROM
5 volt
Regulator
Interpreter
Chip
PIC16C57
w/ 26 bytes RAM
20 MHz
Resonator
Serial
Interface
I/O Pins
0-7
I/O Pins
8-15
BASIC Stamp II
• Specifications
– 4000 BASIC Statements per second
– 16 Digital I/O pins
• Source 20 mA, Sink 25 mA
– Special purpose control routines
– 5v power supply (50 mA)
– Low power (8 mA, sleep at 0.1mA)
– RS232-USB serial programming interface
– 2k bytes program token storage
Board of Education
Allows easy prototyping with BSII
5 volt 1.5A
Regulator
9 volt Battery
Connector
USB
Interface
To PC
BASIC Stamp II
Microcontroller
Socket
Circuit
Prototyping
Area
Digital
I/O
Connector
Wall
Transformer
Connection
Reset
Button
5v Power
Supply
Connection
RC Servo
Connections
BOE Breadboard
(5) pin groups
connected
connections:
+5v (Vdd) &
Ground (Vss)
Application Kits
BoeBot
Board of Education
Demonstration
Let’s Make
Flashing Lights
Design Flashing Lights
Vdd
P1
P0  Digital I/O pins (0 or 5 volts)
 Current Limiting Resistors
 Light Emitting Diodes (LED)
 5 volt power
Circuit Model and Analysis
• How big should resistors be?
– Limit current to 10 mA
Assume:
a) no voltage drop across LED
b) P0 and P1
- go to ground
- have zero input impedance
R = V
I = 5v
0.010A
= 500W » 470W
Vdd
P1
P0
R R
Create Flashing Lights Hardware
connection
to +5v (Vdd)
Note Polarity
Of LED’s
(2) 470 Ohm
Resistors
(yellow, violet, brown, …)
Create Flashing Lights Software
'Program Demo Listing written by C. Radcliffe
'Define Variables and Constants
'-------------------------------------------
left_led con 0 'left LED drive pin
right_led con 1 'right LED drive pin
blink con 100 'blink time (msec)
'-------------------------------------------
'Main Program
'-------------------------------------------
flash: 'Start of Program
high left_led 'turns left led off
low right_led 'turns right led on
pause blink 'wait for <blink> ms
low left_led ‘turns left led on
high right_led 'turns right led off
pause blink 'wait for <blink> ms
goto flash ‘repeat the blink
Flashing Lights Solution
• Circuit Hardware
Plus
• Control Software
Tonight at 8:00pm
MSU vs. Boise State

Introduction to Mechatronics System and Data Transfer

  • 1.
    ME456: Mechatronics Prof. Clark J.Radcliffe Mechanical Engineering Michigan State University http://www.egr.msu.edu/classes/me456/radcliff
  • 2.
    Prof. Clark Radcliffe •Office: 2445 Engineering • Phone: 355-5198 • Email: radcliff@egr.msu.edu • Web: http://www.egr.msu.edu/classes/me456/radcliff/ • Office Hours: WF 11:10-12:00 (after class..) – OR by appointment
  • 3.
    Joonho Lee, TA email:leejoon8@egr.msu.edu Office Hours: In 2200EB Lab It is our intent to provide lots of office hours Please use them… Tuesday: 9:10am -10:10am Wednesday: 9:10am -10:10am Thursday: 2:00pm - 4:00pm Friday: 9:10am -10:10am
  • 4.
    Do you havethe knack?
  • 5.
    What’s Mechatronics? The integrateddesign of products and processes that include mechanical and electrical components under intelligent control. The underlying products are physical in nature (electromechanical, hydraulic, magnetic, etc). There are sensors and actuators for interfacing with them. There is "intelligence" through imbedded computing capability. All these processes are highly integrated into sophisticated products and processes. Reference: National Science Foundation
  • 6.
    Mechatronics • The studyof systems with – Mechanical Engineering Components – Electronic Sensors and Electrical Actuators – Computer Controls • Each necessary to successful performance of the whole
  • 7.
    Syllabus • What’s amicrocontroller – The “BASIC Stamp” microcontroller – Small Design Project (individual) • Robotics – A typical mechanical interface • BIG Design Project (Group) – Learn by doing
  • 8.
    Grading • Virtual Laboratory30% – Written + Check-off • Biweekly Quiz 30% – 5 minutes each on Lab • 1st Design Project 15% – After WAM book • Final Project 25% 100%
  • 9.
    Course Operation • Two“lectures” per week (2 hr) – Come prepared to ask questions – Demonstrations of lab material • Two lab exercises per week (6 hr) – Each has write-up & check-off – Use 2200EB terminals any time – TA scheduled in lab
  • 10.
    1st Assignment • Findthe Webpage • www.egr.msu.edu/classes/me456/radcliff – Download a check-off sheet • What’s a Microcontroller? v3.0 – Do Chapter 1 (everything you can) – Attach all code to the check-off sheet – Demo action to a classmate – Turn in next Friday
  • 11.
  • 12.
    Computers • Typical Computers –CPU – Monitor – Keyboard & Mouse – High Speed Random Access Memory (RAM) – Long Term Memory (HDD, Tape, CD, …) – Other peripheral devices (modem, printers, …)
  • 13.
    Microcontrollers • All aroundus without human interfaces – Cars (as many as 20-30 today) – Toys – Phones – Appliances (your microwave and VCR) • Small for control of machines • For connection to machines not people • Inexpensive ($2.00 - $5.00 or less)
  • 14.
    BASIC Stamp II •An integrated microcontroller system • Programmed in BASIC, Postage Stamp Size 2k byte EEPROM 5 volt Regulator Interpreter Chip PIC16C57 w/ 26 bytes RAM 20 MHz Resonator Serial Interface I/O Pins 0-7 I/O Pins 8-15
  • 15.
    BASIC Stamp II •Specifications – 4000 BASIC Statements per second – 16 Digital I/O pins • Source 20 mA, Sink 25 mA – Special purpose control routines – 5v power supply (50 mA) – Low power (8 mA, sleep at 0.1mA) – RS232-USB serial programming interface – 2k bytes program token storage
  • 16.
    Board of Education Allowseasy prototyping with BSII 5 volt 1.5A Regulator 9 volt Battery Connector USB Interface To PC BASIC Stamp II Microcontroller Socket Circuit Prototyping Area Digital I/O Connector Wall Transformer Connection Reset Button 5v Power Supply Connection RC Servo Connections
  • 17.
    BOE Breadboard (5) pingroups connected connections: +5v (Vdd) & Ground (Vss)
  • 18.
  • 19.
  • 20.
    Design Flashing Lights Vdd P1 P0 Digital I/O pins (0 or 5 volts)  Current Limiting Resistors  Light Emitting Diodes (LED)  5 volt power
  • 21.
    Circuit Model andAnalysis • How big should resistors be? – Limit current to 10 mA Assume: a) no voltage drop across LED b) P0 and P1 - go to ground - have zero input impedance R = V I = 5v 0.010A = 500W » 470W Vdd P1 P0 R R
  • 22.
    Create Flashing LightsHardware connection to +5v (Vdd) Note Polarity Of LED’s (2) 470 Ohm Resistors (yellow, violet, brown, …)
  • 23.
    Create Flashing LightsSoftware 'Program Demo Listing written by C. Radcliffe 'Define Variables and Constants '------------------------------------------- left_led con 0 'left LED drive pin right_led con 1 'right LED drive pin blink con 100 'blink time (msec) '------------------------------------------- 'Main Program '------------------------------------------- flash: 'Start of Program high left_led 'turns left led off low right_led 'turns right led on pause blink 'wait for <blink> ms low left_led ‘turns left led on high right_led 'turns right led off pause blink 'wait for <blink> ms goto flash ‘repeat the blink
  • 24.
    Flashing Lights Solution •Circuit Hardware Plus • Control Software
  • 25.
    Tonight at 8:00pm MSUvs. Boise State