3.5.1. ESP 8266 Definition:
36 The ESP8266 IOT Wi-Fi transceiver Module is a development module based on the ESP8266 chip with an easy-to-use design. Especially, it can be used directly with Arduino's compiler to program and flash software. This is one of the advantages of this product in using and programming applications on the ESP8266 in a simple way. Used for applications that need to connect, collect data, and control waves via Wi-Fi, especially applications related to IoT
Pinout Configuration:
1 ADC channel 1 channel of 10-bit precision SAR ADC.
2 UART interfaces UART0 can be used for communication. Since UART1 features only data transmit signal (TX), it is usually used for printing log.
4 PWM outputs 4 channels of PWM pins for dimming LEDs or controlling motors.
2 SPI and 1 I2C interfaces There are 2 SPI and 1 I2C interfaces to hook up all sorts of sensors and peripherals.
I2S interface 1 I2S interface if you want to add sound to your project.
Fig 3.14. ESP 8266 Configuration
(Source: https://lastminuteengineers.com/esp8266-pinout-reference/)
37 3.5.2. Module RFID RC522
Definition:
RFID RF522 module is a reader by using MFRC522 chip, which accepts the ID code from the RFID card then sends the ID code to Raspberry. It is usually accompanied by an RFID tag in a credit card format and an RFID tag in a keychain format. The cards can have 1K or 4K memory divided into sectors and blocks. The RFID reader module RC522 is also used to write RFID tags. To read the information encoded on a tag, it is placed in close proximity to the Reader (does not need to be within direct line-of-sight of the reader). A Reader generates an electromagnetic field which causes electrons to move through the tag’s antenna and subsequently power the chip.
Specifications:
● Frequency range: 13,56 MHz
● Interface: SPI/I2C/UART
● Supply Voltage: 2,5V to 3,3V
● Max. current: 13-26 mA
● Min. current: 10 uA
● Logic levels: 5V y 3V3
● Reach: 5 cm
Fig 3.15. Module RFID RC522 pinout
(Source: https://components101.com/wireless/rc522-rfid-module)
Pinout Configuration:
● VCC: RFID reader power pin RC522. It supports a supply voltage between 2.5V and 3.3V.
● RST: it is a pin to turn the module on and off. As long as the pin is in the LOW state it will stay off with little consumption. When the state changes to HIGH the RC522 restarts.
● IRQ: interrupt pin that alerts the microcontroller when an RFID tag approaches the RFID reader RC522.
● MISO / SCL / TX: This pin has three functions. When the SPI interface is enabled, it functions as slave output and master input.
● MOSI: entry in the SPI interface.
38
● SCK: clock signal of the SPI interface.
● SS / SDA / RX: The pin acts as a signal input when the SPI interface is enabled.
3.5.3. 16x02 LCD Display Module Definition:
LCD 1602 is a liquid crystal display. This component is a kind of dot matrix module. It is used to show letters, numbers, and characters, etc. It's composed of 5x7 or 5x11 dot matrix positions, with each position can display one character we input. LCD 1602 can separate characters and lines by a dot pitch between two characters and a space between lines. The meaning number of the LCD can show 2 rows with 16 characters in each row.
Fig 3.16. 16x02 LCD pinout
(Source: https://circuitdigest.com/article/16x2-lcd-display-module-pinout-datasheet)
Pinout Configuration:
● Vss (Ground): Ground pin connected to system ground
● Vdd (+5 Volt): Powers the LCD with +5V (4.7V – 5.3V)
● VE (Contrast V): Decides the contrast level of display. Grounded to get maximum contrast.
● Register Select: Connected to Microcontroller to shift between command/data register.
● Read/Write: Used to read or write data. Normally grounded to write data to LCD
● Enable: Connected to Microcontroller Pin and toggled between 1 and 0 for data acknowledgement.
● LED Positive: Backlight LED pin positive terminal
● LED Negative: Backlight LED pin negative terminal
● Data pins: Data pins 0 to 7 form a 8-bit data line. They can be connected to Microcontroller to send 8-bit data. These LCD’s can also operate on 4-bit mode in such cases Data pins 4,5,6 and 7 will be left free.
39 Specification:
● Operating Voltage is 4.7V to 5.3V
● Current consumption is 1mA without backlight
● Alphanumeric LCD display module, meaning can display alphabets and numbers
● Consists of two rows and each row can print 16 characters.
● Each character is built by a 5×8 pixel box
● Can work on both 8-bit and 4-bit mode
● It can also display any custom generated characters
● Available in Green and Blue Backlight Application:
At present, LCDs are used frequently in CD/DVD players, digital watches, computers, etc. It is also used in many electronic projects and devices to display messages. In screen industries, LCDs have replaced the CRTs (Cathode Ray Tubes) because these displays use more power as compared to LCD, heavier & larger.
In this project, we use LCD 16x02 for the purpose of displaying available space in the parking lot, and also showing "Full Slot" when the parking lot has no space available.
3.5.4. I2C Module Definition:
I2C is a simple method of communication that combines the best features of SPI and UARTs. Module I2C supports LCD types using HD44780 drivers like LCD 1602, LCD 2004, etc. Connected to the microcontroller through the I2C interface. It is compatible with most current microcontrollers. In this project, we use I2C to communicate easily with LCD 1602. Instead of using 12 pins of the microcontroller for connecting with the LCD.
40 Fig 3.17. I2C module
(Source: https://lastminuteengineers.com/i2c-lcd-arduino-tutorial/)
Pinout Configuration:
● GND: is a ground pin and should be connected to the ground of Arduino.
● VCC: supplies power to the module and the LCD. Connect it to the 5V output of the Arduino or a separate power supply.
● SDA: is a Serial Data pin. This line is used for both transmit and receive.
Connect to the SDA pin on the Arduino.
● SCL: is a Serial Clock pin. This is a timing signal supplied by the Bus Master device. Connect to the SCL pin on the Arduino.
Applications:
It is much easier to connect an I2C LCD than to connect a standard LCD. We only need to connect 4 pins instead of 12. Start by connecting the VIN pin to the 5V output on the Raspberry Pi and connect GND to ground. Now, we are remaining with the pins that are used for I2C communication. Through module I2C, we just use 4 pins: SCL, SDA, VCC, GND to connect the LCD with the microprocessor.
3.5.5. Infrared (IR) Sensor Definition:
An infrared (IR) sensor is an electronic device that measures and detects infrared radiation in its surrounding environment. Infrared radiation was accidentally discovered by an astronomer named William Herschel in 1800. While measuring the temperature of each color of light (separated by a prism), he noticed that the temperature just beyond the red light was highest. IR is invisible to the human eye, as its wavelength is longer than that of visible light (though it is still on the same electromagnetic spectrum).
41 Anything that emits heat (everything that has a temperature above around five degrees Kelvin) gives off infrared radiation.
Fig 3.18. Infrared (IR) Sensor
(Source: https://circuitdigest.com/microcontroller-projects/interfacing-ir-sensor-module-with-arduino)
Pinout Configuration:
● VCC: is the power supply pin for the IR sensor which we connect to the 5V pin on the Arduino.
● OUT: pin is a 5V TTL logic output. LOW indicates no motion is detected; HIGH means motion is detected.
● GND: Should be connected to the ground of the Arduino.
Principle & Application:
When no obstacles or objects are detected within the detection distance, the output is set to HIGH (5V or 3.3V). When the distance is shorter than or equal to the threshold set, the output signal will change to position LOW (0V). The distance threshold can be set by adjusting the potentiometer / trim pot on the board. This sensor module is only able to detect distances between 2cm and 30cm within the view of the IR LED and Photoresistor. The trigger distance is highly dependent on the surface material, color, and shape of the object.
In this project, we use IR Sensor as a tool to identify vehicles into or out of yards.
Specifically, we will arrange 2 IR Sensors in the 2 Barriers, they have the task of detecting whether the cars pass to close the Barrier.
3.5.6. Camera IPCC-9610 V2 - 10x Definition:
This is a camera with a professional build and falls under the IP camera category. It comes with a color sensor that makes resolution better up to 1920 x 1080 pixels. It has high-quality zoom capabilities that produce sharp and clear images. Other features of the camera are a motion sensor, zoom features, and easy-to-use ONVIF technology. The camera is also compatible with various platforms like iPhones, Windows, and MacOS-
42 so that you can access footage anywhere. The downside of the camera is in its fragility.
The smallest hitch can necessitate the need for a new camera. The motors can be a bit noisy from time to time which may just tip off a thief in the aftermath.
Fig 3.19. IPCC-9610 V2 - 10x Camera
(Source: https://honduras.desertcart.com/products)
Application:
Main Surveillance applications include Enterprise, Small business, Parking lots, Hospitals, Traffic intersections, Backyards, Driveways, Courtyards, Farms and livestock, Warehouse areas, Supermarkets, and Schools. In this project, we use this camera for placing in 3 sites. One is placed in the parking lot to take a picture of available spaces and send a signal to the microprocessor. The two rest we use for checking the license plates of the cars and send the information to the microprocessor to process.
3.3.8. Servo motor SG90 Definition:
Tiny and lightweight with high output power. Servo can rotate approximately 180 degrees and works just like the standard kinds but smaller. You can use any servo code, hardware or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gear box, especially since it will fit in small places. It comes with 3 horns and hardware.
Fig 3.20. Servo motor SG90
(Source: https://datasheetspdf.com/pdf/791970/TowerPro/SG90/1)
43 Specification:
● Torque: 2.0kg/cm(4.8V), 2.2kg/cm(6V)
● Speed: 0.09s/60°(4.8V), 0.08s/60°(6V)
● Rotate angle: 180°
● Operating voltage: 4.8 ~ 6V
● Gear: plastic
● Dead band: 7us
● Weight: 10.5g
● Dimension: 22.8mm × 12.2mm × 28.5mm Application:
The main use of the servo motor is to achieve an accurate rotation angle between 90 degrees - 180 degrees. This control can be applied to drive robots, move the machine hands up and down, turn a sensor to scan throughout the room, etc. In this project, servo motors are used to replace barriers put in entrance and exit gates to open and close.