Let's Make Robots!

FINISHED: LazyBee Security Bot - Laptop Based solution for Dummies

Inter/Intranet controlled robot able to send video/voice/email and play with my kid from the office

Hi all,

 I'm from The Netherlands and have a nice little girl that wants me to build a robot. Well, easier said then done so far. Since I'm an IT consultant I wanted to use a windows based solution to control the bot over the internet. Why? Because windows can do lot's of things that will be pretty hard to programm otherwise. Well for me that is..... With the laptop solution it will be pretty easy to talk, see and even play with my daughter. She will be at home, I will be on my lunchbreak :)

Looked for some advice and some projects that go arround but so far all are pretty complicated and require pretty much skill to realise.

So here's the plan, I will add the progress as I go along.

Build a driving chassis - Done

Set up a laptop that can control servos and dc motors - Done

Set up wireless comms with the home network and the internet - Done

Make the bot accessible by using RDP (I love microsoft) - Done + Teamviewer (free internet tool)

Hooking up all the goodies (like a webcam and so on) - Done, the bot uses Skype amongst others

Dive into sensors and a way to make the bot smart........ Done, got it roaming and smoking

UPDATE, 21th june 2010:

Since I smoked the board with the sensors and basically reached my goal, a roving platform carrying arround a laptop with webcam etc. I'll close this project  for now. I'll get another control board and start up a new project shortly. Well I already started one but didn't get arround the pictures yet. Anyhow, for a first robot this was a good project that gave lots of learning experiences already. Things can only get better now ;) Sorry for making it kind of a mess, all has to do with a lesson I learned long ago when modelling planes and ships, get the equipement first so you know things will fit. Somehow I forgot (so there's lots of different platforms in this post, all just not good enough). The new bot will be smaller, lighter and yes, MEANER. :)

UPDATE, 6th may 2010:

Well, since Madrid was that inspiring, with Frits breaking futuristic cars, Antonios contemplating about his next project, Tinhead raging against his valkyrie and Rik picking barfights I had to come up with something new. Size is were it all starts. Let me elaborate on that; build a robot, post it on the internet and before you know you are stuck somewhere on the globe with a bunch of people that made the same mistake. Some are lucky and some are less fortunate. Lucky the ones that can walk home with a small bot, unlucky the ones that have to travell far with a small bot, really unlucky the ones that have to travell far with a heavy bot. Totally (*&#!*@! the ones that have to travel to Romania with a CNC machine. ;)

So go small.

Since the bot carries the laptop I couldn't go much smaller then the laptop itself. The weels looked too big so I had to replace them (well to be honest I started over the whole thing). I also added 2 extra ping sensors.

It's still under construction....... I have so many wheels at the moment :)

Still need to sand the edges. The upper part is just a try out, that will change a lot as soon as some new parts arrive.

My son loves it, to much. Pretty happy I used1.8cm furniture wood and aloi. It can take a beating. My daughter is still in doubt, a robot or a Hercules action figure?!

And just when things where to good to be true an evil spirit took control of the bot. I was lucky enough to carry arround an empty bottle of red wine so I was just in time to get myself a spirit in a botlle. It's been on the table for the last 30 minutes but I think I will open it. The freaking thing won't shut up! :)))

So remember kids! Robots have souls and are alive!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Lazy Does It ;)

Then again, I don't want to cheer to quickly. As soon as I get the sensors to do what I want I'll dive into the multitasking part. So please Grue, keep reading that last chapter :))

The sensor part is some different game all together. Whilst servo movemend is really easy I'm still holding my breath over the ping and pir at the moment. (As I don't fully understand the code yet, well I think I do but the one provided is either rather silly or it doesn't seem to trigger anything). I'll hook it up to the digibee tommorow to see if it still sets a high when activated.

Remember to set the direction of the pin to input or output first like:

dira[pin_number]~~

then set it to a high like:

outa[pin_number]~~

You can also do it in just one line of code like:

outa[pin] := dira[pin] := 1

As for the PING))) sensor, that should be simple using the object from the OBEX. Download the object called "PING)) Demo" and extract it from zip file to where you are working on your other objects. All you have to do is declare it in your program and then call it to your variable like this:

OBJ

  pg : "ping"                                                                        'Declare the PING object with the Alias of "pg"

CON

  pin  = 0                                                                           'Set my pin for the Ping

VAR

  long   useconds, inches, centimeters, millimeters                ' Setup variables that store the results

PUB GetDistance

  useconds := pg.Ticks(pin)                                                ' Get ms reading and assign that to the VARiable "useconds"

  waitcnt(cklfreq + cnt)                                                      ' wait one second just (because I want to)

  inches := pg.Inches(pin)                                                  ' get distance in inches and assign that to the VAR of "inches"

  waitcnt(cklfreq + cnt)                                                      ' wait one second just (because I want to)

  centimeters := pg.Centimeters(pin)                                  ' The VAR "centimeters" now holds the distance in centimeters

  waitcnt(cklfreq + cnt)                                                      ' wait one second just (because I want to)

  millimeters := pg.millimeters(pin)                                    ' same as above the "millimeters" VAR holds the distance in mm

 

The coding is fairly strait forward by looking at the PING.spin object. Remeber that you do not have to look at all the lines of code in an object's PUB routine to use it. For example:

PUB Millimeters(Pin) : Distance

The name after the PUB statement is what you call from your own object with the options in parenthesis (pin).

 

Nooooooooooooo!!!!!!!!!! All my dreams just shattered. I played arround with the DigiBee+, got the PIR sensor to work and react by putting a led on. But somehow I wasn't able to drive a servo (for the arm on the bot) with the few available examples. So i contacted pccontrol (amazing, they even answer your mail on sundays). And this is what he told me;

Hi Louis,
    Unfortunately a servo does not simply require a digital output to control it.   The signal supplied by the motorbee to the servo consists of a set of pulses 20ms apart. When the pulse width is 1ms the servo is at one limit of travel and when it is 2ms it is at the other limit. The position between these limits varies in direct proportion to the width of the timing pulse(eg 1.5ms positions the servo halfway)
    If you need to use more than one "bee" board on the same pc at the same time then you need to use the "BeeHive" software and associated DLL. This is available for free download from our website. More info at the following link...
    I'm sorry but I'm not familiar with your "parallax/ping" device but there is no way to change outputs to inputs or vice versa on the "bee" boards.
best regards
Archie
So grrrrrrrrrr, I'm stuck with a pretty much useless control board. Guess it's nice to set the lights on a modeltrain track or something but it won't control servo's. Neither is any of the in/out channels invertable so getting the ping to work will be a pain.
I hate robots. ;)
I'll probably go and order the parallax robot control board. Then again I love the really short code that the PicAxe uses. On the other hand, parallax gives full code examples with all their stuff when ordered so it's more a question of intergration then reinventing the wheel.
At least my servo's have been shipped today.

Have you looked at Phigets to interface your motors and sensors to your Laptop?

Are you abandoning the idea of a Laptop controlled Robot? There are many ready made Objects for the Propeller in the OBEX that make code writing short and simple plus you have four languages to choose from and can control the Propeller with the Laptop. If you order the Propeller powered robot control board, you should also buy the book called "Programming & Customizing the Multicore Propeller Microcontroller: Official Guide" for help and examples on video, sensors and general robots. It has lots of code examples and real-world robot projects listed in it.

I'm not sure how to go ahead now. I mean the MotorBee works, so I can basically drive it arround, set some lights on and control 1 servo (all with the laptop). It's just the digibee that doesn't want to do what I want (control servo's). I already looked at the parallax servo control board but I guess I will run into some dificulties making it drive arround whilst just using sensoric input. At start this wasn't the intention anyway but I'm having to much fun.

I already ordered the robot controll board from a shop in the uk (incl shipping it was cheaper then the 1 shop in the Netherlands selling them). I see little use in keeping the motorbee in my bot since the parallax board can do the same and more/better.

The Propeller has a lot to offer. I recomend that you get that book and/or go through the programming tutorials of the PE Kit to learn. The PE Kit documantation is free and you can download the example code for it here. I am working through this right now to better learn SPIN to program my robot. The PE Kit Forum on the Parallax site is also a great source for SPIN examples and help.

For the fun of it you might try the visual language of 12blocks to program your robot or have your child program it (depending on your child's age)

Looking pretty cool. I like the carbon-fibre effect!

Got the ping))) attached and drilled a hole for the PIR sensor. I also added the little wheels to the base of the gripper platform. This helps quite a bit but I guess I have to get me one of these servo slowing down thinggies. The speed of the servo in combination with the weight of the gripper just gives to much momentum to keep things in one part.

andere_kant.jpg

Well it's just a first little experiment. I might re-do the chassis entirely when things work but with a little more accuracy and sensibility to get a real tight fit on all parts. To be honest I'm already starting to get low on space and I still need to install the computer.

zijkant_0.jpg

I don't really like the swivel wheel neither. Might get 2 other full sized wheels. Just for looks.

DSC00663.jpg

Order is still pending in hong kong (hobbycity.com) due to chinese new year. Damn. If you go and buy something there make sure to create an account b the way, prices when logged in are MUCH cheaper.

A very clean looking robot so far, I like where you're going with it.
Oh, and don't forget that the PIR sensor won't be of any use while the bot is moving, since stationary objects will appear (to the bot) to be moving instead =)

Haha, yeah I figured that. What I will try to do is make it run a program as soons as it detects movement. This will run for a period and will then stop the bot again (and activate the sensors after it stopped).