Okay. So I've showed you how semiconductors work. I've showed you how you can kind of take a semiconductor and right really small and efficient circuit designs into it. Amazing technologies, totally revolutionized our industry, our ability to build IoT devices. But one question is how you could actually use this stuff. I mean, if you have some way of kind of creating really tiny wires, how do you hook those ultra tiny wires that are nanometers wide to real wires and real stuff inside your circuit. Well, the way we do it is we can use a set of techniques that make these designs practical. One thing we do is, we take these circuits and we put them in packages. So we think that little tiny circuit and we put it in a big piece of plastic and we have some big metal pins coming out of it. There's different ways to do this. There's different kinds of packages we sell integrated circuits in. The approach that you kinda see on the left there, we have a big piece of plastic and pins that kind of come out and go down. That's called a dual in-line package. You kinda have to lines of pins, and it's designed to plug into a breadboard. The spacing between pins on a breadboard is designed to align with the length of these pins, so they're great for bread boarding. There's also packages that are designed to sit on the surface of PCBs, its kind of blue or green circuit boards. They're designed to maybe be smaller. These are a little bit harder to work with in some ways, you can have to solder a little bit more carefully sometimes. These are called flat mount or surface mount devices. I'll show you two examples there over on the lower right, there's a small outline I see. There's a quad flat package where there's kind of pins all around the outside of it in a square pattern. These are called surface mount devices because they're designed to be mounted on the surface of your circuit board. So there are a lot of different ICs out there, because there are a lot of different problems that people need to solve with IC. So there's a huge market for ICs for Integrated Circuits. Next, what I'm going to do is, I'm going to be the same thing of where I run through a list of different ICs to give you a sense of the space out there so you kind of know what's in your toolbox. I'm going to start by giving you an example IC just so you know what we're working with here. This IC is very widely used one, very famous, this particular one is made by Texas Instruments. It is a Quad and Logic Gates package. This is an example of a dual in-line package. What it is, is it has some AND gates in it. There's space for four AND gates, so they put four of them in there. Here what I'm showing you is, is I'm showing you the kind of physical structure of the device and then I'm showing you some diagrams. So the pinout diagram shows you the inputs and outputs to the device. So you can kind of match them up and see how they're used. Then the logic diagram to the right of that shows you what those pins are connected to in terms of the internal logic. So if you look at the logic diagram, you can see pins 1A and 1B or inputs of the first AND gate. Then pin 1Y is the output from that AND gate. So if you look at the pinout diagram, you can see, 1A and 1B are the first two pins and then 1Y is the third pin. So this tells you how to hook it together with the rest of your circuit. One little ambiguity that comes up, is if you have the dual in-line package or whatever package it's in, you have to match it up with the pinouts, and how do you know which way it's rotated? Well, what you can do is, these packages often have a little bump or a little notch on one corner. So that tells you how to rotate it. So you can see in the pinout diagram the notches at the top. So you know what pin specifically is 1A and which ones 1B and so on. So I got this pinout diagram and this logic diagram from what's called a data sheet. So whenever you buy a component, including an IC, the vendor will often produce some materials which documented describe what's in it. The data sheet that Texas Instruments provides for this logic gate is at this link. You can Google it by typing in the part number in the word data sheet. What you can do is, you can kind of go in there and when you get a component, look up the data sheet and then it'll tell you how to hook it up. It'll tell you the pinouts in the logic diagram and all that sort of stuff. Just so you know, these things cost like a $1.61 if you buy one, if you buy them in bulk the price goes down to $0.65 each if you get them from DigiKey.com. There's lots of vendors that sell this particular IC. So that's an example of a particular IC. Next, I'm going to run through a set of other ICs that are commonly used. I'm going to start with one of the most popular ICs in the entire world. It is the 555 timer IC. You see these things all over the place. Like if you've ever gone to Las Vegas and you see flashing lights or on cars when their turn signals are blinking. Any time you see a device and something's flashing with a regular pattern, there's a good chance there's a 555 timer IC inside of that. What this IC does is it acts like a timer. It is something where you can kind of say, "Okay. I want you to go on and off every so many seconds or every so many milliseconds." It could also operate in an egg timer mode where you can say, "Okay. I want you to go off after 5.5 minutes." So you can configure this thing, you can tell it what mode to operate in and how fast you wanted to oscillate and things like that. Extremely popular IC. There's over a billion of these sold every year. So there's a lot of variants of it too. I'm mentioning some here. There's the XR 2206 for example, the 8038 and so on. These differ in terms of some of the specific configurations that can be done. Another extremely popular IC is the 741 operational amplifier. So if you need to OP-AMP, you can buy the 741. I mentioned some alternatives that differ in terms of what voltage they use and things like that. There's also ICs for voltage regulators. If you needed to change what kind of voltage comes into your circuit. There's also a large number of logic circuits out there. I went through AND gate example in the previous slide. There's many ICs for or gates and not gates and AND gates and all sorts of variations on that which you can buy. Another popular type of IC is what's called a shift register. So as shift register is an IC where you can have one input, one line is your input, and then a asset of outputs. Then you can clock in a set of bits. So you could tell the shift register, "Okay. Turn on pins one, three and five and then make the other pins low." This is good for situations where you have something like an Arduino, Raspberry Pi, something that's kind of driving a circuit, maybe using one line or small number of lines. But you need to control large number of things. You're controlling a huge array of LEDs or you want to monitor a large number of machines. If you have a large number of outputs, use shift registers for that. Because you can make one line control a large number of other lines. The way it works is it stores instead of bits internally when it does this. Another popular type of integrated circuit is in A/D Converter. So this is in IC that converts in analog input into a digital output. So if you have an IoT device that's reading temperature for example. Well, your temperature sensor is going to output something that's analog, is going to output a signal that's continuous in a certain range, maybe somewhere between zero and 10 volts. But you want to read that in and convert that into some digital form that can be read by your Arduino or your micro-controller. For that use an A/D Converter. It'll read in a voltage and converted into a number and then clock out that number in a digital representation. There's also D to A converters. These are converters that convert a digital number into an analog output. So for example, maybe you have a motor and you want to control that motor, you wanted to go at a certain speed. So you want its voltage to go up in a linear way across a set of continuous range. Well, with a D/A converter you can do that. You can tell the D/A converter "Output 5.2 volts." You can send 5.2 into it, and it will convert that number into a range, it will convert it into 5.2 volts on a continuous range. There's also comparator devices. So these are ICs that take in two inputs and then measures the difference between them, the voltage difference. So if I have one volt coming in and three volts coming in, the difference would be two. Another useful type of IC is a motor driver. So I don't know if you have ever tried to control a motor, it's hard to do that. If you have a stepper motor for example, it's tricky making it stop. You need these things called H bridges which can be used to reverse the polarity. If you wanted to go forward and then break and then stop, and then go in another direction, maybe you want to control a set of motors, you don't need to deal with all that yourself, you can buy an IC to do that for you where they've figured out how to do all that efficiently. The way motor drivers work is they'll accept some input which may be an analog signal or a digital representation of what you want it to do, and then it can drive the motor. Some motor drivers are very powerful, they can drive very big inductive loads, huge electromagnets and stepper motors and things like that. There's also LED drivers where there are similar to shift registers. I'll have a whole bunch LEDs, and I want to have them at different brightness levels and intensities being on and off and things like that. So you can use LED driver for that, controlled by a single input. There's also I/O Expanders which are other variants of shift registers doing clock out a large number of bits, and control a large number of lines using a single input. There's also things like WiFi modules where if you want your device to communicate using 802.11 wirelessly to other devices, you can sit down and build a circuit for that but that would be a lot of work. You don't need to do that, you can just buy a little chip that does that for you. So it's very easy to put WiFi in all your circuits. You building a light bulb poets talk over Wi-Fi, you just buy a little chip that does it. They're very cheap now. So these are some examples of ICs, and there's so many more. So before you sit down and you design something, you might want to think about whether there's an IC for that. You should search for that, because often going and paying a few dollars for a chip, especially if you're not building something in bulk is a lot cheaper than you fabricating something yourself. So this leads to the question of ICs are great. How about we just make everything in IC? Do we even need to build circuits anymore? Integrated circuits are great, they have some advantages, but the thing is you can't really do everything as an integrated circuit. Because integrated circuits are designed to use pretty low voltage levels. If you need something that drives something with large voltage levels, you can't really do that in little tiny silicon. You can't fit that much voltage in there. Also, if you have niche cases, things are low volume, you're not going to find ICs out there that can do that. Or if you're doing something that's really new and navel that hasn't really come up before, it'll be hard to find ICs for that as well. So this introduces another interesting question is, are there other ways to component in designs besides integrated circuits? Something that's really taken off in maybe the past 10 years or so are these things called breakout boards. So breakout boards are an attempt to componentize things that are not ICs. They may contain ICs on them, but the goal here is to componentize a circuit as a whole as opposed to just the integrated circuit. What these are is they'll often be a PCB, a Printed Component Board, we have a set of components on there, and then a set of well-defined pins that you could use to interface your designs. This particular one I'm showing here is made by Adafruit. There's a lot of vendors that make these, this is just one example. This one is neat, because what it is it's a device that measures movement in three-dimensions. We talked about gyroscopes and accelerometers. This combines both of those on a single board. It deals with a lot of the nitty gritty details of analyzing things in the 3D space and it breaks out the communications in an isotope pins you can interface with it. So this is a breakout board that's useful. In general, breakout boards are useful to consider for your designs because they reduce costs, you don't have to go in and build everything yourself. They save space, they may be more reliable because everything's fabricated on a single board, they simplify reuse, they have clear pinouts, they're often documented. They also save you time if you don't really know what you're doing. If you want to get in and build something and you don't have time to learn about it like how to design stuff, you can do stuff with breakout boards. But even if you do know a lot about how to design stuff, they're still useful for these other readings as well because they speed prototyping that can save you solder and work and so on. So they're useful for rapid prototyping as well. But there's some challenges, you have to be careful about with breakout boards. You'll see some of these breakout boards are designed for Arduino. So they're physically designed to only plug into Arduino Systems. They may make assumptions about what protocols used to communicate with them. You may need to do some work like soldering or installing header pins, and you have to be careful to read the documentation because they may have requirements on supply voltage and other inputs. That said, they're very useful, and so you should consider using them in your designs. I'll give you a few more examples just to give you some sense of what's out there. Here's an example of an IR thermal camera breakout, and what we have here is a camera that can read infrared. So this application is useful for a lot of things because if you can see infrared at a distance, you can build so many interesting things with that. When people get embarrassed, they blush, their face turns red. One thing they figured out is people can blush in infrared as well, and a lot more people blush in infrared and they blush and the visible spectrum. So you can read people's emotions with these and figure out things about them. You'd also sense people walking into dark rooms and figure out what they're doing in that dark room. There's all stuff you could do it with infrared. This particular breakout has an eight by eight array of thermal IR sensors that can detect a human 23 feet away and refreshes at 10 Hertz, and incorporates a Panasonic thermal IR sensor 3.3 volt voltage regulator and some resistors and capacitors. So it's an IR sensor in some logic around it to protect that sensor and make it useful and easy to work with. So if you look at this breakout board in a little bit more detail, you can see there's a set of pins, and these pins are used to interface with the board. There's an input voltage, there's ground, there's supplied electricity. There's two pins that are a serial clock and serial data. So these are used to supply and read data from the board, and there's also an interrupt output which signals you have something crosses the vision path of it and so on. Here's another example of a breakout board. This is one to control a stepper motor, and it's useful because it can drive the motor in a circular pattern, it can reverse things, it can break flight breaks to the motor if you want to slow down quickly. Can be used for all things. If you have a robot, if you have something you want to pin until and scan around. If you have a gauge you want to move around or things like that. Inside, it has an IC. It has a Toshiba TB6612 integrated circuit inside of it, but it has some other stuff around it to make it more useful. So if you look at this board in more detail, it's got same tore things input and output voltage. It's got some additional things to tell the motor what to do. This particular board can actually drive two different motors at once. So if you have two different motors you can just use one board and so on. As another example, here's a capacitive touch board for the Raspberry Pi. This is a board that can detect touch. So here what we have is the person is hooked it up to a set of fruit which are things that conduct electricity, and what she's doing is she's playing the drums on the fruits, so he's playing sounds when she could touches these different fruits. So this board has inside of it a microcontroller, and again it has some stuff around it to protect it, make it more usable. If you look at the pins, it's got a bunch of touch pins. So these are things that can be hooked together with fruit or conductive materials, conductive glass. If you want to detect someone touching those things, and then voltage input and output. Again, we see the serial input for data, serial clock and things like that. Another example is this feather wing LED matrix. So this is a matrix that drives a set of LEDs, and you can tell which LED slideUp. You can clock in a set of frames and have it animate between the different frames. So has a memory in there, and has LED driver chip and some other stuff. Again, you see an array of outputs which drive the LEDs and you see serial clock and serial data for input, that's another example. So what I've done here is I've given you an overview of a bunch of different breakout boards and given examples of this breakout boards that are out there. When you do your own design, when you're trying to build something, your own IoT device, what you want to do is you want to think about first is there a breakout board already out there that solves the problem? Then in addition you can look at ICs. Is there an IC that I can use that can solve subproblems I have inside my design? Then when you feel with those approaches get into how do you design your own circuits to achieve things, so you can do that. Now, one thing you might have noticed though is a lot of these break-up boards have serial clock and serial data. So these are pins we see over and over in these boards and in the ICs too, and they're used for communication. Because we run into this problem over and over of I have a device or I have a chip and that chip has data and it needs to communicate that data off. This leads to an interesting question of how do you take data and communicate it using a wire? That's actually what we're going to talk about next. We're going to talk about encoding. Encoding is the process of taking data and sending it in efficient ways over wires.