Cardboard Traffic Control Robot
by GeniusGem in Circuits > Arduino
1030 Views, 3 Favorites, 0 Comments
Cardboard Traffic Control Robot
I am in for the cardboard contest. If you like my instructable please vote for it!
After studying this instructable, you will learn how to design and use Cruizmo Cis. Cruizmo Cis is an intelligent robot that controls traffic. It controls both cars’ and pedestrians’ passage and crossing. It sends signals to the LEDs to let the traffic commuters know when to go or stop. It also turns on the street lights if it is night or if the environment is dark.
After studying this instructable, you will learn how to design and use Cruizmo Cis. Cruizmo Cis is an intelligent robot that controls traffic. It controls both cars’ and pedestrians’ passage and crossing. It sends signals to the LEDs to let the traffic commuters know when to go or stop. It also turns on the street lights if it is night or if the environment is dark.
Gathering Needed Materials
Components:
1x Arduino uno & USB Cable (or Nano)
4x 5mm red LEDs
4x 5mm white LEDs
4x 5mm green/blue LEDs
2x Push buttons
1x LDR
10x 220 Ohms Resistors
9V Battery & cap
Jumper wires
Breadboard and Veroboard
The components can be gotten from a nearby store or online from AliExpress.com, Arduino Store, or
Amazon.
Tools:
Cardboard
Soldering iron
Tape
Glue
A4 paper
A ruler.
A small size saw.
Scissors.
A pencil.
Apps:
Arduino IDE (can be gotten here)
1x Arduino uno & USB Cable (or Nano)
4x 5mm red LEDs
4x 5mm white LEDs
4x 5mm green/blue LEDs
2x Push buttons
1x LDR
10x 220 Ohms Resistors
9V Battery & cap
Jumper wires
Breadboard and Veroboard
The components can be gotten from a nearby store or online from AliExpress.com, Arduino Store, or
Amazon.
Tools:
Cardboard
Soldering iron
Tape
Glue
A4 paper
A ruler.
A small size saw.
Scissors.
A pencil.
Apps:
Arduino IDE (can be gotten here)
Cutting Out Parts From the Cardboard
I used cardboard to make the roads, path, robot stand, poles and street lights.
I used a suitable dimension for the design. You can use different dimensions if you like. Clearance of 0.5 centimeters can be added to the edges.
To start with, get the cardboard, scissors, ruler and pencil for marking out the dimensions.
On the cardboard, mark out a cuboid with height 2 centimeters, breadth 2 centimeters, length 12 centimeters. On the cuboid, mark out a small hole of diameter 0.5 centimeters for the lights. Also mark out a square for the button.
Using scissors, cut the marked out plane. Then place it on the cardboard and cut out seven more to make it eight. This will be used as poles for the traffic and street lights. Also make a small hole of diameter 0.5 centimeters for the lights.
Next is the cabin where the robot stands in. Mark out and cut another cuboid with the dimensions: height 2.5 centimeters, breadth 6 centimeters, length 17 centimeters. This will be the cabin's base.
For the cabins body, mark out and cut another cuboid with the dimensions: height 5 centimeters, breadth 6 centimeters, length 8.5 centimeters.
I used a suitable dimension for the design. You can use different dimensions if you like. Clearance of 0.5 centimeters can be added to the edges.
To start with, get the cardboard, scissors, ruler and pencil for marking out the dimensions.
On the cardboard, mark out a cuboid with height 2 centimeters, breadth 2 centimeters, length 12 centimeters. On the cuboid, mark out a small hole of diameter 0.5 centimeters for the lights. Also mark out a square for the button.
Using scissors, cut the marked out plane. Then place it on the cardboard and cut out seven more to make it eight. This will be used as poles for the traffic and street lights. Also make a small hole of diameter 0.5 centimeters for the lights.
Next is the cabin where the robot stands in. Mark out and cut another cuboid with the dimensions: height 2.5 centimeters, breadth 6 centimeters, length 17 centimeters. This will be the cabin's base.
For the cabins body, mark out and cut another cuboid with the dimensions: height 5 centimeters, breadth 6 centimeters, length 8.5 centimeters.
Gluing the Pieces
I used the glue to join the pieces together to get the required structures.
Each of the eight cardboard pieces for the poles should be glued at the edges to except for one of the sides which will be open. So that it would look like an open box.
The glue should be smartly and carefully applied so that the structures look nice.
The cabin base and the body should also be glued separately in a similar way like the poles. Then the two structures will be glued together by applying little glue on the edges to give a single structure with the open side facing you. The centre of the base should be aligned with the body's center such that the distance between the edges is 4.25 centimeters.
Then cut the point where both sides of the cabin base and body meet.
Other parts will be glued after the wiring is installed.
Each of the eight cardboard pieces for the poles should be glued at the edges to except for one of the sides which will be open. So that it would look like an open box.
The glue should be smartly and carefully applied so that the structures look nice.
The cabin base and the body should also be glued separately in a similar way like the poles. Then the two structures will be glued together by applying little glue on the edges to give a single structure with the open side facing you. The centre of the base should be aligned with the body's center such that the distance between the edges is 4.25 centimeters.
Then cut the point where both sides of the cabin base and body meet.
Other parts will be glued after the wiring is installed.
Designing Cruizmo Cis
Cruizmo Cis's body is a cuboid with height 3 centimeters, breadth 2 centimeters and length 4 centimeters. The head is a cube with height 2 centimeters, breadth 1 centimeters, length 2 centimeters.
To get the robot, mark out the dimensions and cut it from the cardboard.
Glue the edges of the cube to get the head. Use a pencil for the oval eyes and the mouth or you cut them out if you wish
Glue all the edges of the cuboid excluding one which will be glued later.
Then glue the head to the body.
To put the Robot in the cabin, cut out a 2 centimeters by 2 centimeters square
from the cabin's top. Mount the robot on the cabin and glue it.
To get the robot, mark out the dimensions and cut it from the cardboard.
Glue the edges of the cube to get the head. Use a pencil for the oval eyes and the mouth or you cut them out if you wish
Glue all the edges of the cuboid excluding one which will be glued later.
Then glue the head to the body.
To put the Robot in the cabin, cut out a 2 centimeters by 2 centimeters square
from the cabin's top. Mount the robot on the cabin and glue it.
The Electrical Wiring Inside Cruizmo Cis
For the robot to perform its functions, I embedded an electrical circuit within it.
In the cabin's base there is a breadboard for connecting the robot to the traffic system.
Within the robot, there is an Arduino Uno board with a lot of wires connected to it. The board sends and receives signals from other components.
The connection can be seen in the diagrams above.
The traffic LEDs are connected to pins ranging from 2 to 9. The wires will go to the traffic lights.
The street lights are connected to digital pin 10.
The button is connected to digital pin 11.
The GND goes to the breadboard.
The A0 goes to the LDR.
All grounds are connected on the breadboard.
In the cabin's base there is a breadboard for connecting the robot to the traffic system.
Within the robot, there is an Arduino Uno board with a lot of wires connected to it. The board sends and receives signals from other components.
The connection can be seen in the diagrams above.
The traffic LEDs are connected to pins ranging from 2 to 9. The wires will go to the traffic lights.
The street lights are connected to digital pin 10.
The button is connected to digital pin 11.
The GND goes to the breadboard.
The A0 goes to the LDR.
All grounds are connected on the breadboard.
Completing the Structures
Some shapes that haven't been completely glued because some wirings need to be embedded.
Use the saw to cut 6 rectangular pieces of 2 by 1.5 centimeters and 2 rectangular pieces of 4 by 1.5 centimeters out of the veroboard.
On the two longer ones, independently solder the button, red LED, green/blue LED with wires leading out to be connected to the Arduino.
Of the other 6 pieces, choose two and independently solder the red and green/blue LEDs with wires leading out.
On the remaining 4 pieces, solder a white LED on each, the wires from the positive pin will be connected together to the Arduino, and the negatives to the GND.
Insert the soldered circuits into the cardboard structures.
On the cabin base, a hole is created for the LDR, then the breadboard is inserted into it.
The Arduino is inserted into the robot.
After completing the wirings, the open surfaces can be glued.
The structures are complete, and Cruizmo Cis is ready to start functioning but some lines code need to be uploaded. Let's inspect the code.
Use the saw to cut 6 rectangular pieces of 2 by 1.5 centimeters and 2 rectangular pieces of 4 by 1.5 centimeters out of the veroboard.
On the two longer ones, independently solder the button, red LED, green/blue LED with wires leading out to be connected to the Arduino.
Of the other 6 pieces, choose two and independently solder the red and green/blue LEDs with wires leading out.
On the remaining 4 pieces, solder a white LED on each, the wires from the positive pin will be connected together to the Arduino, and the negatives to the GND.
Insert the soldered circuits into the cardboard structures.
On the cabin base, a hole is created for the LDR, then the breadboard is inserted into it.
The Arduino is inserted into the robot.
After completing the wirings, the open surfaces can be glued.
The structures are complete, and Cruizmo Cis is ready to start functioning but some lines code need to be uploaded. Let's inspect the code.
The Code
I used the Arduino IDE to compile the code. The code can be gotten here
Firstly, I defined the pins for the LDR, button and LEDs used in the circuit.
Then in the setup() I configured the LED pins to OUTPUT and the BUTTON_PIN to INPUT_PULLUP, this enables the button to use the inbuilt pull-up resistor.
In the loop(), I used an if statement to check whether Cruizmo Cis should turn on the street lights or not.
Then another if statement appears and checks whether the button is pressed or not.
After the loop are two functions used by Cruizmo Cis to control the traffic.
The goRoad() function stops the pedestrians and allow the cars to move on. The red light will blink first to alert the pedestrians before totally stopping them.
The stopRoad() function stops the cars and allow the pedestrians to cross. The red light will blink first to alert the cars before totally stopping them and the green/blue light will turn on to pass the pedestrians.
Firstly, I defined the pins for the LDR, button and LEDs used in the circuit.
Then in the setup() I configured the LED pins to OUTPUT and the BUTTON_PIN to INPUT_PULLUP, this enables the button to use the inbuilt pull-up resistor.
In the loop(), I used an if statement to check whether Cruizmo Cis should turn on the street lights or not.
Then another if statement appears and checks whether the button is pressed or not.
After the loop are two functions used by Cruizmo Cis to control the traffic.
The goRoad() function stops the pedestrians and allow the cars to move on. The red light will blink first to alert the pedestrians before totally stopping them.
The stopRoad() function stops the cars and allow the pedestrians to cross. The red light will blink first to alert the cars before totally stopping them and the green/blue light will turn on to pass the pedestrians.
Finalization
To make it rhyme, the cardboard poles are used as street and traffic lights.
The two poles with the button should be used for the pedestrians.
The Pedestrians request crossing by pressing the button and Cruizmo Cis can only grant them their request if it was pressed 17 seconds after the previous press.
If the condition is fulfilled, they are allowed to cross for 6 seconds. After the red light will stop them and the cars will be allowed to drive on.
Finally, make sure the code is correctly uploaded to the Arduino board to achieve the correct result.
Have fun!
The two poles with the button should be used for the pedestrians.
The Pedestrians request crossing by pressing the button and Cruizmo Cis can only grant them their request if it was pressed 17 seconds after the previous press.
If the condition is fulfilled, they are allowed to cross for 6 seconds. After the red light will stop them and the cars will be allowed to drive on.
Finally, make sure the code is correctly uploaded to the Arduino board to achieve the correct result.
Have fun!