April 5, 2014 Jonathan Valvano EE445M/EE380L.619. Motor Interfacing• Motor physics• Transistor-level interface19.1Ya Brain,who pluggedthis typewriterinto our TV?J VwPinky,are youponderingwhat I'mpondering?Digital InterfacingApril 5, 2014 Jonathan Valvano EE445M/EE380L.619.2VOLis defined as the voltage at maximum IOLFamily Example IOH IOL IIH IIL fan out Standard TTL 7404 0.4 mA 16 mA 40 µA 1.6 mA 10 Schottky TTL 74S04 1 mA 20 mA 50 µA 2 mA 10 Low Power Schottky 74LS04 0.4 mA 4 mA 20 µA 0.4 mA 10 High speed CMOS 74HC04 4 mA 4 mA 1 µA 1 µA LM3S/LM4F 2mA-drive LM3S811 2 mA 2 mA 2 µA 2 µA LM3S/LM4F 4mA-drive LM3S811 4 mA 4 mA 2 µA 2 µA LM3S/LM4F 8mA-drive LM3S811 8 mA 8 mA 2 µA 2 µA Electrical specifications• See Chapter 24 of TM4C123• 5V tolerant?• PD0, PD1 PB7,PB6All GPIO signals are 5-V tolerant when configured as inputs except for PD4, PD5, PB0 and PB1, which are limited to 3.6 V.April 5, 2014 Jonathan Valvano EE445M/EE380L.6Motor Physics19.3WireElectricalCurrent,IMagneticField,BElectrical ModelRLemf-+IBElectromagnet+-+-WireIBNorth SouthFFNorthMagnetSouthMagnetCoilIIFBrush BrushICommutatorsFNSCoilFStatorRotorApril 5, 2014 Jonathan Valvano EE445M/EE380L.6Darlington Transistor• TIP120 (NPN)• hfe= 1000• Ice= 3A19.4LM3SLM4FPWM0PWMPWM050 200125 125200 50H LH LH LH L2N2222orTIP120RDC motor+V1N914-+RLemf-+bPWM0PWM0Ib= Icoil/hfe= 1A/1000 = 1mARb≤ (VOH-Vbe)/Ib= (3-2.5)/1mA = 0.5 kRb= 100 VCEdepends on currentApril 5, 2014 Jonathan Valvano EE445M/EE380L.6MOSFET Interface• VGSturns on• VDSsmall• IDSlarge19.5PN22221 kLM3SLM4FPortIDCoil+V1N914-+RLemf-++V10 kIRF540IRF522PN22221 kLM3SLM4FPortIDCoil1N914-+RLemf-++V10 kIRF9540FQP27P06GDSGSDApril 5, 2014 Jonathan Valvano EE445M/EE380L.6H-bridge Interface• Both directions• VOH= +V-1.4, VOL= 1.219.6L293+5A+V361A2A1Y2Y2711,2EN+54,5168+V1N914Q1Q2Q3Q4A1Y 2Y36845L293April 5, 2014 Jonathan Valvano EE445M/EE380L.6H-bridge Interface• PWM controls power• Out controls direction19.7 uC 1 , 2 E N 3 , 4 E N 1 A 2 A 3 A 4 A +5+519271015+516451 2 1 3+ 9 8 + 9 +9 +9+9 3611141 Y 2 Y 3 Y 4 Y L 2 9 3 1N914PWM Out PWM Out See L6203.pdfApril 5, 2014 Jonathan Valvano EE445M/EE380L.6H-bridge Interface• One Port is PWM controlling power• Other port controls direction19.8April 5, 2014 Jonathan Valvano EE445M/EE380L.6Servo Motor• Simple digital interface (built in controller)• Duty cycle controls angle19.9April 5, 2014 Jonathan Valvano EE445M/EE380L.6Servo Interface• Needs its own +5V regulator• Duty cycle controls angle19.10Command waveforms60o30o0o0.5 ms1.5 ms2.5 ms20 msIn OutGnd7805VinServoPowerGroundCommand+5V9S12PWM10F10F+-+-AngleuCPWMApril 5, 2014 Jonathan Valvano EE445M/EE380L.6Servo Software• Duty cycle controls angle19.11Summary• Be careful of the currents• Sensors are noisy• Time lag makes it unstable• Component testing• Visualization and controlApril 5, 2014 Jonathan Valvano
View Full Document