Presentation is loading. Please wait.

Presentation is loading. Please wait.

Steering Servo How to control the car heading via a steering servo Team: //noComment Leader : Christian Software Specialist : Matt Hardware Specialist.

Similar presentations


Presentation on theme: "Steering Servo How to control the car heading via a steering servo Team: //noComment Leader : Christian Software Specialist : Matt Hardware Specialist."— Presentation transcript:

1 Steering Servo How to control the car heading via a steering servo Team: //noComment Leader : Christian Software Specialist : Matt Hardware Specialist : Vic Assistant : Andrew

2 Overview  Hardware  Futaba S3010 Specs  Components Needed  Wiring  Interfacing  Registers Used  Register Diagram  Analog to Digital Conversion  PWM Review  Mechanical Binding Test  Software Implementation  Summary  References  Questions

3 Hardware Futaba S3010 Servo (1)

4 Futaba S3010 Specs Control System: +Pulse Width Control Required Pulse: 3-5 Volt P-P Square wave Operating Voltage: 4.8-6.0 Volts Operating Speed (4.8V): 200 ms/60 degrees at no load Operating Speed (6.0V): 160 ms/60 degrees at no load Pulse Span: 1000-2000usec Dimensions: 1.6” x 0.8” x 1.5” Weight: 1.40z (41g)

5 Components Needed  32 bit ColdFire MCU FireBird32  Smart Car chassis with mounted Futaba servo  Bench Top Power Supply(5v)  Jumpers  Oscilloscope  Potentiometer

6 Wiring Powering the Servo  Connect 5V from power supply to the RED pin on the servo connector  Tie the grounds of the ColdFire and the bench top supply together  Connect the BLACK ground pin from the servo to the Coldfire ground Connecting to Coldfire  Connect WHITE control pin from servo to Coldfire PWM output port (PF4)

7 Interfacing MCU(Coldfire) Servo Power Supply (5V)

8 Registers Used TPM2SC – Status Control Register TPM2MOD – Modulo Register (sets period) TPM2C0SC – Channel Status and Control Register TPM2C0V – Value Register (sets pulse width)

9 Register Diagram

10

11 Analog to Digital Conversion Initialization  Select ADC clock source and divide by # bits for conversion (ADCCFG) Per Conversion  Select channel to convert (ADCSC1)  Wait for conversion complete (COCO)  Read data from result registers (ADCRx)

12 Analog to Digital Conversion //derived from Prof Sumey int adcGet() //adc conversion on PTB4, 10 bit thus 0-1024 result, result then returned { //channel 0=PTB0... channel 7=PTB7 //channel 8=PTD0... channel 11=PTD4 // perform conversion ADCSC1 = 4;// start conversion on PTB4, channel 4 while (!ADCSC1_COCO){} // wait for conversion complete* return ADCR; // grab 2-byte result and return it } void adcInit() { // ADC initialization: ADCCFG = (0b10 << ADCCFG_ADIV_BITNUM) // select Busclk/4 (3MHz) + (0b10 << ADCCFG_MODE_BITNUM); // 10-bit mode }

13 PWM Review MCF51JM128 ColdFire® Integrated Microcontroller Reference Manual

14 Mechanical Binding Test NO YES FOREVER { adcresult = adcGet(); dir(1000+adcresult); } //Max=1777us //Min=1134us

15 Software  void initializeMCU() { ….. //SOPT2_CLKOUT_EN = 1; ….. }  PWM initialize() TPM2SC = TPM2SC_CLKSA_MASK // select bus clock for timer clock + 8; // divby-8 prescaler (8MHz / 8 = 1MHz Timer clock) TPM2MOD = 10000; //Period = 20,000us= """20ms"""= f=50Hz TPM2C0SC=0x38; //Set status control register TPM2C0V = 1500; //Pulse Width = """1.5ms""“ * TPM2C0V *

16 Summary How to control the car heading via a steering servo

17 References  (1) “S3010 Std. HT Ball Bearing." S3010 Std. HT Ball Bearing. N.p., n.d. Web. 17 Feb. 2015  (2) “How Do Servos Work?" How Do Servos Work? N.p., n.d. Web. 17 Feb. 2015.  (3) "Futaba S3010 - Standard High-Torque BB Servo." Futaba S3010 Servo Specifications and Reviews. N.p., n.d. Web. 17 Feb. 2015

18 Questions?


Download ppt "Steering Servo How to control the car heading via a steering servo Team: //noComment Leader : Christian Software Specialist : Matt Hardware Specialist."

Similar presentations


Ads by Google