FIRST LEGO League

I have been involved with FIRST LEGO league for over ten years. Lately it has been as a judge at the local and state level. Last weekend and this weekend were the local tournaments that qualify teams to move to the state tournament. It was a long day of interacting with teams. As a technical judge, I grill the teams on programming, mechanical, and strategy for the robot they built to solve the year’s missions.

It was great fun to see the teams this year. Unfortunately I am pretty sure that my fear regarding programming has become real. A few years ago, LEGO stopped providing a software language that allowed a team to get deeply involved in programming. The NXT-G language they came out with hid many details and dumbed  down the interface. A simple icon now does what 20 used to do. As a result, the kids have little incentive to learn advanced skills. The programs I saw today were pathetic compared to what was being produced by teams 5 years ago. It was a sad day.

Posted in FIRST LEGO League, Personal | 2 Comments

Experiments with BlueTooth

For a work project, I have been experimenting with BlueTooth wireless transceivers. I purchased a few of the BlueSmirf devices from Sparkfun. Following some instructions on the web, we got the units programmed and communicating to each other as well as to a cell phone and a PC dongle. Very nice. They act like serial cable extension cords without the wire.

We ran a stress test and broadcast data as fast as we could and read it on the other end for accuracy. Not a single failure. I will be looking forward to using these in the future for home projects.

We did come across two issues. If the rise time of the power supply is too slow, the unit will hang. Without an external reset line, the unit becomes unresponsive. You need to consider either a fast rise time on power, tacking on a reset line to the RF module, or a FET to turn power on and off quickly.

The second issue was that although the RF module would establish a link with a micro sending it data, that data would not make it to the remote. Establishing the connection without the unit being hammered by data seems to work just fine. Small glitch that I can live with.

Posted in Personal | Comments Off on Experiments with BlueTooth

Furnace monitor bugs

After the power outage and all the work involved with getting the household back up and running (I have never done that much laundry at one time) I had some time to work on the furnace monitor. I finished the final wiring and got the major bugs out of the Arduino as well as the Linux SW. But two issues had been lurking.

The first was the rather random breaking up of lines. This turned out to have an interesting root cause. The Serial print and println routines have a limitation that has significant ramifications for RS-485 communications. According to the reference page, the last byte is not transmitted till sometime after the call returns. If the very next thing you do after calling the print routine is to turn off the transmitter, than you are nuking your own transmission. Now I see using println that it is not just one character, but rather both the CR and the LF that get obliterated. I added a short delay and now my Linux receiver does not have hiccups.

The second problem has been the occasional IO error on the Linux side when the device driver dies because of “possible EMI” issues. With everything opto isolated (other than the wall wart that powers the Arduino) I am at a loss. But I am now wondering if a mall formed byte (broken due to transmitter going inactive too early) might look like EMI. Time will tell.

Posted in Furnace Monitor, Projects | Comments Off on Furnace monitor bugs

The storm is over

Almost exactly one week after the New England freak October snow storm hit, my power is back on and I have internet. As you might image very little got done during 7 days of living off the grid.

Posted in Personal | Comments Off on The storm is over

Working from home

At work I have been helping on a failure review board. Once every 10,000 boot cycles, sometimes the system gets stuck displaying the splash screen. They asked me to figure out a way to automate the booting and then to halt should the splash screen get stuck on. Python and Sparkfun parts to the rescue! Continue reading

Posted in Python, Software | 2 Comments

“Playing Hookie”

Since I worked all day Saturday and finished my project at work, I decided to stay home today (Monday). Although I am using the time from Saturday to account for 40 hours this week, it still feels vaguely naughty staying home when I know my colleges are busy at work. What did I do on my day off? Continue reading

Posted in Furnace Monitor, Personal | Comments Off on “Playing Hookie”

Weight off my shoulders

For 4 years I have been working on a project at work. Yesterday (Saturday) at 6:30PM I finished the last qualification testing of the unit. The customer has approved the device for immediate deployment. In the next few weeks everything will wind down and I will find myself working sane hours.

I hope to get back to home projects that have been put on hold. Number one is to finish the renovations (painting, maintenance, …) of my home. Number two are all the projects stacked up like cord wood in the shop.

But today I feel as free as a bird and will pat my self on the back with a trip to the LEGO store.

Posted in Personal | Comments Off on Weight off my shoulders

Moving Furnace Monitor over to RS-485

Last night I got the three primary zone circuits instrumented and connected to the Arduino. I also have the two thermistors working but I have yet to run the outdoor sensor through the house wall. All this has been done with USB communication to the Arduino siting on the floor of the furnace room.

It was therefore time to run a serial cable to my Linux file server one floor up from the furnace room. My recent experience with RS-232 over long runs pushed me to an RS-485 solution. Continue reading

Posted in Furnace Monitor, Projects | Comments Off on Moving Furnace Monitor over to RS-485

Furnace Monitor

I have been up against a bug in my furnace monitor Arduini code for two days. The first night I looked for it I had had a rough day at work. My mind was spent. Last night (although it did take a while) I found the bug. It was a classic mix up between a == comparison and an = assignment operator. The statement I had wanted was

if (val == 0xffff) {

What I ended up with was always setting val to 0xffff and always taking the branch. How I wish that C would not have allowed assignments inside conditional clauses. Some people would hate having to write code that was “wordy”, but it would have saved the world much frustration.

I need to find a good Lint program…

Posted in Furnace Monitor, Projects | 3 Comments

Backup SW bug V2

Last night I spent some time with this bug. The problem is it takes several hours to reproduce and hence I get just one iteration a day. But what I found is that the reason the MD5 checksums do not match is that the SW was unable to find a file on the ISO file system because it was no longer mounted!

During disc creation I create the ISO image using mkisofs. After the files are added, I mount the file system as a loop and double check the integrity of the file system by performing an MD5 checksum test against the original file. At the point the break point hit when a file did not match, I found that the file system was no longer mounted! Poof it was gone. The ISO image was still in the temp directory, but it was not mounted.

What could cause that? Too big a file? Some Linux error (need to check /var/log/messages). Some permission issue (but this runs as root!)? And why to the previous 70,000 files work and it only barfs at this point? Does it always barf on the same file or perhaps after the same amount of time? What processes would un-mount a loop file system?

“This is not fair!”

Posted in Projects, Robotic DVD burner | Comments Off on Backup SW bug V2