 So, this experiment you are going to do next is about analog to digital converter and along the way you will also learn about something called 555 timer. So, we will see what that is. So, let us start with are you all familiar with binary numbers? Yes or no, binary numbers you are all familiar? Yes. Let us just do a quick example to begin with. So, there are various number systems the number system that we normally use is called the decimal system or what is the other name for the decimal system? What is the other name for the decimal system that we use? Anybody what is the name for another name for the decimal system that we use? Base 10 correct. So, base 10 what does it mean? In base 10s number like this 567 this means 7 times 10 raise to 0, 56 times 10 raise to 1, 5 times 10 raise to 2 that is how it is base 10 and that is the decimal. So, similarly in binary number system the base is 2 not 10. So, therefore, a number like this and see this in the decimal system that digits will go only from 0 to 9 there is nothing after 9. Similarly, in the binary system the digits will go from 0 to 1. So, there is only 2 digits 0 and 1 that is why that is because it is base 2. So, a number like this will be 1 times 10 raise to 2 raise to 0, 0 times 2 raise to 1, 1 times 2 raise to 2 etcetera. So, this number if you do all these additions it turns out to be 45 in the in our normal decimal or base 10 system. Are you all familiar with this? This is probably a repetition for you. So, what we say is this number 1 0 1 1 0 1 in base 2 is the same as 45 in our base 10 or the decimal system. If you want n bits how many numbers can you make up? You can make up 2 raise to n numbers because each bit can take either 1 or 0. So, therefore, 2 raise to n numbers. So, if you have 3 bits if you have 3 bits to represent your numbers you can make up 8 numbers and so on. Is that clear? I think that is a strange ok fine. All right. So, now the question is why do we in a bother about binary numbers or why do we bother about converting from what is analog analog means real numbers like 1.23 volts. What is digital? Digital is a binary representation of that particular number or voltage. So, first of all why bother with digital numbers? So, that allowed easy to manipulate easy to add ok that is one right. It is well defined I am not so sure whether this is it is well defined. So, is 1.257 it is well defined also. It is not subject to noise that makes some sense. So, we will come back to this point. So, it is not subject to noise as much as an analog signal is. So, that is actually a valid answer what else anybody else easy to? Easy to store of course, extremely easy to store and that is why we have this the whole computer revolution is based on digital chips right. So, now we have a storage of gigabytes and so on and when the first calculators and computers came the storage was of the order of kilobytes. So, now of course, we have gone like 6 orders of magnitude in that. So, very easy to store what else anybody else any other advantage anyone why only answers are coming from this first 2 rows. Anybody else no one has any opinions what else you exhausted all possibilities ok. So, we will see these are the main things there are some other advantages let us look at those all right. So, I have a slide here called why digital right. So, as I said it is very easy to design things ok. We want to add multiply do some more processing it is very easy to do design with digital. You are not doing that in this course, but it turns out to be extremely easy to do this as compared to analog. Easy to store because you have to just store 0 or 1 and that turns out to be very easy to do. One big advantage of making things digital is that things can be programmed right. Suppose you with analog in the analog domain you do a particular operation like for example, filter you are done last time a filter right. So, if you have an RC filter and you want to change its cutoff frequency what will you do? You will change the resistor of our capacitor right. So, you will have to actually pull out one component put another component that is not always possible in the digital domain if you implement a filter with in the digital domain all you need to do is to reprogram it in some way. And then you can use that as a with a different cutoff frequency. This less vulnerable to noise this point was actually brought up by you also. It is much less vulnerable to noise and we will see why that is in the next page. And another very big advantage with digital circuits is that you can integrate a large number of functions on a single chip. For example, your mobile chip has got a huge number of functionality inside and most of those things are digital. Of course, there are some front end which is analog and so on, but a lot of processing actually is digital in that. So, in all these are advantages and that is why we need to convert we would like to convert an analog quantity into a digital quantity alright. So, we said that digital signal is less vulnerable to noise what will we mean by that? Here is an example. So, here you see can you see that the red signal there? There is a red signal ok or let me just redraw this. So, there is a signal like this that is the one which is which you are trying to transmit. How do you transmit a signal? How do you transmit? You might just connect it from one room to another or you might transmit through an antenna so on. So, there are so many ways of one transmitting, but in that process invariably there will be some interference from other sources or there will be just plain noise and the signal gets distorted ok. Now, is it possible to remove this noise to some extent it is possible because you can pass it through a filter and you can actually, but so not all of this distortion actually can be eliminated. So, therefore, there is there is definitely a degradation in the signal. The longer the distance weaker your signal will get and there is something called SNR. Have you heard of this term? There is something called the signal to noise ratio ok. So, if you transmit over longer distances or through longer wires this signal to noise ratio of a signal will degrade. Of course, you are suppose it is an audio signal your audio quality will finally get affected. So, therefore, you do not want that to happen. So, definitely and analog transmission will have its limitation in the sense you do not want to transmit for too long a distance because you the quality the loss of quality is not acceptable to you. The digital domain also there is a distortion. So, for example, this red one is your original signal. So, this is like your 0 this is like your 1 only 2 levels you do not need to distinguish between distinguish any further apart from 0 to 0 and 1. As you transmit this what will happen this signal might actually get distorted and might get something like this might become something like this right. Is it making sense? Pick up some electromagnetic interference or whatever noise right. Now, what I can do is I can this is so this is my this is a signal I received. What I can do is I can feed this signal to a an element called the comparator ok and I can feed this some reference let us say this is 5 volts and this is 0 volts and this is 2.5 volts ok. I can feed this 2.5 volts here to the comparator I can feed this incoming signal to the plus terminal. So, what the output the output would be a plus 5 if this V plus this voltage here is greater than 2.5 volts and it will be 0 volts if this V plus this voltage is less than this 2.5 volts. So, what we are doing basically is by making it pass through comparator we are going to restore the original signal is that clear. So, then all this noise actually then does not matter what it was right all that matters is whether it this signal was above this line or below this line and therefore, I can actually reconstruct this original signal. So, if you have a fiber optic connection from Bombay to Delhi or whatever long distance you will have these things called the repeaters ok. So, every so many kilometers there will be a repeater and that repeater will basically restore the quality of the signal and with the digital signal you can actually restore it perfectly ok because all you care is whether it is a 0 or 1 and then that is why there is a big advantage of transmission of digital signals as compared to analog. Is that clear to you? If you are ok the question is if I am using some kind of modulation then the noise can affect your signal, but still what you are transmitting is still digital data ok. So, what you are transmitting is still 0s and 1s ok. What you do at the receiving end or at the transmitting end in terms of coding modulation etcetera that all that is independent what is going on your fiber optic line is basically just 0s and 1s ok. So, whatever we said about this also applies to that. If the noise is so large that these boundaries get displaced too much then of course we have a problem, but that is much less likely to happen with a digital signal as compared to the equivalent distortion in the analog domain ok. So, that is why digital is still a big advantage in that alright. What are the other reasons to use digital transmission? We have all seen things like this. You have this right in your watch or in your mobile and so on right. These things are called 7 segment displays. Why is it called 7 segment display? If you count this number of segments they are 7 ok. So, what it is actually each segment. So, there is a segment here there is a segment here and so on each segment is actually a diode ok. And if you pass current through the through this diode lights up if you do not pass current then it remains dark ok. That is why it is called a 7 segment display. So, again this is driven by a digital signal. So, if you have an analog voltage say 1.357 volts and you want to display it on a meter like this right. You need to convert all those all that analog value into 1s and 0s which can drive this kind of display ok. Finally, this is this is being driven by 1s and 0s right. If the signal is 0 then the LED does not light if the signal is 1 the LED lights. So, therefore, your analog voltage like 1.3574 volts must be converted into some 001 pattern etcetera right. And this pattern is fed into fed to this 7 segment displays. So, that you can actually see this nice display at the output ok. It is not quite as simple because there are 3 of them. So, therefore, you need some more interface and so on, but essentially that is the idea you take an analog value and convert it into 0s and 1s that is the analog. This is the A2D conversion that we want to study in this experiment. What is another application where you know digital domain is extremely useful is an example here. For example, if you are you are you are trying to control something ok it may you might have an industrial plant or chemical plant or some factory or whatever. So, you have a process and you these are your inputs x1 x2 etcetera. These inputs could be temperature of the of some furnace it could be output flow rate of some reactant. And these are the out the controller outputs ok. So, these are things that will go back to your these you can use to adjust some flow rate somewhere it is some input flow rate etcetera. So, that the overall rate is overall reaction is controlled ok. Now, first of all there are 2 advantages one it is easy to implement this control algorithms using the digital signal processing chips which are now available for the past like 20 years. Very very easy to program this digital DSP chips. Second suppose you are not happy with the algorithms suppose you have some numbers in your control algorithm and you have to change that number ok. Like you see in your RC filter you have to actually pull out one resistor put another pull out a C put another etcetera. In the digital signal processing chip you do not need to do all that you just need to reprogram that chip. So, that your filter coefficients are now different than whatever ok. So, it is extremely easy to reprogram things if you want to change the algorithm. So, that is another big advantage of using digital outputs digital numbers ok. Let us come a let us now talk about this A to D conversion process A means analog D means digital. Now, if you take an ADC it will have one number which is called the range of the ADC. The range could be from 0 volts to 10 volts it could be from minus 5 volts to plus 5 volts etcetera. Depending on the chip they will have different ranges. For example, if your measurement range is like 0 to 10 volts that is the range of your A to D and the ADC resolution is 12 bits. So, here is an example. So, this is your analog voltage is going from 0 volts to 10 volts and your ADC resolution that means your output starts from 0 0 0 0 all 12 0s to all 12 1s ok. So, that is your lowest value of the digital that is the lowest digital number you get binary number you get and that is the highest binary number that you get is that clear ok. So, what is the resolution? The resolution is if there is a change only in the lowest significant bit of this number. So, this bit is called the lowest significant bit or the LSB or the least significant bit. This bit here is called the most significant bit. What is the weightage of this LSB? Always 2 raise to 0. What is the weightage of this MSB? 2 raise to 11 here ok. Since we have a 12 bit since there is 12 bits in all this the weighting factor of this MSB is 2 raise to 11 ok. So, that explains just the resolution part. So, if there are 2 raise to 12 numbers which are represented by this number by this binary output. How many levels do we have? 2 raise to 12 equal to 4096 ok. So, we have 4096 the so called quantization levels. Why quantization? Because it is not it is discrete now it is not smooth it is not continuous. So, therefore, it is called quantization levels right. What is each level? What does that correspond to? That corresponds to simply 10 volts minus 0 volts that is the range of your A to D divided by the number of levels ok. So, 10 volts minus 0 volts divided by 4096. Is this calculation clear to everyone? If it is a 4 bit ADC what will be the resolution? It will be 10 volts divided by 2 raise to 4 ok which is 16 alright. So, 12 bit is a very good high resolution. So, 10 volts minus 0 volts by 4096 which is 2.44 millivolts. So, the first number corresponds to 0 volts the second number just one change here corresponds to 2.44 millivolts and so on. So, each one the next one will correspond to 2.44 millivolts added 2.44 millivolts added and so on and the final number will correspond to about 10 volts. Some ADCs also allow negative voltages for example, you might have minus 10 volts to plus 10 volts ok. Any questions so far? Is all on everything understood? Alright they are not yet come to how to do this and we will just briefly describe as to you know how this is done. But before we do that let us let us talk about know this business of digital transmission. You are not going to do this in your lab, but this is something that is useful to know right. This is interesting to know. How do you have an analog signal like this as a function of time? How do you convert it? How do you sort of transmit it digitally? There are several ways of doing that, but the simplest most basic way is like this ok. So, you sample this analog signal at a particular point t1 then you sample at t2 and so on. So, you sample it at uniform intervals at t1, t2, t3 and so on. Now, this sample value here right this is the sample value. You convert that using an ADC into a digital number or a binary number right. So, what does that mean? Suppose you have an 8 bit 8 bit ADC. So, that means this value is converted into 8 bits whatever 0s 1s. The next sample will be converted into another 8 bits etcetera ok. So, what is the total number of bits you have to transmit per second? That will depend on how fast you are sampling right. So, the sampling frequency suppose this interval is ok suppose this interval is ts s for sampling then the frequency is the sampling frequency fs which is equal to 1 over ts ok. If for example, your ts is 1 millisecond your fs will be 1 kilo hertz ok. So, now you are doing this and you are at each time you are sending 8 bits ok. So, if my sampling rate is 1 kilo samples or 1 kilo hertz. What would be how many bits would I transmit per second? 8 kilo hertz 8 kilo bits per second is that understood? So, each sample we have to basically we are sending 8 numbers not numbers bits right this is just 0 or 1. So, that is the meaning of that is the bandwidth. Now, this your actual bandwidth that you need for for example, a phone application would be much much larger than this 8 kilo hertz why ok. Let us not talk about human voice let us say our signal is just this and we are sampling at 1 kilo hertz. Even then we will require a much larger bandwidth it is that is right. Now, multiple bits is just one thing ok what else? Multiple bits is one thing, but thousands of user is another problem right. We are you are not you are not the only one in the world who is talking to some other person in the world right. There are some thousands people talking to some thousand other at the same time all of this has to go together ok. So, therefore, this number and of course, there is a lot of other complications like you need to modulate you need to encode you need to etcetera. So, all that makes things very complicated and that is why the bandwidth of your mobile phone is something like gigabits per second ok. All right. So, that is the just a general background about transmission, but let us look at mp3 you all use mp3. How many songs do you have on your telephone? How many songs do you have on your telephone? 5 songs 500. 500 ok. I am so shocked that I want to ask any more questions ok. So, you all know mp3 and how can you store so many songs in one single telephone? Even given that your memory is you know quite huge now huge and that is because it is not they do very sophisticated signal processing to reduce your storage requirement ok. So, the sampling rate for music if you are playing mp3 is something like 44 kilohertz ok. What is the human range of frequencies? Maximum. 20 kilohertz. 20 kilohertz is very rare even even Lata Mangeshkar will not actually reach 20 hertz something like 15 maybe. So, about maybe 15 or something the maximum 20 kilohertz is like the absolute maximum ok. So, this sampling rate is not much higher than the highest frequency in your in your speech signal. So, just 44 kilohertz ok. 44 kilohertz and just see the number of bits transmitted per second is 128 only ok. 128 kilo kilo bits per second it corresponds to just 3 bits per sample ok. And 3 bits now if you are just doing this old way I mean this simplistic way you will never get a very good quality without. So, what they do is actually this is they do some very sophisticated compression of the signal and then therefore, they can actually they can manage to send a store much less information and actually get out the same quality and that of course is the whole realm of digital signal processing and speech processing and so on. You heard of GSM? If you use a mobile phone you will know this. There is a sampling rate now this is just speech ok this is music. So, therefore here with the speech the sampling rate can be much smaller because you do not really care that much for quality. All you need to care all you need to know is with what that person is talking whether he is talking sense or nonsense or what is what words and so on ok. So, the sampling rate is much lower than the music signal music signal is much more sophisticated you want to make out the flute from the tabla and what not. So, here the sampling rate is just 8 kilohertz and here again see the compression achieved see this. So, you are just sending 13 kilo bits per second it is hardly it is almost the same as this 8 kilohertz right. So, there is not really much difference again this is made possible because you are sending some characteristics of your signal and not the signal itself and that is again a huge domain by itself ok. So, all these things are not included in your experiment, but you should know these numbers. So, let us come to you know how this A to D conversion is done. We will just take two cases the first one is called a flash ADC and this is not the ADC that you are going to use in your lab, but it is good to know this is a very simple one conceptually to understand. So, what do we have here we have a voltage source let us say fire let us say 10 volts and we have a network of resistors ok and if you have 16 resistors this voltage is simply V 0 by 16. The next voltage will be 2 by 16 times V 0 the next one will be 3 by 16 times V 0 and so on right. The last one will be 14 by 16 and then 15 by 16 and so on. Is this understood this is a simple voltage difference you are all doing E 1 0 1 yes. Anyway this is something you have done earlier just a bunch of resistors in series and therefore the each therefore each of this voltage drops it is simply V 0 by the number of resistors and that number of resistors if it is 16 we have V 0 by 16 here then other V 0 by 16 and so on and that is why these voltages here are no marked as they are ok. Now what you do is this is your input voltage signal ok. So, you feed that to a comparator there are so many comparators if there are so many resistors as many resistors as as many comparators as there are resistors each comparator gets a reference voltage from this node like this that is different, but it gets the same input voltage ok. So, this input voltage is going here is going here is going here and so on ok. So, what happens now if your input voltage is smaller than this quantity this becomes a 0 if it is larger than this quantity this becomes a 1 is that basic idea clear all it is doing is this is a simple comparator it puts out a 1 if the V plus is larger than V minus if put out puts out a 0 if V plus is smaller than V minus that is all it does that is why it is called a comparator it compares and. So, therefore, of these comparators you will have some which are 1's and the rest which are 0 is that easy to visualize ok let us say your voltage is somewhere here then these comparators will have 1 as the output or sorry 0 and these will have 1's. So, there will be some 0's and the rest 1's then you have a logic which will convert this into the digital output that you want ok. So, that is a simple ADC it is called flash ADC because it does things in a flash it is very quick as opposed to some other forms of ADC what is the disadvantage of this the obvious disadvantage of this. If you have 12 bits you will need 2 raise to 12 comparators ok which you may not even be able to fit in one single chip that is the problem. But if you want 8 bit resolution there is a practical it is a it is a practical alternative it is very fast because all of these things are getting compared at the same time and therefore, it is fast the ADC that you are going to use in this lab is actually of a different type and not this flash ADC flash ADC is of course, are expensive what you are going to use in the lab is called a successive approximation ADC ok successive approximation analog to digital converter alright. So, this is a little block diagram for that ADC. So, what it does is there is actually a DAC inside what is it what is the DAC just the opposite of an ADC. So, it takes in or this is a binary number and it gives you an analog value as an output ok. So, this is the binary number input and this is your analog output say V ok. Now, what you do is so this works on the basis of a clock ok. Now, you apply the first clock pulse let us let us take an example is best done by an example. So, let us say you have a 4 bit DAC here that means your ADC is also 4 bit. Suppose you have 4 bit DAC what is your lowest value is 0 0 0 0 the next one 0 0 0 1 0 0 1 0 all the way up to 1 1 1 1 ok. Now, let us say on this scale your analog voltage happens to be somewhere here the dotted line ok. The first pulse what the what this processor will do is it will set this bit the MSB to 1 and all the others to 0 ok is that clear. So, what happens as a result the voltage so this 1 0 0 0 is now fade to this DAC that will produce a voltage that corresponds to this level and that voltage and this voltage are compared ok. So, now it turns out that V in is still higher than this voltage. So, what we do next is we keep this one, but now we make the next bit also one. So, from here from this level this is our trial number 1. In the next clock pulse we make this 1 1 0 0 is that clear ok this is a rather silly example because there are only 4 bits in actual practice there will be 8 or 12 out here ok. So, the next bit is made 1 now what has happened as a result this analog voltage has now become larger than V in ok. So, therefore, what we do is we know that now this should not be 1. So, this should be 0. So, we make this 0 and make this 1 ok at some point we will hover around the actual analog voltage ok. You have heard the story of the 2 cats fighting with each other and a monkey judging the event have you heard this story who has not heard this story I am sure even if you have heard it you will say you have not heard it. Anyway so, there are these 2 cats and they are fighting over a piece of Koya you know what Koya is or whatever some food item. So, now this very clever monkey comes ok. So, it says it is so that monkey wants to give this 2 pieces equally to the 2 cats right. So, what it says it make it makes little one piece a little bigger than the other and it puts in a balance right of course, one of them goes down then it just takes a part of that and eats it and then so that this one goes down. So, it takes a little part of this and eats it and so on ok. So, finally, all of that is gone into the monkeys tummy right. So, this is similar in a way do you see the similarity or you do not kind of similar ok. Any questions about this I mean not about the monkeys and the cat, but about this. So, that is correct. So, what he is saying is the voltage will always be between 2 levels. So, then you take the lower one as the output that is. So, you always in this A to D conversion there is always this business of uncertainty of half LSB is called half LSB half of the least significant bit that much that much error will always be there that is called the quantization error that is the whole process of digitization. Obviously, you are chopping things off and you do not know where exactly you are. So, there is that necessary error there alright. So, that is the that is what you will be using in the lab. Now, this is. So, another question is how do you generate this clock. So, for this purpose there is a circuit given to you and that is called that is made using a so called 555 timer ok. So, there is a integrated circuit or a chip available called 555 timer and it has got an input called threshold, it has got an input called discharge, it has got an input called trigger and you are given the circuit diagram in your handout I will just show you the handout and if you do this now it is too complicated now in this class to explain how this works, but so we will just take the result and for us the purpose of this whole thing is just to feed this clock to your successive approximation ADC that is all right. So, you adjust this you are given some values of RA and RB and C and then you can. So, then this circuit is guaranteed to oscillate if you can make the connections correct and suppose you will get a square wave as an output which the period equal to 0.7 times RA plus 2 RB where RA RB are these resistors times C, R C is the time constant RA plus 2 RB times C and the frequency is just 1 over T. So, now you are given this some values 1 k 10 k and 0.01 micro farance once you calculate all that the frequency for the circuit that you are given turns out to be something like 6 kilowatts anyway. So, you are given the values just do that little exercise and calculate that yourself. So, this is simply to feed your ADC that is the only purpose it will serve and the purpose of this experiment is not really to investigate the behavior of this in detail, but what you will do is to begin with you will look up the circuit you will make sure that you are getting some pulses getting the desired frequency as an output then you will use this in the next part of the experiment as a clock to this ADC. So, the ADC actually is this whole thing is the ADC all these things that I mentioned the DAC the counter the DAC the comparator the processor they are all inside the ADC chip. So, the clock is one of the inputs of this chip any questions about this part there is not that much to ask because we are not really covered any details of this. So, now let us look at the little practical details of what you are going to do in the experiment. So, let me actually show are you are familiar with the breadboard or you want me to go over it again breadboard again or you are familiar everybody knows. Anyway I got this breadboard again with these components actually connected thanks to the TS. So, we will just see what it looks like and you can make something similar it should work. So, there is a chip here you can see the small chip the small IC there is a 555 timer you see the big chip it is the ADC why is it much bigger than the small the 555 why is the ADC have so many pins it needs definitely 8 pins as outputs it is an 8 bit ADC. So, at least 8 pins it requires and then there are other pins. So, therefore, it is definitely necessarily bigger than your 555. So, let us now look at this pin diagram of the 555. So, this is the first time you may be using this IC. So, let us look at this in some detail. So, if you take any IC it will look like this. So, there are 4 pins here and there are similarly 4 pins on the other side. So, this is looking at it from the top there is a notch. Now, if you are looking at it from the top then this pin is called pin number 1 2 3 4 5 6 7 and 8 this goes with all ICs whether it is 8 pin IC or it is a 16 pin IC whatever. So, 1 2 3 4 5 6 7 8. Now, in this particular case. So, we normally we will draw this like that the top view 1 2 3 4. So, let me just so this is the ground terminal all of these ICs do not work if you do not connect the supply to it. So, you have to you have to connect supply means both ground and a supply voltage. So, there is this ground terminal. There is this terminal called trigger there is this number 3 is the output number 4 is reset which you need not connect number 8 is VCC. VCC is the power supply which is 5 volts. So, in the lab you have this power you have this applied power supply and it has got this terminals here. So, you can adjust this voltage to be 5.0 and connect this to this pin connect this ground to this pin that is how you will do it. So, these are these wires I will come back to this wiring then pin number 7 is called discharge pin number 6 is called threshold pin number 5. So, the connections for this particular or I do not know whether you can see that. So, the discharge is too light still a little light, but anyway you will this will be uploaded on here on the PCs that you are going to use. So, you can see the connections in more detail. But the basic idea is you are going to connect. So, basic idea is you are going to make these connections with this chip and remember to connect the ground and the power supply otherwise things will not work. So, how do you connect this chip? There is a breadboard and you know that this these things are connected these things are connected and these two rows are not connected. So, normally you will just place the chip right here and this is your notch. So, this is your pin number 1 this is your pin number 2 3 4 etcetera. So, you will always place any IC in this slot here. So, otherwise if you put it anywhere else you are basically shorting terminals. So, do not do that you have to place it in this slot two sides of that particular slot. So, each pin remains a separate entity. Then it is a very good practice to designate one of you know that this is one row right there are actually there is one connection here all this is one then this all this is another contact and this is a third one this is a fourth one. So, it is a good idea to keep one of these as the power supply or 5 volts. So, designate this as a 5 volt line designate on the other side you take one of these columns as the 0 volts or the ground. So, this will go to your applied power supply 0 volts this will go to your applied power supply 5 volts. So, that means this all of these points are now available to me as 5 volts or 0 volts is that clear to you? You do not need to take wires from each one of these and connected to your power supply that is not a way to do that. So, just connect one wire from this red board to your applied power supply and then this whole thing becomes 5 volts and you it is all this 5 volt sockets are now available for you to make connections. So, that is a very good practice you must always follow. The other things are actually fairly straight forward you already seen a capacitor before you have seen a resistor before. So, the chip is the only new thing that you are going to use alright. So, the first part you just make this 5.5 timer work and you look at the output voltage of this and make sure that you get a square wave with frequency of whatever that turns out to be it comes turns out to be some 0.6 kilowatts or 6 kilowatts something like that. Next part is now we are going to use this DAC. So, ADC. So, let us look at this ADC there is some documentation on the ADC as well and it looks rather forbidding there are lots of pins, but the pins which are important to us are this DB1, DB2, DB3, DB4 etcetera. So, DB sorry it starts with DB0 pin number 18 is called DB0 I do not know whether you can see that. Now, you can see it better again this will also be uploaded on your PC. So, you can see this DB0, DB1, DB2 etcetera all the way up to DB7 these are the digital outputs that you are looking for DB0 is the least significant bit or the LSB DB7 is the most significant bit or the MSB it is written also over there. And then there are lots of pins many of them actually you are not going to use, but the important pin that you need to know is VIN plus and VIN minus. So, your analog input is actually the voltage between this VIN plus and VIN minus and in our case I think we are going to put VIN minus as 0. So, your analog voltage will go directly into VIN plus. A ground and D ground they are two grounds analog ground and digital ground and they should be both connected together and connected to ground ground of your power supply. Then there is something called V ref by 2. So, if you want a reference voltage of 5 volts this V ref by 2 should be 2.5 volts just V ref by 2 divided by 2. So, that is that then there are these other things called chip select bar and read bar and write bar and so on. So, we will for your purpose we will tell you what where to connect these. So, do not worry about those. Then there is something called clock in can you see that CLK in pin number 4 that is called clock in. Now, that clock is required precisely because it is a successive approximation ADC which requires is called clock pulses. So, it will require it will do each one of these comparisons in one clock pulse. So, therefore it needs a train of pulses and then if it is an 8 bit ADC after 8 pulses your output is ready. So, in our case what we are going to do is we are going to connect your 555 timer output to this clock in and before you know it your output will be ready and then it will remain constant because you are going to apply a DC voltage here. You are going to apply a DC voltage as an input. So, therefore, in 8 pulses which is a very short time because the frequency is in the kilowatts range. So, you would not even notice it. In 4 to 8 pulses your output will be ready and how will you test the output now? You can actually take a multimeter and check db0, db1, db2 and so on. See if it is 0 volts or 5 volts or low or high that is one way of doing it. We are not going to do it that way we are going to put some light emitting diodes. And since there are lot of connections we will only test the higher 4 bits. So, what we are going to do is we are going to put their light emitting diodes. They are going to use this light emitting diodes to indicate whether that particular bit is 0 or 1. So, the way this works is like this. So, there is this db0, db7, where is that figure now? There is this db0, then db1 and db2 etc. So, we are going to look at only the last the 4 MSBs. That means these, only these 4. So, and then the way we are going to do it is we are going to connect LED here. This red thing that you are seeing is a light emitting diode and then we are going to put that in a series with a resistor and we are going to connect this to 5 volts. So, when is this LED going to light? If this is high that is if this is 5 volts, the LED is not going to draw any current because this is 5 volts that is 5 volts no current. If this is 0 volts, if this pin is low then there is a current which current will flow through the LED and this LED will light. So, remember this LED is the way we are connecting it, the LED will light if that particular output pin is 0 not 1. Just remember keep that in mind so that you do not get confused while interpreting your results. Any questions? The db pin is high if that bit is 1 low if 0 good question. So, let me repeat the question so that everybody understands. The question is you have all these pins let us take one pin let us say db 7. Now, what I am suggesting is you connect it like this. So, that the LED conducts when this pin goes low. So, what he is suggesting here is why do not we just connect like this db 7. So, if this becomes high this this light will the LED will actually light. Which one is more which one is more friendly? The first one is more friendly or the second one is more friendly in terms of reading which one is more friendly? You would like to see light if something is 1 I mean just intuitively at least I would. So, the second one actually is a little more friendly to read because if there is light coming out you can say it is 1. This is not done because the current that you can draw like this is limited it has to do with the with what is inside the chip. If the current is limited the LED will not glow brightly enough. In this case the current that it can this is called syncing of current this is called sourcing of current. So, the current that can be sunk by this chip is much larger than the current that can be sourced. So, in all TTL transistor logics chips you will find this kind of arrangement. I am not sure you need to look at this data sheet it is actually there in your computer. When you go to the lab you will see this document also there. So, I think that is briefly the experiment but let me. So, these are the LEDs and you can see an LED and a resistor going to this 5 volt line another LED another resistor going to that 5 volt line. If you have time you should actually connect 8 LEDs and 8 resistors. So, that you can see all of them but if you do not have time just connect the upper 4 that means dp7, dp6, dp5 and dp4 takes all these connections takes take time. So, we will be happy if you just connect 4 of them and look at this. And then you need to you are changing the input voltage from 2.5 volts 1 volt whatever values are given. And you are going to look at the pattern here and see whether it is correct or not. You can actually knowing the resolution of the ADC knowing the supply voltage you can actually figure out whether the pattern is expected or not expected. All right. So, one more detail that I missed out and that is not much better. There is something called the start of conversion. It is a little tricky start of conversion. So, there is a pin let me see if I can see this number here. Now, this print out actually is not very good. So, there is one pin which has to be connected to a switch. So, there is one pin which is called the start of conversion. So, when you want to actually when you change your input voltage remember to push this switch only then the conversion will actually take place. Even if you have the clock connected the chip will start functioning only after you press this start of conversion button and this button will look like this. Can you see this little thing here? This one. Little square with a button on it that is a switch and that you need to press when you change your input voltage so that your ADC functions. So, I think that is basically your experiment. You have any questions? Anyone? Why do you connect a plus voltage and a minus voltage? V in plus and V in minus. The reason for that is sometimes your input to an ADC may come from let us say a differential amplifier which has got an output which is like floating. It is not with respect to ground, but it is floating. So, then but why add to a hardware? This will do it. Why add to a hardware? So, this already is designed for that. So, you do not want to increase the cost. Any other questions? So, we will see you in the lab.