EECS 192: Mechatronics Design Lab Discussion 1: Introduction GSI: - - PowerPoint PPT Presentation

eecs 192 mechatronics design lab
SMART_READER_LITE
LIVE PREVIEW

EECS 192: Mechatronics Design Lab Discussion 1: Introduction GSI: - - PowerPoint PPT Presentation

EECS 192: Mechatronics Design Lab Discussion 1: Introduction GSI: Justin Yim 23 Jan 2019 (Week 1) 1 Administrivia 2 BeagleBone Blue Intro 3 Soldering Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 1 / 22 Administrivia Getting


slide-1
SLIDE 1

EECS 192: Mechatronics Design Lab

Discussion 1: Introduction GSI: Justin Yim 23 Jan 2019 (Week 1)

1 Administrivia 2 BeagleBone Blue Intro 3 Soldering

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 1 / 22

slide-2
SLIDE 2

Administrivia Getting Started...

Welcome

Welcome to EE192!

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 2 / 22

slide-3
SLIDE 3

Administrivia Getting Started...

Project

◮ Project: build an autonomous

track-following racecar given a stock chassis and microcontroller dev kit

◮ Teams should be 3 students

◮ Combined skillset should include

mechanical design / fabrication, electronics, programming

◮ Controls experience helpful

◮ Teams formed by checkoff Friday ◮ Read the competition rules

◮ NATCAR Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 3 / 22

slide-4
SLIDE 4

Administrivia Getting Started...

Checkoffs

◮ One-hour time slot on Friday TBD to

demonstrate that your project is where it should be

◮ At least one team member needs to show

up to run your hardware

◮ These are graded, half credit if late ◮ First checkoff this Friday

◮ Form project teams and check out cars ◮ Checks4Cars program: trade a $300

deposit check for a car

◮ Get private course GitHub repository ◮ Details on website

Get your cars!

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 4 / 22

slide-5
SLIDE 5

Administrivia Getting Started...

Git Refresher

◮ Git: distributed version control software

◮ Each commit: like complete snapshot ◮ Branches: separate chains of commits ◮ eventually merged back to its parent ◮ Distributed: everyone has compete copy ◮ Most operations local, periodically sync

◮ Best Practices

◮ Small, logical, often commits ◮ Write good commit messages ◮ Develop in branches: keep master clean git logo, by Jason Long, CC BY 3.0

Learn git here: try.github.io

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 5 / 22

slide-6
SLIDE 6

BeagleBone Blue Intro Hardware

Hardware

◮ FRDM-K64F Development Board

Beaglebone Blue (BBBL)

◮ Octavo Systems OSD3358 Processor

◮ 120 MHz M4 1 GHz ARM Cortex-A8 ◮ 1024 KB 4 GB 8-bit eMMC flash storage ◮ 256 KB 512 MB RAM

◮ Program over network via USB or Wifi ◮ I/O connectors including

◮ GPIO ◮ 12-bit SAR ADC ◮ USB2.0, I2C, SPI, and UART ◮ PWM, Servos, Encoders, H-bridges

◮ LEDs, Buttons, 9-axis IMU, Barometer

Beaglebone Blue Board

image from BeagleBoard.org Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 6 / 22

slide-7
SLIDE 7

BeagleBone Blue Intro Board Refresher

IO Refresher

◮ GPIO (general purpose input/output) pins

(strawsondesign.com GPIO link)

◮ Output: sets pin voltage from software:

either GND (0) or Vdd (1)

◮ Input: samples pin voltage: 0 (low) or 1

(high)

◮ PWM (pulse-width modulation) module

(strawsondesign.com PWM link)

◮ Every period, the pin is high based on the

duty cycle, then low for the remainder

◮ Can digitally approximate analog outputs

◮ Analog Inputs (ADC) (strawsondesign.com

ADC link)

◮ Converts a continuous analog voltage

(0-1.8v) to a 12-bit (0-4095) quantity

Beaglebone Blue pinout

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 7 / 22

slide-8
SLIDE 8

BeagleBone Blue Intro librobotcontrol

Robot Control Library

◮ C library hardware interface for Beaglebone

Blue

◮ Examples and testing programs available ◮ Documentation:

http://strawsondesign.com/docs/ librobotcontrol/index.html

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 8 / 22

slide-9
SLIDE 9

BeagleBone Blue Intro librobotcontrol

“Hello, World!” Code

#include <stdio.h> #include <robotcontrol .h> int main () { if( rc_kill_existing_process (2.0) <-2) return

  • 1;

if( rc_enable_signal_handler ()== -1){ fprintf(stderr ,"ERROR...\n"); return

  • 1;

} rc_make_pid_file (); printf("HelloWorld !\n"); rc_set_state (RUNNING); rc_led_set (RC_LED_GREEN , 1); int toggle = 1; while( rc_get_state ()!= EXITING){ toggle = !toggle; rc_led_set (RC_LED_GREEN , toggle); rc_usleep (100000); } rc_led_set (RC_LED_GREEN , 0); rc_led_cleanup (); rc_remove_pid_file (); return 0; } Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 9 / 22

slide-10
SLIDE 10

BeagleBone Blue Intro connecting

Using the Beaglebone Blue

