So, in previous lecture we have seen installation of CCS, then we have written some simple program about the LED blinking and how to build that program, how to debug it into the micro controller. So, in today's lecture we will see some important parts of programming which are important for us I will make a termings applications particularly like interrupt service routine, then PWM and quadrature encoder interfacing that QEI. So, this we will look at these modules and we will debug that program into the micro controller and I am having a DC motor with me. So, you can see, so this is a DC motor with encoder, this is the encoder. You might have seen this motor image in lectures also. So, this is motor with encoder and this is connected to this A298 motor driver, which is an inverted double-edged bridge, like full-edged bridge circuit and this is connected to the TVA micro controller. So, we will write this program and build it into this micro controller and we will run the motor and we can read the actual values of inputs like position and direction and speed of the motor. So, yes, we will start now from, we will start from, so we will first of all this, we will start this program to the studio and I have already written quotes for this ISR 59, PWA and QEI, all these things because it is, it will take too much time to write the program again. So, and we are going to share these programs with you also. So, you can, you can see that program also. So, just we will like overlook about this programming. So, this is a previous workspace which we have created, I think. So, we will launch this one only. So, here it is starting, just you are having this workshop PDF video. So, in that PDF, the lab number six, I think, lab number four is about interrupts and timers, you can see. So, you can look at this, this is also giving the interrupt service routine program. So, what is interrupt and how it is, how it works. So, already you learned that in the lectures about the interrupt and what is ISR and what is the significance of that. So, you have already learned that. So, just for now, we will look at how to program it in CCS. So, yes, so this is the lab four, you can go through this lab also. So, you can get some idea about this interrupts. So, this is where this program is for linking and leading with some delay. So, you can try this program and run that program also. But for now, we will look at our program. So, yes, so you have seen, yes, so this is to, this is our project explorer and here. Okay, so, we will write the program for, or we will look at the program for LED linking using ISR or interrupt service routine. So, we will create new project. So, new project, do the studio CCS project.  So, I will just name as ISR for on board ELES. So, interpolate with main.c and finish. Yes, so, I have copied that program and I am going to paste it here. So, for now just I will take this program is basically, it is including some like PWM also and QVI also. So, we will first of all, we will delete that because we are, particularly we are going to look at ISR only for now. And then we will go to the QVI and this PWM also. So, PWM also we will delete. We are not doing this PWM at all. Okay, so, this is also not needed. Okay, yes. Now, we are going to use interrupt service. This should be included. And this should also be included. Yes. So, this is our program like these are header files. Then some of the functions like we are not going to use this PWM or timer and sorry, timer is going to use. So, QVI and this PWM function in this program we are not going to use. So, it is not needed. Or you can keep. It will behave as a redundant program. So, yes, these are functions for like this timer and it is for timer initialization and ALDG LED is for ALDG linking program. Like you can see here on this function you can get directly what is written in that function. Also for here also. Yeah. So, we will going to look at read. So, PWM frequency is also not needed. And yes. So, this is main function. So, here we have already seen that here we have like uses this system division of 5 and this PLL of 16 megahertz. So, our frequency is 40 megahertz now. Then this is for like enabling the PWM model GPIOT. But however you are not going to use that. So, it doesn't matter. Also, this GPIO C is for QVI model. Same. And this GPIO EF like 40F is for onboard LED's. So, we are for now only going to use this GPIO EF because we are only targeting our onboard LED's and ISR through this. So, we are GPIO pin type GPIO output. So, we have made this pins 1, 2, 3 as output pins. And now we have we are calling these functions now in main function only. So, PWM frequency not required. So, timer unit. So, what after this like enabling this peripherals like 40F. What will it do? It will like run this function timer unit and what is timer unit function. So, timer unit is initializing the timer. So, for any interrupt or interrupt service routine. We need to define one timer for that particular interrupt service routine. So, here in T1 we are having number of timers like timer 0, timer 1 and like timer A, 0, timer A1, timer B, 0, timer B1. Like that type of timers we are having. So, we can have number of interrupt service routines for that purpose. And we can use different timers for different applications. So, for now this timer initialization function is for ISR routine that we are going to use. So, it is enabling the peripherals enabled. So, this is a peripherals enabled. So, which is going to enable this timer 0, because we are going to use timer 0. That's right. Then this is a configuration of the timers. So, it is like there are many functions like timer CFG Peraldy or some different configuration will be there. So, we are using this Peraldy as a Peraldy. So, all these functions like system control peripheral enable or timer configuration or timer load set, int enable. All these of this type of function you will get here in this pdf like T1 functions pdf which we have already shared with you. So, in that you will get this all these functions. So, for example just for now I will tell you about this timers like so yes this 29 chapter is for timer and this API functions. You can see there are number of functions are there like timer ADC event gate timer ADC event set like that. So, for now we have used this timer configure. So, in timer configure we have done this whatever timer you are we are going to use. We have to provide its base address which is timer 0 address. You can see here also that is timer configured and the first input to this function it should be or first argument is the base address of the particular timer that we are using. And then how to configure it. So, it will like after clicking on this function also you will get more about you will get to know more about this function. So, for example this is now timer configure function and here it is giving the what is the parameters actually. So, this is the base is the base address of the timer module and it is the configuration of the timer. So, description is also there like for example what type of in which different ways we can configure the timer. So, that a timer can be configured to be as like a full-width timer a timer CFG or half-width timer A timer B like that. So, the number of different ways to configure the timer. So, of this among this we are using this timer CFG periodic. So, I am going to tell you this because whenever you are going to write the program you should go to this particular PDF. And you will get to know what is this the we can see the function of each this API function like what is what this API function is doing. So, anything like for example for now we will see that what the system control peripheral enabled means. So, system control peripheral enabled means what. So, here I think it should be the system control yes and API functions. So, yes you can get here system control clock set which is the basic or first line we can say where we are going to set our clock frequency. So, here after picking on that you can get. So, this is the which is required configuration of the device clocking. So, you can see here there is the division 1 division 2 division 3 like that up to 64 also the use of PLL either we will use PLL or we can use as oscillator. So, that and external crystal frequencies can be chosen in this way. So, you can see there are like number of ways and number of different arguments that can be given in this particular function or any different particular functions. All these arguments are what should be written in that function is provided in this PDF under this section. So, we can click on any function you want and you can go you can search for this description and you can see what is should be written inside in here. Like for example, you can see here like number of external crystal frequencies are there and of which we are using this 16 megahertz. So, that type of study you can do yourself to get to know what is like what is the significance of different API functions. And so that you can write your own programs in different ways with different many types or be many different ways you can write your program. So, again one particular function I will tell about it and ok. So, we after that we will look at the next part of the program. So, system control peripherally enabled that is that is the particular function which is we are using every time. So, this one system control variable enabled. So, you can see here. So, this is argument is this argument which is given to the function is peripheral to be enabled. So, which peripheral unit we want to enable we have to give its name or we can basically say its address maybe like it is port AF or port D or it is QVI model or it is PWM model or it is a timer model. Whatever peripheral we want to enable it can be given inside here in this function. So, you can see this is GPIOB, GPIOD, GPIOC we have we have switched on this GPIOF for our LEDs or this is PWM we are going to use this PWM PWM1 in our next program or QVI1, QVI0. So, this type of different arguments are there and you should follow this particular function because it will otherwise the program will not get built because if there is a spelling mistake or any mismatch in these functions and your written functions then your program will not get built. So, yes for now so you can see this system we have seen this API function and system control peripheral enabled also and this GPIO output mix this. So, I can say this GPIO pin input pin type GPIO output is what this function will make the pins as a output pins, general problem input output or digital output pins we can say. So, here argument is first of all the base address of the port and then the which pins are to be made output pins in that particular port. So, port is F and pins are 1, 2, 3 like PF1, PF2 and PF3. So, this is the argument we can say. So, we are not needing this particular any peripheral we can commit it out for this particular program and yes. So, where we are? Okay, so this is timer configure. Okay, so there is like the period of the timer like we can say after like it particularly it will show it will be for the frequency of ISR. So, how frequently ISR should be called or interrupt service routine should be in function that particular frequency we can set here by using this timer load set. This EVI 32 period is one of the argument which is nothing but the timer like for example or time period we can say. So, for example, it is 16 control clock gate means whatever frequency we have set as a clock frequency that one divided by 10 means that particular frequency will be 1 second and divided by 10 means 0.1 second like that. So, here particularly if we are loading this time will be 0.1 period. So, our ISR will be in service we are or we can say this ISR will be called after each 0.1 second like that. So, yes then we have enable this interrupt enable then timer interrupt enable then interrupt master enable and then finally timer enable. So, all these models should be enabled and this is the program you will also get to know from here also from this lab. So, you can see here this is the internet world time interval int master enable like that. So, yes and this here it is just making pin I think 2 means it is making pin so ready ready on and off that's it. So, it is providing if it is on then make it off otherwise make it on like that. So, so I will show that so you will concentrate you should concentrate on this function this is interrupt handler function or we can say interrupt service routine. So, whenever this timer is calling the ISR our program will execute this particular function. So, this is function what this function does first in first line it will clear first of all this timer int clear. So, because it is clearing this interrupt otherwise our timer will not call again and again. So, it should be clear then again this timer enable will be enabled then the function will be called and again it is clear then it will enable like that this cycle will be there. And then what is what this from this is actual count means actual count is giving call to this here ready function and our ready function is what it will make pin on and off sorry ready ready on and off.  So, as we are going to call ISR or we are executing this ISR then it will turn on and off the ready ready. And this actual count we have provided here because we will see when this program is built we can count this like how much time this function is called and how this frequency particular frequency is affecting the ISR. So, you can see that because this ready function is going to return this count. So, count is equal to count plus 1 and initial value of count is 0 then each time this function is called it will increase the count by 1 and that particular count is this actual count. So, here we have already declared these functions and now you will wonder about we have not defined this particular function that is timer 0800 this function is nowhere defined here in this program or even nowhere called here like in main function as well as in timer function we have not called this particular function then how the program will get exhibited. So, yes this is what the interrupt service will do. So, basically when our interrupt is enabled after this frequency it will automatically call this function but how this function is we will get called we will look at it. So, first of all we are we will build this program we check errors. So, yes ok you can see it is not it is not because we have not provided the paths for this library files. So, here you should remember in previous lecture only we said in this properties in ARM compiler in productions we have to give path for this particular Tivaware installation file or folder this one ok. Then in ARM linker file search path we have to provide this driver lift file. So, I say it is in TI then this Tivaware software folder then driver lift in CCS dip again driver lift dot dip. So, yes open. So, yes now our program should be built successfully. So, there is some error it is showing some error that you are the COI 32 period is not defined yes because we have while deleting we have by mistake deleted this also. So, we will define it again in unit. So, 32 bit integer yes we mean initialize it for 0 and look at now ok. So, our program is not is built successfully without any error. So, we will now go for debugging it on a microcontroller. So, I have attached already the microcontroller. So, you can see here even if we have now run the program or resume the program then still the ready it is not blinking. Why so like even our program is not having any error or there also this error is not being blinking and the reason is. So, yes because this function is not getting called. So, now to make this function called we need to change something that you should look at carefully. So, that particular thing you will also get in this lab file also. So, in this program of ISR you have to go through into this base file that is dm4c123 the startup file. And in that startup file we have to make one change or we can say two changes like we have to define this function in that startup file. So, under here you can see here this is external function. So, external y and this function. So, y is different yeah. So, we have to define this function here in this startup file and also you have seen we have used this timer A of timer 0 base. So, here under this timer 0 sub timer A. So, you can see here there are lots of interrupt handler functions. So, for like I can say for first of all it is these aren't some default interrupt handler functions for each like jpo port A, B, C, D, UAR, T, SSI, PWM. This type of like peripherals are having these interrupt functions interrupt handler functions depart interrupt handler functions. And of which we have selected this time to 0 sub timer A and so we have to change this function name to ours which we have defined. Then only our program will run successfully. So, here we have changed this name to timer 0 interrupt end handler whatever name we have given here that name should be copied. And yes, control yes to save this. And now you can see now you will be debug it. Yes, now it is debug successfully. And now okay, I will show you this is and now yeah. So, this already it is now blinking with 0.1 second we can say delay. And for whatever it means we have provided. And now this actual count we can count it by using add to watch expression then okay. And here continuous regression. So, you can see this is the 0.1 second frequency. So, it is running with the atmospheric machine or it is increasing by the atmospheric machine. So, after each one count like at one count it the LED is off after and at another count it will turn on like that. So, this is just for showing you how this ISR is working and yes it is working and its count is changing and yes. So, this actual count is from this is a value changing because we are this in this ISR or this particular interrupt handler function we are calling this LED. And now we can change it to the 1 second time like this and we can debug it again. You can see watch this again here in the expressions you can see this changing value changing after 1 second. So, now we have changed the frequency of we can say interrupt handler frequency to this to the 1 second. So, it is value changing as a 1 second. So, yes we have also provided this program to you you can go through this program and you can like play through it. You can do step as useful for you and you can define this different you can use different frequencies and different types of. So, you can play around this API functions also and you can go through the functions actually what this API functions are doing. And then you will learn this programming. Thank you. So, yes now we have seen the basic ISR what is interrupt service routine. Now we will look at PWM for now like just PWM and then we will look at QVI module like this quadrature encoder interfacing module. So, we will go to this PWM. So, new CCS project, TOC, GH6PM, this and here we can write PWM for onboard LEDs. So, for now I am just providing this PWM for onboard LEDs. And you can see as the PWM duty cycle is changing the brightness of the LED will go on increasing and decreasing according to the PWM duty cycle. So, yes finished. Okay, we will just complete that program which I have written already. So, onboard a PWM and yes, yes, yes. Yeah, I have completed that program. Now just we will go through it. So, these are like the difference you can see. So, here PWM.h5 this is added now because we are going to use PWM type. So, yes, this COVI adjustment is for adjusting the duty cycle. And I is for like for changing the duty cycle. Okay, so, yes, this is how to be initialization. This is like the PWM because the PWM is what port which is having onboard LEDs connected to the onboard LEDs. And then we have this PWM module. And then block saved by this. You can go through this. Actually, you can go, you can all go through this different API conditions. So, what is PWM block saved? How it can be saved? Like what should we put here? So, this is you can see what is saved. Because like for example, it is 64, so it is expected to be 64. Like that. So, I will say you should go to this PDF functions. And here the style goes to this PWM API functions. And PWM block saved is PWM block saved or so you can see here PWM block saved. It can be 64 or 32, 64, like 64, like that. So, you can go to there and you can save the PWM block. Otherwise also in system control also using this function you can save this PWM block like that. So, I will not go to all these functions because you can go to these functions actually. And you can learn that functions. No issue. So, this is the PWM type PWM like that. Like this is making this for PF1, PF2, PF3 piece as a PWM piece. So, this one is actually PF1, PF2, PF3 like that. It is PWM 3. So, in this one, I will change it before we will go out of the group guys. Yes. So, this is for the group PF1 piece as PWM only 1 and our PWM output 5 like that. PWM 1 output 6, PWM 1 output 7. So, PF1, PF2 and PF3 all these things how so you cannot do like PF2 as a PWM 5. No. You cannot do that. So, each has its particular functions or we can say different functions but that are already defined. We cannot switch functions from each on different like you can see in this data sheet. You can see here I think pin die pin or signal tapers. So, here what we are looking for PF1. So, yes PF1. Yeah. So, PF1. So, you can see in PF this PF1 pin can be configured as analog comparator or PWM 1, PWM 5 which is motion parameter mode to the point PWM 5. So, or we can configure it as a QAI module 0 phase V like we can use this pin as a QAI pin also like that. So, different functions can be assigned to particular pin but at the time it can do only one function as well as like you cannot write program without looking to this data sheet because you can see this PF1 is written as PWM 5. So, this is making this PWM. So, this is doing configure this PF1 pin as a PWM pin but you cannot write PWM 6 here because that PWM 6 is assigned to this PF2. So, like that you should go to this data sheet while writing the program. Then only you can see which pins can be written as these pins like that. So, yeah. So, the PWM is called a figure. This is the amount down you have already seen like this is up and down and only down like that. So, this is for integration. Then if you already said it is maximum period like 100 now I am giving it means period of the PWM. Like for example, if it is presented as 100 and we are going to provide its pulse width as 50, it means 50% in 20 cycle or if we are going to provide the PWM width as 80, then it is the PWM will be 80% or 80% in 20 cycle. So, it will depend on this period. But later which I will just tell you we cannot set this period directly as this. Like we can say but whenever we are going to use this for particular thermodynamics applications like DC motors, then this period is depending on the PWM frequency which we are going to use. So, here we are just going to apply this PWM to LEDs. So, it will not matter that much. But when we are doing for a thermodynamics applications, then we should know at which frequency this PWM signal should be provided to the motor. And according to that particular frequency this period will be changed. So, you can go through this long spread workshop. And here I think after 10 or 11 lab is for PWM. So, yes, this is for PWM. You can go through this particular lab and you will also get to know more about this. So, before coming into this programming, you should go like this particular lab in this workshop. So, you will get better ideas. So, this is the period set, then PWM output state. So, output state is 5, 6 and 7 of this PWM 1 is true. So, if we are making it as output, PWM output. And now we have a number of these generators, PWM generators. So, all these things you can get from the data sheet. Like for example, just I will show you. So, when you see this data sheet, this particular is attached to PWM generator 2. And this one is operated by PWM generator 3 like that. So, we have enabled this PWM generator 2 as a generator 3. And PWM 7, which is also operated by generator 3 only. So, these two and they are enabled now. And now we have a wild loop. What we have done is, we have first applied for from I1 to 21. And we have changed this EY register as I into 5. So, first idea is we will be 5 and then its final value is 100 like that. So, our duty cycle will change from 5 percent to 100 percent duty cycle. So, here pulse PWM pulse width set, we are giving its width as a EY8 integer. So, for each loop, this particular PWM width or we can say duty cycle in other words will change. And then we have provided this delay. So, we can stay this delay as a part of one second. I will give this to you to find out how this will be one second or what is this, sorry. So, how to make this as a one second. So, 10 minutes. So, 10 minutes we can say or anything we can find out that. And this A is giving us that A is equal to PWM width gate. So, it is set and this is gate. So, it will give us the particular value of this video. So, for now I will just see I have only to PWM 5 because we will just look at ready-ready. And not for other LEDs. So, yes this A is going to be fine. So, now we will improve properties. Then introductions here, browse in TI this folder. And ARN linker, file search path here. Not sure to be here. We will look at it. Build. Yes. So, this is now without a error. Now we will build this program. Sorry, we will debug this program on to the debug aspect. And now I will show you. So, currently it is on the debug aspect. So, when I upload this wiring set, these wiring are like A input wiring which we will look at after this one. So, yes. Now I will move to resume this. So, this particular, so I will say. So, this is actually equals to now. This blue LED is always one because of this PWM model. And that's why we are getting, we are not only getting ready-ready. So, just we will make some change. Instead of this, we will make as a code 6. But one thing I will show. Our program is not wrong. Just we will show you. So, keep it as a 5 only. And so we will run it. You can see here the A. And most is A. And yes. This value is like 5, 10, 20, 20, or like that. It is changing by 5. So, this PWM is changing or 20 cyclic changing for 500. So, the program is okay. But this blue LED is also one. And that's why we are not going to get exact idea. So, just I will change this to 6. And we will look whether it is now giving. So, yes it is giving. But I don't think from camera you can recognize it. Now, I think you will get this. The intensity is changing. How this intensity is changing? But maybe one. I don't think from camera you will be able to see this change in the brightness. But it is like little one and difficult to recognize from camera. So, just we will see. So, this particular brightness is changing. From 0 you will recognize it actually. Otherwise it is looking as same only. Minimum is from for you. I can recognize it. But I don't think you can recognize this change. You can look at when it is becoming 0. So, yes, this brightness is now increasing. Like that. So, in this way you will be learning this working. So, even you can, I will provide this. We are going to provide this particular program also with you. You can try this program. You can see the speed of the brightness is changing. And you can play with different areas. I made it new and green. And these areas are completely different. You can see the changes in the brightness.  You can provide that speed of the signal that we want there also. So, that to change also. You can say so that to recognize this change. And actually the speed of the signal should be given to be like, like we are going to use for gas megatron applications like DC motor. Where we can control the speed of the DC motor. So, here it is for just for the, we can say the first glimpse of the first idea of the PWM, we have given it to the LED. So, as this brightness of the LED is changing, in that way we can change the speed of the motor. So, I will show that also. So, yes, this is the PWM. Now we will look at QEI model, which is quadrature encoder interface. So, basically that is not given in this workshop. So, you can look carefully. We will build your program for that. So, particularly that QEI model is, what it is going to do, it is capturing the signals from quadrature encoder or like rotary or linear encoders, which are having changes as APR and index channel. And we can obtain the position, velocity and the direction of the rotation or linear movement from this interface. Like QEI, we can say here is a simple QEI. We are not, I will rotate the motor by my hand opening and we will go and recognize the changing position of speed. So, yes, finish. Finish also. This is QEI ready encoder data. This is interesting. We will provide this provided also. So, just I will let you know what is it. Like these are live profiles. And here this QEI library file is now added because we are going to use this QEI model. And yes, this position and velocity and the direction of the variables for the recording. And PPR, you should know what you may know or you can study this encoder. So, the PPR is what like per revolution, the how many counts are there, what is PPR and PPR and how this partition encoder works and how it will make this count useful in our, we can say, calculation of the velocity and all these things. So, yes, this is hardware initialization enable periphery of GPIO-D because we are using port D as a QEI model. So, I will show you this port D. We are going to use QPR-QEI model because the pins like PD-7 and PD-6 and PD-7 are the pins which can be configured as a QEI pins. So, we have enabled this GPIO port D. So, you can see this PD-7. So, yes, this is PD-7. So, PD-7 pin can be configured as PHB-0, that is QEI model 0 phase B. And where is PD-6? PD-6, PD-6. So, this is PD-6 and this PD-6 can also configured as PHK-0 which is QEI model 0 phase A. So, here we have enabled this particular port D. Similarly, you can use port C also. I think port C, the PC-5 and PC-6 pins can be configured as QEI pins. So, you should go to this data sheet to recognize all these things. So, what pins should be, which pins should be used and all these things. And now, port D we have enabled and on port D the QEI model is QEI-0. So, there are two models, QEI-1 or QEI-0. As we have using port D or PD-6 and PD-7. So, we should enable this QEI-0. And now, this is one step that whenever you can see on this workshop file also, I am going to use this switch program. So, how to use this on-board switch provided on Tiva. You need to unlock that particular key. This is not needed for all the keys, but there are particular keys like this PD-7 or again I think PC-5. For this piece, we need to unlock this piece because they are configured as another and at first they are locked with particular function only. So, we need to unlock this. So, for PD-7 only, we need to do that. Not for all the pins. That means you can get it from here. You can get the data sheet also, which pins are to be unlocked or not. These things you can get. And also while programming, when particular key is not working, then you will get to know oh, there is something wrong. And you will go to the data sheet and you can search like that. So, this PD-6 and PD-7 pins are we now made as a pin type QVI. As we have already used this type of which type of pin type, GPIO output or PWM, and now we are using it as a QVI. So, this is and it is now configured as PD-6 should be used as PH0, PD-7 should be used as PHB as provided in the data sheet. And now before going to configuration, we have to configure this QVI. We have to disable this QVI model and interval QVI. And then configure it as a, you can go to this, like I will go. And so QVI, API functions, QVI configures. So, here we can say we have to provide first of all base. So, we are using QVI model 0. QVI is the base. And now we can configure it as a many different base. Like you can see, either you can capture only A or you can capture A and B. So, here we have provided it as a capture both A and B. What is A and B? These are the signals from encoder, like channel A and channel B. Then whether it should be reset on index pin or it should not be reset like that. Like for example, after reaching this 1336 value, it will again come to this 0. Like that. So, we can provide it whether it should be reset or we have to not, we don't need to reset it. Like that. So, I will tell about this value also. Just shortly. Then it can be, the QVI can be configured as quadrature or as a clock and direction. You might have seen there that in lectures also. And here we have configured it as a quadrature encoder. And it is swap is needed or not. So, swap, which means like if our by mistake provided this channel A pin to the PH, PD6 on board, like the physical it is pin from the motor, or encoder is channel A and by mistake we have attached it to the PD7 and channel B is attached to the PD6. In that case, you might need to swap the configuration. But of course, we can directly change it physically only. But if it is not possible, then you can go for swapping it. And according to this value, it is like we can say you can provide any value if you don't want to recognize this rotation. We can say so when one rotation is completed, if you do not need that, then you can go for any higher values. But for now it is value like it is value of when 360 degree is completed like 360 degree or one rotation of the motor is completed at that time it will reach the position of 1336. And it will again depend on this PPI value. So, PPI into 4, it will give us this value. And it will reset, like after reaching this value, it will again start from 0. So, we can get to know it is now reached over rotation, then it will again start from 0. Then when it starts from 0, like that. So, it will get reseted. And now enable this QEI and also enable filter if you need. And also we have to configure this velocity also. So, these are functions for your velocity configuration. Like we need to divide it or not. So, you might have studied it in lecture also during that by seeing this signal diagram for the QEI. And also at the same time you can go through this API functions. So, I will like I will suggest to go through all the API functions whenever you are seeing these programs uploaded to you or given to you, you should go to this QEI functions. And you will get to know the functions then like the arguments and why these functions are used here and all this. So, QEI velocity enable we have enable this QEI 0 piece. And now in my loop we are getting this position QEI position get QEI 0 piece. So, just keep in mind you are reusing this QEI 0 because we have used this QEI 0. So, there is QEI 1 also which is provided or another piece like PC5, PC6, like that. Now we are getting this velocity but we need to cover this velocity into the RPM and then the direction. So, yes this is the program and just I will show you. These are like connections not connections, but So, this is motor and this two pins are for motor power and this four pins are one is for encoder power then one is for encoder ground and two pins are channel A and channel B and which are connected to this our micro T1 motor. So, at this motor you have seen already in the lectures and now I think we have not So, we need to promote this path. So, it should be a free you can say. Ok, yes. So, it is we will successfully we will debug it. So, just for now I will like add this position to watch expression then this RPM to watch expression now we will resume it. Ok, so program is now present and now I will rotate the motor by hand. So, you can see this position is changing. Ok, now my I will move by hand and now as soon as I am going to rotate it my value will increase but as I am going to stop the rotation then RPM will come down to 0. However, the position will be at the last position where I have stopped. So, yes. So, RPM is started and then it is coming to 0. Now, you can see the position is changing and now it should be coming to 0 after 1336 because we have provided that 1336, yes. So, you can see this is coming after 1336 it is coming to 0. Now, this motor is I cannot rotate very smoothly by hand and so that it is going to be increasing even if I am rotating it slowly but I cannot rotate it too slowly to go by 1, by 1 like start by 1 by 1 and now I will rotate it in another direction. So, this position is really now increasing in another direction. Like that you can now if I am rotating just for you I will just connect this motor supply to the 5-way supply or not. So, you can see you can see this velocity and how this 10 positions are changing. Just wait for a minute I will now I am rotating the motor by 5 volt you can see this constant velocity is there like somehow change will be there but almost constant sorry rpm and the position is continuously increasing I am coming down to 0 after 1336 and now I will change the direction now count is increasing now after change the direction instead of increasing it will go on decreasing and this is exclusive like that. Wait this count is not decreasing and we are providing the same rotation but in different direction that is the change. So, just wait I will connect it so that we can see now you can see this position and this velocity is changing and we will just plot this position and you can see we have the position is changing and continuous repression ok. So, yes it is going to 1336 and coming down to 0 so it is not too smooth because I have directly connected it to one smaller source and it might be fluctuating but yes in this way so because it is now we have provided it in one loop so it will take time as required by the let us say or provided by this voltage and according to the voltage how much time it will take to reach the this our world rotation and I will be able to train with that because it will directly flowing to the after one position it will directly flowing to zero position. But the thing is here the thing is now you can see that you can give any type of different ways like you can say you can give rectangular signal to the motor or sinusoidal signal to the motor or trapezoidal signal triangular signal like that you can by using what? the PWM duty cycle. So, you can write yourself the program where the PWM cycle is changing such with that it is rectangular. So, if PWM is rectangular then it will provide the the speed the speed diagram will be rectangular like that the position diagram will change irregularly. But you can control the position also using this PWM because you can write the program because now you are having this position count you are having the RPM and you can you can change the RPM by using PWM by using H bridge or L298 motor driver you can see the data sheet of the H bridge how this H bridge works how to provide the PWM signal to the H bridge and how to connect the motor to that and change the speed using PWM. So, programming the programming is the programming is almost this similar one just you need to I can say combine all this which I have shown to you like I have first of all we have go through this ISR then PWM then QVM. So, basically you need to combine all these things to run your motor in the way you want basically. So, I will give one just idea you need to read the encoder data and using that encoder data in programming you need to define your duty cycle to provide I can say the PWM duty cycle to provide the speed range or speed signal or whatever signal you want due to the motor you can give it using this QVM and PWM both and ISR you can use of course for this frequency of the signal to be provided like at I can just say a great number or but to that you have to use this ISR and with different ISR frequency. So, that part I will leave to you that how to combine this different programs or different course of different aspects of this DC motor for particular DC motor with encoder and how to run that motor as you want and just another aspect is by using this not only you can provide the signal to the motor but you can control the motor like you can develop the PID controller or PD controller like that so think about that and check how you can do that by using this QVI and PWM and ISR okay, thank you


