EECS 192: Mechatronics Design Lab
Discussion 6: Velocity Control GSI: Justin Yim 1 & 2 Mar 2017 (Week 6)
1 PCB Peer Review 2 Velocity Sensing 3 Feedback Control 4 Summary
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 1 / 15
EECS 192: Mechatronics Design Lab Discussion 6: Velocity Control - - PowerPoint PPT Presentation
EECS 192: Mechatronics Design Lab Discussion 6: Velocity Control GSI: Justin Yim 1 & 2 Mar 2017 (Week 6) 1 PCB Peer Review 2 Velocity Sensing 3 Feedback Control 4 Summary Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6)
1 PCB Peer Review 2 Velocity Sensing 3 Feedback Control 4 Summary
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 1 / 15
PCB Peer Review
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 2 / 15
PCB Peer Review Activity
◮ Why peer review?
◮ Get a fresh perspective on your board to
catch bugs you’ve missed
◮ Get a new opinion from someone with a
different background
◮ Facilitate transfer of knowledge
◮ Things to look for in your peer reviews:
◮ Schematic style: messiness hides bugs! ◮ Circuit safety and spec check ◮ Layout sanity: DRC violations, don’t
design for minimums
◮ Really, anything that looks off
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 3 / 15
PCB Peer Review Activity
(or another two teams, if teams don’t line up)
(www-inst.eecs.berkeley.edu/~ee192/sp15/docs/dis5-pcbchecklist.pdf) but feel free to add additional criteria as you want
(so about 15 minutes per team in a group)
as well as pitfalls others should know and avoid
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 4 / 15
Velocity Sensing
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 5 / 15
Velocity Sensing Basics
pros and cons of your methods? Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 6 / 15
Velocity Sensing Simple Encoder
◮ Detects when sensor is lit up ◮ Reflective sensor: light up codewheel,
◮ Photointerruptors: direct light beam from
◮ Outputs a pulse train
◮ Compact reflective sensor including emitter
◮ Open collector output ◮ Optimal distance 0.7mm
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 7 / 15
Velocity Sensing Simple Encoder
◮ Measure width between transitions
◮ Count number of transitions in timespan
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 8 / 15
Velocity Sensing Simple Encoder
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 9 / 15
Velocity Sensing Simple Encoder
◮ Two square wave signals phase shifted by
◮ Generated by two sensors at an offset ◮ Can distinguish forwards from backwards ◮ More robust to spurious spikes
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 10 / 15
Velocity Sensing Simple Encoder
◮ Beaglebone Blue only accepts quadrature
◮ If your car only goes forwards, we can
◮ Delay the signal with an RC circuit and
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 11 / 15
Velocity Sensing Simple Encoder
what waveforms should you expect to see?
skipped pulses, inconsistent pulse lengths Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 12 / 15
Feedback Control
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 13 / 15
Feedback Control PID control
◮ Control is the sum of three components: PWM = P + I + D ◮ Proportional Control
◮ P = Kp ∗ ( difference between sensor input and data) ◮ Very intuitive- increasing effort for increasing error.
◮ Integral Control
◮ I = Ki ∗ (integration of error over time) ◮ Overcomes offset errors (example: friction)
◮ Derivative Control
◮ D = Kd ∗ (instantaneous derivative of the error) ◮ Helps prevent oscillation (example: steering)
◮ Video about PID control on vehicle
◮ https://www.youtube.com/watch?v=4Y7zG48uHRo ◮ Video courtesy of MIT Aerospace Controls Lab Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 14 / 15
Summary
◮ Optical Encoders ◮ PID control overview
Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 15 / 15