DOC PREVIEW
UIUC GE 423 - Introduction to I/O with the F28335 Motor Control Processor

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Mechatronics Laboratory Assignment 3Introduction to I/O with the F28335 Motor Control ProcessorRecommended Due Date: By your lab time the week of February 17thPossible Points: If checked off before your lab time the week of Feb. 24th … 10 pointsIf checked off after your lab time the week of Feb. 24th and before your lab time the week of Mar.3rd … 7 pointsIf work not finished before your lab time the week of Mar. 3rd … 0 pointsMechatronics Laboratory Assignment 3Introduction to I/O with the F28335 Motor Control ProcessorRecommended Due Date: By your lab time the week of February 17thPossible Points: If checked off before your lab time the week of Feb. 24th … 10 pointsIf checked off after your lab time the week of Feb. 24th and before your lab time the week of Mar.3rd … 7 pointsIf work not finished before your lab time the week of Mar. 3rd … 0 pointsGoals for this Lab Assignment:1. Work with wheel angles measured by the motor’s Optical Encoders and write to both PWM and DAC output channels.2. Estimate Velocity from Optical Encoder Position Feedback.3. Identify the friction in the robot’s drive system.DSP/BIOS Objects Used:PRD, SWILibrary Functions Used:Global variables Enc1_rad, Enc2_rad, Enc3_rad and Enc4_rad. Funcutions void writeDAC7564(float dac1,float dac2), void PWM_out(enum epwm ep, float u), void init_PWM(enum epwm ep) Prelab: Read the first few pages of the TMS320F28335datasheet http://coecsl.ece.illinois.edu/ge423/datasheets/F28335Ref_Guides/F28335DataSheet.pdf to familiarize yourself with the robot’s motor control processor. Continue reading the first 6 chapters of “Teach Yourself VB in 24 Hours”. Also read through the “Extended Prelab/Final Check off for Lab 5” section at the end of the lab. This is not due now but is giving you a heads up of what is coming for lab 5’s check off and to get you thinking about your VB GUI. Laboratory ExerciseUp to this point, lecture and lab have been focused on the MSP430G2553 microcontroller used in your homework assignments and the dual core OMAPL138 processor on your robot vehicle. In this lab and also lab assignments 4 and 5 we are going to switch gears a bit and focus on another processor on the robot’s circuit board that takes care of the motor control and acquisition of many of the robot’s sensors. This chip is named the TMS320F28335. Texas Instruments categorizes this processor as a microcontroller but just for marketing reasons. It is actually one of TI’s first DSP series. Looking at its datasheet http://coecsl.ece.illinois.edu/ge423/datasheets/F28335Ref_Guides/F28335DataSheet.pdf and Figure 1 below it is much more powerful than a standard microcontroller. The TMS320F28335 is clocked at 150MHz, has 67Kb of internal RAM, 512Kb of program flash and a large number of peripherals. The peripherals we are most interested in for our robot vehicle are the ADC (Analog to Digital) inputs, Optical Encoder inputs, PWM outputs and SPI and I2C serial ports. In addition to the on-chip peripherals of the TMS320F28335, external chips and sensors have been added to the robot’s circuit board to interface with the TMS320F28335 giving it even more capabilities. See Table 1 for a list of inputs, outputs and sensors the TMS320F28335 provides for the robot. GE423, Mechatronic Systems Lab 3, Page 1 of 9Figure 1: Pictorial of the Many Capabilities of the TMS320F28335 Processor GE423, Mechatronic Systems Lab 3, Page 2 of 9On Chip Peripherals Off Chip Peripherals Sensors/Actuators Interfaced by thesePeripherals1. 12 PWM Outputs2. 16 ADC Inputs3. 2 Optical Encoder Inputs4. SPI serial port5. I2C serial port6. UART serial port7. McBSP serial port1. 4 Optical Encoder Inputs2. 2 DAC Outputs1. +/- 400 deg/s Rate Gyro2. Ultrasonic Distance Sensors3. IR Distance Sensors4. Compass5. 6 Optical Encoder Sensors6. 6 RC Servos7. 2 DC Motors8. Text LCD Screen9. 4 Toggle Switches10. 2 LEDsTable 1: TMS320F28335 Capabilities used by Mechatronics Robot Vehicle.In this lab we are not going to focus on learning a new aspect of the DSP/BIOS real-time operating system, instead we are going to focus on using the Optical Encoder inputs, DAC (Digital to Analog Converter) outputs and PWM (Pulse Width Modulation) outputs. In Lab 4 we will take a more detailed look at the source code given by the F28335 project creator and also study the circuit board design of the robot’s processor board. So you are not completely in the dark about the source code given, a brief description is in order. To read four of the possible six optical encoder sensors that can be connected to the robot’s processor board, four LS7366 chips are interfaced to the TMS320F28335 through its SPI serial peripheral. These LS7366 chips are 32 bit counters that count up when the optical encoder is turned in the positive direction and count down when turned in the opposite direction. So the TMS320F28335 uses its SPI serial port to read this 32 bit count from each of the LS7366 chips. The TMS320F28335 has a peripheral for generating PWM signals so no addition circuits are needed for PWM outs. In the case of the DAC outputs, the TMS320F28335 does not have a DAC peripheral. So in addition to the LS7366 chips connected to the TMS320F28335’s SPI serial port there is a DAC7564 chip connected to the SPI serial interface giving the TMS320F28335 two channels of 0-2.5V 12bit DAC output. The TMS320F28335 code’s purpose is twofold. One is to acquire all the sensor information every 1 millisecond and communicate this information to the OMAPL138 through another serial port called the McBSP serial port. Second is to perform the speed control of the robot’s motors also every 1 millisecond. In lab 4 you will be developing code to add the acquisition of the sensors connected to the ADC peripheral of the TMS320F28335. In lab 5 you will develop the motor control algorithm. So in the TMS320F28335 project creator’s default code, what happens each 1 millisecond?1. A PRD object calls its function void start_dataCollection(void) every 1 millisecond. Inside this function all that is done is call the function start_SPI(). Start_SPI() selects all four of the LS7366 chips and sends a command to them over the SPI to latch the current reading of their connected optical encoder. Start_SPI() does not wait for the 8bits of data to be transmitted. It starts the SPI transfer in the SPI peripheral unit. After Start_SPI() initiates the transfer, the function ends, leaving the


View Full Document

UIUC GE 423 - Introduction to I/O with the F28335 Motor Control Processor

Documents in this Course
ARTWORK

ARTWORK

16 pages

Load more
Download Introduction to I/O with the F28335 Motor Control Processor
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to I/O with the F28335 Motor Control Processor and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to I/O with the F28335 Motor Control Processor 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?