Hi, I'm Zor. Welcome to a new Zor education. We continue talking about electricity and it's a good time to solve a few problems. A few problems for the Ohm's law. Actually, I would consider this to be probably the most important law in the electricity. So it really works well to spend some time on problems which are related to Ohm's law. Now, this lecture is part of the course called Physics for Teens, presented on Unisor.com. I suggest you to watch it from Unisor.com because it has detailed notes for each lecture. All lectures are presented in logical sequence as a course and I suggest you to take the whole course. And there are exams for each part of the course. Everything is free, so no financial strings attached, no advertisement. So use the website. It's much better. Okay, so let's talk about the problems. And the first one is probably the most simplest and most classical one. So you have a circuit where you have a combination of parallel and consecutive sequential connections. Okay, these are resistors in a series and these are the resistances of these. This is a resistor which is in parallel to this series. And what's given is the voltage on the battery. And you have to determine the current in this branch and in this branch and in this branch of the circuit. Okay, so how do we solve it? Well, first of all, let's start from the Ohm's Law. Ohm's Law is that U is equal to I times R or I is equal to U divided by R. We know this is Ohm's Law. Now in this case, to find U, we have to find the combined resistance of these three different resistors. Now, it's not one resistor. It's three, so we have to somehow combine. Now, we don't know how to calculate the resistance of this combination of three different resistors. But we do know that we can just consider these three resistors as basically two resistors connected parallel. This is one resistor and this is the combination of these two. Now, all resistors connected in a series are actually the same thing as one bigger resistor which resists more. How much more? Well, the resistance of these two is the sum of their resistances. Remember, if you connect in a series, it's kind of obvious that resistance is added together because the electrons have to drag their way through one and then another. So basically, they're wasting certain amount of energy on one and then another, which is basically to waste for the sum of them. So basically, first what we can do is the resistance R23, which is the combination of these, is the sum of R2 and R3. So this is the resistance of this entire branch of a circuit. Now, we actually convert this scheme into much more simple one. This is R1 and this is R23. Now, this is a regular parallel connection. And again, we know how to calculate the resistance of two resistors connected in parallel. 1 over R is equal to 1 over R1 plus 1 over R23. So if you remember, we have this formula. In a parallel, we are adding inverse of resistors. In a series, we are adding resistances themselves in a parallel inverse. Okay, that's basically enough for us because we know what this is, right? This is R2 plus R3. Now, all we have to do is multiply it by U. Now, what is this? Well, this is the resistance of an entire circuit, right? R. So the I is this. Okay? Now, this is obviously I1 and this is I2 because obviously the current which goes through this one is exactly the same as current going through that one. The current is basically the speed of electrons, right? So we have basically determined everything. So we have I1 which is U divided by R1, we have I2 which is U divided by this and this one would be their sum. Now, obviously, instead of using this approach to calculate the entire resistance and the I as a result of this, we can do it in reverse. Well, let's first determine what's the current which goes through the first resistance. Well, we have the voltage, it's U, right? Because this one is parallel to this one. So on these ends we have the voltage difference in electric potential U. So we have a difference, so we can use the Ohm's law and we can immediately say that I1 is equal to this one. Now, for I2 we do have to calculate the sum of these. So again, we know the voltage in these two ends, so we have to find the resistance of this one which is the sum, so we divide U divided by sum that would be U2, I2. Now, obviously, the current in this common branch of the circuit is equal to sum of these two currents because again, what is the current? It's the amount of electricity, amount of coulombs of electricity per unit of time. So obviously, if we are splitting this flow of electrons, the sum of these is equal to the whole, right? So that's basically it for this very simple, very elementary problem. Next. Okay, next I would like to find out what exactly the amount of work is done by the battery. So this is the regular circuit, this is the Ohm's law or I is equal to U divided by R. Now, so my question is, this battery is producing certain amount of energy and then this energy is basically spent on circulating the electrons in the circuit. So let's consider that we do maintain this type of connection and the battery is generating certain amount of electric energy. It's going around, it probably heats up the resistor and it's all happening during this time T, for instance. So my question is, how much work in JOLS is basically generated during this time, the battery, if you have all these parameters. So you have the parameters of the circuit, you have the resistors, resistance, you have the voltage, I is equal to obviously from the Ohm's law. So you have all the parameters. Now, question is, I would like in terms of these parameters to come up with something from, we know from the mechanical part of this course, energy in JOLS basically, the work. Okay, so what is the work? Let's just think about it. What is the voltage? Let's just go back to the definition of voltage. Voltage is amount of energy which we have spent or is needed for to separate certain amount of electricity in Coulons basically, right? And that's why basically it's per unit of electricity, per Coulon. So how much energy we need to produce one Coulon of electrons, so to speak, right? So what is the one volt? One volt is amount of energy we need to separate one Coulon of electricity. So amount of work therefore it's from definition of electric potential is equal to the voltage times number of Coulons which this battery actually is performing. Now, this is done for the purpose of circulating these Coulons. Whatever the Coulons of electricity is produced is circulating and what is I? I is amount of electricity per unit of time, right? That's the current. What is the current? Current is basically speed of electricity, amount of Coulons of electricity per unit of time. Now from these two we conclude that A is equal to U times I times T. So my very important point is that work which is performed by the battery during the time T is equal to U times I times T. The voltage times the amperage current times time. Now from this obviously follows that the power if you remember is amount of work per unit of time is equal to U times I. Okay? Amount of work per unit of time. Now we can express this differently using the Ohm's law. For instance I can use it, power is equal to, so let's say instead of U I can use I R so it will be I square R and amount of work would be equal to I square R times T. Or I can put it in terms of voltage so instead of I I will use U divided by R so I will have U squared divided by R and amount of work is equal to U squared divided by R times T. So these are different formulas for basically the same thing. How to express something which we know from mechanics, the work. Now we are actually talking about electricity so the concept of work also exists. And again eventually we will understand that the work actually is to heat up the resistor but that's the next problem. And these are formulas which express the amount of work which is done by the battery or any kind of source of electricity to basically force the electrons to go through the circuit and to do whatever is necessary they are doing. Because as they are going through the resistor if it's something like a lamp then the temperature of the filament of the spiral whatever in the lamp is increasing. That's why we have the light, right? If it goes through the electric motor for instance in electric car all these batteries which are connected in some kind of a configuration are spending their energy to basically force the car to go forward. There is an electric motor which is a consumption, a consumer of electricity and converts into mechanical energy. So whatever the work is done to heat up the element or to force electric motor to spin the wheels of the car whatever it is the amount of work is always calculated using and power these formulas. So it's very important. I would like to actually make a very small comment that I'm sometimes using the problems to introduce certain theoretical concepts. This is obviously the problem but at the same time it's a theory actually which allows you to basically understand from the concept of energy and work what electricity is all about these voltage and amperage how they are connected to energy. So work and energy and power are connected to voltage and amperage in exactly this fashion. Next. So now the third problem is basically a continuation of this one and we will talk about the heating. So this is an element and this is our bulb and it produces certain amount of electricity. There is a voltage here and let's say this is the bulb like a regular bulb we are using in incandescent lamp which we are using at home. So it has this tungsten filament inside and I would like to find out actually how high the temperature will go inside this lamp. How far up the temperature of the tungsten will go if we will start pushing the electricity through it. And let's think what exactly we need for this. Well obviously we need the resistance which gives us the all elements we need to calculate the amount of work which is done by the battery. And from the previous problem it is u squared divided by r times t. So this is amount of work. So we know the work. Now where is it going? It actually goes to produce heat right? So this is exactly the same as amount of heat which is consumed by this lamp. So it consumes amount of heat. Now if it consumes certain amount of heat during this time, if we know the resistance and we know the voltage. Now my next question is how high the temperature will rise because of that. Because since we are applying heat then the temperature is supposed to rise. How much? Well there is a specific heat for number for every material for tungsten for instance from which the filament is made as well. That's amount of heat which is needed to heat up unit of mass by unit of temperature. So if we will multiply it by mass and multiply it by difference in temperature we will get exactly the amount of heat which is consumed by this lamp. That's basically it because from this we know delta t. That's the temperature. It's q which is the same as this one, u squared times t divided by r and divided by specific heat. It's a constant for metal and mass. So if we know the mass of this tungsten filament inside the lamp we know that this is tungsten for instance which means we know it's a specific heat capacity. We know the resistance, we know the time, let's say second or two seconds and we know the voltage. We know what is the rise of temperature will be during this time. But obviously as the temperature is rising it emits the heat as well. So it's not like we are accumulating heat and the longer we are under this condition the higher the temperature will dissipate obviously. But we are not talking about this, right now we are talking only about amount of heat which is consumed. Now obviously because the heat dissipates it's not going up to infinity as the time is increasing. It goes to certain level and then amount of heat dissipated will be equal to amount of heat consumed by the filament of the lamp. So this is the formula and if you will put some normal values which I have in the notes for this lecture. So the u let's say will be 110 volts which is normal for the United States. Let's say T would be two seconds. Let's say resistance would be 200 ohm. And specific heat for tungsten would be I think it's 134 J per kilogram degree of and the mass I don't know what the mass 0.001 kilogram. Let's say so if you will do all this calculation I have come up with 900 degrees temperature rise in two seconds. Well I hope I don't make any mistakes but it doesn't really matter. Right now we are talking about the theory and the theory is basically here. That's the whole thing. So that's my third problem and now I have the fourth one which is I consider very interesting because it's very simple but there is a trick. I love the problems with the tricks. So let's say we have the following connections. So far it's simple right? We calculate the resistance of these two which is the sum of these. The resistance of these is the sum of these so it's 3R and 3R and then these are parallel. We calculate the total resistance without any problems. So if you have u, you have I, you have I1 and you have I2. Now let me introduce the bad thing. What if I have another resistor which is connected this way? Now the whole circuit is neither in a series nor in parallel and it cannot be split into pieces and calculate each piece separately and then combine. Like without this I have two separate pieces and calculate this series and this series and then parallel to each other. Here I can do it. Question is what can I do? And this is basically one of the tricks which can be used in problems like this. Let's just think about it. The whole thing is very much symmetrical. So the top part and the bottom part are completely symmetrical and this one doesn't distort the symmetry. Symmetry is still there. Now if symmetry is still there it's very reasonable to basically state that I1 is equal to I2. Because from the perspective of these two currents there is absolutely no difference and if there is no difference then this is obviously true. And it's equal to I divided by 2. Because they are together we are splitting one flow into two absolutely symmetrical ones. But if it's symmetrical remember what is the voltage drop? The voltage drop from here to here is equal to I1 times R. And what is the voltage drop here? Let's just talk about I1 in both cases. Because they are equal to each other. It's also I1 times R. These Rs are the same. So the voltage drop is the same. So what is the voltage between this and this? Well it's whatever comes here minus voltage drop you come here. Now here you have exactly the same voltage and exactly the same drop. So you have the difference between these two electric potentials are zero. Because we have the same here and we dropped it by the same voltage. And we have exactly the same in these two pieces. These two pieces whatever it doesn't really matter. Now what does it mean that the voltage potential is the same in these two points? Well it means that there is no current through it. That's what it means. If there is no difference in electrical, why is there a current here? Because there is a difference in potential between minus and plus. There is an axis of electrons here and a deficiency there. This deficiency is exactly the same here. And this axis is exactly the same here. So from here to here the voltage drops. Here it drops by this one. And from here it drops by this one. The same thing. So these are exactly the same electric potentials. There is no difference and there is no current. And since there is no current to make all our calculations we can do just this. As it does not exist. That's the trick. So you have to understand that because of the symmetry of this particular problem there is no difference between electric potential in these two points. And therefore we can just completely ignore it in all our calculations. And therefore we have r plus 2r which is equal to 3r on the top. The same thing on the bottom. And they are parallel to each other. So it's 1 over 3r plus 1 over 3r is 1 over r total. Which is what? 2 third 3r. So r total r total is equal to 3 second of r. And that's why u divided by this r total will give me i. i is equal to u divided by 3r2. And i1 is equal to i2 is equal to half of this which is u divided by 3r. And that's the end. So I like this particular problem because it actually needs some kind of a logical trick. And there are some other problems which I will present similar to this one. I do suggest you to go to the Unisor.com to this particular lecture. Take a look at the notes and solve the problems yourself right now. One thing is to listen to whatever I said. And another thing is to basically do the problem yourself. This is the most important part of any kind of an education. You can do it yourself based on whatever you have learned from the lectures or text books or whatever. Don't pay attention to the solution which I present. Just read the problem itself, solve it and then check your result with the solution. That's it for today. Thank you very much and good luck.


The afternoon that Matt Carpenter had, even more impressive considering he wasn't in the original lineup and he hasn't started a game for you guys in quite some time. Yeah, I put him in the garage for a week and pulled him out for a spin. And I mean, that's impressive. What he's doing, what he's done since he's gotten here. Six homers now.  It's just been a lot of really good at bats. Tremendous play down there at third. Really impressive.  And I know he was very curious about to go find out in spring training and early this year. And he's seeing the fruits of that from a guy that's been a really talented player in this league for a while. Clearly not just him this afternoon. You got a lot of contributions up and down the order. But when you set the tone like that in the first inning, just how much does that help the offense, help your staff relax overall? Yeah, I mean, yeah, that's great. It's not like we're pounding the ball all over the place there early necessarily either. It was just a lot of really, really good at bats making their guy work hard. G, Lameju, Carpenter, all with just really good, really good job of controlling the zone there. And then Kiner gets a big hit. Just quality at bats that set the tone for the day. You've continually said Higashioka will get going. We've seen it during spring training. But what do you think it meant to him to be able to drive the ball a little bit today? Yeah, great. Good to see him really get into one. We know he's capable of that. And it's a long season. And we'll see some more of that. Susan. On the field, Matt had said that the best thing was the play that he made at third base because he felt like he was a player. Do you understand that feeling that he was out there and for the first time in quite a while? Yeah, it was a great play, by the way. I thought he made another good play to his left, kind of slowly hit ball where he kind of got to move across and make a good play. Yeah, you know, he's been such a joy to be around since he's got here. You know, a guy with his track record, a guy with his resume, a guy that's had his career that's just come in here and, you know, you can tell every day just excited to be here and has jumped right in with those guys and become a huge part of this.  Lindsay. I'm assuming you were pretty familiar with Carpenter previously. Yeah. How different does his approach to the plate in a swing look to you now versus, kind of, historically? No, I think it resembles who he's been and who he was when he was a really good player in this league. So there's nothing that I'm seeing, like, in whatever subtle adjustments that he made that he wanted to improve on the last couple of years. He looks like the Matt Carpenter I've watched as an all-star player with the Cardinals.


