BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Dec 11, 2018 4:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Tracked Vehicle Control - Wireless to Wired
PostPosted: Mon Dec 20, 2010 11:26 pm 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
I am looking for alternatives to control my tracked rover using tank mode control. I am currently using a a PS2 wireless controller for beta testing the rover, but need to switch to a wired configuration to avoid issues with wireless control over longer distances (+300').

With some minor tweaking I was able to use code (by others) to control my tracked rover with a wireless PS2 controller. I like the code because of the following, but am willing to switch to another method to get wired control over 300' of custom cabling.

-use gear shifting (not a must)
-turn on and off control (not a must)
-use two joysticks for tank mode operation (a must)

I see that BasicMicro provides joystick components, but my fear of overcomplicating the solution creeps in.

Any input is greatly appreciated.

Regards
Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Tue Dec 21, 2010 2:36 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
300' + of wired, you'll probably need to use RS-485.

Which means you need an MCU at the controller end, paired with a MAX485 TTL to RS-485 converter.
Then another MAX485 at the vehicles end.
Serial TTL or RS-232 starts to have trouble at longer distances.

The only other thing i can think would work is a high power xBee, which is still wireless, but would be capable of much further ranges.
A pair of these would work.
http://www.sparkfun.com/products/8742

or a pair of these http://www.sparkfun.com/products/9099

You'd still need an MCU to convert the PS2 controller data to TTL.

So Wired PS2 Controller connects to an MCU such as the atom pro/nano.
Option 1: The controller MCU connects to a high power xBee, which transmits to another xbee on the receiving in, thus controlling the bot.
Option 2: the controller MCU connects to a TTL to RS-485 converter, then you have a long freakin wire connected to another RS-485 converter that's attached to your bot.

The Pro's of option 1 are that it's pretty fool proof. And the 60mW xBees should have zero problem reaching the 300' range. The cons, it would set you back about $100

The pros of option 2, it would only cost about $20.
The cons of option 2 far outweigh the pros. The wires at that range would be heavy. So depending on the size of the bot, it would add unnecessary strain on the bot.
A 300+ foot wire would be tough to coil up. And would be easily susceptible to damage.
1 kink, and it would take you hours to find the kink.

So i'd suggest forgetting about wired, and just go with a high power xBee.
I personally use class1 bluetooth, and i can get over 300feet LOS, but if you want serious range, a high power xBee is the only logical solution.
Wired is for like <20' for movable bots. or 100'-200' for stationary. Longer than that and you want wireless.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Tue Dec 21, 2010 11:01 pm 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
I realized that the camera being mounted to the rover has a built in web server and network card which can be accessed via Cat5e. It also has a DB9(M) connector on it.

Does it seem possible to send tank style commands by the following path?

laptop -> cat5e -> camera network card -> camera DB9 -> Bot Board II

Any leads and suggestions on code for tank style control of BB2 using a laptop keyboard connected this way

The code I am currently using uses PS2 wireless remote as described in previous posts.

I am contacting the camera manufacturer to find out more about the camera's network card and DB9 (serial connection). I believe the camera is set up to control pan and tilt servos from a software interface. This may be useful.

Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 2:04 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
#1 If the IP camera supports serial out it could work. But you won't get a definite answer unless we see some exact model numbers.

#2, we don't know what motor controller, or even what micro controller you're using.
Your board is the botboard 2, that's all we know. but you didn't mention if you are using the basic stamp, the basic atom, the BA Pro, or what have you.

And we can't do anything about the code, without knowing what motor controller you're using.

Now then, you can use a cat5 cable with an IP camera, and a Network to serial bridge, by going through a wired router, or even a simple network switch.
The camera and the ethernet serial bridge would both connect to the router/switch, and then you can control it from a laptop.
Again, we would need a lot more details.

uController type
motor controller type
camera model, possibly a link to the webpage.

Then we need info about you, like how good you are at networking.
And how good you are at programming.

Programming an MCU for a tracked rover is simple enough. Especially simple tank style. My tracked rover uses the tank style too, as well as 4 button mode.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 2:24 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
MicroController - BB2
Motor Controller - RoboClaw 2x10A
Quadrature Encoder - 128 ppr
Camera - http://www.ipix.com/cv_dome.html
Camera Network Card Supported Protocols - Standards........ TCP/IP, HTTP, FTP, RTP/RTSP, DHCP and more.

I expect to speak to the camera manufacturer soon if there are any specific technical questions that need to be asked.

I will research the serial bridge and work on visualizing the configuration and what I need to aquire or develop. I found www.sparkfun.com to have possible components that will be needed to make this happen. Feel free to suggest any 'next steps' and sources for what I will need to acquire/develop.

Very appreciative,
Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 4:09 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
In answer to the questions about my experience level....I am moderately capable with reverse engineering basic code and can develop straight forward programs. I have been able to combine code to control a rover with a wireless PS2 and display distance data to 7-segment display. The only additional experience was writing basic programs on my PC Jr. I am not proficient in any other programming language.

Understanding the balance between software and hardware has been a challenge. The topic of sending keyboard commands via Cat5e to the camera's network card seems like the way to go to ensure the tether is light; it will carry DC conductors and Cat5e conductors. The hardware on either end is an unknown to me, but I am researching your references to develop the hardware components in my head.

I am very thankful for this forum, all of you, and wikipedia.

Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 4:31 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
BB2 is a board the micro controller fits into. It is not a micro controller.

Image

The large board is only the botboard, the modules under it are the micro controllers.

Which micro controller are you using?

On the Roboclaw, are you using RC, packet serial, simple serial, PWN?

The camera doesn't list at all if any DB-9 ports can be accessed remotely. So using a router/switch and the Ethernet to serial adapters might be required.

These might help.
http://www.sparkfun.com/products/9476

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 5:00 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
Doh! Atom 28 Pro

Does the following go on the hardware list?

http://www.sparkfun.com/products/9476


Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 5:04 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
Too funny...I finished reading your post and my link to the converter (ethernet to serial) is the same as you recommended. That's a lesson to me that I should read the entire post before I respond.

What small component could I use as a switch/router?

Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 5:20 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
If controlled by the laptop i'll need more info on how you intend to control it.

But controlling it by wire is very easy.

You'll probably only need 1 ethernet/rs-232 adapter on the rovers end. If using a small 4 port switch or router it should all be straight forward.
A switch MIGHT be easier, since you can configure the gateways from within linux.

Simply you'd have a short 6" to 1' cable between the switch and the Camera, another to the serial adapter, then a 300'+ cable between the switch and the PC. So the PC, Camera and the Serial adapter all share the same switch.

http://www.wiznet.co.kr/Sub_Modules/en/ ... 0&pid=1040

The PC would run their Wiz Virtial serial port software, so you don't need 2 adapters, only 1 ethernet to serial adapter.

So the PC would use the IP camera's built in webserver so you can see what the camera sees.
And the PC would use another program, like a terminal, to control the bot.

There are different ways of doing this naturally.
You can use any PC compatible gamepad, even an xbox 360 controller. A common terminal, and possibly need joy2key, which converters gamepad controls to keyboard keypresses.

Or you can write your own program if you know how. Goto the Lynxmotion forums and check out FlowStone. Makes designing programs pretty easy.

As for programming, i can't help you there until after you have everything, or at least until i have all the info.

But it'll be really easy, that much i can tell you.
Since the roboclaw only needs 2 values, one for each motor when using simple serial.


This will work for a simple switch.
http://www.newegg.com/Product/Product.a ... 6833166034
A router wouldn't be necessary for such a simple project. The camera didn't mention if it was only 10/100 or if it was 10/100/1000.
A 10/100/1000 switch will cost about $35

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 5:58 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
I am ordering the RS232/RJ45 converter and would like to include the router/switch. The router/switch needs to fit in a 12" long x 6" wide x 3" tall case. The idea of a un-cased router component seems advantageous to mount in the case without any unecessary plastic housing.

I have never worked with Linux, but will figure it out if necessary. Could I spend more and get a solution with less programming (router?)?

My search for a "micro" router/switch (2 port minimum) is ongoing. It is good news that the switch you spec'd fits within the dimensions of the case (12"x6"x3"). Linux may be a short-term challenge. DC (~8V) can be delivered to the router/switch.

Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 6:37 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Nothing i mentioned requires linux, all can be done with windows.

A router will cost more, but won't really benifit in any way.
You could probably remove the switch from it's case. just make sure you test the switch incase of DOA first.

Creating a networking gateway should be pretty easy, though you may not need it, just configure each device so each one has a specific IP.

you'd need at least 3 ports. 1 for the PC, 1 for the camera, and 1 for the RS-232/Ethernet adapter.
5 port is the best you'll probably find for your project. The one i listed from newegg should work fine, i see nothing about it that would cause any problems.

Quote:
A switch MIGHT be easier, since you can configure the gateways from within linux.

I actually meant windows, i just happen to be thinking about linux at the same time and kinda got those mixed up.

Windows networking in XP/Vista/windows 7, should all be pretty straight forward.
Just have each device assign it's own IP and you're set.

The Wiz VSP, you just put in the assigned IP of the converter, and that's it.
The camera, you just view it's IP like you would any other IP Camera.


With the switch, theres no need to use the uplink, just connect the PC, IP Camera and converter to standard ports. Windows Gateway services can handle any DHCP if needed.
It's the cheapest and smallest way to go.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Wed Dec 22, 2010 7:15 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
Cool that Linux is not in the mix.

The orders have been placed for:

-RJ45/DB9 Converter
-Rosewill RC-405X 10/100Mbps 5-Port Switch

Stay tuned while the mail does its thing.

Mike


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Thu Dec 23, 2010 8:14 pm 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
BTW...the RoboClaw 2x5A is set for packet serial.


Top
 Profile  
 
 Post subject: Re: Tracked Vehicle Control - Wireless to Wired
PostPosted: Tue Dec 28, 2010 6:38 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
The RJ45/DB9 converter arrived. I have it powered and ready to connect.
Still waiting for the switch.

After reading more threads I am not clear on the ultimate configuration for wired control (Cat5e? or Serial?)? I have been attempting to control the RoboClaw through the AtomPro28 using Flowstone (serial COM port) with little success. I am able to open/close port as evidenced by a green LED on the RoboClaw that turns on/off simultaneously.

Can Cat5e deliver the video (mpeg) and control (flowstone) up to 350'? Remember the camera has an attached network card that will connect to the soon-to-arrive switch.

Does the RJ45/DB9 converter need to connect to a network card of its own or does the switch suffice? The network card connected to the camera is internal (ie IP camera) and is not accessible two other RJ45 jacks.

Considering the following, what are some efficient options for control w/ encoder output to 7-segment display? I have this all working with a wireless PS2 controller, but would prefer to switch to wired control for reason mentioned earlier.

-2 DC Motors
-2 Quad Encoders Connected to RoboClaw 2x10
-Roboclaw 2x10A connected to P14 & P15 of BBII w/ Atom 28 Pro, using hserial
-Using Atom28Pro to send encoder calculation to 7-segment display

What is best config to send keyboard commands (or joystick emulator) for control of tracked rover over 300' while processing encoder data serin/serout OR hserout/hserin OR both simultaneously??

I was thinking to re-purpose the coductors of a Cat5e for the IP camera and microcontroller. Assuming there are enough conductors. The 300' threshold and number of conductors seem factors to consider.

Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO