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.
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.
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
Did you use a H-bridge for the motors. Or did you use the IC?
what ic did the RC car have? TX-2 or a RX-2?
@Karthikeyan
I just connected directly to the IC on the RF receiver board – though I know this isn’t the best idea, as the IC is running too, so I could end up damaging it.
Sorry I can’t remember what it said on the chip ๐
Thomas
I liked your article is an interesting technology
thanks to google I found you
Hello.
I am beginning a project of building a remote controlled Quadrocopter based on the Arduino Mega and would like to control it using the wifi connection from my phone (Samsung Galaxy S2).
I would like to be able to connect the two devices directly without the router/access point (Not a nice thing to have to carry to the park), and the Galaxy S2 does support both WiFi-Direct (although apparently only to other WiFi-Direct compatible devices) and can be turned into a portable hotspot.
However i cannot find any WiFi-Direct compatible breakout board for the Arduino, and i do not know if the portable hotspot functionality allows for communication between the phone and the device or if it simply sends the internet signal directly through.
Do you have any thoughts on this? (I have never tried to make something like this before and would greatly appreciate any advice you are willing to offer ๐ )
Christian
@Christian
Dear Christian.
I haven’t heard about this WiFi-Direct thing.
But the WiFi module I’m using, the WiShield, supports two different modes: Infrastructure and Ad-Hoc.
The Infrastructure mode is used when connecting to some kind of accesspoint, like a router or a mobile hotspot. The Ad-Hoc mode is used when you want two WiFi devices to be connected together when they don’t support the hotspot feature.
I know Android devices are capable of making a WiFi hotspot which will be accessible by the WiFi shield, just like a normal accesspoint. So you would definitely be able to use this for your project, as long as your phone can make a hotspot.
Best Regards
Thomas Jespersen
Hello,
Great Article,
I was starting on a similar project but run into some trouble. i was looking at our your source code and have a question about it. I was wondering why port 1000 to connect to the arduino from the PC application?
I ask because i was trying to use your application to control a R/C car over wifi. but when i used port 1000 i could not connect to the arduino using the application, however, when i used port 80, it would connect with ease but could not remotely control the R/C car.
Can you please help me out?
thank you very much.
Goerge,
Got it to work. Thanks anyways. ๐
George,
@George
It doesn’t matter which port you chose – though port 80 is used by HTTP internet, so I wouldn’t use that for this purpose, but it is indeed possible to use it.
Glad it worked out for you.
Thomas
Hello Ive been looking at similar projects and ive never worked with arduino at all or visual studio but i have tried to teach my self about many different aspecs of programming and electronics tho still consider myself pretty much a newbie I have a desire to become a good proggramer. I just have to know how did you learn to use arduino and was is complicated? How long did it take to learn and how did you learn to develop your program? and last would it be possible to make a website to control this? by the way props for the great project one of the best ive found and seems to be one of the simplest too great job and keep up the good work! cant wait to here from you
@Josh
Hi Josh.
The Arduino is a great starter development board for electronics newcomers.
It doesn’t require much hardware knowledge, and with a bit of programming knowledge you can find a lot of good examples and tutorials on the Arduino homepage to get started with.
Because I also had a good basic understanding of the electronics and hardware development, it wasn’t actually that difficult to trace which pins I should connect the Arduino to, to control the RF Car.
But I would recommend you to start with the Arduino as it is and then get a feeling of the LED example, the serial port, and maybe go to some of the advanced examples with PWM or Analog readings.
I wish you luck.
PS. Yes, it is possible to make a simple website and control the robot thru that, fx by WiFi.
Best Regards
Thomas Jespersen
Hi,
Your work is pretty cool! I am doing the same project with you, but instead controlling the car used the computer, we have to keep the controller like it is used in RF mode. I am thinking that both car and controller will be applied the wishields used the ad-hoc mode. Do you think it is possible to do it? I read on the internet that the ad-hoc network works fine on the range of 100 meters in the free space and 20 meters in the building. So is the ad-hoc network a good choice?
Thank you so much!
@Tan Thoi
Well, I think I would rather use an RF-module instead of a WiFi module for the transmission.
Are there any purpose or requirement that you should use a WiFi module?
the purpose of this is to prevent the interference between the cars using the same frequency. so I wanna to replace the RF module by the wifi module.
@Tan Thoi
Well, then I understand the purpose – but still why do you want to use WiFi?
Have you had a look at the Xbee modules fx? These are also using 2.4GHz for the radiotransmission, though they better suits a project like this, as they just use normal Serial communication.
The great thing about the Xbee modules are their support for multiple connections, having a master (your controller fx) connected to multiple slaves.
As I know when the Xbee works on the wireless world which mostly use 2.4GHz, the sending package will drop and Xbee will not work. Therefore, I think Xbee will also cause the interference when 2 or more cars using the Xbee which operating at 2.4GHz.
@Tan Thoi
No that’s actually the great thing about the Xbees.
They are very configurable so you can change sub-frequency and channel individually, making it possible to use many modules in the same room.
How do I connect the wires? whether it is -2 RX chip?
I have RX-2 chip !!!
@Alexandar
Dear Alexander.
According to page 3 of the datasheet I connected the Arduino to the Forward, Backward, Left and Right pins of the IC.
These pins are going to the DC Motor driver circuitry on the board, which includes some power transistors or MOSFets, so you don’t have to worry about drawing too much current on the Arduino pins.
Though be aware that this is a very dirty hack as I connect to the IC output pins, while the IC is still mounted and therefor would be able to control the pins too (output a high level etc.)
Best Regards
Thomas Jespersen
I,m not understand code. Have you code for control car through wifi-shield ?
@Pojanart
Yes I have. By using the WiFi shield connected to the Arduino I was able to control the car remotely (thru WiFi) using an application on my laptop/PC.
Thomas
Is code through webserver?
@Pojanart
No. The application running on the PC connects directly to the WiShield module thru a UDP socket connection.
is it possible to control this robot over long distances with a wireless internet connection. IE a smartphone or other wireless internet connection? (like 4g or clearwire) for longer distance applictations?
@another joshua
Yes sure.
If the wireless internet connection allows incoming socket connections to be established this project wouldn’t actually require any changes at all, you should just change the connection IP-address in the VB.NET app.
hi. can you send me the source code off arduino?
thanks…
@budz
The code is provided in the .zip file in the bottom of the post. Here is the link for the file: http://blog.tkjelectronics.dk/wp-content/uploads/WiFi_Controlled_Car.zip
Hi may i know how u connect the wishield and arduino together as in what pin from the wishield connect to what pin of the arduino
@hydrgen
The WiShield is just a shield that connects on top of the Arduino.
But to be specific the WiShield uses the SPI periphiral of the Arduino, which is the following pins:
– Clock (SCK) : Arduino pin 13 (port B, pin 5)
– Master in, slave out (MISO) : Arduino pin 12 (port B, pin 4)
– Master out, slave in (MOSI) : Arduino pin 11 (port B, pin 3)
– Chip select (CS) : Arduino pin 10 (port B, pin 2)
When I Compiled The Code I Came Up With A Error…
Can You Help Me:
Error:
WiFi_Controlled_Car:15: error: conflicting declaration ‘const prog_char ssid []’
C:Projectarduino-0023librariesWiShield/config.h:44: error: ‘ssid’ has a previous declaration as ‘char ssid []’
@Gladwin
What the error actually says is that the SSID variable has been defined somewhere else in the code, before the “const prog_char ssid[]” declaration.
So you should look before that line and see if you can spot another ssid definition.
I will also remind you that the WiShield library doesn’t work with the recent version of Arduino IDE, v1.0, as some major changes has been made in the internal libraries.
Please download and have a try with version 0023 instead.
Advanced hint
If you know GitHub well you should be able to download this Pull request which hasn’t been merged: https://github.com/asynclabs/WiShield/pull/3
This code enables you to use the WiShield library with Arduino 1.0
Thanks For The Reply Thomas Jespersen.
I Directly opened The .PDE file On The Downloaded .zip File.
So, I never edited The Code.
The Only other Declaration with ssid:
unsigned char ssid_len;
I tried With Both Arduino 1.0 and Arduino 0023.
I Got Similar Errors..
When I Tried The Example Programs Too? I Got Similar Errors With SSID?
Do I Have To Change Any Of The Settings in The computer.
Thanks In Advance..
@Gladwin
Dear Gladwin.
I have no problems compiling the code with Arduino 0023.
Have you remembered to type in your routers SSID and Passphrase in the appropriate places like ssid[] and security_passphrase or wep_keys.
You should also remember to change the security_type to what matches your router settings.
Thomas
Help me repair this error . Thankyou:
In file included from socketapp.c:46:
socketapp.h:51: error: conflicting types for ‘uip_tcp_appstate_t’
e:arduinoarduino-0022arduino-0022librariesWiShield/webserver.h:43: error: previous declaration of ‘uip_tcp_appstate_t’ was here
Hi,
Really nice project. I was working on a similar project until I stumbled accross yours. One thing is puzzling me though. I can get PWM to work at max speed i.e. 255 for the motors using Wifi. When i lower the PWM to around 100 i have excellent control and everything works fine. But why when i set it to 200+ the motors start spinning endlessly and i somewhat loose control. This is not specific to your code. It is the same issue when I use a C# program as the controller. Is it something to do with the arduino or wifi?? Any advice would be much appreciated.
Sorry i meant to say “I can’t get PWM to work at 255” in the previous comment.
@Dai anh Tai
The socketapp.c file should not be opened inside the Arduino IDE – it should just be located next to the PDE file.
@Jim
Dear Jim.
Hmm, that sounds a bit odd. I haven’t experienced this yet, but it might be a problem with the Visual Basic .NET app.
Could you please try a UDP terminal application and see whether or not you can get it working by simply sending the moving commands/speeds.
You could use the Hercules application fx: http://www.hw-group.com/products/hercules/index_en.html
Also which version of the Arduino IDE are you currently using?
The WiShield is currently not well supported in the latest version 1.0. Instead you should be using Arduino 0022 or 0023.
Best Regards
Thomas Jespersen
Hello Thomas,
This robot is really nice ๐ I am interested in making such a robot. But when I try to compile/upload your given code, compiler says:” ‘WiFi’ was not declared in this scope”. Error is shown in this statement: WiFi.init(); And it is not declared anywhere in that code.. :/
I am looking to hearing from you here or to the email. Thank you ๐
@Saulius
Dear Saulius.
This project uses the WiShield from Asynclabs and therefor relies on the WiShield library
You should install this library in the Arduino library folder to be able to compile the project.
Please also have in mind that the current version of the WiShield library isn’t supported in Arduino 1.0 – instead I recommend you to use Arduino 0023.
Regards Thomas
@Sandar
Dear Sandar.
I can see that you have simply quoted Saulius’ question. Do you have the same problem as him?
Have you seen my reply to Saulius and are you still unable to get it working?
Best Regards
Thomas Jespersen
In file included from socketapp.c:46:
D:downloadarduino-0023librarieswifly1/socketapp.h:52: error: conflicting types for ‘uip_tcp_appstate_t’
D:downloadarduino-0023librarieswifly1/webserver.h:43: error: previous declaration of ‘uip_tcp_appstate_t’ was here
how can i fix this problem?
@adi
Which library are you using? It seems like the folder is named WiFly?
Please have in mind that I am using the WiShield from Asynclabs, which this code is made for.
I’m in a similar project, and I just want to get the wifi shield library , and the code of from Visual. I opened your project and the arduino softwere can not open it.
@Alexander Monico
Dear Alexander.
As explained in a previous comment too this Arduino project and the WiShield library isn’t supported in the new version 1.0. Instead you should download the old version 0023 to be able to compile the project.
You should also remember to download the WiShield library from the Asynclabs page: http://asynclabs.com/wiki/index.php?title=WiShield_library
Can give as a easy example of wifi shield, just turn on a LED in visual basic and send us the code from both (Arduino with the parameters and the visual with the complete code.). I have been triying and i can’t. Please.
@Derrick Davis
Dear Derrick.
Please have a look at our Ardulyzer project and let me know if that is what you like to achive.
Ardulyzer – Arduino IO Controller
Regards Thomas
I just want a simple example of the communication between Wifi shield & Arduino. Sending signals from Visual.Net or VBasic to the shield. N matter if is a LED ON and TURN in off.
@Derrick Davis
Well then maybe our Ardulyzer is a bit too advanced to start with.
Have a look at this tutorial. Hopefully it will get you started.
Control Arduino Through Serial Connection (USB) VB Visual Basic program
Good post ๐ but i need to use the wifi, with the (wifi shield). Because i have a poject for Arduino and i bought the cupperhead wifi shield so i need to control it trough the computer via wifi.
@Derrick Davis
Well then you should make the communication thru TCP or UDP instead.
The WiFi shield comes with a numerous examples to get you started. In this project with the RC car I used the UDP protocol as it is the fastest but doens’t have the same level of package tracking (checksum, error checking etc.)
It will for sure be possible to combine the tutorial I mentioned with the UDP example from the WiFi shield library, to get a project with your requirements.
Regards Thomas
As I told you in a past comment I’m in a similar project, i done the communication through the Visual and Arduino using serial port(To check my sketch ) My problem is with the shield i can’t program it and i have not time so I don’t know if you can help me. Please i will appreciate so much http://www.mediafire.com/?yy9nv7wj4o9vc97 . PLEASE HELP ME TO USE THE WIFI SHIELD
Hi, very nice post. I am trying to compile your arduino codes but it failed to do so.
I have also downloaded the WiShield Library. I am suspecting that the WiShiled Library that I have downloaded is not the correct one. Is it ok if you share with me your Library?
Also what version of Arduino IDE are you using? I am using Arduino 0022.
One more question, is this WiFi connection adhoc? Meaning the BlackWidow creates it’s own WiFi instead of tapping on another existing Wifi connection.
Thanks a lot!
I have tried Arduino 0023, and downloaded the Library from the link u gave: https://github.com/asynclabs/WiShield
I am getting this error:
WiShielduip.c.o: In function `uip_process’:
C:UsersMyPCDocumentsarduino-0023librariesWiShield/uip.c:776: undefined reference to `webserver_appcall’
C:UsersMyPCDocumentsarduino-0023librariesWiShield/uip.c:815: undefined reference to `webserver_appcall’
C:UsersMyPCDocumentsarduino-0023librariesWiShield/uip.c:1570: undefined reference to `webserver_appcall’
C:UsersMyPCDocumentsarduino-0023librariesWiShield/uip.c:1597: undefined reference to `webserver_appcall’
C:UsersMyPCDocumentsarduino-0023librariesWiShield/uip.c:1674: undefined reference to `webserver_appcall’
WiShielduip.c.o:C:UsersNoelDocumentsarduino-0023librariesWiShield/uip.c:1755: more undefined references to `webserver_appcall’ follow
WiShieldstack.c.o: In function `stack_init’:
C:UsersMyPCDocumentsarduino-0023librariesWiShield/stack.c:77: undefined reference to `webserver_init’
Can you confirm again that this Library works? If not, is it possible for you to share with us the library that you are using? Thank you so much for your time…
@Alexander Monico
Hi Alexander.
The WiFi Shield is very different from using the Serial port on the Arduino. It requires some extra code where I recommend you to take a look at the examples sketches that comes with the board.
We can of course also help you with specific things in the project or doing the whole project for you at a small fee.
If you are interested in this do not hesitate writing to us at: mail@tkjelectronics.dk
@MrExtra
Hi.
I have seen many users reporting to me that they can’t get this code to work on their computer whatever they try. The WiShield has been updated a bit since I used it for this project which might be the reason for the compiler errors.
So to make it easier for you to try the project I have uploaded the complete project source code including the used WiShield library (has to be put into the Arduino libraries folder). For this project I used Arduino 0022.
The complete project can be downloaded here: WiFi Controlled Car Project
Let me know if it works for you.
Best Regards
Thomas Jespersen
@Thomas Jespersen
Hi there, I have managed to get it to work before your post. I found out that we need to modify the config-app.h header file. Thanks so much, you are very helpful. Other than just controlling the RC car, my project requires me to mount a camera and display the video stream on my Android phone too. xD Currently I am finding ways to implement this.
Thanks again!
@MrExtra
Great you managed to get it working.
For the camera and video I would recommend you to get an WiFi IP camera which would be controllable by a phone. Another solution but very slow, would be to attach a serial camera or maybe a parallel one with FIFO to the Arduino, and then let the Arduino handle the images too.
The last proposal though wouldn’t give you more than maximum 2-4 FPS.
Regards Thomas
@Thomas Jespersen
Thanks for your reply. I will let you know which brand of Network camera works for me when I have tried it out.
MrExtra
Hello,
I am trying this project but i am using a slightly different method. I am going to use the arduino ethernet shield and directly wire it to the router on the car. Im going to be putting a camera and a few sensors on it a bit later. I was wondering what it would take to convert this code to work with the ethernet shield. I am doing the same design and the protocol is the same so it should be easy to modify the code? Please help.
Thanks!
@JimG
Dear Jim.
It wouldn’t require much effort to make this code work with the Ethernet shield.
The Ethernet shield already comes with a “UDPSendReceiveString” example sketch which demonstrates the UDP functionality of the library. By using that example sketch as a reference you should easily be able to convert our code.
Regards Thomas
Hi there!
Can anyone help me with UDP Packet programming? I am running a windows computer, so I’m not able to compile the sample code on the asynclab webpage. I am able to compile the arduino sketch and .c. I tried to find the UDP server from the Hercules software, but I can’t find any device. Can some1 enlighten me in this problem?
D-Link DCS-930L IP Camera worked for me.@MrExtra
Hi Thomas Jespersen, I have just sent you an email regarding the Project Details
Hope to get your reply soon as possible ๐
i’ve a project using arduino
i’m using DFRobot wifi shield v2.1 but i can’t configure my wifi shield
any one can help me to config my wifi shield?
please ๐
@Nick
In UDP mode you can’t talk about having servers and clients. In UDP mode both devices opens a listening port and the connects to the other parts listening port.
With Hercules you can do this in the UDP tab and then you should be able to test it with the Arduino Asynclabs example provided.
But why can’t you compile the Asynclabs Webserver example? I’m on a Windows computer too and I have no problems!
Regards Thomas
@MrExtra
Nicely done.
Any pictures or video of the “rover” in the field?
@hendra
The DFRobot Wifi Shield works in another way than the Asynclabs.
You have to communicate with the board thru the Serial interface and then use AT commands to connect to the internet or make a sever application.
But the easy setup is just to make a UDP loop-thru that redirects all the UDP traffic to the Serial port and opposite, as demonstrated in the tutorial: http://www.dfrobot.com/wiki/index.php?title=WiFi_Shield_V2.1_For_Arduino_(SKU:TEL0047)
Regards Thomas
@MrExtra
Hey .. sounds great what you guys are conversing about .. I’ve taken a look at the code posted here; but also, would you mind uploading your code for WiShield w/Librairy .. and also Android App ? I had one that is giving me the blues. It was supposedly tilt sensitive to control the rc (via motor shield) but either I need re-wire some connections or re-program altogether :/
I have enjoyed this tutorial and like all of the functionality it gives, however I am wanting to do the exact same thing except through tethered ethernet instead of through WiFi. Can anyone give me a direction to go in order to do this? I have tried everything I can think of and searched the Internet like crazy but have not found what I am looking for.
@Shaun
Hmm, I guess you have not searched well enough ๐
The keywords is the UDP protocol I’m using for sending the direction parameters.
Please have a look at the following tutorial where the Arduino Ethernet shield is used: Sending and Receiving String via UDP
Merry Christmas
Regards Thomas
nice project, but i can controll the rc car with bluetooth module ?
@Martin
Yes indeed. This would simply be a question of changing the communication parameters and not to use the WiShield and UDP project and the RC control command parser.
The most simply way to do it would be to add an inexpensive Serial Bluetooth module to the Serial pins of the Arduino. Then you would be able to connect with your PC of cell phone and control the robot.
nice work man, jusy a couple of things i need to know :S
1.- Which program did you download to the Arduino Board?
2.- when you run Hercules, it auto log with the arduini wishield?
if you can answer me it would be awesome, thnx
@Angel
Hi.
The code that I uploaded to the Arduino board can be found in the ZIP file, also linked to in the blog post: http://blog.tkjelectronics.dk/wp-content/uploads/WiFi_Controlled_Car.zip
I have only been using Hercules for UDP and TCP protocol testing. When I control the robot it is done thru a Visual Basic .NET application I have made.
Regards Thomas
@Thomas Jespersen
thnx man :D, another doubt i foun today was that im using the Wifi Shield from Arduino instead of your wifi shield model, an when i run the net app, it encounter a problem with the port integred(?
did i need to make a new application?
similar but a new one?
Hi – I use this code, but i can’t complete, anybody can give me working code pls :)))
In file included from C:Usersร?รยฐรยบรยฐรย รย รยฐรยทรยฝรยธร?รยฐDesktoparduino-1.0.4-windowsarduino-1.0.4librariesWiShieldrequest.cpp:32:
C:Usersร?รยฐรยบรยฐรย รย รยฐรยทรยฝรยธร?รยฐDesktoparduino-1.0.4-windowsarduino-1.0.4librariesWiShield/WiServer.h:198: error: conflicting return type specified for ‘virtual void Server::write(uint8_t)’
C:Usersร?รยฐรยบรยฐรย รย รยฐรยทรยฝรยธร?รยฐDesktoparduino-1.0.4-windowsarduino-1.0.4hardwarearduinocoresarduino/Print.h:48: error: overriding ‘virtual size_t Print::write(uint8_t)’
@Kakaya_Raznitsa
Just change it from
To:
In WiServer.h at line 198 and change
To:
WiServer.cpp at line 212.
se puede con cualquier otro modulo wifi??
Hello there,
within our time at university we created a RC-car controlled by an android mobilphone. But the mobil phone is working as communication station to give us all the power for the usage of a camera, an accelerometre and usb-connection. You would be able to connect to the android application with another java app at a pc. Maybe you will enjoy it and youรข??re going to take a look. But if u want to see it in action, there is a video taken by interessted programmer: http://vimeo.com/67519531
Best regards
https://code.google.com/p/carduinodroid/
heloo
i need ur little help
i am thinking to make an RC plane controled throu an android app bt the transmission is though wifi as u did the plane is quite big .. its one wing is 161cm . i was advised to not use use it as a fuel tank plane
bt the think that is worrying me is m a comuter engineering student n i want to implement hardware in the plane and software in the android app bt if its fuel tank how shld i use the circuit hardware implementation in any way… plz help me!! il be greatful for ur reply… nice work!
heloo
i need ur little help
i am thinking to make an RC plane controled throu an android app bt the transmission is though wifi as u did the plane is quite big .. its one wing is 161cm . i was advised to not use battery bt use a fuel tank plane bcz the battry can fly the plane for a longer span.. plus the plane is big ther4
bt the think that is worrying me is m a computer engineering student n i want to implement hardware in the plane and software in the android app bt if iv used a fuel tank in the plane how shld i use the circuit to perform operations send through android app shld i use micro processor or wat to build a circuit ie-hardware implementationรข?ยฆ plz help me!! il be greatful for ur replyรข?ยฆ nice work!
Hi, I got to know about your project thru youtube searching. It is very interesting and I believe quite easy to understand as well. I am also on a journey of similar assignment but I am not using the toy car which you have shown here. I am gona use the Tamiya tracked chassis vehicle (http://www.amazon.com/gp/customer-media/product-gallery/B00061HHTK/ref=cm_ciu_pdp_images_0?ie=UTF8&index=0) which is very simple one with basic chassis structure. I have already constructed the vehicle and would like to connect this to arduino board for very basic (rev / fwd) movement as first thing.
Can you guide as how to achieve this?
R.
@Raheel
To control that vehicle with an Arduino in terms of controlling the DC motor you will need a motor driver circuitry, an H-bridge as an example.
Depending on how much current the motor draws (I guess less than 1A) you should be able to use this module connected to an Arduino: https://www.sparkfun.com/products/9457
Another option would be to use this shield: https://www.sparkfun.com/products/9815
When you have got control of the motor with your Arduino the next step is to add the wireless control, either by WiFi, Bluetooth or any other kind of simple RF control.
Good luck.
not very good with TouchOSC wanted aserlo I appreciate with wifishield
haha sorry I do not speak English use the translator, very good tutorial
like the project
can you contact me please
nice project, i like this project.
nice project ๐
but the download link of (WiFi Controlled Car Project) is not working ๐
so .. if u can re-uplod it ..
Sir I just want to ask, we do something like this RC car but we have use arduino YUN but the problem is only one command at a time the rc car do it cannot execute 2 commands at the same time example is right and forward or left and forward etc.
hello.. I find your project very helpful.. but every time i click the link of code you give, it says “The requested URL /uploads/WiFi_Car_Project.zip was not found on this server.” why is that?
@eljo francisco
It is definitely possible to extend the system to support multiple commands at the same time – you simply just have to expand the command set using a “bit” in the transmitted bytes to indicate what you want to do.
Fx bit 0 could be forward, bit 1 being backwards, bit 2 being left and bit 3 being right.
Sending 0x09 will then make the car drive forward and right because of
Regards Thomas
Hi Thomas…
I’m new to this project and i don’t know anything about programming…will it work if i download and load it on my arduino…or else what i have to do…
@syed
If you have an Arduino Duemilanove or Arduino UNO and especially you need to have the WiShield, then yes it will work.
thomas good day, I wonder if you have a tutorial on how to use the wishiel of asynclab with UDP mode, or as an access point, thanks
@Renรฉ
Hi Rene.
Sorry we don’t. We haven’t been using the WiShield for quite a while, and unfortunately Asynclabs has stopped manufacturing them as well.
I can recommend you to have a look at this guide though, where the Arduino Ethernet shield is used: http://arduino.cc/en/Tutorial/UDPSendReceiveString
Regards Thomas
Hi when ? try to compile your code witch ? downloaded here gives me these errors. What can ? do to make it work. ? am using arduino uno r3, cuhead wifi shield v2.0 and arduino IDE 1.0.5
In file included from socketapp.c:46:
E:Programlararduino-1.0.5librariesWiShield/socketapp.h:52: error: conflicting types for ‘uip_tcp_appstate_t’
E:Programlararduino-1.0.5librariesWiShield/webserver.h:43: error: previous declaration of ‘uip_tcp_appstate_t’ was here
I search and solve it but now gives this error.
E:Programlararduino-1.0.5librariesWiShieldclock-arch.c:44:20: error: wiring.h: No such file or directory
I am using your wiShield library.
@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
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 [:
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
@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
hi nice project but i cant download the vb source
@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
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.
@choi teemo
I use an accesspoint which the WiFi shield connects to.
Regards Thomas
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
@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
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.
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
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
@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
@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 ๐
@yudha
I have replied to your email. Please see me answer and proposal in there.
Regards Thomas
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
@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
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
@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.
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
@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.
any interest in updating the code as im sure alot of us will have question concerning newer versions?
@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.
Great application.
Have you thought about doing this on a drone? What about the Yun or Nano?
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
@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
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.
@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.
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
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.
@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.
@Alparslanyk Hey! Did you complete the program in C#? Please contact me at waseemtahir70@hotmail.com