Friday, October 29, 2010

Morse code and the great candy grab

Morse Code (ME-84: Assignment 5)
The task: Use the NXT to send and receive Morse code messages via an LED and a home-made light sensor. I found this much, much trickier than I expected. We were meant to present our projects on a Tuesday. The instructor, Chris Rogers, had boldly claimed that if we could fake it (and get away with it!), then we could get full marks. I did this (much, much more easily than I expected!), and then spent the next three days trying to get it working for real. Along the way I learned lots of new tricks in LabView, including how to use flags and timers to syncronise concurrent tasks, how to use the same subVI in multiple instances/clones (not knowing about this gave me some very weird behaviours), charts (I still don't really get how to work with these though).

In the end though, it finally came together Friday afternoon. In the end I could send and receive arbitrary messages at a rate of just under 10 seconds per character. For example, “The quick brown fox jumps over the lazy dog” takes about 7 minutes. Not going to break any records, but at least I finally got it working, and can move on to a fresh challenge next week.

Candy Grab (EN-10: Assignment 5)
By a very convenient coincidence, my boys, Mitch and Rohan, had a day off school on the same day that we were doing the Candy Grab challenge in EN-10, the freshman intro to robotics course that I've been sitting in on. The challenge was to create a robot that can push candy out of the circle, without actually leaving the circle. My boys were a bit lucky in how the competition played out, as you can see here...

Preparing for the challenge was very hectic, but a lot of fun, and obviously my boys came away from the day with a very positive memory! It was like stealing candy from a freshman!

Tuesday, October 19, 2010

NXT Scope and Soccer Dribbler

NXT Scope (ME-84: Assignment 4)
The task for the fourth challenge in ME-84 was to use a pre-release version of HiTechnic's new prototyping board to create an NXT based Scope. The Scope was to include a signal generator, an oscilloscope, and a multimeter. I spent a lot of time trying to come up with a nice, reusable menu system and even more time working out how to generate signals. In the end, I was able to display either a sine wave or a square wav (both with adjustable frequency and amplitude), and I also had a functioning volt meter. *Then* I realised that there was a programming block that we had ben meant to use to take care of the signal generation for us!!! It would've save me a lot of time, but I'm sure I learnt more doing it the hard way. Unfortunately, I ran out of time to complete the oscilloscope. I was hoping to get back to it afterwards, but other projects have taken over since then. I guess that will be another project to come back to when I can.

Soccer Dribbler (EN-10: Assignment 4)
In En-10, we were given a challenge to create a line-following robot that could dribble one of the LEGO balls included in the Education kit to 3' from a goal, and then shoot a goal! I thought this would be a good opportunity to build a soccer "dribbler". A dribbler is a mechanism for applying reverse spin to a ball so that the ball tends to "stick" to the robot. I've had some experience with these in the context of RoboCup Junior Australia (RCJA) where this is a very common technique. I was, however, unsure whether it was possible to dribble the LEGO ball, given that it is significantly lighter than the RCJ soccer ball. Here's what I made...


Friday, October 8, 2010

Haptic Pong and more Sumo

Haptic Pong (ME-84: Assignment 3)
Our third assignment in ME-84 followed on from a series of tasks in-class involving haptics. Specifically, we'd been making use of the motor as a way of providing feedback to the user, as well as it being an input device. The assignment was to create a video game that involved haptics.

I decided to create an NXT version of Pong, where the paddles would automatically bring themselves back to their starting position. My first version was a little boring, so I rewrote it so that the ball would increase in speed during the game (up to some limit). Here's a game nearing its conclusion...

SumoBots (EN-10: Assignment 3)
This challenge in EN-10 provided an opportunity for me to rebuild the sumo robot I'd previously made for ME-84. This time, however, the idea was for the robot to be fully autonomous. That was okay by me, as we had already created a program for our "remote controlled" sumo robot that would enable to operate autonomously. The other difference this time was that teams were limited to a single kit (plus an optional extra light sensor). Also fine by me, as the first time around I'd given myself that very constraint. And here was the result (this is, of course, the best that it performed!)...

Thursday, October 7, 2010

The trombone and the swing

I've been spending so much time lately doing things that I want to blog about, that I never seem to find the time to update this blog. I'm pretty keen, however, to post something about each of the projects I've completed for the two robotics classess I'm undertaking, so here is some of what I've done since I last posted...

NXT Trombone (ME-84: Assignment 2)
From ME-84: Introduction to Robotics
ME-84: Introduction to RoboticsThe second assignment in ME-84 was to create an NXT-based musical instrument AND use it to perform a "recognisable" tune. I had been intending to modify a diagnostic program I'd created, based on a RoboCup Junior IR Soccer Ball and the HiTechnic's IR Seeker, but my eldest son challenged me to make a trombone, so that's what I did.

It took one afternoon to build the first version of my trombone. The idea is that the notes depend on the position of the slider, and are produced when you blow into the sound sensor mouth piece. I had originally wanted to make it look more like a real trombone, but thought it more important to see what could be done with a single Edu kit. The ultrasound sensor can be a little flakey, so I knew the slider would have to be long enough to spread out the eight or so positions required. In the end, I was reasonably happy with the performance of the ultrasound sensor (it performed better than I did!). I also wanted to use a formula to generate the correct note based on the ultrasound sensor reading, but I didn't know how to do a x^y calculation on the NXT at the time. In the end I found the hidden vi that maps notes to frequencies, and used that inside a case statement. At home, I asked my boys (who play piano), if they knew any songs that I would be able to play on the trumpet, and they taught me "Ode to Joy". I also learned how to dynamically control the length of the notes being played, using anotherPlay Note (no wait) and a Stop Note block.

Automated Swing (EN-10: Assignment 2)
From EN-10: Simple Robotics
I spent way too much time on this challenge. The assignment was to create a piece of playground equipment that included sensors and motors. I took this task as an opportunity to follow up on the swinging robot that I'd worked on during a biometics workshop back in August. The idea is to use motors to simulate the motion of a child on a swing, using the motors as legs.

Following some gentle encouragement from my wife, I made the robot look more like a swing seat. I'm pretty happy with how the NXT brick functions as seat, and it helps with the story of this robot as being a model of an "assistive device".

By estimating the period of the swing based on the length of the swing, and then doing some tweaking on top of that, I was able to come up with a motion that worked fairly well. The swing could start from rest and work up to a decent swing motion. The following video shows the robot in full swing (it had been started from rest)...

Of course, it would be much more impressive if the robot "knew" when to swing the legs based on the position of the swing. As a result I spent most of the following week trying to make use of a HiTechnic Accelerometer sensor to time the swing.

In the end, I gave up because of signal/noise issues. Between the vibrations naturally in the swinging and the extra acceleration caused by the motors, it proved to difficult for me (at this time) to solve the timing problem. I would however like to come back to this one when I know a bit more about filtering...