Implementing an RC-controlled vehicle collision avoidance system -

Implementing an RC-controlled vehicle collision avoidance system

Around the middle of last year, the folks at Silego offered 25 free GPAK4 development kits to whoever could tempt me with the tastiest of tempting ideas for GPAK4-related projects (see Want a free Silego GPAK4 mixed-signal FPGA development kit? ).

As you may recall, I tend to think of GPAKs as teeny-tiny mixed-signal FPGAs that you can design and program in just a few minutes and that cost only a few cents each. The idea was for and community members to email me to tell me why they deserved one of these little beauties — to excite me and delight me with descriptions of the amazing hobby or work projects for which they might feature one or more GPAK devices.

Once Silego had dispatched the development kits, it wasn't long before one of the lucky recipients — J.R. Stoner — showed us how to implement a GPAK-based multi-peripheral controller. Sometime later, this was followed by Wojciech (Wojtek) Rynczuk's GPAK-based light-following device.

In turn, this was followed by the release of the GPAK5 family, whose members boast on-chip asynchronous state machine (ASM) and I2C communications capabilities. And then, Victoria Yatskulyak from Silego emailed me to say: “Hi Max, take a look at this video showing an RC-controlled vehicle collision avoidance system implemented using a GPAK4 device.”

How cool! I immediately responded to Victoria saying: “I love it. Can you get someone to describe this is more detail and include the GPAK4 design file so others can download it and play with it?” All of which brings us up to a few days ago, when I received the following from the guys and gals of Silego's application team:

Few activities offer such unencumbered joy as racing RC cars. Zipping through neighborhood streets with impossibly tight handling, RC cars weave around ankles and other obstacles until the inevitable miscalculation, slightest loss of traction, or lapse in depth perception leads to a collision. More often than not this means the end of the fun, a dent in the wallet, and maybe even a sore ankle or shin. But this is 2016. Modern luxury cars have collision avoidance systems, so why not RC cars?

We — the applications engineers at Silego Technology — have devised a way to solve this issue using a fourth-generation member of Silego's flagship GPAK product, thereby saving you money, heartache, and Band-Aids. GPAK is an incredibly small, programmable, mixed-signal IC designed to implement a variety of circuits, including glue logic, timing adjustments, IO expanders, and more, thereby enabling designers to add features and differentiation to already highly integrated systems. GPAK devices are available in a wide variety of resource configurations and packages. With components like counters, delays, look-up-tables, digital comparators, PWMs, internal oscillators, and more, we were able to implement an ultrasonic collision avoidance system with the following features in the SLG46620V GPAK 4:

  • A remote switch to enable/disable the collision avoidance system.
  • Stopping distance proportional to the car's speed (throttle input).
  • Front LEDs to indicate system status.
  • Rear LED brake lights.

Block diagram of collision avoidance system (Source: Silego)

Taking advantage of the easy to use GreenPAK Designer development software (shown below) the ultrasonic collision avoidance system implemented in the SLG46620V GPAK4 is organized in five main functional systems:

  • ECHO Ready System: Prepares the ECHO signal for comparison.
  • Throttle Ready System: Prepares the THROTTLE_IN signal for comparison.
  • Comparison: Analyzes the throttle and echo signals to trigger the stopping of the vehicle by blocking the throttle throughput.
  • Pulse Generator: Sends 10µs pulses every 60ms to the HC-SR04 Ultrasonic Ranging Module to trigger echo pings.
  • LED and Function Control: Enables the ultrasonic collision avoidance system when LED_CH_IN receives a PWM positive pulse width bigger than 1.5ms from the receiver. When the system is active, the front LEDs are fully lit and the rear LEDs are dimly lit. When the collision system is triggered (stopping the car), the rear LEDs are fully illuminated, just like the brake lights on a rear car.

GreenPAK Designer Development Software (Source: Silego)

Well, I don’t know about you, but I for one am tremendously impressed. Even though I'm familiar with advances in technology, it's still amazing to me that so much diverse functionality can be crammed into such a tiny chip.

(Source: Silego)

If you are interested in learning more about how this system was implemented, click here to visit the vehicle collision avoidance webpage where you can access an application note and the associated GPAK Designer project file. All you'll need to view the project file and tinker with the system is to download Silego's GreenPAK Designer tool, which is free on

If you want to go further and start programming your own GPAK4 devices, you'll need a GreenPAK 4 Development Kit ($59.99). This little rascal comes with a development board, ZIF socket, and a bunch of GPAK sample chips (I have one sitting here on my desk as I pen these words).

As for me, I'm now tempted to start playing with RC cars. I know a few guys who do this, but I don’t think any of their cars are equipped with collision avoidance capabilities. I can imagine “playing the innocent” and driving my car straight toward a wall or something, and then watching their faces when my car stopped itself. Hmmm…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.