Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of...

11
Microcontroller Microcontroller Hands-on Workshop Hands-on Workshop #4 #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009

Transcript of Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of...

Page 1: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

Microcontroller Hands-Microcontroller Hands-on Workshop #4on Workshop #4

Ahmad ManshadNew Mexico State University

Institute of Electrical and Electronics Engineers

November 14, 2009

Page 2: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

2

Agenda for TodayQuick ReviewFreeduino motor controllerControl servo motorWork on robot

Page 3: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

3

Today’s Kit1. Arduino Microcontroller/ USB Cable

2. Breadboard

3. Wires

4. Soldering Iron w/ solder

5. Freeduino Motor Controller

6. DC Motors

7. Servo Motor

8. 10K Potentiometer

Page 4: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

4

Quick Review - PWM PWM signal is a digital square

wave where the fraction of the time the signal is on can be varied between 0 and 100%.

Call analogWrite(pin, dutyCycle), where dutyCycle is a value from 0 to 255.

Use one of the PWM pins (3, 5, 6, 9, 10, or 11).

Page 5: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

5

Quick Review - Motors Electromechanical device that converts electrical energy to mechanical energy

Page 6: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

6

Quick Review - Motor ControllerControl 2 motors from your ArduinoSN754410NE motor driver

Board and Arduino pinout:Motor A Direction -

Arduino Digital pin 13Motor A Speed (PWM)

- Arduino Digital pin 10

Motor B Direction - Arduino Digital pin 12

Motor B Speed (PWM) - Arduino Digital pin 9

Page 7: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

7

Continue assembling Motor Controller

GO TO: WWW.GOOGLE.COMTYPE: FREEDUINO MOTORCLICK ON THE FIRST LINK

CLICK THE LINK: “THIS GUIDE”

Or Type the following in the address bar:http://mcukits.com/2009/03/12/assembling-the-freeduino-

arduino-motor-shield/

Page 8: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

8

Controlling Servo Motor

For Code: File -> Examples -> Servo -> Knob

Page 9: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

9

Robot Design

Discuss Robot Plans with Team Members!

Page 10: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

10

Robot Teams

Team A Benna Belfedal Taeho Hong Jezreel Bassett

Team B Alynna Montoya Adrian Ontiveros Erika Urena

Team C Kevin Thompson Adriana Aquino Ugochukwu Ogbue

Team D Luke Salazar Roman Salazar Roushan Rustamov

Team E Ernesto Gonzalez Angel Alarcon

Team F Jonathan Havstad Michael Scoggin

Team G Veerendia Modi Chandana Tatineni Vineet Nair

Page 11: Microcontroller Hands-on Workshop #4 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 14, 2009.

11

Questions or

Comments?