Tag: university

Back in October I had the opportunity to compete in the 5th annual IEEEXtreme programming competetion, a 24 hour challenge to complete as many programming problems as possible. There were a total of about 16 problems, released roughly once per hour or so. Our team completed around 5 or 6 problems (some were remarked after the completion of the competition due to a bug in the test system, so I am not sure about the final tally). Our team started with 3 members, but unfortunately we were down to 2 about 8 hours in, but we still felt as though we managed to do pretty well. We recently got the results back and were pleased to discover that we came in 240th (out of a total of 1515 teams), putting us in the top 16%! We also came in 14th place in Canada and 3rd place at our home University. I somehow managed to miss this event every other year it has happened but have always wanted to go, so I am glad that I got this final chance to compete.


Two weeks ago I had the opportunity to go to Loudon, NH for the 2011 SAE Formula Hybrid competition. We had a long (38+ hr) drive out to competition and many sleepless nights working on the car, but it was a good experience. We brought 14 guys from our team out and there was always at least one person working on the car 24/7. Most of us electrical engineers wound up with the overnight shift and ended up working on the car from about 1 pm to 6 am, sleeping a few brief hours in the late morning. It was an interesting experience spending quite a few nights in the infield of a Nascar track. One day there were a bunch of locals riding their bikes around the track. A couple guys even brought out their penny-farthings. The first day we were there, they had an open track day and so there was a wide range of cars attempting an obstacle course, from a brand new Lotus to an 80’s station wagon.

As for our car, the short story is we weren’t able to drive it at competition. We poured many hours into it and after a passing preliminary mechanical and electrical tech inspections saw that we had a lot of work to do to pass final inspections. At that point we decided to focus solely on getting the car driving.  After much frantic running around stripping, soldering, and crimping wires, plugging things in and seeing random smoke, and just general exhaustion, we finally got the tires to spin on their own. One of the motors started smoking pretty badly, but we decided that it just burned out a metal shaving that had found its way into the housing (the car had been super hard to push before that and was suddenly very easy to push after, so we must have released a short). At this point we were pretty excited, but noticed that the batteries were pretty low, so we went to get the charger. We had never charged our battery packs in their assembled state before, so we didn’t really know how it would work. As it turned out, it didn’t and so we took that as a good place to toss in the towel and go get some sleep.

Being so close to driving the car motivated us to get it driving in our spare time following competition. Well, that and the fact that they want to reuse much of the car for next year’s competition. Last Saturday we got together to work on it and, while I really didn’t want to work on it, I did want to see it move. We were just about to get the generator working so we could charge the batteries that way when we noticed we had no fuel. While some guys went to locate more (the engine needs fairly special fuel that is hard to find) a couple of us tried to get into the room where they stored extra fuel (everyone had forgotten their keys). Let’s just say that the locks on the doors are overpriced.

Once we got fuel, some maintenance people (one in a full haz-mat suit) came into the shop saying they needed to cut power to the building. Having lost most of our motivation to work on the car, we decided to try just driving the car on the little juice it had until it was run flat. Let me tell you that that thing can move. We shot a couple clips of it and they don’t do the thing justice, even when you were standing next to the camera. I’ve embedded some of the clips here (unfortunately Vimeo limits you to one HD video and 500 MB per week, so I will put up all the SD video and replace it with HD as I have the chance). I look forward to seeing how the team does next year now that they have a solid platform to start off with.

UMSAE 2011 Formula Hybrid Car Test Drive – 20% Torque from Benjamin Bergman on Vimeo.

This was the first time we got the car driving. The torque was set very low to make sure that we didn’t wreck anything immediately.

(I’m not sure how the video got rotated. It was horizontal on my computer. I’ll try again another time.)

UMSAE 2011 Formula Hybrid Car Test Drive – 80% Torque from Benjamin Bergman on Vimeo.

UMSAE 2011 Formula Hybrid Car Test Drive – 100% Torque from Benjamin Bergman on Vimeo.

This is my first test drive. The throttle is basically on or off, so I took my time finding the threshold.

UMSAE 2011 Formula Hybrid Car Test Drive – 100% Torque – 2 from Benjamin Bergman on Vimeo.

UMSAE 2011 Formula Hybrid Car Test Drive – Ben Driving from Benjamin Bergman on Vimeo.

UMSAE 2011 Formula Hybrid Car Test Drive – Mitch Driving from Benjamin Bergman on Vimeo.



Last Sunday, UMIEEE together with UMARS (two University of Manitoba student groups I am a part of) got together to hold an embedded systems workshop on campus. We helped teach a bunch of fellow students the basics of designing and programming embedded systems. We used TI’s MSP430 Launchpad development kit, a super low price dev kit, so that everyone could go home with their project and continue experimenting. While the Launchpad (or rather the MSP430 microcontroller on the board) isn’t as easy to program as something like an Arduino, the Launchpad allowed us to convey some of the more fundamental principles of embedded design like bit masking and timer interrupts.

