Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Help with linking OI and RC over Internet.... (http://www.chiefdelphi.com/forums/showthread.php?t=49544)

P1d40n3 19-10-2006 10:56

Help with linking OI and RC over Internet....
 
My team is trying out an interesting project; namely, we are making a robotic hall monitor that can be controlled over the Internet. But we've hit a roadblock of sorts.

We have 2 GW21W's, one connected to the Tether port on the OI, and one to the Tether port on the RC. I know that the two are connected (their status pages say they're connected to each other), but for some reason, there is no data passing between them. What I'm thinking the problem is that the serial port on the RC GW21W is improperly configured for outputting to the RC.

So what I need to know is this (If indeed my theory is right);

The flow control scheme that the RC uses, and the bit parity. Also, if you have any ideas (pitfalls to look out for, questions, etc.) feel free to post them.

A thousand thanks to all those help us :cool: .

-commander Adam 'P1' Burch

Tom Bottiglieri 19-10-2006 11:05

Re: Help with linking OI and RC over Internet....
 
http://www.ifirobotics.com/radio_modem.shtml
9600bps Full Duplex. Not sure if that helps. For the bit parity, I would say just brute force it and try all of the available options.

I hope you're going to have some kind of local object detection system on the robot, or at least some kind of emergency shut-off in case of packet drop. The last thing you want is a router to shut off and your robot to slam into a person in the hall.

Greg Marra 19-10-2006 11:10

Re: Help with linking OI and RC over Internet....
 
Quote:

Originally Posted by P1d40n3
We have 2 GW21W's, one connected to the Tether port on the OI, and one to the Tether port on the RC. I know that the two are connected (their status pages say they're connected to each other), but for some reason, there is no data passing between them. What I'm thinking the problem is that the serial port on the RC GW21W is improperly configured for outputting to the RC.

I'm not particularly familiar with the communication schemes used by the RC, but have you gotten these boxes working with other serial devices? You've probably already tried this, but if the problem lies in the GW21W instead of the RC, you could be banging your head against the wall. Try putting another serial device through them and see if that works.

EHaskins 19-10-2006 11:17

Re: Help with linking OI and RC over Internet....
 
If I remember right radio and possibly the tether ports are rs422 not rs232.

Dave Flowerday 19-10-2006 11:42

Re: Help with linking OI and RC over Internet....
 
Quote:

Originally Posted by P1d40n3
We have 2 GW21W's, one connected to the Tether port on the OI, and one to the Tether port on the RC.

Ouch, you better be careful with this or you'll damage things. The tether port is NOT a standard serial port. Yes, it does use RS-232 to communicate with the RC (the radio modems use RS-422), but it also carries power and ground (think about how the OI powers up when you tether it). In addition, the OI and RC only switch over to using the tether when they detect that it is connected by monitoring the connections on the pins.

Bottom line is that you'd have to build an adapter for each side to make the right connections. And if you screw up there's a good chance you could fry a $500 controller.
Quote:

Originally Posted by Tom Bottiglieri
9600bps Full Duplex

That's the throughput of the radios. They actually communicate with the OI and RC at 19200. As do the tether and dashboard ports.

The settings are 19200, no parity, 8 bits, and 1 stop bit, with no hardware or software flow control. But again, this really isn't a good thing to be experimenting with unless you know exactly what you're doing.
Quote:

Originally Posted by Tom Bottiglieri
some kind of emergency shut-off in case of packet drop

That's already built into the RC firmware. However, driving a robot which is not in direct view of the OI sounds really dangerous to me. If you're driving it out of range of the standard radio modems then it's probably too far away to be safe.

divergentdave 19-10-2006 11:42

Re: Help with linking OI and RC over Internet....
 
You may want to investigate the tether specs further, because I think that the OI might be trying to draw power from the robot through it. If your serial connectors don't supply voltage through the right pin, it might turn on some failsafe feature on the OI.

Kevin Sevcik 19-10-2006 12:29

Re: Help with linking OI and RC over Internet....
 
To further add to the confusion, it's possible that the tether uses characters that could confuse your adapter. It looks like COM1 will switch to a console if you send 'Z' or 'z' 3 times in a row. So I'd be safe and use COM2.

Tristan Lall 19-10-2006 12:49

Re: Help with linking OI and RC over Internet....
 
That serial box is available with RS-422, according to the specifications (well, one place says -422, but there are no subsequent mentions of it). You might want to ask whoever sold it to you to exchange it for the RS-422 model, to connect via the radio ports instead. With luck, the hardware would treat it identically to the E-Wave modems that we use now.

Kevin Sevcik 19-10-2006 13:11

Re: Help with linking OI and RC over Internet....
 
Think again, Tristan.

IFI Radio to Wifi FAQ

Modems have tons of commands that tell the modem how to connect to the other modem, etc. The RC isn't expecting to see an OI at the end of the radio port. When its setup commands aren't replied to, it just won't work. If this did work, you could just hookup the RC to OI with an RS-422 crossover cable and get much better max distance than with the tether thanks to the differential signalling.

Tom Bottiglieri 19-10-2006 13:56

Re: Help with linking OI and RC over Internet....
 
Quote:

Originally Posted by Dave Flowerday
That's already built into the RC firmware. However, driving a robot which is not in direct view of the OI sounds really dangerous to me. If you're driving it out of range of the standard radio modems then it's probably too far away to be safe.

Yes, but the connection from the host computer to the robot would not be broken. The connection from the client to host computer over the internet would. The robot would still think the OI is present, even if it was giving garbage data. It may not be very probable, but this system is just an injury waiting to happen.

This all goes to prove a very good point. If there's people or valuables around, and you cant see the robot, don't drive it!

Astronouth7303 19-10-2006 16:56

Re: Help with linking OI and RC over Internet....
 
Quote:

Originally Posted by divergentdave
You may want to investigate the tether specs further, because I think that the OI might be trying to draw power from the robot through it. If your serial connectors don't supply voltage through the right pin, it might turn on some failsafe feature on the OI.

The OI only draws power from the RC if it isn't plugged into the wall. (Personal experience: Plugging-in OI can solve "chasing LEDs" problem.)

P1d40n3 19-10-2006 21:34

Re: Help with linking OI and RC over Internet....
 
Thanks for help all!

Just so we're clear, the team and P1 also plan to attach a wireless webcam to the robot, so as to get a live feed from the robot. The goal is to set it up as a hall monitor you cna use from anywhere in the world. As long as you have the right password. :)

cdfps 19-10-2006 22:09

Re: Help with linking OI and RC over Internet....
 
I read the posts and I don't fully understand what you are doing. I get the perception that you want a computer somewhere in the building and the robots f in the hall.

The last time I did this, I put a laptop on the robot, used a free timelife giveaway usb camera, a power wheels 6 wheeler, a car battery ,ran Libranet with apache, and wrote CGI in c to control the 225in/oz steppers I was using to move it.

The stepper driver kept the motors constantly hot so battery life was low.

The forward, backward, etc, etc scripts were called when a button on the web page was clicked.

The robot was a simple build and worked easily from inside the school, getting through the school firewall waws a lot harder.

I probbably have the c cgi source as well as the web pages used, and maybe some documentation. If you want I can take a look and send it along to you.

For a while I had a telerobotic tethered turtle in my office which anyone in school could access. Turns out there are two kinds of people. The kind that spin the telerobotic turtle around 5000 times to wrap up it's teather and the kind that would drive it into you.

Hieb 20-10-2006 10:42

Re: Help with linking OI and RC over Internet....
 
Quote:

Originally Posted by P1d40n3
Just so we're clear, the team and P1 also plan to attach a wireless webcam to the robot, so as to get a live feed from the robot. The goal is to set it up as a hall monitor you cna use from anywhere in the world. As long as you have the right password. :)

A possible option to consider -- mount the OI on the robot, directly tethered, so it is receiving the information it wants. Then look for a Wi-Fi adapter to connect to the serial port of the RC. I recall seeing one when I was considering a similar project, but I don't remember where. That way you have your video feed and control all through the network. As mentioned before, definitely include a failsafe so a dropped packet will disable the robot.

Matt Krass 20-10-2006 11:12

Re: Help with linking OI and RC over Internet....
 
Also don't forget the IFI communications system tries to maintain a sync at about 38Hz, latency induced by the internet transmit may cause timing issues and force an RC shutdown due to "unstable communications". The radio port is designed to control E-wave modems and I don't believe it'd work connected straight to this device, and as others pointed out the tether is sensed by the direct connections of certain pins which the adapter probably doesn't emulate (Why would it? it's non-spec).

I think pairing up the OI/RC works, as long as you have a remote kill switch. Talking to the RC via serial port with those adapters is likely to work much better.


All times are GMT -5. The time now is 01:27.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi