 Hello everyone! In this video, we are going to make a miniature version of the Tollgate and barriers that many of you must have seen on highways and in parking lots. For making the Tollbooth, we'll need a Vive, two IR sensors, silver motor, pallet chart papers, corrugated sheets and six male-to-female jumper cables. Let's begin by creating a plot for our Tollbooth. Take a corrugated sheet and paste a chart paper on top of it. Draw a line of 10 cm width along the centre of the base. Paste a strip of black chart paper of 60 cm cross 10 cm on the marked lines. This will act as the road. Now, draw a line of 1 cm width along the centre of the road. Stick white tape on the marked line for making the divider. Check the tape on both the sides of the road as well. With this, the road is ready. Now, let's begin with the assembly of the Tollbooth. We will use two small pieces of size 8 cm by 6 cm of the corrugated sheet. Leaving 0.5 cm from one side, draw a rectangle of 4 x 3.5 cm. Now, cut along the edges of the rectangle. Make a window in the second piece as well. At the centre of the base, paste the support for the Tollbooth using hot glue. Now, paste the walls to the base and to the support using hot glue. Now, let's make the Toll barrier mechanism. For that, we'll need a servo motor. First, let's test the servo. Connect it to evive's servo channel 1. From evive's menu, select controls, then servos, then servo 1. Set servo motor angle to 0 degrees using evive's potentiometer 1. Now, for making the barriers, take a single-sided servo horn and attach a thin strip of corrugated sheet to it using hot glue. Now, let's paste the servo motor at the open end of the Tollbooth using hot glue. It's the barrier, that is servo horn onto the servo head. Now, to sense the entry and exit of the vehicles, we are going to use two IR sensors, one for entry and the other for exit. But first, let's test the IR sensor. Connect VCC or fire sensor to evive's 5 volt pin. Connect ground of IR sensor to evive's ground pin. Connect signal pin of the IR sensor to evive's digital pin 3. Observe the value at pin 3. From evive's menu, navigate to pin state monitor and select digital pin states. Observe the value at pin 3. The default value is 1, but when we bring our hand close to the IR sensor, it changes to 0 and it changes back to 1 when we take our hand away. Similarly, test the other IR. Now, let's attach the IR. Attach one of them at some distance ahead of the Tollbooth and one at some distance behind the Tollbooth. Now, let's move on to the connections. First, let's connect the IR sensor. Connect VCC of both the IR sensors to the 5 volt pins of evive. Connect ground of both the IR sensors to the ground pins of evive. Connect the signal pin to evive's digital pin 3 for sensor 1 and pin 2 for sensor 2. Then, connect the servo motor to evive's server channel 1. Let's make a code in Pictoblox. We are going to write the code in the upload mode. The program will start executing as soon as evive starts up. As soon as the first IR sensor, which is connected to pin 3, senses the present of a vehicle, the servo angle changes to 90 degree and the barrier opens. As soon as the vehicle crosses the barrier and goes past the second IR sensor, which is connected to pin 2, the servo angle changes back to 0 degrees, thus closing the barrier. Once done, upload the code. You can also display the number of cars or vehicle passed and the status of the barrier by making a few changes in the code. Make a variable for storing the numbers of the vehicle that passed by and initialize it with 0. Use display blocks to display number of vehicles passed on evive's screen. As soon as the vehicle will approach the sensor, it will sense the vehicle but the gate will only open when the car goes past by the IR sensor. The barrier will then open up and the status gate opened will be displayed on the screen. Similarly, as soon as the vehicle goes past by the IR sensor 2, the barrier will close, the status gate closed will be displayed and the count of the vehicle passing by will increase by 1. Thanks and don't forget to give it a thumbs up. Let us know what you'd like us to make next in the comment section below and for more such interesting projects, subscribe to STEMpedia and follow us on Facebook, Instagram and Twitter. See you soon.