Arduino RFID Servo Motor Control system for Car Parking “MFRC522”

(Last Updated On: October 19, 2019)

RFID Servo Motor

Description:

Arduino RFID Servo Motor Control system for Car Parking- In this Tutorial, you will learn how to make an RFID based Car Parking gate Opening system using a Servo Motor, Arduino Uno, MFRC522 RFID module and RFID Tags. To reduce the overall cost of this project, I decided to design my own PCB board for the ATmega328 microcontroller. The same connections can be done using the Arduino Board.


In this tutorial, we will also cover some basics and we will also make a power supply for the Servo Motor. For the best understanding, you can watch a video Tutorial given at the end of this Article. This Tutorial covers

  1. What is the Servo Motor?
  2. Servo Motor Advantages
  3. Servo Motor Applications
  4. How to make an external power supply for a Servo Motor
  5. Servo Motor Interfacing with Arduino
  6. MFR522 RFID module interfacing with Arduino
  7. Programming and finally
  8. Testing

Without any further delay let’s get started.

The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
MG996R Servo motor: https://amzn.to/2Ue6zAp
MFRC522 RFID module and tags: best deal. https://amzn.to/2PD9Ref
LM7805 Voltage Regulator: https://amzn.to/2IZEl5x
Potentiometer: https://amzn.to/2JSLbfg
330 ohm resistors pack: https://amzn.to/2NtlAeh
5v 2A adaptor: https://amzn.to/2GsNfcw
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF

DISCLAIMER:

Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!



Servo Motor:

A Servo Motor is a Rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity, and acceleration. It consists of a suitable motor coupled to a sensor for position feedback. Servo Motors comes in different sizes and shapes, but the basic working principle of all Servo Motors is exactly the same.

RFID Servo Motor

This is High-Torque MG996R Servo Motor that I have used in this Tutorial. MG996R is an upgraded version of MG995 Servo Motor, and features upgraded shock-proofing and a redesigned PCB and IC control system that makes it much more accurate than its predecessor. The gearing and motor have also been upgraded to improve dead bandwidth and centering.

Servo Motor MG996R Specifications:

  • Weight: 55 g
  • Dimension: 40.7 x 19.7 x 42.9 mm approx.
  • Stall torque: 9.4 kgf·cm (4.8 V ), 11 kgf·cm (6 V)
  • Operating speed: 0.17 s/60º (4.8 V), 0.14 s/60º (6 V)
  • Operating voltage: 4.8 V a 7.2 V
  • Running Current 500 mA –
  • Stall Current 2.5 A (6V)
  • Dead band width: 5 µs
  • Stable and shock proof double ball bearing design
  • Temperature range: 0 ºC –
  • 4.8 V a 7.2 V
  • – 900 mA (6V)
  • Double ball bearing design
  • 55 ºC


Servo Motor Pinout:

RFID Servo Motor

Advantages of Servo Motor:

  • Low Cost
  • The smooth rotation at low speeds
  • No Power is used at a standstill
  • With no static loads on the motor, no current is required to hold the position.
  • Wide variety of types available.

Servo motor applications:

  • Servo motors are most commonly used in robots for precise positioning, these are used in Grippers, Pick and place a mechanism, robotic Arms joints, etc. S
  • Servo motors are also used in industries for labeling and packaging etc.
  • Camera Auto Focus.
  • Solar Tracking Systems.
  • Antenna positioning.
  • CNC machines.
  • Automatic door openers and so on.


Servo Motor Rotation Problem and how to solve this?

Your servo may behave erratically, and you may find that this only happens when the Arduino is plugged into certain USB ports. This is because the servo draws quite a lot of power, especially as the motor is starting up, and this sudden high demand can be enough to drop the voltage on the Arduino board, so that it resets itself. The same thing happened to me, my Arduino was resetting and I wasn’t able to achieve the smooth movement and accurate positioning. I solved this problem by making an external power supply for my servo motor. Let’s have a look at the circuit diagram.

Servo Motor Power Supply Circuit Diagram:

RFID Servo Motor

This schematic is designed in cadsoft eagle 9.1.0 version. If you want to learn how to make a schematic and PCB then watch my tutorial.

 

 

J1 is the dc female power jack; this is where you connect your 12v adaptor or a battery. This voltage should be greater than 6 volts and less than the max input voltage of 7805 voltage regulator; the recommended voltages are 9 to 18 volts. In my case, I will be using 12 volts. A 25v 470 UF capacitor is connected between the output and ground pins. The output of the voltage regulator is connected with the supply wire of the servo motor. The ground wire of the servo motor is connected with the regulator ground and also with the Arduino’s ground. While the signal wire is connected with the Arduino’s pin number 3.


RFID Servo Motor

This is the final circuit; the components are soldered as per the circuit diagram. The supply wire of the servo motor, which is the red wire, is connected with the output leg of the 7805 voltage regulator, and the brown wire which is the ground wire is connected with the middle leg of the 7805 voltage regulator and a 470UF capacitor is connected between the output and ground.

RFID Servo Motor

This is the ground wire and should be connected with the Arduino’s ground. The yellow wire is the signal wire and it can be connected with any PWM pin of the Arduino, in my case I will connect this with pin number 3 of the Arduino. Now this servo motor is ready and can be used with Arduino, Mega or any other controller board.



Now let’s have a look at the circuit diagram of the MFR522 RFID module and learn how this module is connected with the Arduino. I am using the term Arduino because the board I have designed is just like the Arduino.

After I designed my PCB, using cadsoft eagle 9.1.0 version.

RFID Servo Motor

Then I sent my PCB Gerber files to Wellpcb company, and made an order of 50 PCBs. these are the PCBs.

RFID Servo Motor

Properly documented containing all the information about the PCBs.  As you can see the quality is really great. I am 100% satisfied with their work.

Download this PCB board: RFID SERVO MOTOR

If you want to learn how to make a PCB then you can watch my tutorial Click here

PCB connections explanation:

The same PCB board I have already used in the Bike Anti-theft system. So for more details and connections watch this Tutorial.

RFID Servo Motor

Let’s start with the power supply; this is the terminal block where we connect the 12v and GND. wires. The 1n4007 diode is connected which protect the circuit if in case you connect the wires in a wrong way. The cathode side of the diode is connected with the input pin of the 7805 voltage regulator. The middle pin of the 7805 voltage regulator is connected with ground.


RFID Servo Motor

A 330-ohm resistor is connected with the output of the regulator, this resistor is connected in series with the led anode side, this is a current limiting resistor, the other leg of the led is connected with the ground. A 10uf capacitor is also connected at the output of the voltage regulator.

RFID Servo Motor

A 10k resistor is connected with pin number1 of the atmega328 controller and the other side of the 10k resistor is connected with the 5v. a 5v wire is also connected with pin number 7 of the controller. Pin number 8 of the controller is connected with the ground. A 16Mhz crystal is connected with pin9 and pin10 of the controller. 22pf capacitors are connected with the 16Mhz crystal.


RFID Servo Motor

Pin number11 which is the digital pin5 is connected with the 10k resistor, and the other side of the 10k resistor is connected with the base of 2n2222 NPN transistor, the emitter is connected with ground, while the collector is connected with the ground pin of the buzzer. This transistor will be used to control this buzzer.

RFID Servo Motor

While the buzzer positive pin is connected with the 5v. pin number12 which is the digital pin6 will be used to control a relay. The emitter is connected with ground, while the collector is connected with one side of the relay coil while the other side of the relay coil is connected with 12v. This transistor is selected after the calculations, if you want to learn how to perform the relay driver circuit design calculation then you should watch my tutorial on relay driver circuit design calculations, this tutorial covers the relay Pinouts, finding the relay coil resistance and calculations Click here”. A diode is used across the relay coil for back EMF protection. A terminal block is connected at the output of the relay. Digital pins 9 to 13 are connected with the RFID module. So that’s.



Soldering:

For the step by step explanation watch video Tutorial Click Here

RFID Servo Motor

RFID Servo Motor

MFRC522 RFID Module:

RFID Servo Motor

A few days back I posted a tutorial on ” Arduino MFRC522  RFID module Pinouts, Interfacing, how to read RFID tags  identity number and use”


RFID Servo Motor

In this tutorial I covered all the basics, like interfacing, finding the identity numbers of the tags, I am using the same RFID tag. So if you don’t know how to find the RFID tag identity number then you should watch this tutorial, Click Here

RFID Servo Motor Programming:


RFID Servo Motor Video Tutorial:

 

Related Projects:

Servo Motor Arduino code and its Power Supply, Advantages & Application

 

RFID & GSM based student Attendance Alert message to parents

 

RFID based students attendance system with message Alert

 

Bike anti theft system using MFRC522 RFID module

 

 

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Close