Introduction: Collision Avoidance Controller

Picture of Collision Avoidance Controller

This Instructable demonstrates how to make a vehicle collision avoidance system.

The basic idea of how to implement this is shown in Fig. 1. We use a single Silego SLG46620V GreenPAK CMIC. This IC provides processing of the ultrasonic sensor and RC transmitter, and assists in control of the vehicle.

Required Materials
Hardware:

1. Vehicle

2. RC receiver

3. HC-SR04

4. Silego GreenPAK SLG46620

5. LEDs (front and rear)

6. ESC and Motor

Software:

1. Silego GreenPAK designer. http://www.silego.com/softdoc/software.html

The principle of operation is as follows:

the higher the rate - the greater the distance at which the automatic brake will engage before an obstacle (only when the throttle is engaged). Schematic, and illustration of PCB are shown in Fig. 2, and Fig. 3. Also, you can watch a video of the finished prototype in action.

The next step will describe the GreenPAK Design. You can go through this step to understand how the GreenPAK chip has been programmed. However, if you just want to easily create the robot without understanding all the inner circuitry, download GreenPAK software to view the already completed design file. Plug your computer to the GreenPAK Development Kit and hit program to create the custom IC to control the Collision Avoidance robot.

The next step will discuss the logic that is inside the GreenPAK design file for those that are interested in understand the internal circuitry.

Step 1: Circuit Design

Picture of  Circuit Design

As shown in Fig. 4 and 5 the system can be implemented using the following cell blocks:

two INVs (INV0, INV1),

seven 2-bit LUTs (LUT1, LUT2, LUT3, LUT4, LUT5, LUT6 and LUT7),

thirteen 3-bit LUTs (LUT0, LUT1, LUT2, LUT3, LUT4, LUT5, LUT8, LUT9, LUT10, LUT11, LUT12, LUT13 and LUT15),

one 4-bit LUT1,

eleven DFFs (DFF/LATCH0, DFF/LATCH2, DFF/LATCH3, DFF/LATCH4, DFF/LATCH5, DFF/LATCH6, DFF/LATCH7, DFF/LATCH8, DFF/LATCH9, DFF/LATCH10 and DFF/LATCH11), DCMP0/PWM0,

nine CNTs/DLYs (CNT0/DLY0, CNT1/DLY1, CNT2/DLY2/FSM0, CNT3/DLY3, CNT4/DLY4/FSM1, CNT5/DLY5, CNT6/DLY6, CNT8/DLY8 and CNT9/DLY9),

two P DLYs (P DLY0, P DLY1), OSC

and two Pipe Delays (Pipe Delay0, Pipe Delay1).

Step 2: Circuit Analysis

Picture of Circuit Analysis

The implementation of this project is shown on the block diagram (see Fig. 6). This project is based on the comparison of two values: THROTTLE_IN (position of throttle stick) and ECHO (distance to the obstacle). Comparison block is implemented using DCMP0/PWM0 and two FSMs blocks (CNT2/DLY2/FSM0 and CNT4/DLY4/FSM1). In both FSMs blocks, the default counter data value is 240. This value corresponds to the number of steps to detect the difference of the input signals. Their counter data goes down to 0 when the input signal is switched HIGH. Input signals previously are processed before the comparison because their frequencies are different (as shown in Fig. 7).

This function (input signal processing) is implemented on the combination of group blocks that do the following functions: clock divider (ECHO CLK and THROTTLE CLK), Ready state (ECHO ready system and THROTTLE ready system) and a block that stores the data for comparison (Comparison). For THROTTLE_IN signal, these are: CNT8/DLY8, CNT1/DLY1, CNT2/DLY2/FSM0, P DLY0, 3-bit LUT0, DFF0 and 2-bit LUT2 blocks. For the ECHO signal, these are: CNT3/DLY3, CNT4/DLY4/FSM1, LATCH10, LATCH11, 2-bit LUT4 3-bit LUT9, DFF6 and 2- bit LUT5 blocks. Then, both data are ready for comparison – output result of DCMP0/PWM0 is written into the Pipe Delay1. It is implemented using 3-bit LUT13 and 8, 2- bit LUT6, P DLY1 and INV1. If OUT0 Pipe Delay1 is LOW, it’s the STOP state (obstacle detected), see Fig. 8, Fig. 9 and Fig. 10.

If OUT0 Pipe Delay1 is HIGH, the device is in the normal state (motion of the car continues), see Fig. 11 and Fig. 12. RESET block is implemented using the combination of the following blocks: 2-bit LUTs 3 and 7, 3- bit LUTs 2, 3, 5, 10, 11, 12, 15 and DFFs 2, 4, 7 and 9. 4-bit LUT1 is a MUX to control the THROTTLE_IN and Internal STOP (combination of the blocks: CNT9/DLY9 and 2-bit LUT1). The function of the automatic STOP can be switched on/off with the remote control and it is implemented in the Function control block (CNT6/DLY6, LATCH5, 3-bit LUT4, DFF3 and MUX based on 4-bit LUT1).

If the automatic STOP turns on, it indicates this via LEDs (front LEDs shine at full intensity and rear LEDs shine dimly). If internal STOP is activated - rear LEDs shine at the full intensity (this function is the same as stop signal in real car). Rear LEDs control is implemented using PWM & Control block (Pipe Delay0 and 3-bit LUT1). To get the result from the ultrasonic sensor, a 10us pulse has to be generated and fed into the input trigger, and repeated every 60ms. Such function is implemented using the Pulse generator block (CNT0/DLY0, INV0 and CNT5/DLY5).

Conclusion

We created the system that controls an RC car providing protection from collision with an obstacle, and LED visual effects control.

This design can be extended to other applications such as robotic vacuums, toys, handicapped early warning systems, industrial automation.

Comments

About This Instructable

185views

4favorites

License:

Bio: Silego provides a development platform based on an easy-to-use hardware and software GUI that allows users to easily create custom ICs. We provide design files ... More »
More by Silego:Make a Maze Runner RobotSmart PillowHalloween Ghoulish Illuminator
Add instructable to: