Electronics Design Laboratory Lecture #3 ECEN 2270 Electronics Design Laboratory 1
Lessons from Lab 1 Use the course calendar, it has all relevant dates Use the course website, it has all lab materials If you have questions ask the instructors ECEN 2270 Electronics Design Laboratory 2
Experiment 2 Robot Motor Broader objectives: working with a load Understand the physical behavior of the load: motor Developing an electrical model for the motor as a load Experimentally finding model parameters Performing design and simulation using models Hardware implementation, verification, and testing ECEN 2270 Electronics Design Laboratory 3
Robot Platform Motors Two motors, each driving a wheel Each motor has an optical encoder for sensing direction and rotational frequency A gear box connects the motor to the wheel wheel 10 < V < 10 V V CC ENCA ENCB I Optical Encoder Motor motor shaft 64:1 gear wheel shaft 12 pulses per motor shaft rotation ECEN 2270 Electronics Design Laboratory 4
Motor basics currents create magnetic fields i B Ampere s law relates current i to the magnetic field, B i B i Magnetic fields want to alight with each other! The will exert force on each other F B 2 B 1 F B 2 B 1 i F F Force [N] i Current [A] Unit Length Vector l B 2 Magnetic flux density vector [T] ECEN 2270 Electronics Design Laboratory 5
Simple Motor F N S B 1 voltage creates current. Split rings reverse polarity every half turn B 2 _ V N S i Use permanent magnets to create a fixed magnetic field If an arm is connected to the rotating coil, we have a motor! T ki The torque of this motor is directly related to the current Torque [Nm] in our wire loops k = motor constant [Nm/A] ECEN 2270 Electronics Design Laboratory 6
Back EMF F B 2 N S B 1 i _ V We now have a time varying magnetic field Faradays law tells us this should be generating an electromotive force! Rate of change of magnetic flux through the armature winding V EMF Induced EMF [V] d dt N S V EMF k Induced EMF [V] Speed [rad/s] k = motor constant [Nm/A], [V/(rad/s)] For analysis an equivalent circuit would be nice ECEN 2270 Electronics Design Laboratory 7
Building an Equivalent Circuit. F N S B 1 V EMF k Induced EMF [V] Speed [rad/s] B 2 _ T ki Torque [Nm] N S i Voltage source powers motor Motor coils are simply one long piece of wire ECEN 2830, 2270 Spring 2011 Electronics Design Laboratory 8
Electrical model (armature circuit) motor equations V R M I V EMF k L M di dt V EMF Mechanical model T J d dt B T load J = moment of inertia B = friction coefficient T ki T load T int T ext Load torque is a combination of internal gearbox load and external load ECEN 2270 Electronics Design Laboratory 9
motor equivalent circuit model I L M R M V V EMF = k T = ki J 1/B T load V R M I L M di dt V EMF k V EMF T J T ki d dt T B load T T load int T ext Consider how to measure all circuit parameters from the model Requires measurement of input terminals, V and I frequency in rad/s use optical encoder ECEN 2270 Electronics Design Laboratory 10
Optical encoder Encoder output pulses, frequency f enc [Hz] is proportional to speed Encoder pulse output A Encoder pulse output B Encoder pulse output A Encoder pulse output B counterclockwise clockwise In Lab 2, only one encoder pulse output is needed. Optional extra credit uses both pulses to determine direction ECEN 2270 Electronics Design Laboratory 11
Encoder circuit VCC = 5 V GND Pulse out A Pulse out B LEDs shine through a spinning wheel with notches Photo transistors short a node to ground whenever light is shined on them Spinning disk goes here Logic inverters shape the sensed signals into square wave output pulses Encoder connector takes VCC and ground and supplies ENCA and ENCB ECEN 2270 Electronics Design Laboratory 12
Speed conversions Example: wheel speed is 1 rotation per second: 1 rps rotation n 1 sec n 2 f enc n 64 enc radians rad 2 rotation sec 12 768Hz rad 12 4.8k sec 64 n = wheel speed, rotations per second [rps] = wheel rotational speed [rad/s] f enc = frequency of encoder pulses [Hz] ECEN 2270 Electronics Design Laboratory 13
Input and output ports defined Spice model Model parameters to be determined by experiments: R M, k, J, B, T int Encoder model: correct speed to f enc frequency conversion has already been done, no need to change anything in this part of the model Download the model from the Experiment 2 website Only edit the model designated parameters ECEN 2270 Electronics Design Laboratory 14
Testing Spice model External load torque T ext attached here External load must sink to ground Simulation set up to 1. Start motor: bring up V, over first 1ms 2. Pulse load torque: 0A (no load) for first 50ms, 1A for next 50ms 3. Stop motor: bring down V from 100ms to 101ms, 10V to 0V ECEN 2270 Electronics Design Laboratory 15
Motor Simulation Results Consider waveforms and model in each mode: motor start, load change, motor stop I L M R M V V EMF = k T = ki J 1/B T load _ V R M I L M di dt V EMF k V EMF T d J dt T ki B T T load load T int T ext ECEN 2270 Electronics Design Laboratory 16