PDA

View Full Version : [Project] Jim and the Serializer - Part 1



JimH
02-14-2008, 10:16 PM
From box to spinning a motor in about an hour!

So my Robotics Connection Serializer WL showed up on Tuesday as expected. Work has been very busy lately, so I haven't had a lot of time to play with it until tonight. All I had a chance to do on Tuesday night was throw 4 AA batteries into a battery holder and then touch the wires to the power block on the unit so I could watch the LEDs twinkle for a few seconds....

Tonight I'm up doing some work tasks (waiting for a large file to copy over a VPN connection...) so I pulled out the Serializer and started to play. Here's how it went:

Power Setup
For now I'm using the 4AA alkaline battery setup for power. I dug around and found an old flourescent light kit for a PC and stole the switch from it. I then wired the battery holder to the serializer with the switch in place and powered it on. I got the normal LED startup condition, so I turned it off and moved on to connectivity.

RS-232 Module Attempt
I decided to start with the serial cable because I figured it should be the least troublesome. I brought home a serial cable from work to test with. I remember 10-12 years ago we threw serial cables out by the box load because there was no use for them. Now I had a hard time finding one in the store room that was M-F. I wasn't sure if it was a standard cable or some kind of management cable.

So I install the RS-232 module on the serializer. Then find out that my HP Media Center PC has no serial port. I had to pull out my USB to Serial adapter and get it installed. Attach the cable and verified the COM port. Opened HyperTerminal and setup the connection based on the documentation.

No go.

Ran through everything again to make sure the configuration was correct and still no go. When I entered text in HT and hit enter I got activity on the USB to Serial adapter, but no response from the Serializer. I figure it must be the cable. Probably a proprietary management cable for some long forgotten device...

USB Module Attempt
So I shut everything down and swap the RS-232 for the USB module on the Serializer. I've seen the dialog regarding the drivers, etc. for the USB setup, so I let Windows go find the drivers after getting everything hooked up. It took a few minutes, but both drivers were installed successfully.

Back in HyperTerminal there was a new COM port. Setup the connection and hit the connect button.

It's a go!

I pulled out the documentation and found the commands for the LEDs and changed the settings, then shut them off.

First Motor
LEDs just aren't enough fun. Something has got to move for it to be exciting! I pulled out a low voltage DC motor, screwed some gator clips on a wire and hooked it up to a motor block and then clipped on the motor.

>mogo 1:20
>ACK

The onboard LED for motor block I was not connected to lit up...

>stop 1
>ACK
>mogo 2:20
>ACK

zzzzzzzzzzzzzzzzz on comes the motor!

>stop 2
>ACK

WOOT!

Now What?
So I can already see a few things that I will need to do. For starters I need to find something safe to mount the Serializer in so it's not just sitting on my desk with a bunch of wires running everywhere. It looks vulnerable, not to mention ugly...

I also remembered that I had an RC10T in a box in the garage. It has a servo for the steering, so I need to pull that for testing on the Serializer. I may also use it for my first mobile platform, but will need to work through several things first. Right now I just want to test the servo control so I understand how it works.

.NET is also on my list. I have .NET Studio 2005, MS Robotics Studio, and the Serializer library installed. Now I just need to ease into how to use it and work on my first program.

I'll let you guys know how it goes.

Dave
02-15-2008, 11:27 AM
>mogo 2:20
>ACK

zzzzzzzzzzzzzzzzz on comes the motor!


That's a really satisfying sound, isn't it? Keep us updated!


I also remembered that I had an RC10T in a box in the garage.

Nice. I have an old RC10 (the buggy model though, not the truck) somewhere. I think it might still be in my parents' attic. Maybe I should dig that thing out and give it a brain.

JimH
02-16-2008, 09:13 PM
So I went out and spent a few dollars on some more items. I picked up a large project box and some stand offs from Radio Shack and got the Serializer mounted inside to give it a solid base a little protection. While looking through the electronics drawers I came across a Parallax PING ))) sensor. I couldn't remember if it was supported, but figured it was worth picking up. Turns out it should be supported, so a good find locally (about the same price as buying online and shippping).

