Video link through xbee module to PC? Robot Application.

AndyGray

New Member
Dear Forum Members,

I have followed many topics on this forum for the past few years now. Having worked with Picaxe on many basic circuit designs and applications I have decided to try something more ambitious. I would like to include a camera on a remote operated robot controlled over the xbee connect facility.

I wondered if anyone had experience of using the xBee module for this use and if it is indeed even possible to control a robot over the network. I was looking at using something similar to the below link. A standard cheap webcam may be an alternative.

Many thanks in advance.

Andy


<A href='http://www.rapidonline.com/productinfo.aspx?tier1=Electrical+%26+Power&amp;tier2=Security+%26+Warning+Device&amp;tier3=Covert+Cameras&amp;tier4=CMOS+camera+modules+with+audio&amp;moduleno=65323' Target=_Blank>External Web Link</a>
 

xstamp

Senior Member
Unless you use some kind of MPEG compression, Zigbee will be too slow to send real-time video. Your easiest bet would be to send raw analog video back over the type of low cost 2.5GHz link used for home security systems. Maplin Electronics stock a number of these transmitter/receiver products. The camera should feed directly to the transmitter and the receiver feed directly into a TV video input. All standard phono lead stuff with no development required.

What do you want to send to the robot? Would standard pulse width modulated RC equipment do, or must you send a binary data stream and at what speed?



 
Too slow... use analog -- bit more expensive, but hey. You COULD use a parallel webcam and have the xbee transceive really fast, but it's bound to mess up.
 

AndyGray

New Member
I was hoping to send all command data down the xBee connection. Using a pc based interface I would be able to control the movements of the robot and have an image sent back of what obstacles were in front of it.

The 'video' link as I put it before could be just a snapshot image updated every 5 seconds or on a specific command if the data transfer was too slow. As a resolution I was looking at 160 x 128 which some cameras seem to output. I found this one below. I also found an interesting artical based on a zigbee-like network structure.

Would the baud rate still not be high enough on an overclock 28X or maybe the 28X2? I am unsure on the overheads and bandwidth needed for such transfers.

Many Thanks for your advice


Camera Module:<A href='http://home.pacific.net.hk/~comedia/C328-7640.PDF' Target=_Blank>External Web Link</a>

Article:<A href='http://www.broadnets.org/2004/workshop-papers/Basenets/Schiller.pdf' Target=_Blank>External Web Link</a>


Edited by - AndyGray on 25/10/2006 23:15:51
 

hippy

Technical Support
Staff member
For a 160 x 128 image at 8-bit colour per pixel, that's 20,480 bytes total, sent as 11-bit serial that's 225,280 bits, so that's the baud rate needed to send it a second.

At 9600 baud that would take 23 seconds, a 16MHz PICAXE can achieve 19200 baud which would reduce that to about 6 seconds.

It might be possible, but that doesn't include any overheads or delays anywhere. The biggest problem will be in capturing the image and spooling it out.
 

AndyGray

New Member
Another option is to not put the picture data through the Picaxe, leading to the setup below.


Normal Operation:

PC ---&gt; Picaxe Connect ---&gt; XBee TX ~ ~ ~ ~ XBee RX ---&gt; Picaxe ---&gt; Motors/Actuators/Lights etc

Sensors ---&gt; Picaxe ---&gt; XBee Tx ~ ~ ~ ~ ~ XBee Rx ---&gt; Picaxe Connect ---&gt; PC


'Photo Call':

PC ---&gt; Picaxe Connect ---&gt; XBee TX ~ ~ ~ ~ XBee RX ---&gt; Camera Module ---&gt; Capture Image Commands

Image Data ---&gt; XBee TX ~ ~ ~ ~ XBee RX ---&gt; Picaxe ---&gt; PC

Would this setup work or will the Xbee not agree with having two inputs and outputs feeding of the same serial connection?
 

moxhamj

