Wednesday, December 21, 2011

Impressive programming and design

The video above is simply amazing.  Let's face it, humans can find learning how to ride a bike a challenge.  Why?  There are a lot of things happening at the same time that are all inter-related.  Steering, pedal force varies by where you are in the rotation and can vary on either side.  In short, it is very complex.  Riding a bike uses  the human's "inner ear" for balance control.  The robot uses a gyro to manage balance.  In short, this is very impressive programming.  And, it uses that silly PID we are going to learn someday.

Anything is possible!

Tuesday, December 20, 2011

NXT...and what is a "brick" anyway?

I get calls this time of year asking about what is what.  I will make a breif summary and then get into the details.

Retail.  Currently the retail model is LEGO item 8547 which is LEGO Mindstorms NXT 2.0.  Three years ago there was LEGO item 8527 which was LEGO Mindstorms NXT 1.0.  The "hardware" such as the controller or "brain", motors pieces etc are the same.  The KEY difference is the Software which is faster and more robust than 1.0.  And, the light sensor was replaced with a color sensor.  After three years and 7th out of 50 teams, we used the older light sensor.  In short, the hardware is all the same but it is nice to have the NXT 2.0 software.

Where to find them?  Fast but full price, the LEGO store at the Burlington Mall in Massachusetts.  Use Froogle.com.  Or, buy used from eBay or Craigs list.  At risk for used stuff could be, missing important parts like a motor, wires, sensors, original SW disk, USB Cable.  Or, a controller (aka brick, aka brain) that had a battery leak.  I am here to help share my knowledge so ask.  But, I am not suggesting I am an expert.

More info.

If you really get going with LEGO Mindstorms NXT and plan or want to get a FLL team going, I would strongly encourage one to find the Education set, LEGO item 9797.  The big benefit, it comes with a rechargeable battery and charger.  Sure, it might have a few extra pieces but not critical.  It also comes in a sorting tub and tray.  You will have to buy a tackle box with a retail kit as the box it comes in is useless.  My point, you get more for your money even though it costs a little more.

Older NXT bricks are fine.  They can be flashed with the current Firmware from LEGO Education.  The key thing to look out for is a brick that had a battery leak.  :(.

I also learned that if your brick makes sounds but the screen does not display, this is a known problem and I was able to get two of mine replaced with new units from LEGO.

Plastic?  All LEGO should be collected!  But, LEGO Technic pieces are heavily used.  Lastly, something many folks don't realize.  Once you master the software that comes with the NXT, called NXT-G, you can also buy educational software such as RobotC or even full blown LabView and use the controller with far more advanced software. 



Thursday, December 15, 2011

Interwoven Interests

One would have to categorize this blog as being somewhat "robotics centric".  At a meeting last night we heard about how youth should use this time to discover what they really enjoy.  What sparks a passion.  I agree.  What better time to sample everything out there.  Robotics was presented as one of those "entrees" to sample.  But, I think it goes much beyond that.

Robotics could be pigeon holed into geeks with motors and sensors pounding on the keyboard, writing in some unintelligible machine language.  That would be a shame!  IMO, it is really just a platform by which youth can start developing their curiosity and passion for problem solving.  Not to mention just good old fashioned patience and persistence.  Whether it is robotics or rowing, one must develop patience, persistence and vision.

Today I came upon an interesting stop motion video using real models, not CGI.  (See right video)  In watching this stop motion video, the complexity of how both the camera and the subjects had to move in a highly synchronized, multi-plane imaging technique blew me away.  And, due to my curiosity, I had to learn more.  Only after watching it a few time did I realize how much hidden (subliminal) messaging was happening and the amount of intellectual thought that went into making this clip.

It struck me as a collision of so many important skills which youth can explore today.  I guess the term used today is "multi-displinary".  Kids should realize that one passion might be instrumental in helping another person or group achieve their goal.  Everything is so intertwined today.  In this video, we see creative concepts, computerized model making, lighting, acting, team work, programming, digital art, scrip writing and so many more skills all collaborating to project a single message. (see right for how it was made)

The talents of so many diverse people were brought to bare on this 2 minute, 20 second piece of art I thought it was worth calling to the attention of others.  Whether it was the creative team dreaming up how the leaves would be off the trees after the factory or how the farmer's mustache turns grey by the end.  3 million hits later, it is a VERY powerful creation.  Using highly programmed "robotic" camera technology I might add.

Tuesday, December 13, 2011

Tip #2 for Toop 77 Robotics Merit Badge

Justin attacked his program tonight and he got most of it.  One thing about programming, it teaches you patience and problem solving.  A sensor can be thought of as eyes.  They are constantly providing a "feedback loop" to the brain.  We see a ball coming right at us, the body moves due to the eyes or "sensors" telling the brain "controller" what to do like "duck" or "stop".

In programming speak this means we must use a "loop" which is constantly getting feedback from the sensor.  Like 2000 time per second!  We are wanting the bot to sense if it is getting close to something.  Think of this as a Yes, I'm near or No, I'm far away.  This is also known as a switch, on or off.  Or, close or not close.  So, we put a switch inside the loop.  So, 2000 time per second the program is asking this switch are you close or not?  When it gets a YES, I'm close, stop the loop and wait for the next command.  In my sample, I use a sound block saying "object detected".  Why not, it is one of the sound options!

Here is where the tricky part comes.  How do you exit the loop or "get off the merry go round?  The only way I know how is to use a "logic loop" and a "variable".  Ya, not very intuitive but like any language, you have to learn something new.  And once you read this, you will completely get it and use it often in programming.

I create a variable called EndLoop.  Set the end loop to false outside the loop.  Put a "write to" variable right after you stop the motors in the switch which will instantly change the EndLoop variable from FALSE to TRUE. (remember, you set it to FALSE outside the loop)  Then, in the loop, have the EndLoop variable write the value to the logic loop using a wire.  So, when the EndLoop is true, stop the loop.  We can cover this Wednesday night for those of you who have had little to no NXT-G experience.


Sunday, December 11, 2011

VEX field trip update


More photos go HERE.

We drove down to Boston University Academy and found that not only did they have a VEX competition, they also had a FLL regional.  In one gym, at the same time.  In short, it was hard to get a handle on what was going on.  Very hard.  For the VEX field, if you were not standing at the edge of the field, you could not see what was going on even if you were 6ft tall.  Did not work well for spectators.  We got to the edge for one match.  To see some experienced competitors going at it look HERE.

We spoke with the kids and although they were busy fixing, altering their robots, they were less clear on the programming language being used.  Ultimately we concluded all teams were using a CORTEX controller and EasyC.  One coach showed us EasyC and it is much more like NXT-G.  No one that we could find was using RobotC or a C based language.

That said, it did not appear to be so advanced that middle school kids could not have fun competing with HS age kids.  Autonomous was less than advanced.  Bots often did not have the maneuverability to get to scoring elements.  Strategy did not seem that overwhelming either.

I think what was lacking yesterday was the celebration of the youth and recognition of both what failed and what worked.  Both are critically important means of learning.  VEX was second fiddle to FLL.

What next?  Not really sure.

EasyC vs. RobotC.

You can look at past posts to dig up info on RobotC.  Based on my research, EasyC may be easier than RobotC for kids who are not yet in love with figuring out a programming language.  No doubt learning RobotC based on THE most common and universal language, C, would be prudent.  But, for the casual kid and mentor, EasyC looks a little less intimidating.

At issue is the "portability" of the language you select accross all the possible controllers.  For a FLL team, you already have LEGO NXT controllers.  For a new VEX team, older PIC controllers are sufficient to get one's feet wet and are readily available with minimal to no investment. But, you would have to buy EasyC twice if you started with PIC.  The last competition said it was PIC ready but when I spoke to a knowledgeable coach, he said he doubted they would be able to handle PIC if we had show up with PIC bot.  In a perfect world you would just start with CORTEX and reduce potential down stream hassles.  An expensive way to start in the event the team does not find it of interest.




Langauge Options
Controller(s) NXT-G RobotC EasyC
NXT Y Yes $74 Not available
VEX PIC Yes $74 for both PIC/CORTEX Yes $75 PIC version V.2
VEX CORTEX Yes $74 for both PIC/CORTEX Yes $75 CORTEX Version V.4























Saturday, December 10, 2011

VEX Road Trip to Boston

For the first time in many many weeks, Justin and I have some "non scheduled" time.  So, why not drive the 75 miles down to Boston University Academy and see what this small VEX scrimmage is all about.

Take some notes, see what folks are doing and see if it looks like fun.  Hopefully it is not so small and informal that it is difficult to get a feel for the true event.  We hope folks will be willing to chat with us about VEX, as the competition would seem to be an early warm up for other major events.  One team from ME.  Something tells me they will be well sorted.  3 teams from a VoTech school in Fitchburg.  And a true middle school from Melrose.  Interesting that a Middle School team and a High School team will be both competing and working together as aliances.

This will also serve as one more step toward the BSA Merit Badge as one of the requirements is to attend a robotics competition.  Here is a list of other events in the region.  Our HS engineering teacher said I could just borrow a VEX PIC system and play if that is what would create some interest.  At this point, it is a one man band.  After today we should know the path forward.  I think it would be possible to field a robot for the Concord event in March.

Local VEX events   As of 12/2011, more will be added I am told.
12/10/11   Boston, MA (75 miles from Hopkinton, NH)
01/07/12   Worcester, MA (97 m)
01/14/12   North Conway, NH (97 m)
01/16/12   Boston, MA  (Monday) (75 m)
01/21/12   Thetford, VT (70 m)
02/25/12   Wilton, NH (37 m)
03/03/12   Worcester, MA (97 m)
03/10/12   Concord, NH (10 m)


FRC (First Robotics Competition) Schedule
Granite State Regional Manchester NH  Mar 1-3rd
North East Utilities Hartford CT Regional   Mar 29-31st

FTC (First Tech Challenge) Schedule
WAPAC Regional, Antrim, NH Mar 10th

Friday, December 9, 2011

Clearly some minds are wired differently than mine

I was looking for some tips on how to sum the error to add the I to my P.  (PID).  I came upon this video.  Why folks are worried about what parts he used to build it.  To me, it is the program that I cannot get my head around.  It looks like it is only capturing some of the 54 "color facets" that make up a Rubrics Cube.  It would seem to me you need each facet to solve the problem.  Interesting stuff!


Thursday, December 8, 2011

Tip #1 for Troop 77 Robotics Merit Badge

I am going to assume building the Five Minute Bot and adding the ultrasonic sensor was a no brainer.  The hardest part was finding 6 good batteries.

So.  Where to begin.  Well, you can actually use some math just to see that there is a reason you learn this stuff.  We call recall that Circumference = Pi * Diameter.  LEGO is kinda twisted and they actually put the diameter on the rubber tire.  In this case, the subject tire is a 56mm diameter.  So, some simple math tells you it is approx 176mm circumfrence.  So, how many of those fit into a meter?  Basic quick math.  You have to do that.  But, fractions of rotations gets messy when you have a much better tool at your disposal.

DEGREES!  Yup, you can control your robot by telling it how many degrees to go and get VERY accurate results vs. just random guessing.  So, we all know there are 360 degrees in a circle (rotation) so how many mm are there in a degree?

So, now you have this silly number but, you only have to use it ONCE.  Although the true number is smaller, let's just pretend it is .5mm.  If 1 degree turn of the tire is .5mm, how many degrees do we need to travel to complete 1 meter?  1 meter is 100 cm.  Or, 1,000 mm.  My math tells me 2,000 degrees.

In short, having demensions, math formulas you can figure a lot out before you even program.  This is helpful when an engineer needs to design something to explore the surface of Mars.  Too far out?  Did you know that Trinity College in CT is the center for developing robots to fight fires and reduce the risk to Firemen?

To demonstrate.  You should do the math.  But, if you want to travel 1 meter with 56mm diameter tires, you need to program the motor to go 2,045 degrees.....you just might find it traveled 1 meter.

Yup, all that math you learn can be used in the real world.  Let's hope I did it right!

Next:  Simple blocks.  You want your bot to move straight.  You want to use MOVE blocks when you want to make your bot go straight.  That is because the MOVE block makes sure both wheels turn the same amount.  Motor blocks are for single motor driven items. If you want to learn more see this YOU TUBE video.  Go to 6:55 if you want to get to the key point.

With this and other tips, you should be able to easily get to the soda can with your first program.

Good Luck!

Sunday, December 4, 2011

Withdrawal anyone? Top Ten Topics To Try To Test...

So, what do we want to do next other than enjoy the holidays?  Hopefully a bunch of NXT sets are in Santa's Sleigh and we can have some fun post holidays exploring things we wanted to understand but did not have the time during the season.

Here is a random list of 10 items.  Email me or comment on the blog if you have any particular item you want to pursue.

  1. Using FileAccess block to capture and create independent thresholds for each light sensor port and see what happens.
  2. Using the logging feature to capture the LS readings while hunting for lines or following lines....see what it tells us when we miss lines.
  3. Solve the BlueTooth issues.....that is no fun but we're stumped.
  4. Build a line follower that will be faster than our current PLF program.  Add the integral??  The Derivative?
  5. Explore other SW options for NXT controller to see if VEX or FTC would be cool.  They tend to use RobotC or EasyC. RobotC can be run on the NXT but at this point  EasyC seems to be exclusive to the VEX controller world.  EasyC is "graphical" similar to NXT-G so it is something to be reviewed.  I know zero about either.  I also read National Instruments is working to offer something between NXT-G and full blown LabView.
  6. Explore use of HiTehcnic sensors.  We have 1 Gryo Sensor and 1 Accelerometer Sensor.  Want to explore?  Just ask.  They are sitting in my box of LEGO stuff. Based on what the links say, it is clear one could play with these sensors and RobotC.
  7. Have a skills session for local teams at Maple Street with basic challenges up to a line follower competition.
  8. Go to a VEX or FTC meet.
  9. Work to make a standard joystick (game controller) drive an NXT as we see in the RobotC promo video.
  10. Have fun!
RobotC Reference links: (aka, extra reading and exploration)
One -  Using RobotC on NXT
Two -  RobotC overview, maybe the "...over 100 sample programs..." will help jump start NXT-G types?? 
Three - code to help "replicate" NXT-G blocks. 
Four -  RobotC and a Gyro to control precise turns. COOL compared to NXT!


NH States in review

As with every year we have gone to the States, it was filled with excitement and drama which will not be soon forgotten.  Driving to Manchester at 6 am, cloaked in darkness as the horizon just began to turn orange is an exciting way to begin the 12 hour day.  Of the 180 registered teams in NH, 50 teams were invited to States to vie for the chance to go to St. Louis to represent the New Hampshire.  Because there are over 20,000 FLL teams world wide this season, only an elite few are invited to the Global Championship. Read about FLL here.

We did our very best to compete with all our Gracious Professionalism and enthusiasm for those who toiled for 3 months over bright colored plastic pieces.  Writing code for a much under appreciated 32 bit controller which is managed by NXT-G 2.0, a simplified version of National Instrument's LabView.  When you look at what some teams are able to accomplish in 2 minutes and 30 seconds, it is truly amazing.

The Yappin' Yodas should be proud of their efforts as we ended up 7th overall.  Although those teams ahead of us were scoring more points than our theoretical perfect run, we still held our own with 166 points which was 32 points below our perfect score.  It is always harder at competition to do as well as you can at home.  Keep in mind the table makes up only 25% of your overall score.

16 trophies sat on the table as the day began to wind to a close.  Top teams walk away with more than one making it that more rewarding that this years team left with a coveted yellow LEGO trophy for First in Inspiration.  Maybe it was the ears, maybe it was helping others, or maybe just wanting to make sure everyone walked away feeling good after their table run.  The team was recognized for their effort by winning the Inspiration Award!  VERY exciting if not INSPIRING stuff!

For a peek into what our day was like, enjoy the Calder's video compiled from yesterday.

Next year's theme was announced as well.  Senior Solutions!  Become a follower of this Blog to get updates about FLL in Hopkinton/Contoocook.


Thursday, December 1, 2011

Want to go PRO*?

Sadly we will miss a local VEX competition that is being held on Saturday while we are at States.  I had hoped I could take our FLL team to a NH VEX event so you could see what else is going on out there.  I might add there is NO PROJECT.  Team members can tell me they want to try it and mentors will dig in and see what options are out there for you.

Here is a young person who started at 12.  Looks like fun. 

Joshua Wade
Josh sharing details of his bot
His robot in action with driver

Below is his bot in 100% autonomous mode, check out those ATLs! (advance to line)



Be the most you can be!  Always take the initiative!

* A reference to the NHPR radio segment the Yodas were on where one person indicated all FLL team members can become a pro.  Not something possible in athletics.