a crash course in hardware
DESCRIPTION
A Crash Course in HARDWARE. SIGMil. “Real world” hardware (analog) “Virtual world” hardware (digital). Analog Stuff. Voltage and Current Discrete Components Printed Circuit Boards Design Mounting Components Building an Example Board Bill of Materials Considerations Tools - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/1.jpg)
A Crash Course inHARDWARE
SIGMil
![Page 2: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/2.jpg)
• “Real world” hardware (analog)
• “Virtual world” hardware (digital)
![Page 3: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/3.jpg)
Analog Stuff• Voltage and Current• Discrete Components• Printed Circuit Boards
– Design– Mounting Components
• Building an Example Board– Bill of Materials– Considerations– Tools– Putting It Together
![Page 4: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/4.jpg)
Voltage and Current
• Voltage is also called potential– Think of it as the possibility of moving electrons
(how fast they’ll be moved once they’re allowed)
• Current is the actual movement of electrons– Measured as the number of electrons per second
• As you could imagine, these are related..
![Page 5: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/5.jpg)
Discrete ComponentsResistors
• Made of a piece of materials which slows down the current and builds up potential – But electrons do not actually build up since
charge is flowing
![Page 6: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/6.jpg)
Discrete ComponentsCapacitors
• Usually made of two parallel plates with a non-conducting material between then; current does not flow-Both potential and charge are built up
![Page 7: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/7.jpg)
Discrete ComponentsInductors
• Made of a loop of conducting material which slows down charge due to electromagnetic field– Can build up potential
![Page 8: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/8.jpg)
Other Fancy Things• Simple sensors which enable you to do
magical things– Thermistor– IR Diode/Phototransistor– Accelerometer– Microphone
• These are all very easy to use, and later we will see about interfacing to them
![Page 9: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/9.jpg)
PCB
• Printed Circuit Board– Silicon surface with wires (traces) and
holes (vias) embedded
• Straight forward to design PCB– Essentially draw the theoretical circuit out
and the rest is done almost automatically• Place, route and design rule check
![Page 10: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/10.jpg)
Mounting Things on PCBs
• Everyone has probably seen soldering irons … but what about 200+ pins on a chip?
• There are better ways to put these things on PCBs (especially tiny chips):– Reflow soldering– Oven soldering
• We’ll be trying all of these this year
![Page 11: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/11.jpg)
Building an Example Board
• Our board will contain a FPGA which must be powered and fed a clock signal– 1.2V and 2.5V– 10 MHz clock crystal requires ~5V supply
![Page 12: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/12.jpg)
Example Board BoM
• What do we need?– Mounting surface
• Schmartboards
– The FPGA– A power source
• Batteries
– Voltage Regulators– Crystal– Associated capacitors, resistors and inductors
![Page 13: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/13.jpg)
Example Board Considerations
• Things we need to consider in general:– How much current will be used?
• Thickness of wires• Types of power source for battery
– Li-Ion vs NiCAD vs NiMH
• Current limiting
– High-frequency effects of wires• Skin effect• Length of wire
– Operating temperature– Many more..
![Page 14: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/14.jpg)
Example Board Tools
• Soldering iron/hot air gun
• Flux, Solder
• Wire cutters/strippers
• Multimeter (voltage/current measurements)
• Pliers
![Page 15: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/15.jpg)
Putting it together1. READ DOCUMENTATION 3 TIMES OVER
– Otherwise you will probably burn something out
2. Draw out the intended circuit3. Tape down components4. Solder components5. Add in wires 6. Check wires correspond to drawing7. Solder wires in8. Testing, debugging….We’ll go through this process for real in a week or two.
![Page 16: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/16.jpg)
Digital Stuff• History• Transistors• Logic Gates• Registers• Interfacing to Analog Stuff• FPGAs
– Logic Design Process– Embedded System– Programming FPGAs
![Page 17: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/17.jpg)
History
• “Standing on the shoulders of giants…”• Take a modern-day processor and all
the knowledge of creating it back in time 50 years: how much is it worth?
• We can get parts for cheap:– $10 FPGA (equiv. of an entire 15 year old
computer in a 20mm x 20mm chip)– $1 Clock oscillator– etc.
![Page 18: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/18.jpg)
How a Transistor Works
• In this context (digital), as a switch to low/high voltage – (0V -> 1.2/2.5/3.3/5V)– Not much current flow (<5 mA)
![Page 19: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/19.jpg)
::Gibson draws on board to show basic logic, registers
and MUXes::
![Page 20: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/20.jpg)
FPGAs
• Bunch of configurable logic– Can implement arbitrary boolean functions
• Can include other goodies:– Multiplication, SDRAM, IP cores
![Page 21: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/21.jpg)
FPGAs: Basic Blocks
Typical FPGA may have 2,000-20,000 Configurable Logic Blocks (CLBs)
![Page 22: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/22.jpg)
Logic Design Process 1. Write out end goals of logic
2. List the big steps to reach that goal
3. Define each big step as a black box
4. Define the interfaces between black boxes
5. Pick a box and go to step 1 until you are at a basic level where you are drawing the gates within the black box.
6. Once you’re finished with all boxes, write up the logic of each block in VHDL (hardware description language).
Much like programming, its all about abstraction and defining good interfaces.
![Page 23: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/23.jpg)
Embedded Systems
• Xilinx has tools to make SoC creation -very- easy:– Embedded Developer Kit (EDK)
• Includes 32-bit processor and peripherals– Ethernet controller, Memory controller,
general purpose I/O, ADC converter (!)– Etc.
![Page 24: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/24.jpg)
FPGAs: Programming
• JTAG Interface– Industry standard (pretty much /EVERY/
chip out there has this)– Allows us to get to some internal state of a
chip, interact with registers, etc.
![Page 25: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/25.jpg)
FPGAs: Programming
• Bitfile is streamed to the FPGA, it configures itself temporarily (until the power is reset)– Internally, a bunch of RAM is written to and
this configures the MUXs and LUT in the CLB
![Page 26: A Crash Course in HARDWARE](https://reader036.vdocuments.us/reader036/viewer/2022062309/56813acb550346895da2e883/html5/thumbnails/26.jpg)
Projects
• Build FPGA Board and then. …– Bus snooping– Ethernet snooping– Logic analyzer– Crazy, sensor-laden piece of HW
• Rev-Eng Hardware– JTAG interface probing SW
• Quadrocopter