Saturday, 27 August 2011

GPS Module Review (dGPS by Dexter Industries)

Are you bad with directions?
Do you constantly check-in on social networks like Facebook Places or FourSquare?
Do you have an Iphone, Android phone or any other smart phone?

Chances are, you would have already used, or own a GPS if you answered yes to any of the above.

So what can the GPS module bring to LEGO Mindstorms NXT that I couldn't already do on my Smartphone?

Well for starters, the GPS is actually quiet an advance piece of technology. By calcualting the distance to each satellites in space, it would be able to triangulate its current location. You should read more about the concepts and theories on how it actually calculates its location at the wiki site here.

However, this advance technology is no use if you don't understand or know how to utilise it.

The good thing about the getting the GPS module for the NXT Mindstorm is that, you'll have to write your own codes, rather than just downloading the apps and run it on the phone.

You'll need to know a little GPS concepts, and lots of creative ideas on how to implement or use it.

The review that I will be doing today would be based entirely on the NXT-G blocks that have been provided by Dexter Industries. In the photo above, I have both the dGPS module writting the to the NXT display, while on the right, I have HTC Desire with a GPS app, obtaining it the current location coordinates. If you are able to look closely, both of them are actually giving out different coordinates... of by a few decimal points.

View GPS for the LEGO Mindstorms NXT in a larger map

I have plotted both the coordinates on Google Maps. As you can see, both shows a different location, about 10 feet apart. Which one is more accurate? Well both is off by a little, as in one if off to the right, while the other is off to the left. I would need to check this with a few more location to determine which is the most accurate.

In the same map, I have also plotted a path that takes me around the KT town area. The path is marked in red. I have also attached the NXT-G files used to log the data, as well as a KML Path Creator at the end of this post.

You'll have to download 2 custom NXT-G Blocks available here. One you have downloaded and added it into your NXT-G software, you'll be to use it under the Advanced tab.

The first Block is the GPSRead, where it is able to extract all the information from your new dGPS module to your NXT. You could either write it to your NXT Display or even a text file on your NXT.

I have modified one of the sample codes to both display the information on the screen as well as write it to a file. When you write the coordinates to a file, with fixed interval, you'll be able to plot a path, as shown in the Google Map above (red path).

The next Block available is the NXTNavigation block. Given a destination coordinates, it will return the distance and angle to the destination from the current location. The usage is a little different from the GPSRead block, but it has it own purpose.

Overall the dGPS module is excellent. To log on to the satellites is pretty quick on a clear open sky (less than a minute), but takes up to a few minutes if it is very cloudy. The response that I am able to get, even at 1 second interval is acceptable.

I'll have to do more advance vehicle or robots to fully utilize the dGPS module's full potential.

Download and view PDF Instructions on how to Collect and Upload data to Google Maps.
Download the NXT-G file for data logging here.
Download KML Path generator here.

Wednesday, 24 August 2011

dGPS Preview (Dexter Industries Sensor)

I have just received the dGPS that is made by Dexter Industries.

I have been playing over the last few days. I have been using it to collect information, that I later convert and upload directly to Google Maps

Attached here is a Google Map with me driving around the town where I stay. Used the sample codes available at Building Blocks (taken from Dexter Industries resource/downloads) and have modified it a little.

I will continue to modify the NXT-G codes, making it easier to use. Before uploading the finished NXT-G codes here.

I  am also in the middle of editing a special Excel file that will auto generate the KML file used by Google Maps. Easier to manipulate the data for upload.

I will do a full review over the next few days, completing the NXT-G codes as well as any other files created.

Stay tuned!!

Sunday, 7 August 2011

Moonbots 2011 - Prototyping & Robot Design

What I love about LEGO is that, given similar (or even same) parts, the possibility to create something seems to be infinite. So many possible solution for the same task...

The following is more of a Photo blog, of our attempt to prototype and design a vehicle for our Moonbot mission.

We started off with trying 2 basic design
  • Tank Track based, with 2 driving motor.
  • Car Based (4 wheel) with a front steering system.

 A very quick tank track based prototype done. After a few runs over the Moonbot ridges I have deem this design a little too unstable. It couldn't get over the ridge consistently, most of the time either falling on its back before going over, or falling head first after it has gone over the ridge.

 This was one of the first car based prototype that the kids had produced for me. It worked fine and was able to traverse any flat terrain properly. However the turning circle was bad.... really bad. With this design, we too had difficulty crossing the ridge, as it is tail heavy (note the NXT is behind the back drive wheel). Told the kids to move the NXT to between the 2 drive axle, giving it better balance.