◮ Accepts power over USB or 9-18V

barrel connector

◮ ALWAYS shut down by either:

◮ sudo poweroff from SSH ◮ ”POW” button on board

◮ Beware short circuits and Electrostatic

Discharge (ESD)

◮ We can only provide you with one

replacement board if yours dies

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 10 / 22

slide-11
SLIDE 11

BeagleBone Blue Intro connecting

Electrostatic Discharge

◮ You build up static charge on your body

◮ ... just by walking, especially when it’s dry ◮ ... and up to several kV ◮ but under ∼2kV is imperceptible

◮ Chips are sensitive to high voltages:

may cause permanent damage

◮ read: board stops working “for no reason”

◮ Remember to ground (discharge) yourself

before handling sensitive electronics

◮ Touch the grounded lab bench surface ◮ Use a ESD wriststrap ◮ Avoid touching traces on boards

Don’t let this happen to you

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 11 / 22

slide-12
SLIDE 12

BeagleBone Blue Intro connecting

Connecting to Beaglebone Blue

◮ Connect to USB and wait for boot ◮ Lab desktops with Windows:

◮ Start Virtualbox ◮ Pass Beaglebone USB to Ubuntu

◮ ssh ubuntu@192.168.7.2 ◮ Passphrase: temppwd

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 12 / 22

slide-13
SLIDE 13

BeagleBone Blue Intro connecting

Hello, World! Demo

Live Demo!

Connect to Beaglebone Blue, Print ”Hello World” Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 13 / 22

slide-14
SLIDE 14

Soldering Theory

Overview

◮ Soldering: joining (electrically and

mechanically) metals using a separate fillter metal “solder”

◮ Electronics: bonding component pins/leads

to circuit board through-holes or pads

◮ Solder is usually a tin/lead alloy (e.g.

63/37) or lead-free tin-silver-copper alloy (e.g. SAC305)

◮ This tutorial focuses on introductory

through-hole soldering

◮ Note: most production boards today are

surface-mount to save space

Example solder joints: Through-hole Surface-mount

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 14 / 22

slide-15
SLIDE 15

Soldering Theory

Safety Precautions

◮ Soldering melts metal - IT’S HOT

◮ Tips typically set at 700°F (371°C) ◮ Irons cool slowly after turning off ◮ Touching a hot tip is NOT fun

◮ Leaded solder contains ... lead

◮ ... which is known to the state of

California to cause cancer and reproductive harm ...

◮ WASH YOUR HANDS AFTERWARDS

◮ Solder vaporizes flux, producing fumes

◮ Regular exposure linked to asthma ◮ DON’T BREATHE THIS ◮ May also cause solder splatter:

eyewear required (regular glasses ok)

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 15 / 22

slide-16
SLIDE 16

Soldering Theory

Oxidation

◮ Soldering depends on good thermal transfer

from tip to solder / component / board

◮ Metals oxidize, forming an oxide layer

◮ Oxides impede thermal transfer ◮ Reactions faster at higher temperatures

◮ Flux provides chemical cleaning

◮ Rosin flux is corrosive when heated ◮ ... and is present in solder wire spools ◮ ... but is “burned” upon use

◮ Just keep this in mind...

Solder cross-section showing flux core

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 16 / 22

slide-17
SLIDE 17

Soldering Theory

Equipment Overview

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 17 / 22

slide-18
SLIDE 18

Soldering Procedure

Tip Maintenence

◮ The tip is what heats things up

◮ Want to maximize thermal transfer!

◮ Keep the tip “tinned” with solder

◮ Provides better thermal transfer ◮ Sacrificial layer preventing tip oxidation,

which destroys the tip

◮ Must be occasionally refreshed

◮ The solder oxidizes, accelerated by heat ◮ Cleaning: wipe on brass or wet sponge ◮ Immediately re-tin (apply solder layer) Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 18 / 22

slide-19
SLIDE 19

Soldering Procedure

Procedure

◮ Beginner’s tip: use iron to heat up component and board, not solder

◮ Feed solder in through the other side ◮ Solder only melts when component and board sufficiently hot

◮ Maximizing heat transfer

◮ Point tips: solder using “side” of tip, not point ◮ Chisel tips: use the broad flat end Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 19 / 22

slide-20
SLIDE 20

Soldering Procedure

Joint Inspection

Optimal joint shape is a “solder volcano”

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 20 / 22

slide-21
SLIDE 21

Soldering Lab

Fin

For checkpoints 1 and 2, you need to build 2 LED blink circuits- the first using an IC and the second using PWM from the Beaglebone Blue. Choose the resistor such that ∼1.6mA goes through the LED The BBBL supply voltage is 3.3v

(yes, I know those red LEDs suck) Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 21 / 22

slide-22
SLIDE 22

Soldering Lab

Links

◮ Chassis:

http://os.3racing.hk/carkits_web.php?carkits_web_key=61

◮ Github: https://github.com ◮ Beaglebone Blue: https://beagleboard.org/blue ◮ Robotic Control Library: http:

//strawsondesign.com/docs/librobotcontrol/index.html

Ducky (UCB EECS) Mechatronics Design Lab 23 Jan 2019 (Week 1) 22 / 22