element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
GIZMO 2
  • Products
  • Dev Tools
  • Single-Board Computers
  • GIZMO 2
  • More
  • Cancel
GIZMO 2
Blog Build a self-driving RC car with the Gizmo 2
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join GIZMO 2 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 16 May 2015 6:56 AM Date Created
  • Views 2254 views
  • Likes 4 likes
  • Comments 4 comments
Related
Recommended

Build a self-driving RC car with the Gizmo 2

Former Member
Former Member
16 May 2015

I used the Gizmo 2Gizmo 2 single-board computer for this project.

 

image

 

This project was originally inspired by a few of the image processing projects that I have gotten involved in as well as my strong interest in robotics. After hearing about the Gizmo 2's small size, reasonable power consumption and fast x86_64 processor, I saw it as a perfect fit for small to moderate size robotics projects that involve large amounts of computation. With all of the buzz lately over self driving cars, I thought it would be cool to create my very own 1/10th scale self driving RC car. This type of project is very well suited to the Gizmo 2 since it fulfills every aspect of the preceding criteria.

image

The final project is an a fully autonomous, self driving, object tracking 1/10th scale car. The car is a 1/10 scale Traxxas Slash pro-class short course RC race truck that is powered by a high performance 12 turn brushed DC motor. Mounted to the hood is a Logitech C920-C USB camera which captures video that is sent in real time to the Gizmo 2, which it mounted on the rear of the car using a custom laser-cut mounting bracket.

 

image

Power to the entire system is provided by 2 lithium polymer batteries, a 4 cell 3.2Ah pack for powering the Gizmo 2 and all USB peripherals along with a 2 cell pack providing drive power for the car. Battery life is slightly over 3 hours with the Gizmo 2 and car running constantly. The main motor is controlled via the standard brushed motor ESC (electronic speed controller) included with the car. The RC radio system of the car has been replaced with a custom designed control system consisting of the AMD / Gizmosphere Gizmo 2 running Arch Linux as well as an Arduino Uno. The Gizmo 2 and Arduino work together such that the Gizmo 2 processes the video frames from the webcam and performs the several hundred matrix operations  necessary to process the incoming video stream using OpenCV libraries and locate the colored object if it is present in the video frame.


If the colored object is detected, the software running on the Gizmo 2 will then proceed to compute a vector from the center of the frame to the location of the center of the object. The magnitude and direction of this vector are then used to compute a speed and steering angle, where the steering angle is proportional to the location of the object with respect to the center of the frame and the speed is inversely proportional to the steering angle. This causes the car to always turn towards the object as well as slow down during tight turns.


The computed speed and steering angle values are then transferred to the Arduino using a custom designed, fault tolerant serial protocol. The Arduino then decodes these incoming data packets and uses a combination of data from an onboard hall effect based RPM sensor along with a PI (Proportional-Integral) control system to compute approximately 60 motor power adjustments per second that are required to maintain the car at the speed requested by the Gizmo 2 even in changing terrain conditions.


The output of the speed regulation algorithm as well as the steering position values are finally input into a series of hardware timers in the Arduino's ATMega328 microcontroller that synthesize the PWM(Pulse Width Modulation) signals that will finally be interpreted by the car's ESC and steering servo.


Telemetry for configuration and monitoring is accomplished via a dual band TP-LINK TL-WDN3200 USB wireless adapter as well as the dhcpd and hostapd linux utilities, which allow the Gizmo 2 to create its own WiFi network for the control computer. The SSH and VNC protocols are then used for console access and initial configuration as well as access to the graphical desktop for actually running the image processing application respectively.


Bill of Materials

AMD/Gizmosphere Gizmo 2AMD/Gizmosphere Gizmo 2

Traxxas Slash 2WD RC Racing Truck

Traxxas Big Bore Shock Kit

Traxxas RPM sensor and trigger magnet

16GB microSD memory card

XT60 connectors

Various sizes of heat shrink tubing

12"x12"x1/4" acrylic sheet

4-40x1" nylon bolts with nuts

4-40x3/4" steel bolts with nuts

1/4" spacers

Arduino ProtoShield

TP-LINK TL-WDN3200 N600 Dual Band Wireless USB Adapter

Arduino UNO R3 Board

Venom 30C 4S 3200mAh 14.8v LiPo Battery

Venom 40C 2S 5000mAh 7.4v LiPo Battery

1 meter, full size USB A to B cable.

Bussmann ATO inline fuseholder

2.5x5.5mm barrel plug power cable

Logitech C920-C Webcam

HiTec 44165 X1 AC Plus Single Port 6 Amp AC/DC Charger (NiCd/NiMH/LiPo)

 

Code

https://github.com/nkaminski/gizmocar

  • Sign in to reply
  • Former Member
    Former Member over 10 years ago

    Great campaign! Hats up to your invention and i am waiting to see how your processor keep the car on the track. Your post seems very innovative my friend and i think you have put all of your efforts while doing this. You must have to know some car care tips as every car needs proper care. Thanks for sharing your article with us. Keep posting!

    www.germanautowerks.com/car-care-tips.php

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago

    I have read your stuff, it looks very interesting and i am waiting to see how your processor will help to keep your car on the way. It was very nice to do inventions on by own but it was also important to understand the new techniques and unique ways about how to invent those things in a simple manner. Keep doing your best Nash Kaminski.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to DAB

    The first iteration of the software is complete where the car tracks a uniquely colored object and does not follow any type of preprogrammed route. All of the color recognition logic ia implemented in colortrack.cpp

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Interesting project,

     

    I will be watching to see how you take in sensor data to keep the car on track.

     

    Are you going to put it through an obstacle course or just a preprogrammed route?

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube