e e so uh just wait for 5 minutes uh until more participant will join and then we can [Music] start sir yes uh Robert Robert socer previous Edition video links can be helpful for this meeting sorry uh come ahead uh pre uh previous lecture of Rober soer 2024 can be helpful for this actually that is a yeah we will cover this in Q&A session just wait for few more participants will join and then we can start okay sir I joined just now did I miss anything okay uh sh we start uh yeah welcome to Robo software 20125 this a virtual event Edition uh in margali so comparing to the previous Robos Edition it is completely virtual and uh we are going to cover that in in a new way through simulations so uh in this event you're going to learn learn lots of uh stuffs related to simulation and components and everything so let's proceed can you hear me yeah yeah yeah yeah thanks a lot bro thanks a lot for that uh you know for starting this and yeah so uh guys I'll just take five minutes of your time as this uh an introduction uh most of you will know me as uh the person who did Robos soer 2024 and um this is uh Robo soer 2025 as a starting we have done for margi in 2025 this is going to be even bigger than the one which we had last time and for marashi this time we have uh you know the competition where we will be asking you to make uh circuits on walk and tinger Cat all the details will of course be shared by my team uh I myself am not in the team this time because the electronic system students are U you know taking this forward I'm as the mentor this time and yeah this team will definitely make it even better than what we had last year and uh yeah so this time I'm organizing spark and in spark also we have Robo soccer so if you're an electronic system student visiting the campus in Jan which is in the next few days then uh please make sure to contact me and make sure to participate yeah so that is all uh the introduction from my side I hope you enjoy your time participating in Robo soccer 2025 in margi all the best once again and yeah I'll hand it back over to my team to continue the session thank you so much yeah so coming back to the session uh this is our first session of Robo soccer 2025 and we going to give you intro about the event and its guidelines and everything and uh after this we going to conduct your live I mean your simulation tutorial for Tinker cat so which is covered by our team number stre so just uh stay tuned for that and so in Robo soer 2025 we are going to make a robot which has a similar thing in robosa 2024 but with additional additional camera one uh which means uh first person view robot which is a live streaming one and it is completely uh built upon the simulation only uh no need to uh build a physical one and we don't ask for that also we will complete uh everything from for you from the basics to the uh from basic knowledge that we that you need to have to build this simulation and for the event event details uh or event comments us from today itself and uh whoever who doesn't register for Robos Saker 25 uh till now make sure to register uh before January 1st 10 p.m. so that's when our registration closes so whoever who doesn't register for the event till now make sure to register I will our team member will put your link to the registration also you can check that so the highlights of the event as I mentioned we are going to build the FP fpp robot which is a live streaming one and uh we will cover you all the tools that you need to know uh in this we mainly cover two tools namely Tinker card and walk so these are beginner friendly and it is a very efficient to build this so don't worry about anything you you doesn't know about the tools before itself we will cover you from the basics and this is our event plan so today we have the introduction to event and the simulation part of Tinker C and tomorrow we will have another session on walk we which is another simulation tool and a live Robo demonstration from our side and uh January 1 10 p.m. itself the robot design competition starts and you have more than 3 Days To Build Your simulation and you have more time to learn and can make uh you can do both of the simulation in Tiner and walk we and uh and you can yeah check yourself which tools suits you and there is a lots of learning uh there in the span of three three or more days so make sure to use make useful of that uh from the day one itself and in that meantime we have a doubt clearing session and uh we have another session with our es professors also which is a guest session and January 4 we have the doubt clearing session from our our team only and finally we have the price distribution session uh actually we have uh cash prices also and uh we have income prices that is uh uh just it's a surprise uh whoever make that will definitely know that and yeah speaking about the GU lines so this is only based on the virtual event so it is purely based on the simulation tools only uh in this you the participants can use only any of the tools but you can yeah you can play with two of them and Suits whatever best to you and submit the simulation in that particular tool we have W and Tinker card for this event and make sure to submit your simulation that is a functional one because uh we will cover everything from you need to know to how to operate the tool and how to build the robots in the SIM a tool itself so make sure to submit your functional simulation model and yeah speaking about the experimentation you are allowed to use whichever suits you and I highly recommend you to uh play with both of the tools so you can get uh experience in that and yeah uh it's an important one we are also accepting physical models also that uh that means if you are enthusiastic to build a physical one we are also accepting that and you have to submit your video uh demonstration of that so you can uh submit it itself and these have some other rules for the physical build not not the simulation part I'm talking about the uh physical bill so we have a set of rules that we will share you uh later after this meet in the group itself so whoever wants to create your physical one make sure to uh your robot should uh satisfy those uh restriction made from our team and yeah the rules is you have every everyone should submit the simulation model even though you have build a physical one because we accept the solution is purely based on the simulation model that you submit at the deadline period and uh use of the components uh make sure to use the components only from the op and the uh Tinker get libraries uh so don't use any kind of other things and submission you have to uh make a uh video demonstration of that simulation part also whatever the tool you have used both have the sharing sharing option in that uh uh simulation uh so you can share that link in the G form that we going to circulate after uh I mean during the deadline time so where you can submit that uh simulation model link and the demonstration video of yourself demonstrating that simulation part and uh yeah speaking of the evolution criteria it is purely based on the design design part and the functionality e even though you need to stick to the rules that we have mentioned here yes and for the regulation it is nothing more but this event is a solo event so every participant have to participate individually and yeah the second one is most important make uh every participant must submit your original work don't try to copy from any other simulation model that your friends or someone made so duplication will definitely result in disqualification from the event and yeah the submission deadline is January 5 uh we are accepting until 6: p.m. so you
have uh more than 3 days to work with your designs and yeah judges decision is the final so our es Professor will judge everything so make sure to you give your creativity and uh yeah it is a design competition so make sure you you give your 100 per to the design and the functionality and yeah uh as I mentioned earlier we accept physical Bill also but it it has to comply with the rules that be mon share in the group later and just a rem reminder who what who doesn't register for the event till now make sure to register and we will share the link also in the chat box uh go and check out that and yeah uh any other question related to this even guidelines and everything uh go uh sir I have a doubt like uh we can build two now like uh on while evaluating will they compare the offline one means physical one and virtual one can they compare or there is separate evaluation for this and then no no uh actually the evolution is purely based on the simulation part not on the physical one but if you want to build a physical one you can build that and you can get into Paradox Robos soer also with that will there be guidance in marari for physical one no uh but uh as of now there is no guidance for that what what type of robot we have to build like is there any theme or specific theme like yeah it is a mentioned right uh it's a streaming type of robot actually it is a live streaming no but what functionalities we have to put in that like like I am I have zero zero experience in this field so can you tell okay okay so we will cover how to build a robot in both simulation tool you will get a uh yeah St will guide you uh everything you need to know to how to build a robot in that tool so don't worry about that he will cover that in this session sure sure yeah uh sir what will the winner get yeah it's we have cash pressures so actually is a cash and uh everyone who have submitted their uh simulation model will get a participant certificates and the winner gets winner certificates yeah uh kishan Singh sir how many winners we will have in this Robos Mar even yeah actually it is three plus three p and we have in kind prices also uh the first three position the winner position can you show us some examples of simulations yeah we will uh teach you how to do that uh if you have any questions regarding the event not uh not as the technical one uh regarding the rules and things like that uh you can ask here if not yeah so so what parts of the robo we need to add to the simulation oh okay okay so all your doubt is about the simulation part uh we can move the to the simulation tutorial if you have any doubt regarding the general event queries you can ask because that will be covered in this simulation tutorial so it's like we have to make a complete robot but virtually not yeah yes okay do we need to make a file also hello yeah do we need to make a file also what component f means what component should we use in that robot for no no uh actually uh we are accepting the video demonstration in that you can explain that right a short form of Video Only video is yeah your simulation model link and the video demonstration screen Rec so how you explaining the yeah sorry uh how will you evaluate the simulations of students you will need to yeah it is based on the design and the functionality okay okay any other queries so if there is no queries I can hand over the session to St uh will teach you everything about the Tinker card simulation 2 okay St yeah hello am I audible yeah yeah you can okay yeah yeah I'll take so hello everyone I'm San I'll be guiding you throughout this Tinker cat simulation session we we'll be learning how to simulate two projects uh these are examples we'll not provide you the exact blueprint we'll just provide you guidelines and examples so that you could build and come up with a good project for the margary event very happy to be part of margari happy New Year everyone uh let us begin I'll share my screen once it's visible please [Music] do okay I guess it's visible right okay uh shall I start okay see uh I want everyone to be active in this session so if possible everyone just open tinkercad.com uh I'll give you a minute time to log in with your account do it now come [Music] on uh after doing it please do give a thumbs up so that I can move [Music] forward also sorry very sorry for the background noises my house is at the main road so [Music] okay okay hoping some of you have opened it let me move forward okay uh I have already done these simulations in the preparation for this session uh here I have an obstacle avoidance bot and I have an remote controlled RC bot okay uh this one is quite complicated for a beginner who's using Tinker cat for the first time so let me introduce you to the obstacle avoidance part okay I'll Tinker this we'll be building this from scratch I'm just showing you a working model okay so I'll okay guys basically if you are stuck at some point you're not understanding you have some doubts please do unmute yourself and ask by the way okay right uh I'll give start here to start the simulation and you can see that the motors are running at 231 RPM uh why is this happening see this project in this project we have an ultrasonic sensor which senses an obstacle at a distance uh as it senses the obstacle we can uh give an control statement in the code to make this Motas rotate the way we want uh what I have done here is to make the threshold uh distance 50 cm so the ultrasonic sensor if an object is below 50 cm from uh the ultra ultrasonic sensor then it will sense it and the motors will turn left as you can see I'm keeping it at 41 cm and now uh it's moving to the left now the left motor will rotate to the backward Direction and the right motor will rotate to the forward which will create a left to okay so I'll change this you can see that the motor start to rotate in the forward direction again I'll show you the code this what we are going to do we'll be doing it okay so you can also see the this serial monitor displays the distance that we are from okay though it's not quite accurate uh it is an approximation okay so as I keep changing you can see that the values change every time so yes I'll stop Sim now uh does anyone have any doubts with this sir I didn't understood exactly this purpose uh okay okay this is basically an ultrasonic sensor an obstacle avoidance bot okay uh as I start simulating it the Green Point you see here where I point my mouse this is an obstacle okay maybe an object whatever your mobile phone a book or whatever so the the sensor what it does I'll come to the part while we are building it okay I'm just uh as an introduction I'll just keep the working part of it now I'll come to the building okay uh could everyone uh it'll be it'll all be saved so you can just come back uh okay okay so everybody will be here now you can press this circuits [Music] button uh you can give the create create circuits and here you are you are at the new page now by clicking at this you can change the Project's name I'll call it again the obstacle what see it's it's changed okay so now going into the components of this bot we'll be using an ordino UNO of course as we saw saw in the simulation we'll be using an RedBoard uh you can by the way you can drag these things from the components okay uh if if everybody is doing it uh if someone has any doubts please do unmute and ask okay we'll also need a 9 battery for this experiment I'll place this here uh we'll need two Motors [Music] [Applause] [Music] okay now I'll need a motor driver motor driver this is the L2 93d okay placing the motor driver here I am going to get the main thing that is the ultrasonic sensor search for Ultrasonic in the beneath the components you have a search bar okay you can also press contr F to search in it directly uh just type in ultrasonic okay uh you will get you'll get the components other components we have HCR hcsr 4 uh this is the ultrasonic sensor that we are going to use here this distance oriented ultrasonic now we'll be these are the parts that are required okay these are simply uh what five or six components okay now we'll start wiring these components so that we can go forward with the simulation uh I'll connect the positive just click on the positive terminal you'll start getting an wire uh after you get an wire you can change the color of The Wire by pressing the numbers in your numad okay uh I'll change the color like as this is an postive terminal it's an convention to go with red right so I'll go with red I'll give it to the breadboard go with black black is one red is two and so I'll go with black and connect it to the red board now for I hope you guys know the breadboard rules see the breadboard uh the middle part of the breadboard every vertical vertical column has the same voltage as every point on okay and for the corner parts of the breadboard labeled as minus and plus we'll have every voltage Point same in the horizontal Direction okay so let me just yeah yes sorry I didn't get your doubt sir please repeat that again can you explain okay the breadboard part of it yes okay so uh in the breadboard see the when I point my cursor here I'll go I'll zoom in and zoom in a bit when I point the cursor at a hole you can see that the horizontal lines are all getting green in color okay here the thing is we'll have same voltage in every point in the horizontal direction for the middle part of it we'll have everything in the vertical Direction okay so the the thing is now I can manage my wires I can draw the ground wire from here to the other part of the bread P because we have same voltage uh in this pin and in this pin understood yes sir okay so moving forward I'll give this to this pin sir I have a doubt like if we made a connection by mistake and if you want to remove that in bitboard how should we remove uh you can just Okay click on the point okay wait I click on the wire if you click on the wire you can just take it drag it anywhere okay understood if you want to remove from the both ends can yeah you you can click on the wire and press delete you'll get it deleted got it yes sir yes sir okay now we'll start uh giving connections to the l293d okay now the l293d most of you guys and also uh in this uh in reality we'll be building uh the robo soccer Bots with l298 motor driver here we are using l29 3D driver okay uh in the simulation part you'll have to use this so as you can see as I point to the pins of the l293d you can see which pin it is uh for example this pin is ground this is output this is input this is enable Okay we'll start giving the connections the ground is of course connected to the negative part of the battery so I'll give this in Black this is this also says for l29 is not showing sir yes sir l29 is not sh okay yeah you can press contrl F or you can go to the search bar you can go and type motor driver you'll get this sir is it hge mot driver yeah hedge Bridge motor driver yeah that's it yes sir we got okay okay so so uh we have connected it to the ground pins okay now I'll do it to the other side also I'll start doing it to the other side uh I go from here to here okay so the ground pins are connected to the negative point of the megative terminal of the battery now we'll start connecting the enable pins and the power pins these enable and power pins will be connected to the positive term we need Supply in okay Power that's what basically it is so I'll connect I'll change the color to Red in order to make it understandable now connect this to here okay ah I'm done uh this to here and this to here good uh if this is clear let let me proceed with connecting the other pins the output and the input pins so basically the input pins will be going to the ardino board and the output pins will be going to the motor driver before that I'll connect my Uno board uh all wies are of same color it's not like red and black it's only of green yeah you can change that you can basically change man after selecting the wire you can uh press any number key in your keyboard is it changing like should I select one wire and then press number key uh yes uh see after after to a point you have uh an wire extension like this on the above on the other toolbar there's a uh option to change the color yes sir like red and everything but if I don't change it doesn't matter now mean it doesn't make an impct yeah it doesn't matter just to make these simulations clear I'm doing this okay doesn't matter okay so we'll be doing the ground sir yeah yeah why you have connected the 5 volt of the ardino with the 9vt battery uh just to give power right no but at Ardo it's 5 volt and at battery it's 9 volt uh it doesn't matter man it uh we we are just giving it power okay so I want it like make it 14 volts in total no no no so uh see uh if whatever is sufficient we'll do that right why are we providing more see our Motors can these hobby Motors can only take in uh 300 RPM I guess okay so it will be sufficient 9 is good okay okay so I'll keep moving I'll start connecting the input and output pins okay input pin I'm dragging I'll give it to the ordino board I'll make it orange I'll give this to five uh I'll give the input two to another pin six doesn't matter which pin you give I'm just giving it these SPS input three and give it in uh nth pin you can always uh adjust this by just dragging okay adjust the wirs by dragging that is simple uh we'll give input for by here to the 10 okay this is clear we'll start giving the output to the motors Okay so so output three will go to my I change this to Green to the positive I'll just adjust this okay doesn't matter I this is output four output four goes here and to the negative this is output one out one yes one here here and here this is output two this goes here okay so now that we have connected the motors uh we have connected the complete l293d so we have finished the connection of of the motor driver we finished the connection of Motors we also connected the battery the thing is hcsr 4 is left alone now we'll start connecting it we'll see uh if I point this is ground this ISS Echo trigger and power of course now the power is going to go to my positive terminal and okay I'll just make this now this ground goes to the negative the Echo and the trigger pin will go into the ordino pins okay whichever pin you choose you can give it I'll give 13 to trigger and 12 to Echo okay so this is basically the connection for it for the simulation uh I'll give you 2 minutes time if anybody has any doubts uh you can ask me I understand the parts you used and all the terminology but I don't I am not getting like how are you designing the circuit like which terminal to connect where to okay understood if you are not understanding which terminal to to connect where to connect you can always see the pins right it says input it says enable it says ground and it says output we have four types in the l293d driver okay so with this driver uh we have got to we have got to connect the power pins power one and power two we'll connect these pins with the Positive terminal of the battery which I have connected to the bedboard from here we'll connect the ground pins of the motor driver to the ground which is negative terminal of the battery here uh we'll connect every output pin to the motor okay output here you see this wire going here here you see this wire going here this will be an output pin this will be an output this will be an outut the input pins will be going to the r is that clear yes sir so can we do this from starting like connection uh uh once again meaning yeah sir means you explain by Logic and then connect then it will be easy to understand I am not getting the logic like how do you are designing the circuit why you are not giving power to the ultrasonic sensor from Battery like uh what is the use man we are direct if we are directly giving the power to the ultrasonic sensor uh okay it will work we how will we even move the motors we'll anyways need to move the motors we in by means by all means we are actually giving power from the battery to the ultrasonic sensor which means you are right actually so we are using breadboard as an intermediary here that's all just to get the pins right no no that I understand but what's the logic behind like why you are connecting I am not able to uh pass you my query like I am not from this Electronics field so I want to know like what's the logic behind all the circuit uh you mean the general aim of this project or uh no why I want to know like so as a beginner I think understanding everything and like connecting the parts and everything we are getting that but why we are doing that is something we aren't very sure of sure of and we are very it's becoming pretty hard for us to grasp the concept yes sir we are just blindly seeing your connection and doing we are doing it and we are kind of getting it but it's it becoming difficult to understand okay uh by the way it's the starting session so you'll anyways feel it's quite harder because you're handling this for the very first time you will feel this is hard okay uh making these simulations will help you make this uh will help you make the projects for the event okay sorry interrupt but I would like to say that what they are trying to say they are not knowing which pin of hard Bo does what thing like so okay yeah that's it okay that's it okay okay yeah sir if you can can we do from starting like can you explain some of the uh logical thing of the connections like you said now output we are doing to motor like that any other okay uh output we are doing to the motor you guys should be clear with that input we are giving it to any of the ardop pins we have 13 of them okay you have 13 ardino pins you can give your input to any of them we have four inputs from the motor driver you can give it to any of them uh I have given the Echo and the trigger pin at 12 and 30 this has no logic you can give it to any pin okay basically while coding it you will change the pins so it's not necessary that you certainly plug this wire to this pin got it sir what will that Echo and Trigger to ah I'll explain this while coding okay I'll explain this o Cod so okay all right let me explain it now okay wait uh what we'll be doing in this project is that we'll be sending a pulse okay a pulse is nothing but a square wave we'll be sending a square wave to trigger the hcsr force sensor we'll trigger the sensor such that it starts so when the sensor starts it starts uh giving out ultrasonic waves okay it emits ultrasonic waves these waves go to a distance hits an obstacle and gets reflected while it gets reflected we'll have our echoin configured at low okay in initially we'll have our EOP pin as low uh we'll have our eopen as an input so that when the reflected waves come back to the ultrasonic sensor the echo pin will get high so when the echoin gets high we'll be we'll be using this as a condition to calculate the time uh all this may sound quite trival and Abstract uh let me not get to uh confuse you let me start coding we'll try and understand here and there okay uh sorry to interrupt uh St H yeah uh can I give that logic over of what you are doing yeah yeah yeah yeah okay uh please Mak yeah okay uh just listen we are building a bot I mean a robot uh which is moving and finding any obstacle in its path so that it can move accordingly so for that we need uh Motors to drive the vehicle right and for sensing the obstacle we need a sensor which uh which is works on the uh principle of uh I mean that it senses the uh Distance by sending a uh signal which gets uh gets reflected by that obstacle if there is any obstacle it will gets reflected if it is not reflected then there is no obstacle there so that the robot can move forward and for the ad you know it is a microcontroller uh which is the brain of that robot so we are programming in a way that if the sensor catches a obstacle it should send a signal that translates into the motor uh so that the mod can move accordingly if it is a obstacle before that it has to move either left or right to get away from the obstacle so that uh chip that I see you are seeing in that bread Bo which is called as the motor driver uh it's like if you are sending a signal as St said that ardino pins will send only the signals if the signal is sent to that uh uh I mean that L 293d IC it will translate into Motas signal uh which means if uh uh if your high two high signals come there it will automatically H the two motor if either one signal comes it will on only one motor basically it is driving that motor and for the uh reason why we are using 9vt battery is the ardino voltage isn't enough to drive the motor because the motor requires more energy to run so we are additionally using a 9vt battery uh which needs to drive the motor so that's all the logic overview of this obstacle bot and yeah I'm sure you can now understand these things yes sir now it is far more clear actually okay okay similarly can can you continue this wiring also no no uh St will handle that as St goes on you will definitely understand those things like logical behind very clearly sorry I can't again you can continue okay okay so let me start to code this bot we'll go to there are three edit modes for coding we one we'll have blocks the other one we'll have blocks plus text the other one we'll have text as a good practice let us start to do to the text uh just clear these codes and I'll start so what did we basically do in the simulation we have set up a motor driver which drives the motor uh when the information from the HC sr4 is passed so we'll need to Define these pins we'll start defining the pins okay defining the pins of hcsr four uh I'll use constant integer as we are not going to change uh the pin number we'll give the trigger pin wherever we have given the trigger pin you can see here we have given the trigger right trigger goes to 13 pin so I'll give 30 here similarly the constant integer Echo will go to the 12 pin here it goes from the hcsr 4 to the 12th okay so we have defined the pins of the hcsr 4 now we'll start defining the pins of Ard see we have connected 10 9 6 and 5 so these will be connected to the motors okay it's a very good assumption to take uh left Motors positive this is left motor uh and if I assume this as the left motor and I say this is the positive this uh positive can be taken as the forward motion for the left motor so I'll Define this as constant integer left motor forward this will go to this is just click on this wire you will get this you're going here okay you follow this pin this is output one output one the adjacent pin to the output one will be input one so when getting to the input one you can see that the input one goes to pin number five so so you'll be giving five here similarly you give constant mode constant integer you will give LIF motor backward now the backward is the negative part so you'll have green wire we have this one going at six so I label the pin as six I'll repeat this procedure for for the right Ms as well uh the right Motors forward is going here which is to the nth and the other pin left is 10 of course so it will be 10 after we Define the ardino pins we'll have to call a function called void setup if uh anyone has experience with orino you know uh how vo setup Works vo setup uh this basically your uh labeling your pins as input or output so here you'll be setting your PS how you will use a function called pin mode okay so p n Ms Capital note Ms Capital uh you give pin mode you will give whatever you labeled I have given trig so trigger as an output pin I'll give pin mode Echo asent input as I told trigger sends out the pulses the waves and Echo reads these waves and it calculates the distance with another function which we'll see in the code okay going forward we will have pin mode for setting up the ardino pins as well uh that is the motor pins so lmf this will be all the motor pins as I told these will be output so I'll copy this and Sir can we use blocks instead of this yeah you can also you can also it's a good practice to do it in text it'll uh just make sure your coding knowledge is good but blocks is also fine uh I'll do left motor backward right motor forward sir is it always coded in C++ only yes uh the ordino ID uses C++ right so C and C++ so it is okay so we have set every pin trigger and for all the four pins of the motar now we'll give serial begin serial begin 9,600 what does this do this sets the B rate for transmission if you have studed microcontrollers you will understand what a b r this it's just a way of transmitting it's just a transmission rate okay so after doing this we'll get to the vo Loop where we'll be coding the functionalities of the robot here as I told we'll start with generating a pulse this pulse will trigger the hcsr 4 to generate a pulse we'll use the digital right command use digital right whatever pin you are going to set you will set it uh for instance we are going to trigger so uh I I'll use the trigger pin trigger comma first I'll set the trigger pin to low we are going to set we are going to generate a square wave so low high low okay it will generate a square now I'll call a delay of two uh you can give anything between 1 to 10 it should work fine digital right not that digital rate W will be Capital uh trick High delay 10 digital again low now we have successfully generated uh pulse okay uh I forgot one thing we'll also need to Define some variables that we are going to use okay what variables are we using in hcsr 4 we are of course calculating the distance right so we are going to do in distance Z and we'll also calculate the duration I'll tell you what this is if you come here you will start with the duration being found out with a function called pulse in this takes Echo and high as the parameters now what does this do so the pulse in function calculates the round trip time okay what is round trip time uh the time taken for an wave to go back and forth okay so as we are doing this whenever the echo pin is set to high whenever the echo pin is set to high we'll get the duration we'll get the time basically the round trip time that will be stored in the duration now for the distance part of it we'll of course know that distance is speed into time uh time is of course calculated by the duration and how will we calculate the speed speed is going to be a constant value of 0.034 what is this this is the speed of sound okay this is the speed of sound in a so we send out waves that hit and come back this the speed this is the time and we'll divide it by two why divide it by two because uh the duration is for back and forth right but we only want it to be uh upfront so we just want to calculate it once so we'll divide it by two f after doing this we'll start the control statements [Music] if if my distance is lesser than 6 for instance uh I should digital [Music] right my motors to move to the left for instance we'll move to the left okay you can also move to the right you can move backward anyways for instance we will just do it in the left direction to move in the left left Direction you will not Propel your left Motors in the forward Direction so you'll give low here next you will give digital right the left backward motor to uh high so now I'm going to copy [Music] this now we are going to change this to right right in order to move left we'll need to propel our right Motors forward right so I'll Propel my right motor forward to high and set this to low now I'll also given if else statement okay why do we need to just uh keep turning left right if uh we have enough clearance distance why do you need to do that so if it is more than 60 we'll keep mov forth so yes so what is low and high here can you explain uh low and high are signals if uh you give low or high it will start uh propelling the motor in that direction okay so if I give left motor backward it will rotate at an uh positive RPM for instance if I give left motor back it will rotate at negative RPM by by giving low High we are just activating the motors to run okay sir now got it [Music] so after results we are quite done simulating get this so uh if I press simulation you can see that the motor start to propel with 143 RPM okay uh I'll click my HC sr4 to adjust the distance now you can see that it is 113 CM away the object is 113 CM away if it is 113 CM away I need to move forward of course the motors are rotating at a positive RPM so my rower is going to move forward now if I bring my obstacle near uh I have placed it at 31 you can see that my bot is turning left so this was basically the demonstration for an obstacle clearance bot if you guys have any doubt you can ask while I'll also print the I'll also print the distance at which the obstacle is there in the serial monitor sir yeah what is delay to and delay it uh it's basically generating generating a delay to ensure smoothness it's a convention okay uh if you have you might have some uh disturbances while generating a pulse so you'll give delay two and eight in order to make sure that it's smooth you you you don't need uh the way to immediately become low high and low right you need some delay generation so that the wave is created properly [Music] okay so okay uh I was about to okay I'll stop simulating I'll add serial s is capital serial serial dot print Ln I'll give I'll give my distance here now serial dot print [Music] Ln I'll give my uh yeah I'll do this distance uh if I use start simulating this will debug by itself uh this will provide okay uh here you can see that the object is here I'll if you see the serial monitor it's printing distance 3030 it's only an approximation now if I move it you can see it starts varing so this was it for the basic tutorial of obstacle clearance if you guys have understood it we can start moving it to the IR remote car sir are the functions like digital right delay and these are predefined or you yeah yeah yeah yeah these are predefined functions so these uh dig WR serial print Ln uh delay uh everything is predefined we are only defining the pins we Define we can we can change that according to the connections uh the other things are predefined [Music] if there is no doubt uh we can start by 810 we'll start with the IR remote [Music] hello no sir will the recording be available yeah this will be available so you can anyways refer to that uh if you don't understand this at the first time if you guys don't understand it please don't worry because these are complex at the first go okay while handling Tinker cat for the first time uh it's quite difficult to understand what's going on if you don't know ardino so you will need to quite put up you can anyway see the recordings and you can make the adjustments as well where do I get the recorded recorded on the uh uh uh you'll get it on the g-space created or on the WhatsApp group that has been created okay thank [Music] you so to be honest at first it is not very very clear but yeah we are getting a little bit of the concept is this fine now yeah it's it's absolutely all right even if you don't get it completely if you understand it even 50% it's quite good because you're starting it this day you guys have a span of 3 days to research about this tool okay you guys can play around with literally everything and learn about this completely my friend uh liit will be taking the session tomorrow he'll also introduce you to an interesting tool walk we where you guys will again learn about simulations uh my my particular advice is that you guys can take a time of one day to just play around with both of these tools okay you just try to play around with both both of these tools whichever you feel is comfortable you can start simulating and creating your project in that 2 days of project time will be more than sufficient okay sir thank you sir okay okay uh okay sir I have a doubt yeah yeah is there any better way to do this obstacle B than we did like we are having competition now so all we do in same way or there can be many ways to do one thing huh see uh I'll tell you a trick I I'll not do this in this session I'll tell you you can also add a thing called as I'll give here Servo okay uh micro Sero the servo motor will make the uh H csr4 to rotate okay so now in our functionality what is there we can only make the bot turn left if we see an obstacle what if there is an obstacle in the left okay we'll again turn left similarly if there is an obstacle like circular we'll just keep rotating uh in Left Right also these are not very uh accurate so even if you are giving a path this will keep on rotating to the left such that it won't even uh realize that it has a path what you can do is to have a Servo motor the servo motor What will what is the purpose of Sero motor Sero motor will rotate the hcsr 4 such that you can identify the obstacle at the left at the right and at the center so that it really is an added functionality now you can identify paths that you can go in free rate so instead of rotating only in left Direction you can also add that functionality yes sir sir I also have one more doubt like I don't know this language of coding so I I'm thinking of doing with blocks so will there be any disadvantage by doing that with blocks nothing man blocks is very simple blocks is uh no like in disadvantage in the sense I am asking like in competition will I have any backand than others who are doing with no no uh you can always change they'll not be seeing that man you can always uh change whatever ever you have edited in blocks you can always change that to text okay sir I don't know that so okay yeah so that will that will be an easy thing don't worry about that okay okay even though uh uh preference uh preference will be majorly given for the functionality and uh the simulation how how neatly you have done and things like that okay so I don't think think that will be a part of it okay sir no I I was saying like if I do with blogs will there any will there be any list functions no no no you can do everything you can do pretty much okay uh so let's begin the next thing uh if we can make it entirely with the uh you know blogs everything so we don't even need the codes to write am I correct correct so we can just pursue the blocks and blocks only yeah you can connecting and that okay so so all changes are saved so you can pretty much come out you can go [Music] back L come here you need to again again follow the drill uh of creating uh click create cutes and you will come to this page again I'll rename this of course I'll keep this IR [Music] car now let me start drawing the components from the list we'll be us ardino again you use the breadboard again you use 9 Again by now you should have uh got got it clear about the functionalities of these components by now it should be clear because we are repeating this again uh yes sir let me introduce you to the new stuff before that we'll add the motor driver motor driver yes uh now uh we are going to use an IR sensor search IR sensor here you will have IR sensor here place it at a corner I'll tell what uh what important it carries uh basically you can also click components all so that you can see all the components here uh uh if you do that you can see an IR remote now for now it's trivial let me explain uh about it later have I got all the components okay uh I'll also need a resistor forgot that I'll tell you why I need a resistor I'll tell you why uh I'll need a resistor because the IR sensor can only bear 6 volts if it if it crosses 6 volts it'll just burst off okay it'll be a good experiment for you guys to try it out in your lab sessions so uh you can do that uh so we'll have this resistance we'll give one kilm to reduce the voltage of the battery uh now we'll start connecting the components okay you guys know the drill so I'm not going to tell you just start connecting the l298 okay I'll start with the battery positive here negative there negative here POS uh 5 Vols [Music] I'm just repeating the steps of what we did the previous time so this must be clear uh again we are connecting the ground pins even if someone is late to this session this what we are doing the first class also first like this here St yeah yeah uh in the meantime of you making the connection uh can I give the uh brief over each components in the yeah yeah do it come on yeah okay okay so guys uh for this we need that brain I mean the microcontroller ardino uh in that we have digital pins and unlock pins basically the digital pins are the uh sense either digital pulse or receive a digital pulse in that mode we can uh configure that into input or output if you configure that then Theo Bo give your pulse as output if you configure it as a input it will receive your pulse uh as a input uh in the previous one we have seen that we give that some pin as input for that ultrasonic sensor because when it deducts your distance it gives that p as a input to the board and it will uh you already know that there are some codes there so it will work with that code and send your low or high pulse as a output so basically that low and high are just the voltage if it is high then there is a high voltage there if it is low then there is a low voltage there if the voltage is low then there is no flow of I mean no flow of current there and regarding the motor driver that I see uh in the center of the RedBoard it is basically a motor a h Bridge motor driver what is does is when we give the power to that IC like St wired that in a way one pin uh goes to the ground and another one goes to the uh positive one and we have uh four in I mean four inputs and uh uh outputs also so the input is the signal G given by the adino if it is high uh the motor either rotates rotates in your clockwise direction or an anticlockwise Direction so basically we are figuring the rotation of the motor in that low and high code uh you can imagine right if we give Plus at one one point and ground at another point it rotates in a clockwise direction if we uh reverse that it will rotate in a reverse way in that mean way the code is also written when we change the high and low Point reverse it will rotate in a reverse Manner and so whatever the doubts you have uh regarding this please post that in the WhatsApp group and we will uh clarify your doubts there also anything that you still have a doubt regarding uh because uh we didn't want anyone to know what it is happening [Music] [Music] [Applause] that any doubts there [Music] [Music] okay so yeah yeah 8:30 so okay so I should make it fast okay yeah yeah yes I'll I'll try I'll try uh so I have given the connections as we have done in the previous time okay so I what is this IR sensor for uh this for sensing okay uh we send signals from the IR remote which is sensed by the IR sensor okay here we have the out ground and power pins we'll provide the resistor here as I told the resistor is to cut the amount of voltage that is going into the pin because it can only withstand six volts ground goes to this Spin and power goes to thisin okay okay sorry sorry sorry the power must be curved so so I must give this to the now the out pin will go to the Arin openin okay here will have a pin change the color this should go to something let me see 8 okay now we are pretty much done with the connection we have connected the IR sensor uh ground goes to ground with power we have given the power out okay where is out out is here okay out here to 8 uh we have pretty much done it we'll start doing the coding part of it if anybody has a doubt till now uh you can ask it at the end because we have quite less time now now I start by including an inbuilt package okay the inbuilt package is called the IR remote uh see uh the notations like caps and small letters here follows because uh this is an inbuilt package you have inbuilt instances in it so you should follow whatever uh this taxes exactly okay so I'm doing this I will Define my IR pin uh where have I given my IR out I out goes to the Blue Line the blue line goes to the eighth pin so I'll give eight here so I have defined I now I'll start doing what I did the previous time for the motors okay left motor forward uh where does this go this is goes 2 five [Music] five let's move to backward we go to here right okay this goes to this spin which is six okay like M forward will go [Music] to uh this wire is going to 10 okay similarly constant put backward okay uh here we don't have any variables that we need to declare so I'll start proceeding with the void uh setup where we Define the things here we start with in mode in mode left qu output set it as output uh as we did the previous time we'll repeat the same with the other Motors as well this is left motor backward right motor forward right motor backward also set the board rate St yeah out of time so fast uh I am making it fast I can only copy yeah we can extend for more minutes or so yeah I'll try to make it as soon as possible if not we'll just yeah okay okay okay now go ahead we have did this here we'll need to use the inbuilt module I receiver do begin uh this receiver. begin we'll take in arguments of our pin and we'll be giving enable LED feedback what will this do this will set our IR sensor this will make the IR sensor ready like we did uh triggering right we sent a pulse to ensure that the ultrasonic sensor is started now we just give an IR begin command so that we ensure that the IR sensor is started now we enter to the void Loop in the vo Loop we start with the control statement we give if IR receiver dot decoded [Music] okay uh we just use ird code here sorry use decode here we ensure that the whatever is received is decoded if only if it's decoded then we enter this section of code we say IR receiver resume if a signal is uh got then it it just goes into this it says I'll execute the command and then I'll resume so I are here we'll be doing uh he will be printing whatever is received in the IR as a good practice so I'll have I [Music] we'll be converting everything to hexa decimal okay now uh we'll be starting with the if statements if I'll just copy this this the data paste this here I'll make this equal see if we press a key in the IR remote it will send corresponding hexadecimal signals the hexadecimal signals will be of the format that I write now Ox should be i i v v BF 00 what are this VV and II see the values in the remotes are will be labeled okay uh for example the power button value of the power button is zero volume uh that of the volume of button is one function and stop will be two you will expect this to be three but uh the previous button is not three uh it is four okay but this circle will be continue this is I'll tell you one by one this is 01 2 this will be 4 5 6 and we'll not give s we'll use 8 9 10 we'll again come to this 12 13 14 we'll be using it this way okay so wherever you want the values will be filled in that way how do you C what is this II then the I is the inverse I'll show you now see uh for example if I'm taking a forward moment uh as the volume button the volume button will be one right so if it is one I'll my decoding will be something BF wait BF BF 0 0 right the VV will be 01 because it is the power button will be zero volume but up button will be one now here for the how to compute the inverse Computing the inverse is simple you just minus the number from 255 okay so 255 minus 1 will be 254 convert it to exod decimal it will be Fe okay so we have found the decoding for the first which is the volume of yeah please proceed with the the remaining code part uh without uh okay uh so let me do one thing I'll I'll not code I'll just show them the running model okay I'll just explain them what it is that will be better yeah okay uh don't worry guys so we will cover you definitely and we will help you to understand that completely yeah and build your own thing okay see guys as I told uh this was what I built the circuit we built will also work this of the same principle uh okay we have seen it till uh the loop decode receive I have written the comments here if you don't understand so as I was telling we have we were here right after the if statement we are going to digital rate the pins so that the motor can run okay I if I press volume button I my thought is that the row should move forward in order for the row to move forward I'll give my left motor pin forward as high and right motor pin forward as high okay uh here I have just labeled pins as motor pins sorry about that but it's it should be quite understandable okay uh I have also printed in serial monitor I also printed go forward which means the B is moving forward uh can you show us the simulation on yeah and just SC through the code and we have to end the session as soon as possible okay yeah yeah yeah okay so uh as I explaining for the go forward you just copy paste this uh for the go backward you just copy paste this for the turn left for the turn right for the stop what really changes in this code the real changes in this code are in the digital right where you just change the motors running orientation to turn left or right the other thing that changes will be your hexad decimal value here okay this will how this is computed I have already told you this is in this is of the format of uh Ox II VV BF 00 you can compute this with this uh as I told and you can finish this you can easily finish this code by just copy pasting it again and again okay so that should be very clear about the code uh take help we'll definitely share this code in the group also as I start simulating you will see that the mot's RPM are 0 now I'll start to uh press the volume up button you can see go forward is printed in the serial monitor also the uh Motas are running in the same direction uh it doesn't matter that the RPM is in negative uh assume that uh we we have negative in the forward Direction whatever if we do right then it's turn right turn right the RPM is also similar now we'll go turn left this is left motor is going backward and right is forward so you'll turn left backward you'll have same direction spins and you have stop where you will have your RPM as zero now this should be quite clear uh that's about it sir Raman uh what should I do now so guys uh let's wrap up this session and uh don't worry if you doesn't get all of the things that uh s t you and uh so we have more time apart from this session we have our WhatsApp group and uh you have the time to build your own robot in the simulation so you have three uh more than three days and whatever the doubts you have there please contact us and we will uh give us give you the support that you need and uh tomorrow we will have another session in walkway with liit who will thought you the simulation part in the walkway also and uh yeah make sure to attend the tomorrow's meet and uh yeah we can end this me tomorrow when will be like time yeah we will share that meet link with you in the robot soer group WhatsApp group so please that time will be the same and there's a little surprise also there's a real robot presentation as well from our can we ask doubts in the group yeah yeah go ahead and ask doubts in the group as well anyone of us will respond okay sir thank you thank you guys for joining happy New Year everyone thank you for joining yeah thanks for explaining thanks a lot everyone well well organized thanks a lot byebye bye yeah n should I stop
2025-01-07 16:52