I was in Toys-R-Us looking around (and considering a LEGO NST system) when I came across some off brand 7.2V batteries with wall charger in the clearance section for $4 each. I bought 5!

Also picked up some connectors, a switch, and a motor at Radio Shack. Broke out the soldering iron and get the switch inline with a battery wire/connector for the 7.2V batteries. Both motor blocks are wired to connectors as well.

So after getting it all rigged up, I started looking through info on MSRS and playing around a bit. All of the tutorials I found are for .NET Studio so I messed about a bit with that for around an hour. I have decided that I will need to spend a lot more time coming up to speed on developing in the .NET IDE.

Any recommendations on online sites, or books, to get up to speed in a decent amount of time would be appreciated.

After shutting down the software, I brought HyperTerminal back up and connected to the unit. After verifying it worked, I shut it down and hooked up the steering servo on the RC10. I was able to get it to move back and forth with no issues. Next I hooked up the Electronic Speed Controller and at first it didn't seem like it wanted to work. I shut down the unit and reversed the pinout and after a little playing with values was able to get it to kick the motor in.

I have been thinking through some of the logic of how to read and react to sensor input. Some simple things I want to try are having a fan come on when you sit down at the computer (sonar/motor control). Steering reaction to objects (sonar/servo/motor control) as well as a bump sensor or two. The PING claims up to 3m of range. If that is true and things are high speed enough, I might be able to get the RC10 autonomous outdoors. Of course...just the thought of a high speed crash with all the electronics onboard makes me nervous.

kdwyer
02-17-2008, 07:52 PM
Trust your robot.
If it crashes into something, then obviously that thing shouldn't have got in the way of the bot. Bots are never at fault.
Be good to your bot, and it will kill you last.

Alex
02-18-2008, 10:57 AM
I figure it must be the cable. Probably a proprietary management cable for some long forgotten device...

Yeah, I'm guessing so too. I had a TON of serial cables laying around the office and had a heck of a time myself trying to find a cable for the Serializer back when it was only RS-232 interface (not the modular communication it is now). I finally went down to Rat Shack and picked up a straight DB9 RS-232 cable, plugged that in and it worked right off the bat.

Great to hear it's working out for you now!

Honestly Jim, if you're not that experienced with programming, I'd stay away from Robotics Stuido, at least until you get a little more used to visual studio and .NET programming with the Serializer. Don't take me the wrong way though. Robotics Studio is a sweet system, but it's definitely not for beginners. It can be intimidating to even an experienced programmer.

In regards to sites on learning .NET programming, I replied to a thread a couple of months ago that might help ya out:

http://forums.trossenrobotics.com/showthread.php?t=1332

It's all C#, but C# is a language I'd recommend learning if you're getting into the Serializer.

If you need other sites, let me know cuz I got a ton of them:)

I also have an incredible book that has helped me in so many ways when I was learning C#. The title is "Pro C# 2005 and the .NET 2.0 Platform" written by Andrew Troelsen and published by Apress.

xero
10-12-2008, 10:24 AM
I also have an incredible book that has helped me in so many ways when I was learning C#. The title is "Pro C# 2005 and the .NET 2.0 Platform" written by Andrew Troelsen and published by Apress.

This by far is the best c# book I have bought. It sit's on my desk at work and I look at it often.

Adrenalynn
10-12-2008, 12:24 PM
That's the big I most frequently recommend here as well - but I do think it's more intermediate (already have some programming experience) level - or a great "bible" to have around for reference.

4mem8
10-12-2008, 12:56 PM
Would you guys recommend this book for me to learn C#, no experience, but willing to learn. Just trying to find a good book, Have you an ISBN no:?

xero
10-12-2008, 01:30 PM
4mem8, it is a very comprehensive c# book but if you are not already a .NET programmer there are other books out there that are more geared to learning .NET and C#. I have been doing c# since it was in beta so really I just need to know how to work with the new language and environmental features of the 2.0 library. I definetly don't think you could go wrong buying this book but you may wan't another one that is more lesson focused.

Here are the ISBN's for the book. I also have his c# 2008 and the 3.5 library book which is just as good.

ISBN-10: 1590594193
ISBN-13: 978-1590594193