Okay, so Glaucon says that your interests are most important. So according to Glaucon, then what's the good? What is it that one should do? What is it that one should pursue and one's own life? And Glaucon doesn't go into a whole lot of detail about what is actually in your interest. But what he does do is tell us that when it comes to deciding between your interests and somebody else, your interest are most important. You always, always, always have to choose your interests first. So for Glaucon, then, since you should pursue your own interests first, the good is being able to pursue your interests, get what you need without having to worry about any kind of reprisals or punishment from anybody else. This brings us to the worst. The worst is suffering at the hands of others. Not only are your interests not being fulfilled when you suffer at the hands of others, but your interests are most important because somebody else's interests are being served at the cost of you. The worst, the bad, is suffering at the hands of others. Well, you might think then that justice is something beneficial here. Well, according to Glaucon, justice is nothing more or less than just this kind of agreement between people that during the course of pursuing your own interests, there's inevitably going to be conflict. And what justice is, is this enforceable agreement, not to have violence, not to have this sort of conflict. If people can't play fair, if people can't play nice, then they're going to be punished. Now, this means that sometimes nobody is going to get what they want. So if you're trying to pursue your own interests, even at the cost of somebody else, justice will interfere. Justice will come and punish you for the pursuit of your interests. Now, for Glaucon, that means that justice is not the worst, but there are still, sometimes you're not going to be able to pursue your own interests. And for that reason, justice is bad.


In this module, we shall study risk management in Mudarba. Mudarba is a contract which has been cited as a perfect substitute for interest-based transactions by many enthusiasts. However, I must say that Mudarba has its own problems, especially when it comes to risk management. I must remind myself and yourself the definition of Mudarba before we continue in this module. Remember, we said that Mudarba is a contract between two parties. These parties could be more than two, but at least two parties in such a way that one party provides capital and the other party does the business. On the understanding that if there is any profit from this business activity, the two parties would share the profit in accordance with a profit distribution ratio, which must be agreed between the two parties. And if there is a loss, that loss would be borne by the party providing capital. So, this is the definition of Mudarba. Now, Mudarba contract doesn't allow interference of investor. We know that we call the investor in this case Rabbul Mal or the party providing capital in day-to-day running of the business. This is a very important restriction. If I have provided you 10 lakh rupees as Mudarba capital for you to do an agreed business, I cannot intervene in the day-to-day business which you are conducting. In other words, Rabbul Mal does not have management rights. Management rights are actually with the party doing business with the money. Rabbul Mal, however, has right to seek information. It could be in the form of daily reports, weekly reports, monthly reports or reports of any frequency that has been agreed between the two parties. So, at least this would give some information to the Rabbul Mal that the money he has provided to someone is being utilized in the activity which was agreed between the two parties. This creates an imbalance between the management and control of the business. One party is actually managing it and it is controlling it at the same time as well. The Rabbul Mal has some kind of control by way of having the information and then advising based on that information that this would be done or that would be done, but that's only an advice. In this context, Mudarba actually becomes a highly risked contract for investors. Misreporting or underreporting of Mudarba profits can become a major concern. In economics, we call it agency problem and agency problem prevails in quite a number of other contracts as well. Now additionally, in Mudarba, burden of proof of cheating is on the investor. If I have given you money on Mudarba and I say that you are actually cheating, you are underreporting profits, in Mudarba rules, if I say this thing, if I blame you or claim that you are not doing the right thing or you are misreporting the profit, the burden of proof is on me. If this dispute goes to the court, the judge would ask me, okay, you have made this claim, prove it. This aspect of Mudarba makes Mudarba even more risky. So Mudarba becomes even riskier in the wake of this restriction or this requirement. So because of imbalance of management and control and because of burden of proof of cheating on the investor, Mudarba is a risky proposition for the investors. So what are the risks in Mudarba consequent to this inherent structure of Mudarba? Loss of profit could be one. There could be loss of capital and loss of profit and misuse of capital because the Rabbul Mal does not have management right. It has only to seek information. It is quite possible that the person who was given money somewhere else. So that is an example of misuse of capital and of course burden of proof of cheating. This is another risk in Mudarba. Now in summary, loss of profit, this is a risk, loss of capital, it is a risk. Misuse of capital, this is a risk and burden of proof, this is a risk as well. What could be the control mechanisms to manage these risks? Now loss of capital to ensure that profit is not under reported or misreported, periodic reporting may be required. So this is a risk management tool. Loss of capital, the chances of this can be minimized by way of asking the Mudarba to provide a feasibility study even before the Mudarba business is started. Now many contemporary scholars, they say that if a Mudarba has provided a feasibility study, this should be deemed as an authentic document. This means that the person who is seeking financing on Mudarba believes in it. And if there is any deviation in the actual business from this feasibility study and there is a loss of capital or in certain cases loss of profit as well, then the Mudarba would be held responsible for this. So this is another risk management tool. Misuse of capital, monitoring and auditing, this is something which can be used to ensure that the capital is not misused. Burden of proof, this can actually be shifted to the Mudarba if a feasibility study has been provided by the Mudarba. Now all these measures would not take away all the risks. Remember, we are trying to understand how the risks can be minimized in Islamic structures. It is not the case of avoiding the risk. The risks can be avoided in certain other ways. And we said that one way is by way of prohibition. So there is prohibition of riba. There is prohibition of gharrar. There is prohibition of maistr, gambling. So the risks involved in those situations are avoided by way of observing the prohibitions which are given in the Quran and in the Sunnah of Prophet Sallallahu Alaihi Wasallam.