The front steering wheel mechanism is really simple (anyone knows the name of this design?). It is just motor connected directly to the steering arm. No rocket science. Simple and effective.... However this design does have a tiny flaw.... it is difficult to get a good turning accuracy, as well as the terrain and ridges sometimes pushes it out of alignment.

The driving motor is connected to the drive axle directly. This design is able to push maximum power without any gears (speed or torque design). Simple and effective. However the trade off for this design is that it doesn't allow the car to turn properly (inner wheel is slower than other wheel).

We did a redesign it and tried it with a differential drive train. It worked very well when the vehicle is on flat terrain and when it is turning. However when faced with uneven terrain as well as Moonbot ridges, sometimes when all traction was lost to 1 wheel, thus transferring all the energy to the other wheel, causing inadequate traction and power to cross the ridge.

I reckon if we could try a limited slip differential, it could work. However with complicated design, it also could mean that the vehicle could be more unreliable. We decided not to try that design and just stick with the simple design and work within the limitations.

Here is a photo of another design of our tank track based vehicle. The student added some gearing, for it to power all the drive wheels, as well as added some counter balance to the robot. It did have great torque and was able to climb over the ridge easily, however the balance was difficult to overcome, causing the vehicle to constantly fall over the ridge.

While the some of us were killing our brain cells trying to figure out the best possible design for our vehicle, other students had the opportunity to do research and prepare for their STEM out reach project. The STEM out reach is worth a whopping 40% of the total, so getting this done properly was essential to the overall score

Alright... moon moon moon.... what else do I need to know about the moon.... Google this Google that.......

We decided to add a torque (speed down) gearing to the front drive arm. This makes the turning a little more accurate (but slow reaction), at the same time making it harder for the drive arm to mis-align when it hits the ridge or the uneven terrain.

One of our first working prototype with the NXT Brain moved to the centre for better balance and a new rake style arm for grabbing the objects. We experimented with this design. It was able to move over the ridge quite consistently, however the heading direction wasn't that consistent due to the uneven ridges pushing (mis-aligning) the vehicle steering arm.

Here is another prototype of a long reach rake style arm for trying to grab the objects from a further distance. The idea is NOT to go into Cravin Crater as it would be near impossible to leave it when you are within it.

Overall over the 2 days that I spent with the kids, it was great. We had many brain storm sessions, prototyping most of the designs we wanted to try and then decided which was the one that should be used. It was good as it wasn't my duty to dictate which is the best direction of building the best vehicle but give the opportunity to the kids to prototype, trial and decide.

LEGO Minifig on NASA Jupiter Mission

NASA's Jupiter-bound Juno spacecraft will carry the 1.5-inch likeness of Galileo Galilei, the Roman god Jupiter and his wife Juno to Jupiter when the spacecraft launches this Friday, Aug. 5. The inclusion of the three mini-statues, or figurines, is part of a joint outreach and educational program developed as part of the partnership between NASA and the LEGO Group to inspire children to explore science, technology, engineering and mathematics.

In Greek and Roman mythology, Jupiter drew a veil of clouds around himself to hide his mischief. From Mount Olympus, Juno was able to peer through the clouds and reveal Jupiter's true nature. Juno holds a magnifying glass to signify her search for the truth, while her husband holds a lightning bolt. The third LEGO crew member is Galileo Galilei, who made several important discoveries about Jupiter, including the four largest satellites of Jupiter (named the Galilean moons in his honor). Of course, the miniature Galileo has his telescope with him on the journey.

The launch period for Juno opens Aug. 5 and extends through Aug. 26. For an Aug. 5 liftoff, the launch window opens at 8:34 a.m. PDT (11:34 a.m. EDT) and remains open through 9:43 a.m. PDT (12:43 p.m. EDT). The spacecraft is expected to arrive at Jupiter in 2016. The mission will investigate the gas giant's origins, structure, atmosphere and magnetosphere. Juno's color camera will provide close-up images of Jupiter, including the first detailed glimpse of the planet's poles.

NASA's Jet Propulsion Laboratory, Pasadena, Calif., manages the Juno mission for the principal investigator, Scott Bolton, of Southwest Research Institute in San Antonio. The Juno mission is part of the New Frontiers Program managed at NASA's Marshall Space Flight Center in Huntsville, Ala. Lockheed Martin Space Systems, Denver, built the spacecraft. Launch management for the mission is the responsibility of NASA's Launch Services Program at the Kennedy Space Center in Florida. JPL is a division of the California Institute of Technology in Pasadena.