Home > Arduino > WiFi Controlled RC Car with the Arduino

WiFi Controlled RC Car with the Arduino

I haven’t been posting in a long time, but I just haven’t had time to do it. I have been playing around with many different projects, both Freelance projects and my own projects.
Then I thought it would be nice to post some pictures and a video about my latest project about my Hacked/Modded DACKO RC Car.

The WiFi Controlled RC Car


As you can see on the image, I have disassembled the car and then found the controller module. Then I found an RF chip/IC on the board (RX2), and I was lucky to be able to find the datasheet of that.

Closeup of the WiFi Controlled RC Car


Then I soldered some wires to the specific pins for the motor driver circuit, one pin for each direction (forward, backward, left and right).

Then I connected theese wires to the Arduino, made a test program where the Forward and Backward pins was PWM controlled, making it possible to change speed. The left and right pin should just be driven high to turn the wheels.

After some testing, I attached the WiShield WiFi module from Asynclabs, and then I started programming a socket application for the Arduino. I thought it would be fastest and easiest to use the TCP protocol directly, than serving a webpage. After some tests with Hercules SETUP Utility I made myself a controller application in Visual Basic .NET – and off we go!


After a couple of inquiries from people asking for the Arduino and Visual Basic .NET code for this project, I’ve decided to upload it.
You can download the complete project including the used WiShield library, the Arduino code and the VB.NET code, here: WiFi Controlled Car Project