Hello everyone, this is Amit Dan of amitdan.com. Today I'll have another episode of coffee video, and I'll show you how to make Tim Hortons instant coffee at home. If this is your first time, I repeat visit. Thank you for your support. On this channel, I'm always trying new and different ideas. If you appreciate very deep, please go ahead and subscribe. So I have another how to make Tim Hortons coffee at home, and one of the viewers suggested that I should make another video on how to make Tim Hortons instant coffee at home. And thanks for the idea. And that's what I'll show you today. So I'll go through the steps you need to take to make Tim Hortons instant coffee at home. And if you follow the steps, then you should be able to enjoy a perfect cup of Tim Hortons instant coffee at home. So let's start. So the ingredients you need to make a perfect cup of Tim Hortons instant coffee, they're all here. And I'm just going to go over them quickly. So the first thing you need you require the Tim Hortons instant coffee, which is right here. And I have dark roast here, but you can use the regular strength coffee or regular roast. But I like dark roast. And if you look here, then actually they have they do have some sort of instructions here. But I'm just going to go into more detail and I'll show you more, give you more information. And then you need to boil water. So I have electric kettle, but you can just use a regular pot to boil water. It's the same thing. And then you'd require some sort of creamer or milk. So I have here four different types of milk or creamer. So the first thing I have is organic soy milk, you can use that, which is okay. And then you can use the organic regular organic milk. This is like almost a 4%. And then I have a coffee creamer. And then I have a I have an evaporated milk. If you are using condensed milk, then definitely it's going to add some sugar and you have to lower the strength or you have to lower the quantity. So according to my measurements or the tests I have done, you'd require about 10% of liquid milk, which it could be like, you know, organic milk, regular milk, or the soy milk of the amount of water you're taking. So for example, in this cup, we're going to take about let's say six ounce of water or slightly above six ounce, but we're going to take 10% of milk in here, which is going to be, you know, in proportionate to give you the best color and the best test. And the other thing I would like to mention that anytime you're making coffee, take very cold water that's going to bring the most flavor and color and it's going to, you know, taste better as well. So the first thing I'm going to start with taking very cold water from the faucet. So let's come here. And I'm going to run the water for a few seconds just to get really cold water. And I'll just give it another few seconds and looks like it's coming colder. So let's wait another 10 seconds. Okay, I have like kind of ice cold water. So I'm just going to take here and I'll show you the quantity. So here I have close to six ounce. It could be six and a half ounce. This is a standard size cup. So you're looking at about six, six and a half ounce. And I'm going to put this in the kettle. So let's take a look here. So we have this one here. And I'm just going to quickly put it in. Okay, so I'll start the boiling process. And then, you know, I'll prepare the other rest of the stuff. So let's turn this on. And you can see that the light is on and let it boil. So what I'm going to do right now is I'm going to take about 10% of milk, of six ounce of water. So it should be about like, you know, one ounce. And in order to do that, let's just open this here. And I have like, you know, a measurement.   So I'd say just about right here. It should be, you know, 10 ounce. So I'll just close this here. And in terms of instant coffee, we're going to take about one teaspoon or lesser of the instant coffee. Now what I noticed that if you're taking more than one teaspoon for this cup or let's say for six, seven ounce of water, then the taste gets bitter and it gets darker. So it's not going to give you a very nice taste and color. So I'm just going to start with about lesser than one teaspoon, which should be actually this is one teaspoon right here. So if I take, let's say like this and I can adjust it later on if I feel like, you know, I need more. So here I have about one teaspoon and I'm going to put it in here so you can see that, you know, it's right in here. And if you prefer, then you can add sugar or honey. So I have some sugar right here. So I'm just going to, you know, put in like two cubes of sugar, which is four grams each, but you can go like in a more or less. But what happens if you're using condensed milk, then definitely don't put too much sugar because condensed milk already has added sugar. So right now we're just waiting for the water to boil. And once it does, then we're just going to, you know, pour some water and see how it comes out. So this is very easy and convenient way. And the water, a kettle is very cheap. You can buy it like, you know, for $15, $20, but definitely you can use a kettle as, use a pot as well. That would do, but always take a very cold water. So it looks like our water is coming to an end.  So if it doesn't come out the first time, you know, don't be disappointed, just keep trying. And then you're going to get the best or perfect once you try a few times. So I'm even not sure at this point that this is going to be the perfect one, but it might be the perfect or it might be, I have to, I might need to add more sugar or less sugar or, you know, coffee or the water. So let's take it, let's see how it goes. So looks like we have boiled water right here. So I'm just going to pour it in here. And let me just see if I can show you how it looks like.    So I have about right here and I'm just going to steer this and see how things look. And you can see that so far it looks good. So it looks a little bit still kind of on the dark side. So I'm just going to put little more water. So let's just take a look here. And you can see that the cup is about 80% full right now. And I'm just going to steer it again. Okay. So you can see that I have a cup of instant Tim Horton's coffee. And I'm just going to take a quick sip and see if the taste is perfect or I just need to add more like, you know, cream or milk or coffee. So just give me a second here. It feels okay. But, you know, I don't mind putting a little more coffee in it. It's, I just want it a little bit more darker. So I'll show you them out very little. And I'm just going to put it in. And I'm just going to stir it a little bit more. So let me just, you know, take a sip, take a sip again. This seems to be a perfect cup of Tim Horton's instant coffee at home.  It's going to give you a little bit different taste. But if you're adding creamer, then you're going to get a different taste. So this is my, like, you know, experience that if you add creamer, then it gives slightly better taste and better color. But, you know, I'm okay with milk as well. And I usually don't use condensed milk, but sometimes I use condensed milk. So here we have a perfect cup of Tim Horton's coffee. So you don't have to go outside home to enjoy a perfect cup of Tim Horton's coffee. And another thing to mention that for sure, the instant coffee is never going to taste exactly like the, you know, brewed coffee. They, both of these have different tastes and different color and different, you know, looks. So that's the Tim Horton instant coffee or any instant coffee, in my opinion, tastes a little bit lesser than the regular strength brewed coffee. So if you want even a better or more perfect coffee, which is more close to the real Tim Horton's coffee, when you go to Tim Horton's and buy, then use the Tim Horton ground, you know, grind coffee and Tim Horton's like, you know, dark roast coffee. And I do have a video on that exactly how to make that, which I'll put a link in the description box below. But for now, I'm happy with my Tim Horton instant coffee. And again, let's wrap up everything. So take about 10% of like, you know, milk, if you're using regular milk, if you're using like, you know, concentrated milk, then it should be even using lesser amount.  And the coffee should be about one teaspoon or slightly more. Don't put in too much. It's going to make the coffee bitter and darker. So for the first couple of times, you may not even get the right taste you're looking for.  And it's going to give you the best color, flavor and taste. So that's all for today. If you like what you see, please go ahead and like this video. So more people can find out about this video. And if you appreciate a variety and idea, then definitely go ahead and subscribe. Thank you for watching. There will be more videos coming up. So I'll see you shortly. Thank you.


Brought to you live from New Hope, Pennsylvania. It's the Matt Back Show. 7, 6, 5, 4, 3, 2, 1, Go! In this episode, we discussed buying your salon from your salon owner. We also discussed upgrades in beauty school. Very important. And what else did we talk about? Oh, separate bank accounts between your behind-the-chair needs and your salon needs. Where to put your dollars? In my pocket. Welcome to the Matt Back Show. This is our weekly podcast with Thad Bolanized and me. You didn't sound too excited. You're like, this is the Matt Back Show with Thad Bolanized and me. I feel like I don't know. You should be excited about yourself. That's a good call, Thad. I like that. Thank you guys so much for watching. This is episode whatever. I don't even know. But we'll just call it the Q&A part of the vlog for the week. I'm really excited to go through everybody's questions. Thank you for submitting those questions. If you want to submit a question to this show, best thing to do is to use the hashtag D Matt Back Show on anything social media. But if you definitely want me to see the answer, then you should go to FSE Social App. Yep, officially. FSE Social App. Go to fsesocial.com. You can download the app for your iPhone, your Android device. And you can start talking with all the hairdressers on there, posting questions, posting your work and getting involved in the community because it's really awesome. I'm really psyched for everybody that's on there. And actually a couple of questions from today came from this forum. And you can also watch the sibling rivalry of Drea and myself as to who's going to be number two on the top users. Yeah, Drea and Thad are fighting for who's the top user on the app. She doesn't know this yet, but... You know you're getting a like from either Drea or Thad if you post something on there. She doesn't know this yet, but I hit her computer and her phone. Oh, nice. Good job. All right, cool. So let's get into the questions. No more wasting time. First question. Pull up the thing. We only have a few questions today, but they're really good questions and kind of long questions. And we don't have a ton of time. So first one is if I'm going to open... This is from Lisa on our free salon education community. If I'm going to open a booth rental salon and operate one chair myself, should I have two separate accounts for the salon and my behind the chair needs? I feel like the behind the chair needs and the salon needs are one and the same. Yeah. But definitely have two separate accounts between those needs and your personal account. Yeah, because I mean you're going to be giving yourself a paycheck. No matter what the entire thing is your business.  So if I take clients all day Friday, I cut myself a check for the clients I did just like I would cut anybody else a check. And then so it is two separate accounts. I have my personal account and I have my business account, but I don't have two separate business accounts. There's no reason to do that. Even if it's booth rental, I don't think there's a reason to do that. Treat your booth rental as your business. Write yourself a check from your business and then put that in your personal and that's a legit way to go about it. Yep. Cool. That was easy. Sounds legit to me. Yep. All right. Next one. This is, I believe, let's keep it anonymous. I've decided she or he says, I've decided to ask my current owners if they'd sell me their business. I'd love to take it over. Do you have any suggestions on how to approach them? Is this brand new? I know. Right. Is it no secret that I aspire, or it is no secret that I aspire to be a salon owner and that, oh my gosh, I can't read this. It is no secret that I aspire to own a salon and there have been comments slash talks before, but not in a while. Any advice would be greatly appreciated. Also, I love your salon gratitude website. So I can assess a few of those things, even the website. I was in the same situation. I worked here in this building for a couple years. I found myself being more involved in running the actual business side of this. The owner moved away. And so the opportunity approached and I just called him up and I said, this is what I have to offer you. I would like to buy your business and he was very grateful. I think this is a funny question. I think you just came up with a clever way of telling your story. I know, right? Because this question actually describes exactly what you did. Yeah, it is. I think it happens a lot. I think a lot of people, this is how salons either, this is that transition that you make. So you're either right now about to go work somewhere else, maybe go try to open your own, but it's harder to open your own than it is to buy somebody's that is already established. I was very lucky in the fact that I had already established my clientele here, so I didn't have to lose any of that. I had already taken over his clients because he moved away. So I had a book where even if I didn't hire, this was like my big thing at the beginning, even if I didn't hire anybody else, I could pay the rent here based on the hair that I did and still be okay. The business would be able to stay open. That gave me the freedom because as long as I can survive, I've never been afraid of like struggling because that's what part of business is. So now I'm not afraid to fire anyone and I don't say that in a weird way.  So my big thing is try to buy the business if you can. The problem with salon owners is they overvalue their business because they don't realize that most of the time it's the salon owner that brings in all the money and then in most cases that's the busiest person and then the other people aren't as busy. So they're putting the value on their book and it's really the value of a salon for the most part unless it's a really profitable successful salon with employees and the owner isn't the main producer. The value is only in the equipment. That's true and I think that that assumption that their business is valued more goes back to the fact that a lot of salon owners are learning as they go. They didn't necessarily go to business school. This is their first run out of business. They're not necessarily CEOs from another company. They're learning about how to be a business owner as they go so they wouldn't know exactly what the value of their business is because they've never dealt with that. Exactly. So I would, to have somebody take a look at it you really need to know the inside of the business and understand that. And I think I overpaid for this business a little bit in the fact that it was my customers at that point. It had been my customers. But you know what? You don't want to underpay for it either because you're not there to rip anybody off. So just offer what you can. If they say yes then great. I think a lot of people think they're going to build up a business, sell it for a million dollars and then that's the retirement. I don't think that's the typical salon transaction. So just, you know, I would assess how many chairs it is. If you want to repost and ask me that question privately I would definitely assess, help you kind of assess that. But just look at the books. You need to understand the business before you put in the offer to buy it. I already knew this business. I knew we were writing the paychecks. We were the ones that weren't able to cash the paychecks. We knew everything about this business when we bought it. So you need to know the insides of it. All right. Hopefully that helps. And then our salon website. We actually use a company called Wix. Wix.com. And it's such an easy way to make a regular website. Like any hairdresser anywhere, any human being can make a website on Wix. It costs, there's a free version, but then for $9 a month you can have your own domain name. I think we pay maybe $15 a month for Wix. But it's literally the easiest thing you could possibly do. You don't have to know how to make a website. You just have to know how to kind of, they give you a template and then you add your pictures in and your menu. So it's really, really simple and affordable. All right. One of the last questions comes from, let me just make sure this isn't anonymous. No. It's Jason. Jason sent me a message on email. So that's pretty cool. I have a question from Matt. I'm a cosmetology student who has a steady flow of guests. And when I don't use my time to work on a mannequin at school we have a system designed to reward students who reach certain set of goals to move up in level. I reach the guest count and haircuts and colors but fall short on other categories such as referrals and add on treatments. How important are these levels to employers? How important are they to you? I feel that I am growing as a stylist regardless whether or not I move up in level and remain intensely passionate and excited about learning with each and every guest. Just curious also can students purchase products from the site at the professional cost? Referrals and add-ons are very important. They're basically how you grow and give yourself a bonus. So I would say that that is a hard yes that employers definitely look at those as positives. Here's what I'm going to tell you. Anything that you're ever going to do that seems more difficult than other things is probably what's going to make you more successful than most people. There's a point where people sit in a comfort zone and you can do cut and colors all day. You don't have to go hand out cards. You don't have to. There's a lot of things you don't have to do and you're still going to get customers but it's that little bit that you grow above and beyond where you're going to see that it's going to separate the successful hairdressers from the non-successful hairdressers. Add-ons are important. When are add-ons important? If you're booked all day then maybe an add-on isn't as important that day but if you have a few clients that day or if you're booked that day and you're trying to book other days or maybe two weeks from now you're not as busy then you have that busy book to offer add-on services that two weeks from now you can do on those people that you currently have that you're busy doing right now. There's a lot of...  That's when they start worrying about it is the day that they're not busy. Add-ons are also great to make up lost revenue. So let's say you have a foil and a haircut and then you have a men's haircut following that. That men's haircut cancels, you add on a conditioning treatment you just made up that men's haircut. You didn't lose any money. You gained a lunch break? Maybe during that 10-15 minutes while the conditioning treatment is hanging out to put them underneath lights or something. I've always been a person that's very driven by my paycheck.   But when I got into the real business of doing hair I realized that that relationship everything that you're doing with that guest is so important because you've got to bring value to a person. Every guest that sits in your chair you can't just do a cut and color on them because the more services that you add on to it the more value you're bringing to your situation and your relationship that you have with that person and so you're going to make them stay with you. Like that might have a guest where he just does a cut and color on and then they can't get in with that that day so they go somewhere else where they can get a cut and color. But if that's doing Olaplex and so he sold you on Olaplex and how much he loves it and your hair can't go without it and maybe a super silk and all these different services that you do different highlighting techniques now it makes somebody scared to go somewhere else they feel like if they ruin the relationship with that how are they going to find all these other things that they're used to getting. So add-on services not only are a boost in your paycheck or from an income standpoint but they're also great for relationship building as well. That also goes, you can double that with referrals because if you have clients that are so devoted to you that they're telling their friends and family to come to you they're less likely to leave you as well. True. True that. Mic drop. Mic drop. Alright cool so that is the podcast for today. We're going to do some hair. Thank you guys so much for watching. We enjoy the questions. Enjoy getting together every week. I would love to continue these conversations on the FSE social app. So go to the app store type in either just type in FSE social it will come up and that's pretty much it but you can get involved on the conversation with us there and you can watch the fight between Thad and Dreia. Right. Well they can't watch the fight. They'll just see the... They just see you popping up and down. Yeah or you can try to beat Thad and Dreia which would be even better. Or you can help me beat Dreia by A, conversing with me or B, help me hide Dreia's electronics so she can't use them. Yeah. Alright cool so you can follow Thad. Thad Bolognais. Thad Bolognais or everything. I think I'm just Thad Bolognais on FSE. I don't know. Yeah. And find him on FSE. It's like my own cell phone number. I don't know. But we have a couple thousand hairdressers now and counting it's going up about 100, 200 a day. So I'm enjoying having everybody get on there and follow us everything at Free Salon Education and appreciate all the conversation you guys are making with us. Use hashtag TheMapBeckShow if you want to ask a question or post your questions on the forum app. Done. Got anything? I'm just Thaddeus Bolland on FSE. I looked at that. Okay cool. Thaddeus Bolland. Alright guys thank you so much for watching. We'll see you guys on the next show. Thanks.