We will demonstrate how to make a vehicle collision avoidance system using a single SLG46620V GreenPAK IC. This IC provides processing of the ultrasonic sensor and RC transmitter, and assists in control of the vehicle. The basic idea of how to implement this is shown in Figure 1. 

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 Figure 2, and Figure 3. You can watch a video of the finished prototype in action here:

Below we described steps needed to understand how the controller has been programmed. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the device.

Collision Avoidance Controller Circuit Design

As shown in Figure 4 and Figure 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).

Collision Avoidance Controller Circuit Analysis

The implementation of this project is shown on the block diagram (see Figure 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 Figure 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 Figure 8, Figure 9 and Figure 10. 

If OUT0 Pipe Delay1 is HIGH, the device is in the normal state (motion of the car continues), see Figure 11 and Figure 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...

Read more »