Categories: Arduino Tags:
  1. Alparslanyk
    February 16th, 2014 at 18:52 | #1

    I search and solve it but now gives this error.

    E:\Programlar\arduino-1.0.5\libraries\WiShield\clock-arch.c:44:20: error: wiring.h: No such file or directory

    I am using your wiShield library.

  2. February 16th, 2014 at 18:56 | #2

    @Alparslanyk
    The errors you are getting are caused by the apps-config.h file. You have to make sure that the only line being uncommented it #define APP_SOCKAPP and the errors should disappear.
    The wiring.h error you are experiencing is due to the updated Arduino version, where they changed the header file inclusion.
    You should change the #include ?wiring.h” to #include ?Arduino.h? in the clock-arch.h file.

    Regards Thomas

  3. Alparslanyk
    February 16th, 2014 at 20:37 | #3

    Thank you very much. ? did what you said and it worked now ? will try it. and if it succes ? will write and c# aplication and sent you to puplish it in your name if you want because of your help [:

  4. Puja Setiawan
    March 6th, 2014 at 13:36 | #4

    I like your project, I want to ask you,
    1. what program do you use to run the car?
    2. how can I get the program or the application
    3. how to connecting laptop with WIFI shield Arduino?

    please your answer via my email

  5. March 8th, 2014 at 19:37 | #5

    @Puja Setiawan
    To control the car I made a Visual Basic .net application that can be downloaded as it is found inside the WiFi Controlled Car Project zip file (see the bottom of the blog post).
    The car itself is connected to an Arduino Duemilanove that takes care of controlling the proper signals to control the car.
    A WiFi shield for the Arduino, such as the one we are using from Asynclabs, can be used to connect your device to your local area network or even the internet. In our case we just communicate between the PC and the WiFi shield using a TCP port.

    Regards Thomas

  6. mannour
    April 21st, 2014 at 17:58 | #6

    hi nice project but i cant download the vb source

  7. April 24th, 2014 at 22:23 | #7

    @mannour
    Please download the complete project including the used WiShield library, the Arduino code and the VB.NET code, here: WiFi Controlled Car Project
    Regards Thomas

  8. choi teemo
    May 9th, 2014 at 07:20 | #8

    Did you use WIFI module supporting ad-hoc mode?

    I can’t get it. How did you connect to shield? With AP router or Without AP router.

    Thank you.

  9. May 10th, 2014 at 23:01 | #9

    @choi teemo
    I use an accesspoint which the WiFi shield connects to.
    Regards Thomas

  10. June 11th, 2014 at 04:27 | #10

    Would it be possible to create that same program, but through Microsoft Visual Studio C++ windows form? If So how. Also I can’t seem to locate the VS file in the zip folder.

    Thanks,

    Demetri

  11. June 11th, 2014 at 17:11 | #11

    @Demetri
    Hi Demetri.
    Apparently the Visual Studio folder was removed from the zip file when both the Arduino and VB.NET project was combined.
    I have now reuploaded the full zip-file, so please try and redownload and you should find the VB.NET project.

    If you have in mind that this is VB.NET it should be portable to C++ as we don’t use a lot of .NET specific features.
    As long as you can get a direct TCP port opened and working for writing it should be easily ported.

    Regards Thomas

  12. vhan
    September 5th, 2014 at 12:01 | #12

    I like this project. can you help me how to do it?
    please pm me if you see this message. This is my email regasavhan@gmail.com
    i need to learn how to do this and how it work.

  13. September 13th, 2014 at 23:36 | #13

    for resolve the erro ” conflicting types for ?uip_tcp_appstate_t?”
    use the Arduino 1.0.1 and Wishield with changes for arduino 1.0 https://github.com/jcmuller/WiShield

    One question:
    How i can connect to tcp server with wishield…. only sample of the tcp socket server and not client socket

  14. yudha
    October 20th, 2014 at 14:44 | #14

    hi sir , would you like to guide me to make something use wiShield?
    I want to make, server use wishield and vb.net.
    there are several questions that will I ask to you.
    may you give me your e-mail address?
    many thank’s

  15. October 23rd, 2014 at 20:28 | #15

    @yudha
    Hi. You would need to be a bit more specific of what you are trying to achive with the WiShield.
    The WiShield together with an Arduino can indeed act as a server, hosting a webpage or keeping a UDP or TCP port open for communication.
    Regards Thomas

  16. yudha
    October 27th, 2014 at 15:17 | #16

    @Thomas Jespersen
    Hi sir, thanks a lot
    in my project, I want to make communication between arduino + wishield (as client) and laptop as server(Controller).
    this I give you a sketch what will I do.
    http://prntscr.com/509cpb
    the first I would like to make server using VB.NET like your project.
    Maybe you have idea for my project ? In server side, better using vb.NET or webserver ?
    thank you sir 🙂

  17. November 8th, 2014 at 23:02 | #17

    @yudha
    I have replied to your email. Please see me answer and proposal in there.
    Regards Thomas

  18. arian
    January 8th, 2015 at 06:19 | #18

    I am just curious im not so familiar with all the coding and etc. in short I suck in programming.
    My question is where is the code for the arduino software because you have to code first at arduino software right before making a controller at the visual studio which is already given. I am just curios
    where is the arduino codes for assigning the pins plss help… sorry if I sound like a novice but I am hehehehe hope you can read this and make a reply asap. Thank a lot in advance

  19. January 17th, 2015 at 22:56 | #19

    @arian
    Hi Arian.
    No problem with your question, please feel free to ask 🙂
    The Arduino source code is also provided in the downloadable ZIP file. Inside the ZIP file it is within the folder called ‘Project’ and the Arduino project file is named WiFi_Controlled_Car.pde
    Be aware this is an old Arduino code file format/ending so the latest versions of Arduino IDE’s might complain!
    Regards Thomas

  20. Enamul
    January 27th, 2015 at 06:58 | #20

    Dear, Please give me diagram . How attach all parts and how i use arduino and Visual Basic?
    Please help me. My email: enamulok@gmail.com

  21. February 3rd, 2015 at 14:42 | #21

    @Enamul
    I have no diagram of how to attach it. It depends a lot on the RC car you have, where to connect it and how to wire it up with your Arduino.
    I would start off by opening your RC car and find the control wires for the steering. Afterwards simply select some digital output pins on the Arduino to use.

  22. Suvam Mohanty
    March 21st, 2015 at 17:15 | #22

    Suvam Mohanty :
    I like your Project very much : but i just want to know that:-
    1. HOW does a arduino WiFi shield get connected to a WiFi ( after all connections are done) ?!
    2. What is the use of a TCP Port???
    3. After I start your ziped application i.e Form1.vb[design] , It gives an error that Socket Exception was unhandled ?! ( i have VS Premium 2012).
    4. How to import the application code or the Arduino code into the Arduino ckt ?!

    Looking forward for your earnest reply
    Thank You.

  23. david
    April 14th, 2015 at 22:55 | #23

    Arduino: 1.6.1 (Windows 8.1), Board: “Arduino Uno”

    In file included from g2100.c:38:0:

    config.h:44:1: error: unknown type name ‘prog_char’

    extern const prog_char ssid[];

    ^

    config.h:46:1: error: unknown type name ‘prog_char’

    extern const prog_char security_passphrase[];

    ^

    config.h:51:1: error: unknown type name ‘prog_uchar’

    extern prog_uchar wep_keys[];

    ^

    config.h:53:1: error: unknown type name ‘prog_char’

    extern const prog_char webpage[];

    ^

    config.h:54:1: error: unknown type name ‘prog_char’

    extern const prog_char twitter[];

    ^

    Error compiling.

    This report would have more information with
    “Show verbose output during compilation”
    enabled in File > Preferences.

    plz help

  24. April 15th, 2015 at 21:16 | #24

    @david
    As mentioned in a previous comment please be aware this the project is in an old Arduino code file format/ending so the latest versions of Arduino IDE?s might complain!
    Therefor I recommend you to download an older version of the Arduino IDE and try to compile the project again.

  25. david
    April 16th, 2015 at 02:05 | #25

    any interest in updating the code as im sure alot of us will have question concerning newer versions?

  26. April 16th, 2015 at 20:29 | #26

    @david
    That would require a newer WiFi shield, as the one used in this project is no longer supported nor updated.
    But yes, whenever I get hold of a new WiFi module I might make a similar project to this, adding WiFi for robotics control applications.
    Thanks for your suggestion.

  27. Scott
    September 24th, 2015 at 16:15 | #27

    Great application.

    Have you thought about doing this on a drone? What about the Yun or Nano?

  28. Nitesh
    February 18th, 2016 at 07:42 | #28

    hi Thomas,

    great project and this is what i was looking for many days.
    I have a some questions:-

    1. can we scale same thing to larger model.
    2. did u calculate the power consumption.
    3. what is the response time between the keypress on laptop and driving of car.
    4. will it be secured and how can be make it sure that no other hack it in local wifi

    i have some ideas to make the car which can carry items from one place to another but need it to control with wifi and also i want to test it out and put this thing in my organisation, not for sale but just to save some precious time.

    waiting for ur reply.

    Thanks,
    Nitesh

  29. February 20th, 2016 at 17:44 | #29

    @Nitesh
    Hi Nitesh.

    Thank you for your comments.
    The project could indeed be scaled to both smaller or larger models. But as this project has mainly been meant as a proof of concept neither power consumption, response time or security has been investigated.
    Though with the current implementation the response time from PC over WiFi to action on the car is atleast 500 ms. But this could be greatly optimized, though for performance and response time critical applications I would probably not use WiFi!

    Regards Thomas

  30. kojah
    March 2nd, 2016 at 05:10 | #30

    hello, in my country the wifi shield if not on sale. however, there is the nrf module. can it work instead of the shield. if so, then please elaborate.

    regards.

  31. March 3rd, 2016 at 00:21 | #31

    @kojah
    Yes, you can change the project to support the nRF24 module, but you would need to specify your own communication protocol and also add an nRF24 module to the PC, eg. over USB.
    Actually I think you would probably even get a better latency and reliability with an nRF24 module.

    If you are thinking about the nRF WiFi modules you would simply have to change the code to support the library made for this module/shield.

  32. SOHRAB GHAFURI
    May 23rd, 2016 at 15:10 | #32

    HI sir, can i get a step by step instruction on how to build and also the list of requirements with their model which has been used in this project? please, sir!
    here is my email sir! sohrab.khamosh@yahoo.com

  33. Abdallhameed
    February 26th, 2017 at 20:31 | #33

    Hi Sir
    your project is Fantastic and i like it,
    i have a project that is rc car and control on a car by using the glove and we have 2 weeks a go looking for an idea for making a connection between two arduino one the car and other on the glove and our problem is a connection.
    what i want to say we have an idea to make the connection by two RF module one is the transmitter and other is a receiver and if you can give me a short note about this connection and short note how it work if you can please sir.
    Thanks.

  34. March 4th, 2017 at 22:58 | #34

    @Abdallhameed
    Do you only need to transmit data in one direction? If so and if the data rate is slow (amount of data and refresh rate), then I will recommend to use a simple RF transmitter/receiver solution running in the MHz band. These would allow you to use eg. a Serial port for transmitting the data.
    Otherwise you can consider to use the inexpensive nRF24L01 modules running in the 2.4 GHz band. The requires an SPI connection for configuration and data transmission but will work fine with an Arduino for which you can also find existing libraries.

  35. Waseem Tahir
Comment pages
1 2 3 841
  1. No trackbacks yet.