School of Mechanical Engineering. Objectives: Transmitting Information ▪ Understanding of...
-
Upload
louisa-price -
Category
Documents
-
view
213 -
download
0
Transcript of School of Mechanical Engineering. Objectives: Transmitting Information ▪ Understanding of...
Electronics Fabrication and Assembly Workshop
School of Mechanical Engineering
Objectives
Objectives: Transmitting Information▪ Understanding of Signals and Signal types▪ Noise and Signal to Noise Ratios
Understanding Electronics Hardware▪ Review of Basic Components▪ Understanding Transistors – Bipolar and MOSFET▪ Understanding of modules and modular design▪ Basics of Microcontrollers▪ Arduino + Compact Rio
▪ Understanding of Electronics Sensors▪ Understanding of Motor types and Motor Controllers▪ Understanding of types of wire and wire routing▪ Understanding Fuses and Emergency Stops
Objectives continued
More Objectives: Schematics and Wiring Diagrams Instrumentations, Assembly and Troubleshooting▪ Basics of troubleshooting▪ Type of Instrumentation▪ DMM▪ Oscilloscope
▪ Types of Circuit Boards▪ Type of Component packages▪ Basics of Soldering▪ Cold Solder Joints
Build and test a circuit (project) To Have Fun!
Transmitting InformationSignal types and Noise
Types of Signals
Types of Signals: Analog Voltage (0-10V)▪ Sine Wave
Digital (I/O, TTL)▪ Binary – either ‘ON’ or ‘OFF’▪ TTL – Transistor to Transistor logic – 5V HI, 0V LOW
Analog Current (4-20mA)▪ Analog – think of Voltage across a resistor via Ohms law: V=I*R▪ Commonly used in Industrial Controls
PWM (Pulse Width Modulated) signal▪ Square wave, variable duty cycle
Serial, Ethernet, GPIB, CAN▪ Negotiated Protocols for sending data
Analog Signal – 0-10V
Digital Signal - TTL
Current Signal – 4mA – 20mA
PWM Signal
Noise and Signal to Noise Ratio
Noise is electrical potential energy that is injected into wires in your circuits.
Noise can be generated by numerous sources, some internal to your project and some external▪ Motors and/or motor drives ▪ Poor wiring practice (crosstalk)▪ Fluorescent lighting▪ Ripple from the incomplete conversion of AC power to DC power in
power supplies▪ Electrochemical reactions (in batteries)▪ Ground loops due to ‘floating’ or high resistance ground connections
The Signal to Noise Ratio is simply the magnitude of your desired signal in relation to the magnitude of the ambient noise. The higher the SNR ratio, the better the noise rejection and purer the desired signal will be.
Noise and Signal to Noise Ratio
Noise is something you should consider and account for in your electrical projects. You can reduce noise by several means including:▪ Good wiring techniques and wire routing▪ Using ‘bypass’ capacitors on DC power supplies▪ Using metal shields and shielded wire▪ Using wire such as twisted pair and/or Coaxial cable▪ Using good grounding techniques▪ Use amplifiers to increase the magnitude of signals
Not all noise is important. Understand your signals and what they mean for your project to determine whether ambient noise is something you need to work with.
Noise and Signal to Noise RatioSignal and Noise with similar Vpp and average DC level
Noise and Signal to Noise RatioSignal and Noise with similar Vpp and average DC level
Notice how when the desired signal’s magnitude is very similar to the magnitude of the ambient noise, the resultant signal is very different than that of the desired signal.
Noise and Signal to Noise RatioSignal and Noise with similar Vpp but different average DC level
Noise and Signal to Noise RatioSignal and Noise with similar Vpp but different average DC level
Notice that even if we shift the desired signal up in voltage, if the magnitude of the signalremains similar to the magnitude of the ambient noise, our total signal is not representative of the desired signal
Noise and Signal to Noise RatioSignal and Noise with different Vpp and different average DC level
Noise and Signal to Noise RatioSignal and Noise with different Vpp and different average DC level
Notice how the resultant signal with noise is not significantly different than the original ‘clean’ signal
Demo – Crosstalk and Noise
Demo: Noise injected from a single wire to parallel wires of different types over a length of 6 feet.
Type of HardwareElectronics Components and Modules
Basic Electronic Components
Resistors, capacitors, inductors used to control current, change frequencies, build passive filters etc
Integrated circuit chips (IC’s) Can be analog or digital in nature and allow you to complete
advanced tasks in a singular package▪ Op-Amps▪ Timer▪ Microcontrollers
Diodes Used to control direction of current flow. Can be used to convert AC
into DC. Also used in protection circuits for motors and power supplies
Transistors Building blocks for most integrated circuits and microcontrollers Can be a Bipolar or a MOSFET type Used in current amplifiers or electronic switches
Transistors, bipolar
Known as NPN or PNP based on materials used in construction. Also called small signal transistors.
Three terminals, Base, Collector and Emitter
Fundamentally bipolar transistors are a current amplifier and each has a gain known as hfe.. This is a ratio of current supplied to the Base terminal and the current available at the Emitter terminal. Gains of 100-1000 are common.
Although these are current amplifiers, they can be used as electronic switches
Can be used to interface a microcontroller output to control a 12 volt relay. (image)
Base
Collector
Emitter
Transistor driver for a 12 volt relay coil
Input
Transistors, MOSFET
MOSFET may also be called power transistors due to the capability to handle large currents.
MOSFET is Metal Oxide Semiconductor, Field Effect Transistor
Three terminals, Gate, Drain and Source Fundamentally, MOSFET’s are a switch.
When the proper charge is applied to the Gate, current can flow from the drain to the source. In practical terms, zero current is required at the Gate to operate the transistor.
Commonly found in ‘H bridge’ motor drives and other high power amplifiers.
Can be used to interface a small switch to turn on or off a larger motor. (image)
Transistor switch to turnon/off a motor
Basics of Electronic ‘Modules’
A module is a collection of discrete electronic components assembled in a way to serve a specific function. These offer pre-engineered solutions for specific common applications and have well defined input signals and output signals.
Modules come in numerous shapes/size and functions. Motor drive Digital Compass Ultrasonic Range Finder Microcontroller kit (Arduino)
Some Key Aspects: Supply Voltage Required Supply Current Required Output Drive Capacity (current drive) Output Signal type Input Signal type Input current required Connectors used
Microcontrollers - Software
A microcontroller is a great option to use for complicated functionality. Microcontrollers can have many means of communications, several inputs and outputs of different types and a high level language to configure the device.
A key consideration for your design and software is understanding the states of the outputs for your microcontroller and the results with your machine Power up – what state are outputs in? Is that condition
defined? Software crash – what happens to your outputs? Race condition/hung software – what happens? Timing – how long for input/output to stabilize to be valid?
Microcontrollers - Arduino
The Arduino microcontroller is a low cost, versatile option for many senior design projects
There are numerous models ranging from the Arduino Micro to the Mega. Different models will have differing numbers of
Inputs/Outputs (PWM), clock speed, RAM etc Arduinos use a C syntax codebase with an open
source Integrated development environment Numerous add-ons in a ‘shield’ format to plug
directory into the development board. We have some Arduinos and Intel Galileos
available in ME 2042.
Microcontrollers – Compact Rio
The Compact Rio (and MyRIO) microcontroller is a moderate cost microcontroller from National Instruments and uses the LabVIEW programming Environment.
There are numerous models ranging 8 slot cDAQ chassis to the single board RIO or MyRIO. Different models will have differing numbers of
Inputs/Outputs (PWM), clock speed, expansion capability The Compact RIO cDAQ platform takes modules that allow
a mix and match set of capabilities. Modules include AI, AO, DIO, Thermocouple, Bridge amplifiers, Motor Drives etc
We have four Compact Rio Chassis available in ME 2042.
Sensors
Example Types: Light Proportional position (IR, ultrasonic, laser) Digital position (IR, ultrasonic, Laser) Flex Accelerometers Magnetic (reed switch, hall effect) Acoustic (microphone, piezo) Linear position (linear potentiometer, LVDT) Switch (digital on/off) Strain Gauges Rotary position (encoders, potentiometers)
Key Aspects: What is voltage and current required to operate sensor What is the signal type of its output Is there a signal conditioner/amplifier required
Motors and Motor Drives
Types: Stepper Induction Servo Solenoid Brushed/Brushless Linear
Controllers: Stepper Drive (1/2 step, full step) H Bridge Frequency Drive PWM speed control
Microcontrollers CANNOT directly power motors – a Motor Drive is required!
Stepper Motors
The stepper motor ‘steps’ from angle to angle when asked Requires a stepper
motor drive▪ Usually requires 3 DIO
controls, Enable, Step and Direction.
Motors come in bipolar or 3 phase configurations▪ Motor is rated in steps
per revolution. Using ‘half step’ mode can double resolution.
AC Motors – Servo Motor
The AC motor is a simple motor that will rotate when powered. Adding feedback causes it to become a servo motor.
AC Motors come in single phase and 3 phase variants. In general, you cannot do speed control on a single phase motor.
AC three phase motors can use a Frequency Drive to control speed.
External controller coupled to a feedback mechanism can give exact position control
DC Motors – Servo Motors
The DC motor is a simple motor that will rotate when powered. Changing the polarity of the power cables will allow you to reverse direction.
Adding feedback causes it to become a servo motor.
Requires a motor drive for speed control DC Motors use PWM drives
External controller and some type of positional feedback can allow for position control
Brushed DC Motor
RC Servo Motor
The RC Servo is an assembly of a motor, potentiometer, gearbox and PCB controller to translate a PWM signal into a position.
These require power and RC PWM signal to operate. The PWM signal has a period of
20ms. The pulse width will determines position▪ 0.5ms pulse width is minimum, 1.5ms
pulse width is neutral and 2.5ms is maximum.
▪ Above translates to full left, middle and full right for RC servo shown
The RC servo is nothing more than a DC motor with feedback controls integrated into the device
Common Interface Devices/Modules
Transistor Current Amplifier Module Used to take a low current drive output from
Microcontroller and turn on a solenoid or relay coil
Relay/Solid State Relay Electrically controlled switch. Relays are
mechanical, Solid State Relays are all electronic components
Transistor Switch Solid State implementation of a relay
Mechanical Switch – for microcontroller input Method for a microcontroller to understand
the state of a mechanical switch (image)
Circuit to interfaceswitch to microcontroller
Debouncing Mechanical Switches
A mechanical switch used as an input is not a true impulse function. It will oscillate from high to low before stabilizing Use a switch debouncer to
correct this issue
Demo – Switch Debouncing
Demo – Impulse Count for a single closure of a mechanical switch
Wire and Wire Types
Sized by gauge - AWG Smaller gauge number = bigger wire Current capacity determined by gauge of wire
and temperature rise of wire. In general, thicker wire will be smaller gauge number and can carry more current.
Solid/Stranded/Coaxial Insulation Rating
12V, 300V, 600V Voltage Ratings Gas + Oil Resistant High Temperature
Sizing Wire
Choosing wire size: Signal wires carry little to no current and can be of a small
size. 22 Gauge is a common choice. Power wires that carry current should be sized based on
the maximum temperature rise you wish to have.▪ We have included in the hands-on packet a wire sizing guide based
on a specific portion of the National Electric Code. This is a very conservative table designed for residential wiring but is very commonly used. There are other tables available for specific applications.
▪ Wires get temperature rise from two sources▪ Direct current in the wire (resistive heating)▪ Induced current from other wires in the same raceway ▪ They will also get heat through heat transfer of other wires generating heat.
(oven effect)
▪ Duty cycle also factors into the required wire size. A low duty cycle load can use a smaller gauge wire than a high duty cycle load.
Using Wire and Raceways
Noise Signal to noise ratio + signal amplifiers Wires as antenna
Signal Wire Twisted Pair vs Non Twisted Pair Coax Crosstalk Shielding
Power Wire Route to avoid signals and interference Terminal blocks
Raceways + protection Conduit – rigid and flexible, plastic and metal Panduit and Wiremold Plastic/fiberglass loom Strain Reliefs Bending Radius
Connectors and Modular Design
Connectors are a vital component of modular design. They allow you to quickly and safely remove and replace
components or modules from your machine They allow for you to ensure proper polarity of your device
Connectors come in many shapes, sizes and ratings. These can be as simple as ring terminals on a barrier strip to more elaborate polarized locking connectors. Common connectors seen in ME 463▪ Berg Pins/Header Pins (used on sensors, Arduino boards)▪ Deans Connectors (batteries)▪ Tamiya connectors (batteries)▪ Ring Terminals/Spade Lugs▪ Screw Terminals
Make sure you have both sides to a connector!!!!! Make sure if you order a device, you order its connector as
well!!!!
Mounting Circuit Boards
Most electronic modules will be build on a Printed Circuit board that includes mounting holes. It is essential that the board/device be mounted securely. Standoffs are plastic/metal fasteners specifically designed to mount
circuit boards above a chassis component.▪ Plastic 4-40 thread stand offs are available for ME 463 from the E-shop
The back of most PCB are conductive and if shorted to the chassis or a moving part will cause electrical issues and damage. Take care to ensure the PCB is insulated and not in contact with your chassis
Additional though should be made with respect to connecting wiring to your devices when laying out your project. Allow adequate space for wires to route (bend Radius) Have proper connectors for wires Use tie straps to secure wiring into a harness and into your project
Batteries, Fuses and Master Disconnects
Batteries come in various types – Alkaline, Lithium Ion, NiCD, NiMh, Lead Acid Capacity is rated in Amp-Hours. Capacity also include max current draw
▪ Batteries should be sized based on run time needs as well as the maximum current draw required. Different battery types will have different max draws based on capacity.
Each type of battery requires a specific type of battery charger. Lithium batteries require a balancing charger and can/will explode if not charged/discharged correctly.
Fuses Protect batteries against short circuit or over current situations. Should be placed as close to the battery or power input as feasible in your
design. Come in ‘Fast blow’ and ‘slo-blow’ designs. Sized based on designed power
draw of your device Master Disconnects (Emergency Stops)
You should incorporate some type of disconnect for electrical power to your device
May be incorporated as part of a larger Emergency Stop system
Emergency Stop Systems
Any project with a significant hazard should implement an emergency stop system to render the machine ‘safe’
E-stop systems should De-energize any hazardous voltages or
electrical equipment that can cause motion. De-energize or disconnect any stored energy
sources such as pneumatic or hydraulic systems
Render safe any mechanical systems with stored energy (springs, suspended weights)
Emergency Stop Systems cont.
Emergency stop systems can be a simple switch or can be more elaborate systems with multiple switches and/or interlocks
As machines get more complicated, interlocks and emergency stops get more complicated. Include some type of diagnostics for where a fault
occurs Consider what may be faults and what may be
warnings Be sure to understand the sequence of operation
for you machine and work to understand and address all failure modes of your machine.
Designing and Documenting Circuits
Schematics and Wiring Diagrams
Schematics and Wiring diagrams are very similar in nature but not interchangeable.
A schematic is a pictorial representation of your circuit using standard symbols for components. Schematic’s can be used to create printed circuit
boards Symbols can be either US or International▪ Example – resistor is either a squiggly line or box
A Wiring Diagram or Wiring Layout is a picture of the connections you will make to the various modules and components in your device. A Wiring Diagram can be used to create wire harnesses
and to troubleshoot integration issues
Example Schematic - Inverter
This is a simple 12V DC to 120V AC inverter circuit schematic. This uses the ‘US’
style of symbols KiCAD is free
software and good choice for creating schematics
Example Wiring Diagram - Arduino
Fritzing is a free and popular software package for making wiring diagrams.
Example Schematic- Arduino
This is the schematic of the Arduino Wiring Diagram.
Instrumentation, Assembly and Troubleshooting
Troubleshooting
TEST AS YOU GO!!!!!!! When things fail, test independent components/modules Be Careful where you test – circuit boards will short if placed on metal chassis!!! Tools
Digital Multimeter (DMM)▪ Good for static voltage measurements
Ammeter▪ Measures current
Oscilloscope▪ Displays analog waveforms – good for seeing transient behavior
Counter▪ Counts pulses, displays frequency, duty cycle and other waveform attributes.
Logic Analyzer▪ Allows for seeing/decoding logic signals and protocol based signals. Useful for identifying timing
issues Common Pitfalls
Lack of a common Ground Exceeding rated output of devices (current drive capacity) Shorts/poor wiring technique during assembly Interference/crosstalk due to improper wire/shielding Improper mounting of components causing shorts
Digital MultiMeters (DMM)
2 Wire Measurements This is the common method most people are familiar with to
measure Voltage/Resistance 4 Wire Measurements
4 wire Measurements are used when the resistance of your device is so low that the resistance of the probe leads will cause error.
Sampling Error on AC signals – DMMs typically expect sinusoidal AC signals when in AC mode. They also use averaging or RMS methods for displaying the voltage it reads at any given time. Low frequency and high frequency AC signals may not read correctly. Use an Oscilloscope to view any time varying signals to ensure you get what you expect.
If making Current measurements, be sure to have a rough estimate of the current you will be measuring and ensure the DMM can handle that current. Blown fuses are common as well. If it exceeds the capacity – use a current shunt.
Oscilloscopes
Initial Settings, Timebase (Horizontal) should be set to around 1/frequency of your signal. Volts/Div (Vertical) should be about a quarter of your expected Vpp of your signal. You can then adjust the position dials to center your signal. Once you have found your signal, adjust timebase and V/div as needed.
Be cautious using ‘autoscale’ buttons. These may or may not show you your signal. If there is a connection problem with your signal, you will see noise
Triggering can be used to ‘stop’ the waveform of your signal. Triggering can be internal (rising edge/falling edge) of your signal or external and typically has a level adjustment.
You should use properly matched scope probes to measure small signals. Coaxial cables may load your signal and display distorted signals.
The Ground of the Scope probe is connected to GROUND. If this is connected to a terminal other than ground of a power supply or output, it will short that connection to ground which likely will result in damage to the probe and/or your device.
Prototyping Boards
Breadboards Breadboards are for testing simple circuits on the bench. Breadboards
have no place in the actual prototype itself. Perfboard
Perfboard is the cheapest and most flexible. This is also the most difficult type of board to assemble a circuit cleanly.
Solderboards Solderboards are perfboards that have plating on one side bridging holes.
This plating also makes it possible to solder components to the board. Printed Circuit Boards (PCB)
These are boards that are custom made with your circuit traces embedded in the copper. This is the type of board you will be assembling in the hands on session.
PCB boards can use surface mount components and be made to odd sizes.
We have a LPKF Circuit Board Fabrication center that will allow you, as an ME student, to create your own custom PCB. See the E-shop for access and details.
Basics of Soldering - Components
Through Hole Components Typical components found in the EE201 kits Easiest of the components to solder
Surface Mount Components Think of an computer board/arduino Much more difficult to assemble, usually
requires a printed circuit board May require special techniques and
equipment▪ Reflow soldering▪ Hot air soldering
Basics of Soldering
Required Equipment Soldering iron, ideally adjustable Solder, rosin core 60/40 mix. NOT ACID CORE Sponge, moist – to clean tip of iron Wire Cutters/Diagonal Cutters
Basic Technique Heat the joint, not the solder Think about assembly order before you start. Use jigs/vises/holders whenever needed Think about amount of heat applied. Ensure you manage this to
avoid damaging sensitive components Cold Solder Joints
Connection that is soldered but does not fully bond the two components physically and electrically. Generally causes device not to work.
Cold Solder Joints
Next Step – We build a circuit!Be sure to come to your hands-on session!