The morning consisted of getting the tools setup and getting a “hello world” application running. The official tools are Windows only, but the Launchpad does work with Mac and Linux once you figure out how to install everything. It actually seemed to work better, due partly to the fact that the tools are open source and hence not crippled versions of paid software, but also because the environment was less integrated (ie you use a text editor, a compiler, and a debugger all separately instead of a full blown IDE like they use in Windows). The Windows users ofter had to restart the whole IDE when one part of the system locked up for unknown reasons.

After lunch, we dove into making a much more ambitious project: an LED chaser. The design specifications we gave to everyone was something to the effect of “when you press a button, your chain of LEDs will light up one by one until you reach the final one in the string.” The idea was then to replace the final LED with the next person’s button input pin and watch as the lit LED ran across everyone’s boards. The day before, the volunteers leading the workshop got together and pumped out a quick (and admittedly buggy) code for this, so we felt it was an attainable project. We nudged everyone along, showing them how to light individual LEDs, use interrupt pins and timers, and wire up buttons with pull up resistors. I think only a few people actually got the final chaser working, but everyone had a good time.

You can see an abstract for the event along with a bunch more pictures here.


WEC 2011

Last weekend I had the privilege of attending the 2011 Western Engineering Competition (WEC) at the University of Sasketoon. The activities were a blast and the Senior Design competition was great. After presenting our design, we felt that we did really well. The other teams also did great jobs and I’m sure it was very tough for the judges to make their final decisions. Sadly, we did not win, but we had a great time competing and getting to know fellow students from across the country. We took some video of our robot/tractor and I have embedded them below.

WEC 2011 – It’s alive! from Benjamin Bergman on Vimeo.

This was the first time we had our robot running in it’s final configuration at WEC 2011 Senior Design.

WEC 2011 – Hay Bail Challenge from Benjamin Bergman on Vimeo.

In this challenge, we had to remotely control the robot to lift a “hay bail” (a marshmallow, in this case) and place it in a small cup. This was one of the easier challenges for the day.

WEC 2011 – Pasture Crossing Challenge from Benjamin Bergman on Vimeo.

In this challenge, we had to remote control our robot tractor and drive it across the “pasture” (represented here by a steep, ~40˚ slope covered in a plastic tarp and a layer of very soft dirt). We had to avoid hurting any livestock or the environment (ie. the trees). While it looks like we did quite poorly, everyone got about the same distance on this one.

WEC 2011 – Grain Sorting Challenge from Benjamin Bergman on Vimeo.

In this challenge, we had to separate the “wheat” (marbles) from the “chaff” (rice) using our robot. The robots built by most of the other teams used the vex panels themselves (they have lots of holes) to filter out the marbles, but this was slow and required agitation. Our robot used some rails on end that left gaps barely wide enough to catch the marbles and let the rice immediately fall to the ground.

WEC 2011 – Manure Moving Challenge from Benjamin Bergman on Vimeo.

In this challenge, we had to remotely control our robot to move a pile of “manure” (loose dirt) from it’s initial location across a line. Our performance in this challenge was not great as it was hard to maneuver our robot in the tight space, plus our scraping mechanism did not reach as low as we would have liked.

WEC 2011 – Barrel Race Challenge from Benjamin Bergman on Vimeo.

In this challenge we had to autonomously get our robot to navigate a figure 8 around a pair of “barrels” (pop cans) and then complete a lap of an oval track. The oval was no problem, and in our testing we could do it very quickly, but the preceding figure 8 in the soft dirt made it impossible to line up for the lap. None of the competitors were able to complete this challenge. Since it was worth 50% of our demonstration mark, that put a lot of weight on our presentation.

WEC 2011 – Barrel Race Lap Demo from Benjamin Bergman on Vimeo.

After the competition, we wanted to demonstrate our completion of a lap of the barrel race track, just for fun. Some other teams also demoed their lap code, but ours seemed to be the fastest.

WEC 2011 – Attempted Marshmallow Destruction from Benjamin Bergman on Vimeo.

During building, we found that our gripper arm had a lot of torque, so after competition we tried to cut a marshmallow in half. Sadly, the gears kept slipping since we had stressed out all of our mounts during competition, but we had fun anyway.

WEC 2011 – Attempted Pop Can Destruction from Benjamin Bergman on Vimeo.

After competition we tried to crush a pop, but our gears kept slipping as the mounts had been stressed during competition.

WEC 2011 – ROV from Benjamin Bergman on Vimeo.

After playing with our robot for a bit, we decided to attach a phone to the arm. This clip was just to get a “first person” clip, but we later set up an IP webcam server from a phone to remotely control it. It was a bit laggy, but tons of fun.


Those who have been reading my blog for a while will remember that I spent some time overseas working on my final year design project (aka. undergraduate thesis). We finally got our (unofficial) official grade back and we did pretty good. In the interest of sharing the knowledge we gained (as well as showing what we did) I am posting our final report and code here.

Final report

The code was written to be used with the simulator that was supplied by the Budapest University of Technology and Economics. Since this simulator is not our property, it has not been posted. Hopefully the algorithms we used are understandable. If anyone has questions, feel free to contact me.