Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Neural Network Controlled Self-Driving (RC) Car

By Samidha Verma

Inspired by the video of the ALVINN autonomous car which drives itself along normal roads at CMU in the mid-90s, this article will focus on building a self-driving remote control car with neural network. The ALVINN system functions on the idea of framing every couple of seconds and then passing it to neural network, trained by watching a human drive in similar environments. The trained neural network then can steer to stay on the road ahead.

This article will work on system which could operate in two modes. First mode is for the system that records video frames and control output from a human driver and use the recording later to train neural network. The second mode is drive mode, which captures live video frames, pass them to a trained neural through radio control network which makes predictions about how to drive.

Designing

The focus is majorly on the system that should be able to record video from the car, pass frames to a neural network and control the car’s steering or motors. Mounting an Android phone on the car would help to gather video frames and make neural network predictions locally on the device. Then hacked car is to be controlled from the onboard phone using an Arduino based Android ADK board, while data is recorded and transferred to a computer for training.

So the system consists of Android phone mounted on the car. It has an app running that connects to a server running on a laptop computer via Wi-Fi and streams video frames across the connection. A computer that runs a Java app called “Driver” which acts as both a TCP server that streams image frames from the phone and a user interface allowing a human driver to control the car with the mouse. The video frames are saved to disk and neural network is trained using these labelled frames in a separate environment on the computer. And an Arduino Uno, connected to the computer via USB and hacked to connect to key presses on the car’s radio controller PCB.

The Neural Network

As on the ML course, the Neural Network is trained using an octave program and here 25345 units in the input layer is used and there are four units in the output layer that corresponds to each of the instructions we can send the car – go forwards, backwards, left or right.  The network backpropagation is used which produces weights corresponding to the contribution each input layer unit makes for the activation of the hidden layer units. Further, the contribution hidden layer unit makes is used for the activation of each of the output layer units.

In order to make predictions in auto mode, the author also implemented the same network topology in Java that contains the interesting code and is a generic neural net implementation, used for any three layer network. The Driver app uses this Java implementation which is set up by the octave script at the end of the training process.

Radio Control with Arduino design for commands to be sent over the USB / Serial interface that could be sent to the car via its original controller.

GET the cheapest RC car, just make sure the push button is on/off type rather than a continuous control. The hacking is done by modifying the radio control unit and the Arduino board will press them for us based on the value received over the serial port.

Figure out how the RC controller works

Try to understand the RC controller apart and figure out how it works. Follow the track of each switch to the nearest solder joint on the original board then find the pads for each switch. Identify the joints that matter, attach patch wires to each point with a soldering iron. The controller which pads for up/down left/right were being connected to when the relevant switch was pressed. Then remove the PCB from the original controller housing altogether and power it with 3.3V from the Arduino board. A simple circuit on a breadboard is built to switch the connections from software running on the Arduino board.

Arduino sketch

Now all you need is a sketch to run on the Arduino board which reads a byte from the serial interface and decodes it to determine which button is to be pushed on the remote control. The car used here is very fast and difficult to drive round a small circuit, therefore the pulse chosen in the forward direction is 250 ms followed by a 500 ms pause.

You can experiment with different values or remove this altogether if you try with a slower car. You can too build your own car through source code of the Android app, Java Driver app and octave training scripts.


Filed Under: Reviews

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • Renesas delivers intelligent sensor solutions for IoT applications
  • Microchip Technology releases AVR-IoT Cellular Mini Development Board
  • Qualcomm acquires Cellwize to accelerate 5G adoption and spur infrastructure innovation
  • MediaTek’s chipset offers high-performance option for 5G smartphones
  • Nexperia’s new level translators support legacy and future mobile SIM cards

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • chebyshev sine approx
  • LLC HB with synchronous rectifiers can be very dodgy?
  • building lm2596 dc dc using Arduino uno
  • ADS Cascode Power Amplifier Loadpull Problem
  • DC DC converter output voltage rise time

RSS Electro-Tech-Online.com Discussions

  • Microcontrollable adjustable and switchable constant current source for driving LED's
  • Help diagnosing a coffee maker PCB
  • Trying to make a custom automated water container for my UV purifier. Can anyone help with where to begin?
  • Control Bare LCD With ATmega328p
  • Are Cross-wind compensation and Road crown compensation functions inputs to LKA function?
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering