Saturday, 15 February 2014 20:38

Wireless Router Remote Control Car

This is my first RC car control by an Arduino and a wirless router running OpenWRT. There are many OpenWRT supported routers, I'm using a TP-Link TL-MR3020 3G/4G Wireless N Router for this project since it is very slim, low power consumption and it is cheap.


RC car features

  • A webcam, the car can be driven without line of sight
  • A horn so that you can honk at people.
  • LED Headlights attached to the front of the car
  • Two wheel drive motor
  • Windows GUI application or web interface
  • Future Additions: Control by a smartphone (Android & IOS)


Wheel Drive Layout

This project work with the following wheel drive layout.

Wheel drive layout


  • If you do not have SSH client, you need to install one. I'm using PuTTY

  • WinSCP (Windows Secure Copy)

  • A router flashed with OpenWRT, please read here on how to flash the OpenWRT to a TP-Link TL-MR3020 wireless 3G/4G router

  • Make sure the router have Internet connection (see below) as it will download the packages from OpenWRT repository


Setup Internet Connection for Router

Connect your PC to router as shown in figure below. After flasing OpenWRT to the router, make sure you have setup the internet connection.

Wireless router connection diagram 


  1. Arduino sketch runs on Arduino (Arduino_Wifi_Car folder)
  2. Shell script (SH script) runs on the router (www folder)
  3. The Delphi Wifi_car client application (Delphi Wifi Car folder) or the web interface (www folder) run on computer
1. Arduino_Wifi_Car folde: Arduino firmware, upload this sketch to Arduino
2. www folder: Web GUI and Shell Script to control RC car.
Transfer the www folder to router root directory by using WinSCP as shown in figure below
www folder
You don't have enough permission to run the shell script ("car") from /www/cgi-bin folder by default. Please change the permission to 0755 as shown in figure below.
Setting permission
3. Delphi Wifi Car folder: An RC car client application running on Ms Window, contains source code written in Borland Delphi 7.
Delphi files 

Arduino Code

Upload the following sketch to Arduino

The serial data send from router to Arduino must start with a special character such as @ and follow by the command (eg. @2), the router may not work correctly (may cause delay) without the start character.



Shell Script run on Router

The Shell Script is just three lines of code, it act as the interface between router and Arduino. Name this file as "car" and save it to router /www/cgi-bin 

When a request is received by the server (router)  for CGI, the parameters it receives are through QUERY_STRING environment variable. QUERY_STRING retrieves the string that follows the ? delimiter in the URL for a query, an URL containing a query string is as follows:

http://routerIP/cgi-bin/[email protected]

When the server (router) receives a request for such a page (eg.[email protected]), it will write the command (@2) to  /dev/ttyUSB0 port (it is COM1 in Ms Windows) 


Lua Script run on Router

Lua is come with OpenWRT. If you know Lua programming, you can use it to replace Shell Script.


GUI Interface

The web interface makes it easy to control the RC car, the program is loaded from the router hence there is not necessary to install an application to your computer. To launch the web interface, enter from browser as shown in figure below.
Web interface
Files structure
car.html: The main program, load the external js & css files and implement image button onClick events. 
car.js: Consists of javascript function
car.css: Layout options such as image postion, colors, and fonts.
images folder: All the images which shows on the web interface
codebase folder: consists of javascript componet to create slider (dhtmlxSlider), more about dhtmlxSlider is available here.
cgi-bin folder: The Shell Script is stored here
Keyboard shortcut
The keyboard event is stored in the car.js file, you can modify it if necessary
Up Arrow
Move forward
Down Arrow
Move backward
Left Arrow
Turn left
Right Arrow
Turn right
Cam (Reserved)
Toggle head light
Toggle horn
Mic (Reserved)
Predefined speed 1
Predefined speed 2
Predefined speed 3
Predefined speed 4
Predefined speed 5
Besides the Web GUI, I wrote another client application which runs on MS Windows computer, you can compile the source code in Borland Delphi 7.
Wireless Router RC car client application


Interface between Arduino and Router

The router needs to install USB-SERIAL driver to work with Arduino, please select the correct serial driver for your Arduino.

  • Run PuTTY and SSH ro router as shown in figure below

SSH ro router


  • Enter root as login and enter your router password as shown in figure below

login as: root
This email address is being protected from spambots. You need JavaScript enabled to view it.. 0.1;s password:

BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
* 1/4 oz Vodka Pour all ingredients into mixing
* 1/4 oz Gin tin with ice, strain into glass.
* 1/4 oz Amaretto
* 1/4 oz Triple sec
* 1/4 oz Peach schnapps
* 1/4 oz Sour mix
* 1 splash Cranberry juice
[email protected]:~#

    • Update list of available packages and stores it on your router RAM partion (make sure your have internet connection
      opkg update

  • If you are using Arduino Demilanove or FTDI usb-serial
    opkg install kmod-usb-serial-ftdi

  • If you are using Teensy / Arduino Uno / Arduino Mega
    opkg install kmod-usb-acm

  • If you are using PL2303 based USB/serial adapters
    opkg install kmod-usb-serial-pl2303

  • If you are using CP201x based USB/serial adapters
    opkg install kmod-usb-serial-cp210x

Verify router is able to communicate with Arduino

Plug in Arduino to the router USB port and restart the router, wait until the router is ready then enter command below

dmesg | grep -i usb

It should similar to this: 
[email protected]:~# dmesg | grep -i usb
[ 9.040000] usbcore: registered new interface driver usbfs
[ 9.040000] usbcore: registered new interface driver hub
[ 9.050000] usbcore: registered new device driver usb
[ 10.240000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 10.250000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 10.310000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 10.310000] hub 1-0:1.0: USB hub found
[ 10.590000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 10.740000] usbcore: registered new interface driver usbserial
[ 10.740000] USB Serial support registered for generic
[ 10.740000] usbcore: registered new interface driver usbserial_generic
[ 10.750000] usbserial: USB Serial Driver core
[ 10.900000] USB Serial support registered for FTDI USB Serial Device
[ 10.900000] usbcore: registered new interface driver ftdi_sio
[ 10.910000] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 11.040000] usbcore: registered new interface driver uvcvideo
[ 11.050000] USB Video Class driver (1.1.1)
[25677.400000] usb 1-1: new full-speed USB device number 2 using ehci-platform
[25677.560000] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
[25677.570000] usb 1-1: Detected FT232RL
[25677.570000] usb 1-1: Number of endpoints 2
[25677.580000] usb 1-1: Endpoint 1 MaxPacketSize 16384
[25677.580000] usb 1-1: Endpoint 2 MaxPacketSize 16384
[25677.590000] usb 1-1: Setting MaxPacketSize 64
[25677.600000] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
The first thing is to disable auto reset, otherwise the Arduino will be reset automatically each time data is sent from router to Arduino USB-SERIAL port. Here listed two simple way to disable the auto reset:
Method 1: Connect a 120ohm resistor between +5V and Reset
Method 2: Connect a 1uF capactior between Gnd and Reset, negative to Gnd and positive to Reset

Disable auto reset

Plug in the Arduino to the router via USB and use the HTTP GET method to control Arduino from browser.

Syntax: http://routerIP + /cgi-bin/car? + command 

Connect three LED to Arduino, first LED to D9, second LED to D10 and third LED to D6. Launch a browser and enter the URL as below:

Turn Left (D10 On)[email protected]
Turn Right (D8 On)[email protected]
Full Speed (D6 100% On)[email protected]
Half Speed (D6 50% On)[email protected]
You must install webcam driver before you can use it with the router.
  • Make sure you have Internet connection as it will download the packages from OpenWRT repository
  • SSH to the router
  • Install the following packages

opkg update
opkg install kmod-video-uvc 
opkg install mjpg-streamer

It should look like this

[email protected]:~# opkg update
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
[email protected]:~# opkg install kmod-video-uvc
Installing kmod-video-uvc (3.3.8-1) to root...
Installing kmod-video-videobuf2 (3.3.8-1) to root...
Installing kmod-video-core (3.3.8-1) to root...
Installing kmod-i2c-core (3.3.8-1) to root...
Installing kmod-input-core (3.3.8-1) to root...
Configuring kmod-i2c-core.
Configuring kmod-video-core.
Configuring kmod-input-core.
Configuring kmod-video-videobuf2.
Configuring kmod-video-uvc.
[email protected]:~# opkg install mjpg-streamer
Installing mjpg-streamer (r148-4) to root...
Installing libpthread ( to root...
Installing libjpeg (6b-1) to root...
Configuring libjpeg.
Configuring libpthread.
Configuring mjpg-streamer.
[email protected]:~#

Enable video streaming
Video streaming is diabled by default. To enable video streaming, edit /etc/config/mjpg-streamer and change option enabled "0" to option enabled "1" 

config mjpg-streamer core
         option enabled "1"
         option device "/dev/video0"
         option resolution "640x480"
         option fps "5"
         option www "/www/webcam"
         option port "8080"

Restart the router, you are ready to stream the video. Please read here for more information.

Arduino PCB

I'm using a SN754410NE H-bridge to control two DC motors, Arduino D6 (ATMega328 pin 12)  is a PWM pin, it is connect to the H-bridge enable pin in order to control the motor speed. Please note that the Arduino D11 (ATMega328 pin 17) is not solder, pleaase leave it no connection unless you want to use two different motor speed.
Arduino PCB 
The Arduino is running  8MHz internal clock (without 16MHz crystal), read here for more about 8MHz Arduino
Schematic: Arduino H-Bridge
With this Arduino board, you must connect it to USB-Serial adapter and then plug in to the router via USB. It is not neccessary to disable auto reset since there is no auto reset designed in the board.
USB-Serial adapter 
As shown in figure above is a Prolific PL2303 USB-Serial adapter,  please run opkg install kmod-usb-serial-pl2303 to install the driver.
To be continue.......
Read 54235 times Last modified on Sunday, 12 June 2016 10:21


  • Comment Link Dames chulp Tuesday, 17 September 2019 16:32 posted by Dames chulp

    Where to order for yourself beautiful glass stair railings in your apartment

  • Comment Link bГ¤sta magnesium tabletten Monday, 16 September 2019 22:13 posted by bГ¤sta magnesium tabletten

    Wow, this piece of writing is good, my sister is analyzing these kinds of things, therefore I am going to tell her. bästa magnesium tabletten bästa magnesium tabletten

  • Comment Link Jamesnef Monday, 09 September 2019 05:30 posted by Jamesnef

    Рыбалка в России

  • Comment Link OlegNeods Friday, 06 September 2019 14:43 posted by OlegNeods


  • Comment Link NancyRoola Friday, 06 September 2019 00:58 posted by NancyRoola

    Bulwark shirts

  • Comment Link RubenUricy Thursday, 29 August 2019 14:02 posted by RubenUricy

    Здравствуйте! класный у вас сайт!
    Нашел класную базу кино: боевики русские 2019 смотреть в хорошем качестве
    Тут: фильмы вестерны лучшие бесплатно В хорошем качестве лучшие вестерны рейтинг 2019
    Тут: Смотреть онлайн лучшие драмы Онлайн лучшие драмы список 2019
    Здесь: Дуэйн Джонсон пообещал упомянуть Робина Уильямса в новом "Джуманджи"

  • Comment Link Allenshomy Wednesday, 28 August 2019 17:16 posted by Allenshomy

    Sol de Janeiro Brazilian Bum Bum Cream, 8 Oz

    Women's Soft Shorts

  • Comment Link centrsnabSmuncag Wednesday, 21 August 2019 10:48 posted by centrsnabSmuncag

    Агрегатор Я. такси Самара позволяет людям вызвать транспорт в любое удобное вам время. Сделать заказ авто вы можете 3 способами: через специальное мобильное приложение, закачав его, на сайте, по телефону Яндекс такси. Вам следует указать местоположение, свой номер телефона, время когда нужна машина.

    Заказывают Яндекс такси вместе с детским авто креслом для перевозки детей, в вечернее время после встреч лучше прибегнуть к Яндекс такси, чем, например, сесть в автомобиль нетрезвым, на вокзал или в аэропорт комфортнее пользоваться Яндекс такси ненужно думать где оставить свой автомобиль. Оплата выполняется безналичным или наличным платежом. Время подъезда Yandex такси составляет от 5 до десяти минут примерно.

    Плюсы работы в нашем Я такси: Моментальная регистрация в приложение, Не очень большая комиссия, Оплата мгновенная, Постоянный поток заявок, Диспетчер постоянно на связи.

    Для работы в такси владельцу автомобиля следует оформиться лично и транспортное средство, это займёт не более пяти минут. Процент агрегатора будет составлять не свыше 20 % отдохода. Вы можете с легкость получать зарплату когда вам нужно. У вас всегда будут заявки. В случае вопросов сможете связаться с постоянно работающей службой сопровождения. Yandex такси даёт возможность гражданам быстро доехать до места назначения. Заказывая наше Я. такси вы приобретаете наилучший сервис в городе.

    работа в такси на автомобиле компании = такси самара работа для водителей

  • Comment Link Elainegar Wednesday, 07 August 2019 02:23 posted by Elainegar

    My naked Photos For Guys Only Here

  • Comment Link EgorClamy Wednesday, 07 August 2019 01:25 posted by EgorClamy

    creampie xtube nsfw gif

  • Comment Link RickyLiz Tuesday, 06 August 2019 20:20 posted by RickyLiz

    You so pretty." I usually nod and say I'm going to let them know whether or not this happens. It is far from in our nature nowadays once we receive the spirit of Christ. They might also be imposed with certain mileage limit.These can be chest issues or respiratory diseases in essential. Some realtors provide to hire an inspector for upon your benefit. She will run for talking stuffed toys and only for certain times.

    Ultra Slim walmart
    sklepni artritis

    So you teach his kid and he fixes car. They ruthlessly fined every warm body with a pulse. We choose our fruits and vegetables select the cost or go with the appearance.Carpeted floors are comfortable for a person as even on flu day they will keep toes warm. This antioxidant has smaller molecular layout. Once we know the saying good health in strong body.

    Energy Beauty forum
    Neurovidan เสริม

    You install a standard AC Austin inside office building and this will not work quickly and easily. They reported the building was safe, but recommended the library be closed for one day as a precaution.Including a healthy diet may help compliment your fitness pattern. People often do not pay attention for the condition within their air conditioners during the winters. There lots of benefits from taking CoQ10.

    rboptions торговый
    topfx susisiekti ir prisijungti

    Individuals . stop numerous gunge forming in the ultimate place. Choose HVAC Company You're feeling Comfortable With - Don't base program decision on money. ventilation can be a must with your newly remodeled basement.Electrical fans are probably the most cheap and cost effective for you to keep your house cool and comfortable. Always choose those black tennis shoes for women which have good sole and portable.

    blitzbrokers para aplicaciones mĂłviles
    mbtrading bonus

    You should also consider a workout room, a different guest room or just your particular artist's getaway. Renovation and building around the base up are two other times that see plumbers popular.Only you can establish your home into place that may never always feel safe local environment may have. Remember not to use it together with handle employing pet within the.

  • Comment Link SharonSmivy Wednesday, 10 July 2019 07:07 posted by SharonSmivy

    Absolutely NEW update of captcha regignizing software "XRumer 16.0 + XEvil 4.0":
    captchas regignizing of Google (ReCaptcha-2 and ReCaptcha-3), Facebook, BitFinex, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another categories of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can use XEvil 4.0 with any most popular SEO/SMM software: iMacros, XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of introducing videos about XEvil in YouTube.


    -30% OFF for July 2019! Buy XEvil with 30% discount:

    Good luck ;)

  • Comment Link P Jitendra Thursday, 14 March 2019 19:28 posted by P Jitendra

    All the source code is available here. this link is not working

  • Comment Link breitling replica Saturday, 28 April 2018 15:42 posted by breitling replica

    breitling replica

  • Comment Link Andrei Tuesday, 20 March 2018 21:35 posted by Andrei

    Hello! I have to do a short project with an RC car controlled by internet(IoT) just like you. I want to ask you more questions about the project. Can you tell me your email? or write me on this email: [email protected]

  • Comment Link admin Thursday, 07 December 2017 13:17 posted by admin

    1. TP-Link TL-MR3020
    2. Arduino UNO, I'm using a home make Arduino
    3. Motor driver, I'm using SN75441NE, but suggested to use the L298N driver controller board module.
    4. Car chassis with two wheel drive.
    5. some 0.1uFcapacitors
    6. A UVC compatible Web Cam, I'm using Microsoft LifeCam HD-5000

    You might be interested in this RC car project:

  • Comment Link Ambedkar Wednesday, 06 December 2017 15:53 posted by Ambedkar

    Fantastic awesome
    How to do that rc car
    Can you help me
    Which products are required and purchased
    Please tell me
    Very interesting

  • Comment Link admin Saturday, 18 November 2017 18:36 posted by admin

    You need a USB hub.
    There is another Wifi RC car project which does not require USB hub.

  • Comment Link Pierre Silva Saturday, 18 November 2017 00:03 posted by Pierre Silva

    Hello ... I would like to ask you how the camera is connected, if you connect the arduino by USB? Is the camera connected in parallel with the Arduino?

  • Comment Link Router T. Monday, 16 October 2017 12:13 posted by Router T.

    Really good for this project. I don't know TP-Link TL-MR3020 3G/4G Wireless N Router can do this job. Awesome!

Leave a comment

Back to Top