Mini Car Gate With Arduino

by cobbsaladlove in Circuits > Arduino

1259 Views, 1 Favorites, 0 Comments

Mini Car Gate With Arduino

20181216_131116[1].jpg
20181216_131204[1].jpg

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.)

What You Need:

You will need

  • Arduino Uno
  • Wires (male to male and male to female ends)
  • Servo motor
  • Button
  • Piezo or something to make noise that can beep
  • 2 220 ohm resistors
  • Male header pins
  • Red led
  • Arduino software installed on your computer

The Circuit

aaa.jpg

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:

Servo ground to arduino ground, servo VCC to arduino 5v, and the data pin to arduino digital pin 9.

LED:

LED + to arduino digital pin 6 with a 220 ohm resistor in between, LED - to arduino ground

Button:

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

The Code

Here you can download the code. It is annotated so it explains itself and what you can change.

Downloads