Sensor Speedway
Welcome to Team 21’s mini board game project that will teach students the basics of circuitry! In this project, we will be building a fun and interactive game where a mini car travels along a track and triggers various circuits to be closed. Along the way, the car will encounter different checkpoints that will activate inputs and cause sensors/outputs to be triggered. By working on this project, students will learn how to assemble a basic circuit, troubleshoot issues that may arise, and get a good grasp on how a basic circuit works. With a little creativity and experimentation, students can also customize the project and create new games and circuits. So, let's get started and have fun learning about circuits!
Supplies
- Materials: Scrap Cardboard (75”x42”)
- Light Sensor
- Resistors
Building the Frame
- Obtain 1 Cardboard box, 12”x24”x6” and another (larger than the other box) cardboard box
- Cut off the top and bottom flaps from the smaller box, leaving just a rectangle with no bottom or top
- From the larger box, cut out the two largest sides, making sure they are at least slightly bigger than 12”by24”
- Apply glue to the edges of the box, then connect it to one of the large singular pieces of cardboard making sure all edges connect with the other cardboard, this will be the bottom of the gameboard
- Before continuing, make sure the glue connecting the edge of the box to the base is dry, then line up the other singular piece of cardboard long side to longside on the open side of the box
- To connect the lid to the base frame of the gameboard, cut out multiple pieces of tape and attach them so the lid is securely attached
- Make sure one of the long sides of the box only has two pieces of tape, each of them at the far edge of side of the box.
- Once these pieces of tape have attached to the long side of the board, cut out the cardboard between the two pieces of tape leaving a hole in the side of the box to view the components and wires.
- Make sure all connections are sturdy and not loose, if loose reapply glue and tape where needed to further strengthen the box.
- Next, mark out the track for the game on the lid of the box.
- Once the track has been designated, mark where each component should go
- Once the layout has been finalized, begin cutting out holes for the components
- Cut out a hole for the large Push Button, making sure the hole is larger than the connection point but smaller than the overall button.
- Cut slits into the cardboard where each of the LEDS will be placed.
Connecting the IR Sensor
- Sensor 1
- Connect the red wire to the power supply
- Connect the black wire to the ground supply
- Connect the yellow wire to the input port from the arduino
- Sensor 2
- Connect the red wire to the power supply
- Connect the black wire to the ground supply
- Connect the yellow wire to the output port from the arduino
Connecting the Push-Buttons
- Connect one end of the push button to an input port of the Arduino
- Connect the other end of the push button to a 22uF capacitor
- Connect the other end of the capacitor to common ground
Connecting the LEDs
- Connect the ground end of the LED to common ground
- Connect the positive end of the LED to one end of a 220Ω resistor
- Connect the other end of the 220Ω resistor to an output port of the Arduino
Connecting the Seven-Segment Display
- Push the display down into the breadboard
- Connect a 220Ω resistor to each end of the LEDs in the display
- Connect the other end of the 220Ω resistors to the power supply
- Connect a wire to the other end of the LEDs from the display to the ground supply
Connecting the LCD Display
- Connect LCD VDD(+5Volt) and LED Positive to +5V
- Connect LCD VSS(GND) and LED Negative to GND
- Connect pin 14 to Arduino digital pin 12
- Connect pin 13 to Arduino digital pin 11
- Connect LCD pin 12 to Arduino digital pin 10
- Connect LCD pin 11 to Arduino digital pin 9
- Add corresponding code to test LCD output
Connecting the Speaker
- Solder the Speaker's V and GND wires
- Connect it to the breadboard
- GND passes through a 220 ohm resistor
Connecting the Ultrasonic Sensor
- Connect a wire from GND on the sensor to ground
- Connect a wire from VCC to 5 volts
- Connect a wire from ECHO to PIN27
- Connect a wire from TRIG to PIN28
Connecting the Potentiometer
- Connect a wire on the left or right pin to ground
- Connect a wire on the other left or right pin to power
- Connect a wire from the middle pin to A0
Proper Hardware Connection
Using the program software Arduino IDE, program the microcontroller to respond to the different inputs and outputs. Connect a cable from the computer to the Arduino Mega 2560. Copy the given code into the Arduino IDE software and choose the correct output port to load the code into.
Code
Click the link below and copy/paste the code into Arduino IDE
https://docs.google.com/document/d/1DKt8LLZRMGE_NEB-IeZQYwBk1QUnYsVgkuhR0oFQ2Fw/edit?usp=sharing
Customize and Enhance
Use your creativity to customize the mini board game by adding new sensors, inputs, and outputs, or by modifying the track and car design. Make it yours!
References
[1] A. Ragab, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 07-Apr-2020. [Online]. Available:
https://grabcad.com/library/digital-metal-detector-med-solutions-1. [Accessed: 24-Mar-2023].
[2] A. Whitham, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 03-Jan-2014. [Online]. Available: https://grabcad.com/library/arduino-uno-r3-1. [Accessed: 24-Mar-2023].
F. Melges, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 24-Aug-2021. [Online]. Available: https://grabcad.com/library/mini-speaker-4ohm-3watt-1. [Accessed: 24-Mar-2023].
[3] “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 06-Oct-2017. [Online]. Available: https://grabcad.com/library/100mm-button-1. [Accessed: 24-Mar-2023].
“Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 20-Dec-2022. [Online]. Available:https://grabcad.com/library/mcd-8021-2-digit-7-segment-led-display-dp-0-8-1.
[Accessed: 24-Mar-2023].
[4] IA Cristóbal Rincón, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 05-Apr-2021. [Online]. Available: https://grabcad.com/library/led-5-mm-3. [Accessed: 24-Mar-2023].
[5] Jelger van de Ven, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 29-Nov-2020. [Online]. Available: https://grabcad.com/library/arduino-digital-display-1. [Accessed:
24-Mar-2023].
[6] M. Beltrán, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 12-Jan-2020. [Online]. Available: https://grabcad.com/library/dp3t-slider-switch-1. [Accessed: 24-Mar-2023].
[7] T. Mahé, “Free CAD designs, Files & 3D models: The grabcad community library,” Free CAD Designs, Files & 3D Models | The GrabCAD Community Library, 12-Jan-2020. [Online]. Available: https://grabcad.com/library/grove-ultrasonic-ranger-v2-0-1. [Accessed:
24-Mar-2023].