New Member
The camera on the link is fine but if you want remote control go for wireless. Search Ebay using &quot;video security&quot; or &quot;av transmitter&quot;. There are tiny 2.4Ghz camera/transmitter and receiver packages for &lt;$50 that go straight into the TV or into a PC video capture card (also very cheap &lt;$10). Use a PC or laptop to then control the robot via the serial port/xbee/picaxe. There is video software for $40-$50 that will take the picture and capture it at any frame rate into jpg's. Then can process the pictures if you like using your own custom written 3D modelling neural network software! I'd start simple with a project like this - stick an AV wireless video on a radio controlled car and put the picture on the TV. Then when that works, send the picture to the computer. Then add some sort of additional sensor to the car (eg bump sensor/ultrasonic range detection etc) and send the data via picaxe/xbee to the PC. Then try sending some data back from the PC via another xbee/picaxe to control something on the car - eg pan/tilt a servo for the camera. Then hack into the car's RC controller and make your own PWM using another picaxe and control the car directly using the PC (a software CRO to trace the signal helps). Modularise everything and use plugs on modules so that working bits can be easily transfered to the next (bigger) project. The 433Mhz modules may be a lot cheaper than an xbee and do interface directly with picaxes. Just some random thoughts.
 

xstamp

Senior Member
You stated your proposed application as as &quot;Using a pc based interface I would be able to control the movements of the robot and have an image sent back of what obstacles were in front of it&quot;.

Why not use an off-the-shelf 35MHz RC transmitters, reciever and decoder to interface directly with the robot servos and speed controller etc? With the video being sent back in real-time over a standard 2.5GHZ link. All very cheap and simple. If you really must use a remote PC for control, I am sure there are PC programmes around to generate RC compatible PWM signals (from a printer port) that you can plug into the 'buddy' socket on a standard RC transmitter.

 
What about a Picaxe.NET to control it on-board the robot along with a Wi-Fi bridge...

Then use an IP webcam (with a built in webserver etc) also plugged into the Wi-Fi bridge to see what's going on...?

That way you can do the lot Wi-Fi/IP at a range of ~100m, view the camera in your web browser, and control the Picaxe.NET with a VB program or similar using IP/sockets.

Check out: http://www.theinquirer.net/default.aspx?article=28632 for a suitable camera.
 

xstamp

Senior Member
Well jamesbruton, that has to be just about at the other end of the cost/complexity spectrum from what I had just proposed.

 

BeanieBots

Moderator
Xstamp. The use of 35MHz for ground based robots carries a very stiff penalty in the UK. Any company found selling equipment for such purposes will be shut down emmediately as has been demonstrated in some recent cases.
I would suggest using 40MHz or 27MMz to remain within the law in the UK.
 

Dippy

Moderator
AndyGray,
where can I get one of those cameras you linked to. Do I have to buy 10,000 or can I get a sample like so many here seem to do?
 

AndyGray

New Member
Dippy: You can get the camera module as a single sample for &#163;21+ postage [from HK however :(] They are not fit for resale as they are not RoHS complient.

I was trying to reduce the number of transceivers I have on the robot. By routing all the command data, sensor data and visual data through the xBee I thought it would be a more effective way of using a single conection. I would like to have bi-directional communications with the robot which is why I didn't look too closely at 27/40MHz technology.

It seems to come down to the simpler 433Mhz Comms with a 2.4GHz Video (and audio if using this option) OR using the more complex programming and circuit design with the Xbee module.

If the xBee route is possible then it does work out cheaper by my calculations. I will have to look further into the compressed image transfer over xBee and see if there are any UK suppliers of any suitable JPEG compressed camera modules.

Anyone have any options not yet thought of or views on the ones that have?

 

xstamp

Senior Member
If you need bi-directional coms, and want to keep the cost down, you could send to the robot at 27 MHz and receive data back using the audio channel of the 2.5GHz 'video' link. I have done this using single chip FSK modems at 1200bps but higher rates should be possible.

 

Dippy

Moderator
Thanks Andy, thats fantastic value.

I know its not so cheap, but this is damned clever - it has already been mentioned on forum so I didn't discover it... <A href='http:// http:// http://www.robot-electronics.co.uk/shop/Camerax39s2081.htm ' Target=_Blank>External Web Link</a>

No, I didn't use Google to find it.


Edited by - Dippy on 27/10/2006 09:49:11
 

AndyGray

New Member
Thats an incredible camera with some great features. Unfortunately it out of my budget and probably a little too good for what i need it for. Nice find though.

How easy is it to send data down the audio channel? Simple serial communications?
 
Top