Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: School Project (Need ideas for Lego Mindstorms)  (Read 6084 times)

Immortal

  • Bay Watcher
    • View Profile
School Project (Need ideas for Lego Mindstorms)
« on: February 11, 2012, 10:31:12 pm »

Hello. I never post over here but I know Bay12 is insanely creative, so when assigned the project I figured I should venture over here to the Creative Projects sub-forum. I'm currently in my second term at university for mechanical engineering, and in my intro to computer science class we have been assigned a project. It basically consists of building and programming a robot using Lego Mindstorms.

Background on the project,
The controller has three motor outputs, each with the ability to return shaft encoder information.
The controller has four sensor inputs. Sensors available are,
Colour Sensor (Returns seeing the colours BGYOR, Black and White, or intensity)
Sonic Sensor (Returns distance to an object in cm, 2m range)
Bump Sensor (Pressed or not)

Now I'm not asking for blueprints, but just general ideas, what sensor we can take advantage of or how it may be used. Another member and I have substantial programming experience (recursion, best choice algorithms, advanced sorting) and we want something challenging (unlike the mandatory cs class). We also have two other members.

Idea 1. Is a CNC like robot. It will have a colour sensor hanging where the normal machining spindle would be and solves mazes drawn by the class.

Idea 2. Is a turret robot. It would detect people walking by, track, match speed and shoot elastics at it.

Thanks for any idea you may generate!
Logged

Stargrasper

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #1 on: February 11, 2012, 11:45:51 pm »

I used to program these things with the Robot C programming language.  The default firmware on these things sucks, so switching to LeJOS or Robot C or something if you're allowed to do so.

Major warning...the sonic sensor sucks.  It not only won't work beyond about a meter distance, but it also won't work at ranges inside six inches or so.  Even worse, it likes to bounce off of surfaces that are at an angle.  It's really only reliable if you're running straight at the obstacle.  I'm not sure I'd trust the color sensor to do anything more than test contrast between light/dark.  The bump sensor is a little sketchy, too.  Try to use multiple sensors in tandem for the most accurate results.  It turns out that the official Lego Mindstorms sensors are all kind of bad, the sonic sensor being one of the worst sensors by any standard.  That might be a good thing because it forces you to program around them.  I can give more advice on the sensors and Lego style robotics, if you want.

As far as stuff to do...in the Midwest USA, universities go to MICS.  There's always a robotics contest.  All they give is the rules and nothing says you have to use a Lego-bot, but most people do because they're easier than building a robot from scratch.  Read the rules for contests past and you should find plenty of challenging and otherwise difficult things to do.  Remember, these things are deceptively difficult.  They look easy until you try actually doing it.  That goes for pretty much anything robotics.
Logged

Immortal

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #2 on: February 12, 2012, 01:36:36 pm »

Thanks, I wasn't thinking about testing the sensors but now I will. The colour sensors I have used worked very well in differentiating colours so far. Yes we are using Robot C.
Logged

klingon13524

  • Bay Watcher
  • The Mongols are cool!
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #3 on: February 12, 2012, 03:16:49 pm »

Make a robot that tells if a television is on or off, and activates a microwave if the TV's turned on. You will probably want to put popcorn in the microwave, and preset the actual time to cook it. Is that possible in whatever environment you're presenting it?
Logged
By creating a gobstopper that never loses its flavor he broke thermodynamics
Maybe it's parasitic. It never loses its flavor because you eventually die from having your nutrients stolen by it.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #4 on: February 13, 2012, 05:20:04 am »

Recycling? Dump in a bunch of random lego blocks, and it will sort them according to size, shape and color.

I really like idea 2 as well.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Stargrasper

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #5 on: February 14, 2012, 11:08:42 am »

How's this coming along, Immortal?  Did you feel enough inclination to look at the historic robotics contests for the conference I liked?  What have you learned testing your sensors?  Decide anything as far as what is or isn't within the realm of reasonability?

If you're feeling ambitious, build a small tank.  Then sic it on anything your classmates build.  :P  The kit comes with everything you need to build it except the gun, which should be well within the realm of reason to jury rig together.

