We are making a Control Panel for a wireless rover

Quick Update: I now also have it setup as infrastructure going through my wireless router with WPA… Working fine. Had problems talking to it with my main machine running windows 7 and explorer 9 beta not being able to show all of the information. Changed to use compatibility view and now that is working. I have also gone through and downloaded the latest com port redirector software and was able to create a comm port that talks to the second serial port on the device.

So now the next questions will be to do we simply use serial access to talk to the rover or should we go down directly to TCP or UDP. (It has been a few years/decades since I last did that… ) Also need to figure out which port talks to the the other IO pins. Well back to playing.

Kurt

Well that’s good to hear! Maybe you can capture your settings.

I got the word from my wife that I have a 2nd package waiting for me! Although it probably won’t be before the weekend that I get a chance to play.

I don’t know what compatibility view is. XP PRO?

Serial emulation or TCP/IP? Would there be much difference in latency? Other then that, and ease of “connecting”, I have no idea.

Good Job!

Alan KM6VV

Having some fun now. I hacked on my simple VB terminal program and added a few fields, to allow me to enter an IP address as well as a port number to talk to. I then added a button that connected to that port. In particular the port associated with the configurable pins (77F0), I then had it talk to that port and print out some current information: So far it comes back:

Client Socket Program - Server Connected ... :(5)10 FF 0 0 0 :(5)11 0 0 0 0 :(5)12 FF 0 0 0 :(5)13 DD 0 0 0
The number in () is the number of bytes that were returned for each of the commands I sent. 5 is correct. The first byte returned is the command number followed by 4 bytes of state information.
10 - All IO pins are available (not special purpose)
11 - Direction all IO pins are currently input
12 - Get active levels - all pins are active low
13 - Current status: DD - 2 bits are currently off not sure yet maybe switches.

Next step will to look more at what the sample board has these pins connected to like buttons and LEDs. If connected to LEDS for example will setup simple form to allow me to set them on PC…

In case anyone wants to see the VB code. Here is what runs when I hit the button:

[code] Private Sub Matchport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Matchport.Click
Dim buffSize As Integer
Dim PinGetFunction(9) As Byte
Dim i As Byte
msg(“Client Started”)
clientSocket.Connect(IPAdr.Text, Convert.ToInt32(Port.Text, 16))
AddLineToLBTerminal(“Client Socket Program - Server Connected …”)

    Dim serverStream As NetworkStream = clientSocket.GetStream()
    PinGetFunction(0) = &H10
    For i = 1 To 8
        PinGetFunction(i) = 0
    Next

    serverStream.Write(PinGetFunction, 0, 9)
    serverStream.Flush()

    Dim cntRead As Int16
    Dim inStream(10024) As Byte
    buffSize = clientSocket.ReceiveBufferSize
    cntRead = serverStream.Read(inStream, 0, buffSize)
    AddLineToLBTerminal(":(" + cntRead.ToString+")"+ hex(inStream(0))+" "+hex(inStream(1))+" "+hex(inStream(2))+" "+hex(inStream(3))+" "+hex(inStream(4)))

    ' now lets try the get direction command...
    PinGetFunction(0) = &H11
    serverStream.Write(PinGetFunction, 0, 9)
    serverStream.Flush()
    buffSize = clientSocket.ReceiveBufferSize
    cntRead = serverStream.Read(inStream, 0, buffSize)
    AddLineToLBTerminal(":(" + cntRead.ToString + ")" + Hex(inStream(0)) + " " + Hex(inStream(1)) + " " + Hex(inStream(2)) + " " + Hex(inStream(3)) + " " + Hex(inStream(4)))

    ' Likewise get active levels
    PinGetFunction(0) = &H12
    serverStream.Write(PinGetFunction, 0, 9)
    serverStream.Flush()
    buffSize = clientSocket.ReceiveBufferSize
    cntRead = serverStream.Read(inStream, 0, buffSize)
    AddLineToLBTerminal(":(" + cntRead.ToString + ")" + Hex(inStream(0)) + " " + Hex(inStream(1)) + " " + Hex(inStream(2)) + " " + Hex(inStream(3)) + " " + Hex(inStream(4)))

    ' And current states...
    PinGetFunction(0) = &H13
    serverStream.Write(PinGetFunction, 0, 9)
    serverStream.Flush()
    buffSize = clientSocket.ReceiveBufferSize
    cntRead = serverStream.Read(inStream, 0, buffSize)
    AddLineToLBTerminal(":(" + cntRead.ToString + ")" + Hex(inStream(0)) + " " + Hex(inStream(1)) + " " + Hex(inStream(2)) + " " + Hex(inStream(3)) + " " + Hex(inStream(4)))

    ' disconnect from socket
    clientSocket.Close()


End Sub[/code]

Note: the Close function is the wrong one it causes the next time I try to do a connect to fail, I need to figure out which is correct one…

All for now
Kurt

Which VB is that? VB6??

So you’re already able to make a TCP/IP connection to the Lantronix demo board! Fine Business!

Mine came, I got a peek at it last night. I’m going to need better light to plug in the little coax connector! That can wait.

I worked late into the night on the Micromoose. Can’t do A/D reads on ARC-32. I did get the sensor board working, I could read the QRB sensors with my Fluke DMM.

Alan KM6VV

I am using the 2010 express edition: microsoft.com/express/downloads/.
Soon my try to figure out the flowstone for this, but VB is easier for me…

Yep I am connecting to the board. I was able to use the comm redirector and make a connection to the second serial port on the card last night and this morning playing with the configurable pins.

Have not done much with analog pins on arc32, if I think of anything else on that will continue on the BM thread.

Kurt

I will probably have to do VB express at some time. I’m not even sure I can find my VB6. Not really into windoz programming.

How much do we want to do with the I/O pins on the new carrier board? It would be good to buffer them, but difficult if they’re bi-directional. They might tolerate 5v OK already.

Yeah, wasn’t looking for an ARC-32 comment on this thread, just what I was doin’.

Alan KM6VV

I am still having some fun and learning…

Good question! Not sure how much Jim will want to use these. It is nice having an independent channel available to us for things. Could be useful for communications and/or signals. Not sure how easy it would be, but could maybe do a reset if things are going bad… The documentation did mention you could use these pins for data transfer, but since each state change requires a command over TCP or UDP, you are probably limited to about 1kbps.
As for 5v I am not sure. I did read in the documentation that the IO pins associated with the 2 serial ports are 5v tolerant, but did not find anything yet on the other pins. If not it would probably be nice if the carrier board had some signal conditioner on it to help support it.

At some point soon it would be great to try to start figuring out what is wanted/needed for the Control Panel. My starting assumption is that we will use the two serial channels. One to be used to send control information back and forth to the BAP probably at a baud rate like 38400 (higher ones are not overly compatible with Bap28 or Arc32). The second channel could be used to send image data. Are we assuming some camera that outputs serial data?

Or are you hoping to plug in a wired Internet camera? The Matchpoint camera does support some form of bridging, but I could not tell from my first pass through the documents if you can do this and still support the serial ports. My first impressions was that once you were bridged all of the commands would then need to come from the wired side. Not sure if that is true or not, but that was my impression.

Suggestions?
Kurt

Hi Kurt,

It may be a matter of real estate! After we get the Lantronix module, a 3.3v reg, one or two level converters and headers, there won’t be much room left.

I like the idea of a reset header (PB too?)

That will have to be verified. That would save a separate 5v level-shifter section.

Yes, we need to know the wish list for the board. We do want two serial channels! But I believe they have to operate at the same speed. (?) Bummer.

I think we have to assume a serial-output camera at this point. What cameras, other then the Blackfin and the CMU do you know of?. the CMU camera doesn’t seem to be readily available (I couldn’t get the CMU CAM3).

We can probably get the wired LAN connections out to header pins, but the magnetics of a LAN connector are probably out of consideration.

That’s a good question! the connector (as mentioned above) could be a problem. Do we have one in mind? Something with at least 640 x 480, at 1Mpix or greater, I would think. yeah, I don’t think you can use both serial and wired LAN at the same time. I could be wrong.

Alan KM6VV

I’m open to ideas here. My goal is super simple. Connect to a laptop for remote piloted operation. The main concern is to have a serial connection for the SSC-32, and some way to see the video on the laptop. Anything beyond that is just icing on the cake. Sockets are cheap, and traces are free. :wink:

