Smart car obstacle avoidance system with Arduino as the core control

Artificial intelligence technology is a cutting-edge technology that closely links with multiple basic disciplines and promotes mutual development. It is a high-tech industry integrating computer, physics, physiology, control technology and sensor technology. The application fields of artificial intelligence technology are also becoming more and more extensive. In addition to the traditional industrial field, the application of artificial intelligence technology also involves military, entertainment, service, medical and other fields.

This article refers to the address: http://

With the continuous development of robot technology, people's requirements for robots are getting higher and higher, and the intelligence of robots has become a hot spot today. As a kind of four-wheel drive intelligent robot, the smart car is flexible and easy to operate. It can integrate various precision sensor data processing modules on the car. Its obstacle avoidance function ensures the self-adjustment of the traveling direction of the smart car during the travel, avoiding Collision and rubbing are important parts of a smart car. At present, smart cars mostly use single sensors to achieve single-sided obstacle avoidance, but there are inherent defects in single-sided obstacle avoidance, such as: slow detection of obstacles and low success rate of obstacle avoidance. Therefore, a smart car system capable of avoiding obstacles in all directions is designed. The combination of infrared single-point obstacle avoidance and ultrasonic double-track obstacle avoidance can realize multi-faceted automatic detection and realize all-round obstacle avoidance, effectively improving The success rate and efficiency of obstacle avoidance.

1 system design

The designed obstacle avoidance system adopts a combination of infrared single-point obstacle avoidance and ultrasonic double-track obstacle avoidance to achieve an all-round effective obstacle avoidance for obstacles. To this end, an infrared obstacle avoidance sensor is arranged in the center of the front end of the trolley for detecting obstacles in front of the trolley, and then two left and right ultrasonic obstacle avoidance sensors are arranged on both sides of the front end of the trolley, and they respectively detect obstacles on the left and right sides of the trolley, which are effective. The scope of detection has been expanded, thus achieving the full obstacle avoidance of the trolley.

The system utilizes multi-module coordination to make it highly adaptive. Based on the requirements, the hardware selects the appropriate module. The overall module includes: power module, infrared sensor module, ultrasonic sensor module, motor driver module, Arduino module. The overall block diagram of the system is shown in Figure 1.

Figure 1 system hardware structure diagram

1.1 Arduino module

Arduino duemilanove is used as the core control module in the design. Arduino is an easy-to-use and easy-to-use open source electronic prototyping platform that can sense the environment through various sensors and feedback and influence through lights, motors and other devices. surroundings.

The Arduino duemilanove consists of the following sections: a 9 V DC input, a USB interface, 14 digital IO ports, 6 analog IO ports, a 5 V DC output and a 3.3 V DC output. At its core is an Atmega 328 microcontroller.

1.2 Motor Module

The trolley adopts dual DC motor drive mode to control the turning and steering of the trolley by controlling the left and right DC motors. The motor module is shown in Figure 2. The DC motor uses the DC motor drive chip L298N.

The L298N contains a 4-channel logic driver circuit. It is a dedicated driver for two-phase and four-phase motors. It is a high-voltage, high-current, dual-bridge driver with two H-bridges. It receives standard TTL logic level signals and can drive 46. The motors below V and 2 A can meet the driving requirements of the left and right DC motors of the trolley. And L289N has an over-temperature protection function and a high noise suppression ratio, so it is very suitable for use in smart cars.

Figure 2 Motor Module

Since the chip L298N does not control the motor speed, the Arduino program controls the PWM signal of the drive motor to change the output power of the motor, thereby controlling the speed of the left and right motors.

1.3 Ultrasonic sensor module

The ultrasonic module is composed of a transmitting circuit and a receiving circuit, as shown in FIG. The transmitting circuit is composed of Em78p153 single chip microcomputer, MAX232 and ultrasonic transmitting head T40, and the receiving circuit is composed of TL074 operational amplifier and ultrasonic receiver R40.

Figure 3 ultrasonic sensor

At the time of detection, the ultrasonic transmitter emits an ultrasonic signal with a length of about 6 mm and a frequency of 40 kHz. This signal is reflected by the object and received by the ultrasonic receiver, which is essentially a piezoelectric effect transducer. After receiving the signal, it generates a weak voltage signal of mV level, and the voltage signal is converted into a digital signal in the core control module. It is assumed that the time elapsed from the time when the ultrasonic pulse is emitted from the sensor to the reception is t, and the propagation speed of the ultrasonic wave in the air is c, and the distance D from the sensor to the target object can be obtained by D=ct/2.

1.4 infrared sensor module

The infrared ranging module adopts the Sharp GP2YOA21 infrared ranging sensor. The Sharp GP2YOA21 infrared ranging sensor is a macro sensor based on the position sensitive sensor PSD (Position Sensitive Device), which captures the optical signal and has a circuit design based on the Lukovusky equation. The effective measuring distance is 80 cm.

The advantage of infrared ranging is that there is no blind zone, high measurement accuracy and fast response speed, but its shortcomings are greatly affected by the environment and the detection distance is close. Therefore, this paper designs a smart car obstacle avoidance system based on multi-sensor information fusion, which uses infrared sensors and ultrasonic sensors to complement each other, so that the robot has an accurate sensing range.

2 algorithm analysis

Aiming at the shortcomings of the single-sensor obstacle avoidance system, this paper proposes a multi-sensor coordination cooperation scheme, which expands the detection range and sensitivity by the cooperation of the ultrasonic sensor and the infrared sensor, thereby avoiding the danger of accidental collision and close to obstacles. The obstacle avoidance rate has been improved, and obstacle avoidance has been realized.

2.1 Process design

During the travel of the all-round obstacle avoidance car, each sensor continuously detects whether there are obstacles around the car. When a sensor detects an obstacle, the vehicle automatically detects obstacles by judging the number of sensors that detect the obstacle: when the single sensor detects the obstacle, the trolley moves away from detecting the obstacle direction; two sensors detect In the case of obstacles, the car turns toward the direction in which no obstacle is detected; when all the sensors detect the obstacle, the car quickly turns left to avoid the obstacle. When the car avoids the obstacle, the car continues to travel. The flow chart is shown in Figure 4.

Figure 4 program flow chart

2.2 Obstacle Avoidance Code

According to the above obstacle avoidance principle, the corresponding program is written to realize the comprehensive obstacle avoidance of the trolley. The program is mainly divided into three parts: motor, ultrasonic and infrared ranging. The motor part is controlled by analogWrite() and digitalWrite() to control the speed and the car forward, backward or steering respectively; the ultrasonic measuring part is controlled by the Trig.Pin ultrasonic input, and the EchoPin controls the ultrasonic output. The control module performs the pulse wave time received. Processing, converted into a distance parameter, thereby obtaining the distance Middle_distance; the infrared ranging portion is obtained by the control module through the infrared sensor to obtain an analog amount anal.gRead(), and the output voltage can be used to derive the voltage value volts, and the output voltage and the detection distance The relationship is distance: 65*pow(volts, -1.10), so that the distance between the car and the obstacle can be obtained.

1.0mm (.039") Female Headers 

Overview

Whenever there is a need for fitting small-sized connectors in compact devices, the 1.0mm pitch female header, or sometimes referred to as header connector, is ideally suited for this application. Not only does this female header space-savvy, but it is also designed for vacuum pick and place that makes it suitable for high volume automated manufacturing.
Antenk offers these low profile, easy-install, SMT or THM miniature female connector plugs at high quality and affordable China-quoted price, for board-to-board connection, snuggly fitting the pins of a Male Header and acting as a receptacle.
Assembly and service is simple with either vertical (straight), elevated or at a right angle configuration/orientation, which can dissipate current of about 1.0 A or less in a tape and reel packaging. The filleted corners can also remove shadowing allowing optimization of LED output.
Also, the 1.0mm pitch female headers are made to work in Arduino boards, Arduino Pro and Arduino Mega with either single or double-row female headers, facilitating connections for programming and incorporation into other circuits. They have the perfect height for clearing the USB-B connector and great for stacking multiple shields.
Female header always called as [Header connector",  Antenk provide widely range of header connector, from 2.54mm (.100″ inch) pitch to 1.0mm (.039″ inch) pitch. The number of pins (contacts) is from 2 to 40 pins per orw. There are three type: Straight (Dip Vertical), Right angle, SMT (surface mount).
If you can not find the items you interest from above items, welcome to contact us, and you will always get fully responsive from us.

Applications of 1.0mm Pitch Female Headers
Its small size is most suitable for PCB connections of small equipment and devices such as:
Arduino Boards
Architectural and sign lighting
Retail and display lighting
Fluorescent LED retrofit lighting
Cabinet or furniture lighting
Commercial / residential cove lighting
WiFi equipment
Gaming consoles,
Measurement instruments
Medical Diagnostic and Monitoring equipment
Communications: Telecoms and Datacoms
Industrial and Automotive Control and Test

Mount Type: Through-hole vs Surface Mount

At one side of this female header is a series of pins which can either be mounted and soldered directly onto the surface of the PCB (SMT) or placed into drilled holes on the PCB (THM).


Through-Hole (Poke-In)
Best used for high-reliability products that require stronger connections between layers.
Aerospace and military products are most likely to require this type of mounting as these products experience extreme accelerations, collisions, or high temperatures.
Useful in test and prototyping applications that sometimes require manual adjustments and replacements.
1.0mm vertical single row female header, 1.0mm vertical dual row female header, 1.0mm Elevated single row female header, 1.0mm Elevated dual row female Header, 1.0mm right-angle single row female header and 1.0mm right-angle dual row female header are some examples of Antenk products with through-hole mount type.

Surface-Mount
The most common electronic hardware requirements are SMT.
Essential in PCB design and manufacturing, having improved the quality and performance of PCBs overall.
Cost of processing and handling is reduced.
SMT components can be mounted on both side of the board.
Ability to fit a high number of small components on a PCB has allowed for much denser, higher performing, and smaller PCBs.
1.0mm Right-angle Dual Row female header, 1.0mm SMT Single row female header, 1.0mm SMT Dual row female header and 1.0mm Elevated Dual Row female Header are Antenk`s SMT female headers.

Soldering Temperature for 1.0mm Pitch Female Headers

Soldering SMT female connectors can be done at a maximum peak temperature of 260°C for maximum 60 seconds.


Orientation/Pin-Type: Vertical (Straight) and Right-Angle
1.0mm pitch female headers may be further classified into pin orientation as well, such as vertical or straight male header or right-angle female header.

Vertical or Straight Female Header Orientation
One side of the series of pins is connected to PCB board in which the pins can be at a right-angle to the PCB surface (usually called "straight" or [vertical") or.

Right-Angle Female Header Orientation
Parallel to the board's surface (referred to as "right-angle" pins).
Each of these pin-types have different applications that fit with their specific configuration.


Pcb Connector Stacking
Profile Above PCB
This type of configuration is the most common way of connecting board-to-board by a connector. First, the stacking height is calculated from one board to another and measured from the printed circuit board face to its highest insulator point above the PCB.

Elevated Sockets/Female Headers
Elevated Sockets aka Stacked sockets/receptacles or Mezzanine are simply stacked female headers providing an exact distance requirement between PCBs that optimizes electrical reliability and performance between PCB boards.

Choosing this type of stacking configuration promotes the following benefits:
Connector Isolation - the contacts are shrouded preventing cable connection mishaps and good guidance for the mating header connectors.
For off-the-shelf wireless PCB module, stacking height is optimized with elevated sockets.
Offers superior strength and rigidity.
Polarisation prevents users from inverted insertion.


Single, Dual or Multiple Number of Rows
For a 1.0mm straight or vertical female header, the standard number of rows that Antenk offers ranges from 1 to 2 rows. However, customization can be available if 3 ,4 or n number of rows is needed by the customer. Also, the number of contacts for the single row is about 2-40 pins while for dual row, the number contacts may vary from 2-80 pins.

Pin Material
The pins of the connector attached to the board have been designed with copper alloy. With customer`s demand the pins can be made gold plated.

Custom 1.0mm Pitch Female Headers
Customizable 1.0 mm pitch female headers are also available, making your manufacturing process way faster as the pins are already inserted in the headers, insulator height is made at the right size and the accurate pin length you require is followed.
Parts are made using semi-automated manufacturing processes that ensure both precision and delicacy in handling the headers before packaging on tape and reel.

Tape and Reel Packaging for SMT Components
Antenk's SMT headers are offered with customizable mating pin lengths, in which each series has multiple number of of circuits, summing up to a thousand individual part number combinations per connector series.
The tape and reel carrier strip ensures that the headers are packaged within accurately sized cavities for its height, width and depth, securing the headers from the environment and maintaining consistent position during transportation.
Antenk also offer a range of custom Tape and reel carrier strip packaging cavities.

1.0Mm Female Pin Header

Pcb Header,1.0Mm Female Pin Header,1.0Mm Female Header Connector,1.0Mm Pcb Header,0.039" Female Headers,0.039" Pin Header, 1.0mm Female Pin Header SMT, 1.0mm Female Pin Header THT

ShenZhen Antenk Electronics Co,Ltd , https://www.antenk.com

This entry was posted in on