1. Introduction to Embedded Systems

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
we're going to be talking about the concept today of embedded systems what it is an embedded system exactly and you kind of get the sense we're going to be used something called an Arduino Uno and okay so what what is all this stuff how do we use this stuff where we're going with it what's the purpose all these things we introduced here in this lecture today so in terms of our class we have these four objectives that we want you to be able to do at the conclusion of this class basically in this class we want to give you mad skills that's the bottom line and these are the mad skills we want to give you first we want you to be able to interface a microcontroller to a variety of analog and digital inputs and output devices second we want to be want you to be able to implement a micro slip automatic control systems using a micro controller third we want you to be able to write and troubleshoot assembly language code for a microcontroller so assembly language is an important aspect of this class because it allows you to get down to the bare essential functional components of the system and finally to analyze a problem to determine appropriate microcontroller use so these are the learning objectives for this class mad skills we want to give you these mad skills here in this class they are going to be educational skills we're going to be having you learned but there are also going to be practical hands-on skills so the there's a big component of this class is hands-on skill but there is also especially like with assembly language and such it's it's going to be more technical so hold on to your seat belts or something because we're going to go for a wild ride here in this class okay in terms of the required acquisitions here's the textbooks we're going to be using you definitely need a copy of the textbook okay because it has certain tables and things like that reference information that you will need that it's hard to find elsewhere and I won't give you it okay because it's in the book so these are a recent prices for these things so compared to a lot of classes it's pretty cheap okay so that's the book you can find it at the bookstore or if you can get it online or at a books or Co ass or wherever you else you can find it you definitely need to get a copy of this so we're going to be using Arduino and there there have been some available in the office uh it's questionable as to whether they'll be available and I'm still not sure if they'll be available or not you can get them online and and so I recommend you getting your own Arduino so that you can work with these things on your own and your own time your own computer because it's very helpful for you to be able to understand exactly how this stuff works and to be able to make it test it out so that's the Arduino the Arduino IDE the integrated development environment the integrated development environment is the programming environment for this it's free on Arduino dot CC so we're going to be using this and actually here I say we're going to be using this at this date actually we'll be using it even even sooner than that we're going to be using it to UM so start programming right away with this and definitely in a lab soon as we can next there's the edge u shield there's the edge of shield and so this edge e shield is is useful it has a number of valuable things associated with it that's got some push on here it's got a light sensor it's got an RGB LED and it's got some other LEDs it's got a temperature sensor it's got a a infrared transmitter and receiver it has a buzzer this is a like a rotary encoder rotary encoder it's got a connection for a servo so this gives you a number of capabilities for different things inputs and outputs that can be used for testing things so it's helpful this is a book that's helpful to give ideas for for projects sensing and controlling the physical world with computer so that this is a helpful recommended acquisition so what exactly is an embedded system well I'm going to talk about that up particularly involves integrating sensors actuators intelligence to produce a system that is more capable more versatile more robust to give you to take a system that you have and to do something more useful with it okay so we have a system when do we use it what's when is it appropriate to use a microcontroller well generally as as we mentioned one of the things that embedded system uses is it involves intelligence you want to be able to incorporate intelligence into the system so if you if you're if you have a system that requires intelligence then that's the kind of thing we want so if for example you want to you push a button and you want a light over here to flash three times or rather to give out an SOS signal long long long short short short long long one short short short okay so one push out of a button sets that up and maybe if you push it again it stuck turns it off okay so it could be a warning beacon or aqua or a help distress call okay so one push of the button does all that okay and so you can think of there being intelligence required in that the complexity of the system if you may have a system and the complexity is reduced by using this so you it turns out that you can do that SOS kind of thing you can set that up using switches and relays timers but if you were to use all of those things it can be a fairly complicated system by the time the whole thing is said and done okay so if you can reduce the complexity so instead of having a bunch of relays and a bunch of switches and a bunch of timers if you can do it more simply another way then in particularly using a microcontroller then it's good to do so cost can be an issue the cost of the microcontroller can be less than other parts okay it may be that you need a variety of sensors and actuators must be integrated in the system or perhaps communication some kind of communication is needed those are the kinds of things that would warrant using a microcontroller now microcontroller isn't useful for everything and the times when it's not necessary to use one it's not the correct tool so for example the system requires little or no intelligence in other words if all you want to do is turn this thing on you flip a switch this thing goes on then you don't need a microcontroller for that perhaps the system can be simpler or cheaper using individual parts then you don't really need a microcontroller or microcontroller might actually be up so in this case the microcontroller is overkill or or it could be that the microcontrollers underkill in other words it may be too slow maybe there's too much number crunching involved or there are too many things going on for the microcontroller to keep up with microcontroller can keep up with quite a bit but it's possible for the microcontroller to be under sized so there may be good use times for for a recommended use other times not okay here is the concept map for a embedded system now here's the concept map so so over here we have this system that needs to be controlled we'll talk a little bit about what that system might be okay so they're sensors signal conditioner there's a power couple of power sources there's a user interface with the system here is the controller the controller is going to be like a microcontroller there's a power interface an actuator associated with the system so basically here's what are the intelligence is the intelligence is generally input into the system in the form of software okay so what is the system needing control well can be a variety of things can be a mechanical system electrical system or an electromechanical system combination of the two so often when we have a system that involves both electrical and mechanical it's often referred to as a mechatronics system mechatronic so that's a combination of the two words mechanical and electronic suppose you could do it the other way a electron electronical well anyway mechatronics system that's that's the standard name for electromechanical systems could be a biological system the main ma chemicals and so on and so forth violent you know so as you can see what we're talking about is very useful for many many applications so when we start talking about embedded systems we're talking about something to control that can control all kinds of things so in terms of a system needing control we have the question what's wrong with the system in other words well maybe there's not anything physically wrong but we want the system to do something so for example clothing the clothing may not be wrong but you could have you might desire lights to flash on your clothing you may have a tie and you want lights to flash on your time so there's nothing wrong with the tie but question is there something we would like to do with it other than just have it as a tie and so part of the question is what can we do with it so that's the that's the issue that we're looking at here so again electrical mechanical biological all kinds of things could be used here so just to give you an example there's a product called SawStop and the purpose of this is as follows we know that there are lots of table saws and table saws can cut off fingers okay I have a brother-in-law that happened to I have a friend that happened to so this is certainly a problem there's a problem associated with table saws that is they're potentially dangerous okay so powerful so there plenty of electric saws we don't need more electric saws we need safer songs the question is how do we prevent saws from cutting off fingers well it turns out that organic bodies like fingers are conductive and generally softer than wood so they they have different properties than wood so how can we use that knowledge then to solve this problem okay so so the smart saw basically applies a small electrical signal to the blade there is a sensor and a DSP that monitors the signal when the blade contacts skin or as in the picture a hot dog the signal in the blade changes and this change then activates a safety system so basically when obviously if the blade is not contacting skin there's no issue there's no problem okay it's only a problem when the blade contacts flesh okay so when that happens basically the the sensor and the DSP quickly detect that so the electrical communications and connections here happen really fast a lot faster than you can move your hand so so let's say your fingers getting into the blade as soon as it soon as it just barely touches the electrical properties change it's picked up by the sensor in DSP and it's safety system is activated when the safety safety system is activated three things happen first an aluminium break locks onto the blade it's like a block of aluminum just grabs the blade so even though the break blade is spinning that it destroys that block of aluminum but in the process it stops the blade and in the process so in the process the momentum of the motor also causes the blade to get to swing out of the way okay so if you've ever and the third thing is it shuts the power to the motor off so if you've ever used a table saw when you hit the off button the blade doesn't stop spinning it takes about it you know 30 seconds before the blade stops spinning it just takes it has to wind that's gotta love a lot a lot of inertia and so what happens then is when the aluminum brake locks onto the blade it uses the momentum the inertia to swing the blade out of the way so it's no longer it's no longer touching the finger okay and so that's the that's the kind of situation we're looking at it that's the applications that's the problem that's the approach okay now how do we apply this in a embedded system okay so here's our over here is our saw blade okay and there are lots of saw blades out there lots of different kinds so this particular saw blade has a sensor and the sensor injects a signal onto the DES saw blade and it also measures that signal okay so it's it applies something it measures something the DSP then is constantly checking what's going on with all this so again when when you when your finger is in contact with the blade that this sensor identifies through the DSP that a change is occurred and that is communicated now to the controller okay otherwise the controller drives the power interface there's a power interface that takes you know the what the line the power from the wall which is 120 volts takes that and it applies it to the motor so that's what's used to drive the blade okay when it's when it's told to shut down this connection is broken okay or rather opened and then this connection is applied so the break break stops so so basically power is applied to either one or the other not both at the same time okay and so that's what the power interface does and so this is an example of what's called a closed loop system okay we saw in our learning objectives one of the learning objectives is to be able to apply a microcontroller in a closed loop control system this is a an example of a closed loop control system so you notice we have this loop here so this is a a block diagram for that we have a number of components in there we have we have the sensor and signal conditioner and again that sensor is required for closed loop control so now what is this called fit uses no sensor it's not closed-loop than its what open-loop right open-loop control so now and there are lots of value valuable open-loop control systems so closed-loop isn't the only way to go so the sensor and the signal conditioner measures important system variables these measurements may be used in general will require conditioning to be used by the microcontroller so for example if you have a sensor that well the Arduino for example has an analog input the analog input only takes a positive voltage so if you have a sick a sensor that gives negative voltage values then the it can't be used by the Arduino directly you have to do something with it first so that it no longer has negative values so they have to be so the signal has to be conditioned for use by the brain so in general the conditioning involved may involve a number of operations scaling offsetting filtering okay in order to be used so so in general there these are the kinds of things that are needed in order to have a sensor and again this also will will require some kind of power associated with it now in general there may be a number of power sources in that first block diagram I showed I had two different power sources okay you may have low level required power and you may have high level required power so you may require multiple voltage levels so for example if you look inside of a PC you have a power supply with like several different kinds of voltages available so and that's because you know the hard drive needs one kind of power you know it's you know the the fan requires a different power and so forth a number of different kinds of powers so in general you may need to supply power other than electrical power you may need hydraulic power or pneumatic power okay so that's that's a different kind of our it may require high power and low power levels for example if you were driving a motor excuse me the motor might require 30 amps well there's no way you're going to get 30 amps going through an Arduino you do that you can fry your Arduino so you it may require a higher amount of power so in that case you have what's called a power interface so the power interface may need to do power amplification so your of Arduino puts out plus a you know 0 to 5 volt values but that that directly may not be useful for a motor so but anyway you have some kind of power amplification in often that will be in the form of current in creation so the Arduino can put out milliamps of current but a motor might require 30 M so there needs to be an increase from the milliamps up to the you know 30 amps so the important thing is that the power and 8 interface is able to handle the power requirements demanded by the actuator so one little Arduino may not not be able to draw a dry of a bank of lights for example so you need something else that will be able to handle the power needed by the lights ok the power interface for in many cases will require analog but the Arduino doesn't have an analog output so you may need to use something called pulse width modulation and we'll talk more about this pulse width modulation is a way of simulating an analog signal using a digital signal so here's an example signal that we would might want in an analog and here is a pulse width modulated version of that signal so basically the pulse width modulation it it puts out pulses at a certain at a certain period every so many seconds a new pulse the width of the pulse is determined by the magnitude of the cig we want out so so notice for low values we have the pulse width is very small for high values the width of the pulse though the on time versus the off time the on time is large ok so so here's very small on time here's very long on time and so we can simulate a changing voltage by modulating the width of the pulses adjusting the width of the pulses so that's pulse width modulation anyway that's a form that's off that's used in some cases for especially like for motors or other things for driving things notice this is a digital circuit a digital signal but it represents a something that similar simulates an analog your actuator is some kind of an energy conversion device so it converts power from one kind to the kind needed by the device it's being controlled so for example if you have a motor that's you know you have a mobile robot and you've got wheels the wheels are turned by motors okay so that motor is an actuator okay it takes electrical current and gives you mechanical output so motors brakes pump solenoids and your actual number of different kinds of actuator could be lights those are different kinds of actuators ok so so in general that may be a part of your overall system user interface so you have a user human that's interacting with this system and the user wants may want to put in information into what's going on in the system so the user interface then needs to take input commands from the user it needs to be able to you know say you want to enter in the number let's say you enter the number 10 and a light over here blinks 10 times okay so that would be an example where you want to be able to put in information into the system or or maybe your input comes in the form of a knob that you turn and that that does something in the system detects that change and it does something based on that okay so number of ways of getting information in from the user so this is an example of a user interface this has a lot of user interface features this this thing so so it can take information from the user and it can give information back to the user okay and that information can be in the form of a GUI so for example this has a GUI graphical user interface there's a there's a there's a graphics associated with this and then what's going on in the graphics then it somehow communicating to the user and the user can interact with that that graphics so for example a screen with a mouse or an arrow that's a graphical user interface or the output could be visual in the form of a meter a numerical readout some kind of a warning light or indicator etc so basically you're the user interface takes whatever information the user is going to give and it returns back to the user information that's useful to the user that's the user interface the controller hardware then can be of a number forms it can be a computer a microcontroller it may involve communication circuitry interface circuitry it may also involve some amount of analog processing okay so the intelligence in the system is coded into the system it doesn't appear by it doesn't appear by random chance it needs to be intentionally put in intelligently assigned to the system and so for the arduino will have the arduino ide which is very similar to C or C++ we will also have you be working with assembly language for higher speed functions highest speed functions we would actually use something other than an Arduino we would probably use an FPGA they also give us higher level levels of speed and there we would use something like VHDL as our as our language of choice um there are quite a few manufacturers of embedded systems so here are just a few embedded system or microcontroller systems and so there this isn't this is something that's huge those of you who are familiar with the the y2k scare that happened just before year 2000 it was a great concern that when the when the clock rolled over from one from one millennia to another that that was going to throw off all kinds of computer systems it was going to shut down all the power turn off all the water all of our utilities it was going to do all this horrible stuff to us and right in the middle of winter and so there was this huge scare there were some people who were very concerned that that about this because of the micro D the probe the proliferation of microcontrollers there's so many different kinds of microcontrollers used in so many different places that most people are not even aware about and and some of those microcontrollers use time functions and so the concern was that the time functions would ARF when the calendar roll over and would all this stuff like your automobile and your you know your your microwave oven and all this stuff is going to shut down because the microcontroller wouldn't know what to do when it rolled over well it turned out that well you know we're going to use microcontrollers and very rarely do we actually need to know what the time is when we are using a microcontroller we don't really care what time it is and so it's not an issue okay so but that was a big scare that's because there are so many microcontrollers used in so many different areas so many different companies make them and they're they're used for different things and and but they're very ubiquitous they're everywhere why the Arduino why would we want to use the Arduino I mean there's so many other microcontrollers well there are some other options in fact another good one is the Raspberry Pi that's a an up-and-coming one there's also different versions of our green oh there's the uno which is very important there's the Douay which is more powerful and then there's the Arduino Yeun which is like really powerful it's almost like a it's like almost like a single board computer it'll run Linux and like so there are different Arduino zwei the Arduino that we're using well first of all here are some of the reasons improvement over other microcontrollers for Hobby usage so the key here is it's for hobby usage that is it's designed to be used by people who are artists not technical people okay and so it had to be simple simple and yet powerful so that's important to inexpensive really small cheap it's really nice it has an IDE on multiple platforms Mac PC Linux so everyone anyone with a personal computer can or a small computer their own computer can design software for this thing so remember the software is where the intelligence comes in so it's pretty important to be able to do that the programming environment is similar to C it's actually based on something called wiring which is based on C and so it's very straightforward very standard type of programming it's open source and extensible both software and hardware and there are Arduino shields it's these two things that really make the Arduino powerful okay so first of all software wise there are oodles and oodles of libraries that people have worked hard at designing so they've done the hard work so you don't have to and you're going to see use some of that you're going to use some some libraries and you have no idea the complexity of what's going on behind that library so it can be as simple as I mean it can be like communication we're going to use a communication library that allows you to communicate serially from the Arduino to the computer console so you can actually get a display readout we're going to use a a stepper motor library that allows you to control stepper motor stepper motors are pretty complicated there's a lot of sequencing involved associated with the control of a stepper motor but you you're not get it's going to be like invisible to you because it's just there someone has developed the library to do all of these functions functions that once we're very complicated to do and still have to do those things like micro stepping of a stepper motor so those some of those things are really complicated you don't have to worry about that you can just use it that's really that's really the power of this open-source extensible software and hardware so the open hardware we have what are called Arduino shields these are like additional circuits you can add on to your Arduino they just kind of like stack right onto your Arduino that allow additional capabilities of your system here are some example Arduino shields you can get a camera VGA camera a GPS system LCD you can get LCD or LED displays you can connect to the internet through Ethernet or Wi-Fi you can control motors as I said like a stepper motor or a DC motor or a servo motor you can have relays you can they sell a mobile robot that works with the Arduino okay accelerometers gyroscopes load cells all of these things can be used with the AR we have additional capabilities there mp3 players that go with an Arduino you know just so many things have been built so you saw for example the edge you shield that stacks on top of the Arduino it will be using has a number of function of capabilities LEDs push buttons infrared transmitter receiver and so forth all kinds of things are available here is a an example our Dino application this is just the connections but this is an Arduino webserver so we can connect to the internet through Ethernet so this is an Ethernet card there's their storage on here it actually will store the web pages and web data like pictures and such and then of course there's the processor the Arduino itself and so all of this together in the training package can be used to create a a webserver before this was this kind of thing was unheard of to have a webserver this small but here we have it here we have it you can create an Arduino webserver we can for example have a light dimmer we have say a bank of spotlights we want to control we want to control them based on the music so we we have over here the audio source that go through some some signal processing and high pass band pass and low pass filters and those each control are used by the Arduino to control these lights through relays ok so here's an example of uh you know above a lights being controlled like at a concert by a music responding to the music here is another interesting application called piano gloves and I'll let the ladies speak for themselves about this hi my name is daniel norman and my name is chelsea hancock and this is our version of piano blows and basically we used an Arduino des Emilia bare-bones a circuit board without basic red board it's basically a bunch of push buttons on two gloves and when you touch the thumbs two fingers or problems are positive power and then the fingers create a note when you touch it just like a crutch plan so it's just a bunch of push buttons basically and um the pennies on the on the gloves are normal note so that's so it's basic C scale but the dimes are flats but there's also other does that control the octave changes right here so this is the left hand and the left hand controls the lower whereas the right hand controls higher so that's basically our project yep so thanks for watching so this is an introduction to embedded systems we have shown you a number of aspects of the entire system this is just kind of a big picture when we come back next time we're going to start getting into the nitty-gritty details and when we get into the nitty-gritty details we're actually going to get into them and at three different levels we're going to start off at the very high level that's the level that the hobbyist sees that is you don't have to be extremely technical to be able to do that there there is some technical stuff that you still have to learn but it's at the level that a hobbyist can learn okay then we're going to get down a little lower in complexity rather higher in complexity we're going to look down and we're going to actually look at the internal structure of the Arduino and and be able to take advantage of some of the features of the Arduino that that the IDE cannot handle the IDE the Arduino IDE is limited it does it can't access all the capabilities of the Arduino itself so we want to be able to get down a little under the surface and be able to access some of those additional features then we're going to go even deeper into the system using assembly language we're going to get down there in the assembly language which is the lowest level and we're going to see how to access things and and we're going to use the the capability of assembly language in order to handle things that are more speed critical critical so that's the kind of thing we're going to be looking at so up so those are the three levels we're going to be looking at and that then it all of this then is the overview or the introduction to this class into embedded systems thanks for watching
Info
Channel: Robert Paz
Views: 355,653
Rating: undefined out of 5
Keywords: Arduino (Computing Platform), Embedded System (Field Of Study), Arduino (Brand)
Id: 9Q-3c0gQcok
Channel Id: undefined
Length: 38min 47sec (2327 seconds)
Published: Mon Mar 10 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.