Glad to hear you're using Robot C.  It's decent.  Certainly better than the default system.  I remember deficiencies in the language causing us problems, but I can't remember what they were off the top of my head.  I haven't used the language in a year or so now.  Let us know if you have problems.
Logged

Immortal

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #6 on: February 15, 2012, 01:39:48 pm »

Yea the course is 3/4 C++ and the rest is Robot C.

Also I won't be testing or doing anything till after reading week (next next Monday). We just have to have our project proposal submitted then. I'm currently in the middle of hell week (midterms) so labs are canceled. I think our group has decided on a tank with a turret on top. The maze isn't difficult enough. Recursion wont be a challenge, but some good AI would easily produce Fun. Anything we hand in will get awesome marks, but with AI we can make it as difficult as we want.

We figure when you hit the top button it waits, then kind of maps and protects its area.. thats the basic idea to build on.

Also Siquo, I mentioned the block sorter to another group of classmates. I think they were considering it.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #7 on: February 15, 2012, 02:38:55 pm »

The fun part about it is you can use more low-tech build stuff, based on what you want to sort, like a centrifuge, sieves, etc. Let us know what it's going to be, with PICS or it didn't happen!

I'm currently waiting until my kid outgrows Duplo, so I can get my old stash from my parents attic again. Friend of mine already bought mindstorms for his kid. His kid is 3. It was a bit too obvious that it actually wasn't for the kid.  ::)  ;)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

alfie275

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #8 on: February 17, 2012, 05:10:38 pm »

I'd suggest this: http://www.norgesgade14.dk/bluetoothlibrary.php

Used it to implement a simple AI following thing once for a school open evening.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Immortal

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #9 on: February 18, 2012, 05:23:56 pm »

Thank you, but I've done quite a bit. I was just looking for ideas or knowledge of the Mindstorms capabilities. Appreciate the help though. Ill keep this thread in mind and post our progress as it goes since I'm sure a few will become interest as we work.
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #10 on: February 19, 2012, 11:40:34 am »

Maybe something like this www.youtube.com/watch?v=GQ3AcPEPbH0 but using a robotic arm?
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Immortal

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #11 on: March 08, 2012, 06:47:17 am »

Alfie - I showed my friends that and they are actually trying a robot arm, not to build anything complicated though. The arm is just to sort a pile of junk, I don't know how their doing though. Thanks.

A few showed some interest in my project so heres the final build, I don't have final pictures of the firing mechanism but this is what we have so far.
Spoiler (click to show/hide)

It holds 36 rounds in 3 clips, it fires at about 1 round/second. It shoots almost 2 feet, and most rounds fall within 3 or so inches left or right of the barrel line.

We are in the process of programming it now. We are currently writing us the base functions, such as;
how far to turn, fire, set robot speed, physical robot speed relative to ground.
This way we will get all the tiny details out and programming the AI will be efficient, hardly ever rewriting code.

I'll update this as we go along. Very good chance of a video down the road.
Note - Tested those sonic sensors. They can detect an object about 1m away. They can hit a wall almost 2m away though.
Logged

Vactor

  • Bay Watcher
  • ^^ DF 1.0 ^^
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #12 on: March 08, 2012, 05:43:49 pm »

I'm a bit late to the game here, but one suggestion for the color sensor would be to build a rotary encoder, with a multi colored disc as a way to serialize position
Logged
Wreck of Theseus: My 2D Roguelite Mech Platformer
http://www.bay12forums.com/smf/index.php?topic=141525.0

My AT-ST spore creature http://www.youtube.com/watch?v=0btwvL9CNlA

Immortal

  • Bay Watcher
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #13 on: March 08, 2012, 08:06:43 pm »

Funny you should say that. The motors themselves have that function built-in. Its also implemented that exact way inside.
Logged

klingon13524

  • Bay Watcher
  • The Mongols are cool!
    • View Profile
Re: School Project (Need ideas for Lego Mindstorms)
« Reply #14 on: March 09, 2012, 05:49:20 am »

Try making a sentient mindstorm, but make sure it''s programmed to follow the three laws.
Logged
By creating a gobstopper that never loses its flavor he broke thermodynamics
Maybe it's parasitic. It never loses its flavor because you eventually die from having your nutrients stolen by it.