Introduction: Mini Car Gate With Arduino
Hey peeps! So, you know how when you drive into a parking lot or garage and you have to stop at a gate? Well, this is a mini version of that gate for matchbox cars or maybe a little bigger than that like I used a little truck. To control this gate, you have a button. When you press the button, the gate/servo opens, a led blinks, and what ever you use to make noise beeps. I did not show in the picture but there, of course, is a breadboard circuit and arduino. (shown in later diagram.)
Step 1: What You Need:
You will need
- Arduino Uno
- Wires (male to male and male to female ends)
- Servo motor
- Piezo or something to make noise that can beep
- 2 220 ohm resistors
- Male header pins
- Red led
- Arduino software installed on your computer
Step 2: The Circuit
I put a diagram up there so you can have a visual but I will also tell you in words. The connections are as follows:
Servo ground to arduino ground, servo VCC to arduino 5v, and the data pin to arduino digital pin 9.
LED + to arduino digital pin 6 with a 220 ohm resistor in between, LED - to arduino ground
Button + to 5v, button - to arduino digital pin 8 with a pull down 220 ohm resistor.
Piezo or your buzzer thing:
Piezo + to arduino digital pin 7, piezo - to arduino ground
Step 3: The Code
Here you can download the code. It is annotated so it explains itself and what you can change.
Participated in the
Big and Small Contest