Wireless Controlled Robot/car help

Discussion in 'The Projects Forum' started by Capiech, Apr 2, 2011.

  1. Capiech

    Thread Starter New Member

    Apr 2, 2011
    5
    0
    Hey guys, i'm 20 and from the UK and looking to start an electronics project but
    am pretty new to this so sorry in advance if I ask some dumb questions :)

    For this project I want to design and make a (or a few) Robots of various designs that can be controlled over the internet from a computer. I imagine some sort of application that recieves video/audio streaming from the robots camera/mic and sends commands to the robot such as steering and other functions.

    Ultimately I would like to mabey do Races or robot-wars (ftw) over the internet with my friends but ofcoarse for now I will just get the basics down. I think the best way to do this would be to have a server up that handles information going
    between the computer and robot (which would connect to a nearby wireless network to get internet access).

    For starters I will just build/mod an RC car with a camera and try to get that working. Here's when I need help.

    1) The Hardware: Is it worth building my own PCB from scratch with everything needed or buying some sort of pre-assembled Wirless Card that I can link up to the Car?

    2)The Software: Is there any programs out there which I could use to communicate with the Car (i'm guessing such software is supplied with any
    pre-built Wireless Card?) or should I be looking into writing my own Client/server applications. If so what would be best/easiest, Java, C, VB, other?

    3)Everything: Is any of this even possible? Would I need a Server or something much simpler? Would the wireless on the Car be sufficicient for the
    amount of info for the Camera? Would I have to set up the Camera and RC commands seperatly and use different boards/software? Like a stand-alone IP camera?

    4) Cost and size: I don't mind spending up to £1000 on this project but would like the finished Car itself to not cost much more than say £100-200 ish and I would like it to be smaller than say, 30cm X 30cm X 30cm if at all possible.
    I don't know how big the Wirless Cards would be or the battery needed to power it

    Anyway, I've got to go for now but thanks for reading and any advice would be apreciated. Thankyou.
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
  3. russpatterson

    Member

    Feb 1, 2010
    351
    16
    I would suggest buy breakout boards so you can get your wireless up quickly then make a custom PCB with all the various components once you have done integration testing and are happy with the entire circuit (months and months from now :D). Take a look at SparkFun for wireless radio systems, like the Nordic nrf wireless keyfob they have of the Xbee radio based stuff. Use an Arduino if you're new to microcontrollers.

    Research motor controllers so you can tell our car/robot to go forward or backward. I've seen a few projects with real time camera input from an RC car, there's one on the SparkFun News blog posts if you search back far enough.

    Just take it one step at a time and keep things as simple as possible.
     
  4. Capiech

    Thread Starter New Member

    Apr 2, 2011
    5
    0
    Thanks guys, i'll start looking at that now
     
  5. Capiech

    Thread Starter New Member

    Apr 2, 2011
    5
    0
    So I've been looking round a bit, and decided to initially just get an RC car working with Arduino type boards from a computer wirelessly. I'll forget the camera for now as I need to just get the hang of it.

    Here's the list of stuff im going to buy, please correct me if there are better versions or alternatives out there, I don't have the experience yet to know what's available.

    First, the Car itself, either 1:10 or 1:15 ish size I think. One of the big off-road type looking ones will probably be best.

    Next the micro-controller that will ultimately be responsible for, well everything:
    the Arduino Uno.

    I'll probably buy 2 Xbee Pro GHz's along with 2 Interface Cables: RP-SMA to U.FL and 2.4ghz antennae of some sort (not sure if there's a particularly good type out there) to deal with the wireless connection.

    An Xbee Explorer USB from SparkFun (and cable) for the computer-side wireless connection. Then I'll get a Xbee Shield (again from SparkFun) which will fit into the Uno.

    Then it's just the motor controllers I think, I'm guessing these will do the job for non-brush motors? : L298N Dual Full-Bridge Motor Driver

    Last would be 0.1" breadboard and connecting wires and such.

    Am I missing anything? Any input would be appreciated thanks.
     
  6. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
  7. Capiech

    Thread Starter New Member

    Apr 2, 2011
    5
    0
    I think I've got most of it figured out, but i'm stuck on one major bit now: I want to be able
    to control the car/robot from an internet browser without installing software, and I want to
    be able to take to robot/car to somewhere with internet but without having to set-up settings (almost plug-and-play). To do this I think I would need a device that plugs into an
    ethernet port, automatically connects to a server (linked to the webpage id use for control)
    and then converts data to Serial (and back) like so: http://i1112.photobucket.com/albums/k492/Capiech/setup.jpg
    I have no idea what device(s) would go in here apart from mabey a computer with software installed that auto-loads on startup. I would want it really small though (like 15cmX15cmX10cm size max) and a Small computer like fit-pc would be expensive. I'd probably turn it into a charging platform as well later.

    So any1 have any ideas on what would work? Thanks again.
     
  8. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    The Wowee Rovio is an interesting wifi based concept.

    The missing link in the pic is a web based ethernet to serial module. Several firms make those like Wiznet, Lantronix, Netburner etc.

    I have experimented with the Lantronix Xport, now that's small! I was able to send temp data over a LAN, from a micro => Xport => router => notebook => hyperterminal session. Hope I remembered that right, been a while, and it's easy to get lost in the details. Never got it working over the web though, which was due to an IP address thing. Might actually work now that I have a dsl connection.

    An important thing to keep in mind is being able to allow multiple connections on the web page. Not sure if the Xport allowed multiple connections?, and wasn't a concern at the time.
     
  9. Capiech

    Thread Starter New Member

    Apr 2, 2011
    5
    0
    Well, i've looked at the web based ethernet to serial modules available but the problem with all of them is you have to plug them in then hop onto a LAN computer (or directly connected computer) to set it up and then find out the IP
    address so that you can then control it from elsewhere. I'd rather plug-and-play
    and it SHOULD be simple. The best one seems to be the Xport Pro:
    http://www.lantronix.com/device-networking/embedded-device-servers/xport-pro-linux-dev-kit.html

    The best way I can think of plug-and-play is using the module to auto assign itself an IP when connected to a network and the connect automatically to
    my server/webpage and either write it's Ip address or just allows itself to be controlled anyway, somehow.

    Is it possible to develop a java app or linux program or something (anything) that could run on something like the xport pro and do this? Or am I destined to continually configure this device everywhere I go? Please help!
     
  10. Imdsm

    Member

    Feb 11, 2011
    39
    0
    As a software developer, I will tell you right now, you will not be able to use HTML to control your car. You may be able to get PHP to utilise a serial connection, though it would be much easier to use ASP.NET as .NET already has this functionality.

    You would need two arduinos set up, one of them in the RC vehicle and the other connected to your server. The web application would then connect using serial to the arduino and send commands. As for receiving them, that'd be more difficult.

    I haven't used Xbee yet - haven't had time - but I have controlled an R/C car using arduino and a custom WASD application. Basically, you have an npn transistor for each control (forwards, backwards, left, right) with the positive wire connected to Collector, the negative wire connected to the emitter, and then a pin from your arduino connected to the base. You also need to connect a jumper wire from ground (gnd) to the negative wire.

    Usually in a remote control, when that connection is closed, the remote sends a signal to the car and the motor pulses. What the transistor does is, when the pin is set to high, it switches on the transistor and makes contact, and sends pulses to the car. It's not the most effective way but it works.

    Here is some C# code that I wrote for my application and the arduino code I wrote for the car:
    http://imdsm.blogspot.com/2011/04/wasd-control-for-rc-car-using-arduino.html

    Good luck, and I hope this helps!
     
  11. nickelflipper

    Active Member

    Jun 2, 2010
    280
    35
    Capiech:
    Now that you have explained it a little more, I understand your setup question. Hauling around a web server to different places doesn't sound like any fun. Hard to imagine a script to configure an unknown router to open up a port for the webserver, but who knows? Sorry, no help there.

    If using an RC vehicle platform, I would continue to use the servo command interface for the stock motor esc, and steering. With a Pic 18f1330 you can do servo signals with hardware PWM (i.e. no interrupt overhead, 3 channels available). There is a price to pay for the HPWM, and that is a slower system clock of 4-8Mhz (1-2 mips for the PIC).
     
Loading...