I will get Devon involved tomorrow as to the FlowStone integration. I am wanting primarily to use this with the SSC-32 at 115.2kb but using it with Bot Board II and ARC-32 would also be useful. The webcam would be the first choice for video.

Um, I thought the whole point of using the Lantronics module WAS to allow a webcam to be used. :open_mouth:

Yes,

Now that you mention it, I do remember comments about webcams. Do you have one in mind? Maybe the magnetics and wired LAN connector is more important then I thought.

Edit:
Humm, just looked up a Logitech C210 Webcam (first find), and it has a USB interface!

I think you might mean something like the Panasonic BL-CI Network Camera (first find).

www2.panasonic.com/consumer-electronics/shop/Computers-Networking/Network-Cameras/Residential-IP-Network-Cameras/model.BL-C1A.S_11002_7000000000000005702#tabsection

Alan KM6VV

Hi Jim and Alan,

He might mean something like a Trendnet. Although the one I have TV-IP 110w. But that one has a wireless connection so that probably would not gain us anything, but they do sell the TV-IP110 amazon.com/TRENDnet-SecurVie … 038&sr=8-6 which is wired and about $24 less than the W version…

If I understand the documentation properly. (Chapter 9 in the Matchport b/g Users guide) on wireless bridging, it states: “Once in bridging mode, the services on the matchport are available only through the wired interface”

Not sure what that all means. Can we still connect through the wireless to the serial ports? Not sure will probably need to investigate and try out…

That is all for now.
Kurt

The two cameras seem similar. At least we’ve found some. I’ve not worked with LAN cameras before.

Yeah, I don’t think we get the serial ports with the wired LAN. See what you can find!

Alan KM6VV

Yes I am looking at the Panasonic one and the TrendNet one. From what we can tell we should be able to connect the camera to the ethernet connector and get video through the wireless link. Devon will be posting a front end for some simple servo control this morning.

Hey guys I put together a little control program that you can play with. Not much to it, just four up/down sliders. You can set the max/min range and choose which servo each slider manipulates.

Slider Ctrl.JPG

Let me know anything you think should be included and I’ll work on it today.
I put up the fsm file for anyone who wants to take a look at it.

-Devon
Simple 4 Slider Control.fsm (49.7 KB)
Four Slider Control.exe (1.61 MB)

These weren’t exhaustive searches, at least not on my part. I didn’t catch the size, but I’d like to see something more compact in a camera. Probably just fine for initial testing.

They appeared to be “connectible”, as far as I could tell as well.

Alan KM6VV

Hi Alan,

I know that the Trendnet has been used and talked about a lot on the Trossen forums, although most of them I believe have the wireless connection. They often completely break them down. I believe that James use one on his MechBrat: viewtopic.php?f=7&t=5224&start=107

I guess I need to see about plugging my wireless one into the board to try it out… Will have to figure out things like which IP addresses go where. That is if my Matchport has address: 192.168.2.30 and maybe I assign the Trendnet 192.168.2.32, then setup the bridge are both IP address OK to talk to? That is if I ask for …32 will I see it on my network or do I talk to …30 and it talks to …32?

Hopefully I will get a chance later today…
Kurt

Hi Kurt,

Sounds like the Trendnet would be fine! As I mentioned, I haven’t used any of them. I did add a wireless camera on top of a Digital still camera mounted on big 4WD 'bot I built for a photographer, but I wasn’t impressed much by that camera system (I didn’t select it).

I see that James has broken down his camera quite a bit. And I see an RJ-45 in addition to the 2GHz (?) antenna.

Yes! see what you can get plugged in. I’ll have to come up with a camera, although I’ll be busy on the PCB probably for a while after I see some serial comms working on the demo board.

Did you see a BOM for the demo kit somewhere? It was late, but I couldn’t find a BOM when I was looking for the RJ-45 connector they used.

I don’t know all the network stuff. but don’t you go to ports 10001 and 10002 or something for the two channels of the Lantronix? Oh, but you’re talking about the bridge setup. I really don’t know what I’m talking about.

Alan KM6VV

Hey I added video to the control panel so you can connect to an ip camera with it now!
Simple 4 Slider Control.fsm (53.3 KB)
Four Slider Control With Video.exe (1.61 MB)

Super!

I can’t wait to try it!

Alan KM6VV