Hello, World!

When you start programming, or pick up a new programming language, often the first program you write is referred to as a “Hello, World!” program, because for the most part all you want to do is be able to produce a working program, so printing something like “Hello, World!” to the screen often feels like a great start. Once you have that working, you can expand upon it.

So we have a MOD-t 3-D printer that we bought a couple of years ago, and I’ve printed a bunch of things on it, but they were all things that other people designed. I’d always wanted to be able to do my own designs, and had two particular projects in mind. One is a part of a cover for a Starbucks travel mug. I have one that I really like, but the small piece which closes over the mouth hole keeps coming off. It doesn’t really stay in the cover, and is constantly at risk of being lost. So I’ve wanted to create a replacement. But that would seem to require considerable design skill. On the simpler end, I have a portable phone charger that I carry, which doubles as a flashlight. I like it, but periodically the light will come on in my pocket, and I may or may not notice. If I don’t, the battery will die. So I’ve wanted to create an end cap for it, to protect the switch from being pressed accidentally by all the other things in my pockets.

And so I have! I created such a cap using the program OpenSCAD which allows you to design things by describing them with code. For this particular item, it is essentially 3 things: a pretty flat cylinder for the base, a hollow cylinder for the body, and another hollow cylinder that sits just inside the larger one, which is very small to make a tiny ridge inside the body, enabling the cap to “snap” fit on the device at its seam. On the 8th try, I have something I am now happy with:IMG_2764

And I have “published” this design to a site called Thingiverse, which is the biggest repository of shared 3-D designs on the web. We’ll see if anyone else finds it useful.

The Technology Optimist

I suppose I could rightfully be accused of thinking too often that I can solve a problem around my house with the application of just a little more technology. Guilty as charged. But for some problems, technology is the best answer, or the only rational answer.

Nicholas Negroponte is also a “TO.” I love the vision of the One Laptop per Child organization he helped to found, to “empower the world’s poorest children through education” and to provide that education, in part, by providing

each child with a rugged, low-cost, low-power, connected laptop. To this end, we have designed hardware, content and software for collaborative, joyful, and self-empowered learning. With access to this type of tool, children are engaged in their own education, and learn, share, and create together. They become connected to each other, to the world and to a brighter future.

I bought two of these XO laptops, for my two older children, when the devices first came out. The organization had a “Buy One, Get One” campaign at that time. I would have called it a “Buy Two, Get One” campaign, though, because you paid for two devices and only received one. The other one went to a child somewhere the organization was deploying them, generally in conjunction with federal governments. Each “pair” of laptops cost $400 at the time. They were really nifty devices, so well thought out for their purpose like no commercial product could be. They were designed to be serviceable and rugged. The screen was an amazing piece of technology developed just for the XO — it was a color display, but had a monochrome mode that was enabled by turning the backlight all the way down. And in the monochrome mode, the screen was completely readable in the bright sun. This was important to them, because in rural African villages, which were one of their target “markets” that’s where school is held!

The devices were also designed to work together to provide a “mesh” network, so that if there was internet access in a village, the laptops themselves could extend the network outward to homes. They also came up with innovative chargers, and other adjunct bits of support technology. Later on, I bought a third one from a friend who had bought a couple, but wasn’t using one.

In the end, my kids treated the devices more as toys than anything else, at least in part because they had easy access to computers at home that were much more powerful. And I happily donated the three back to the foundation. They continue to work on innovative hardware and software to help spread knowledge and educate children.

So today my Twitter Feed had a link to an IndieGoGo campaign that sounded intriguing and very “TO” — the Lantern. This is a nifty, pocket(ish) sized device that receives all kinds of content over a satellite link, and can provide a wifi hotspot that any wifi enabled device can connect to in order to consume the content. It’s not an “active” connection to the internet, but rather acts like a web server with static content. They plan to provide the content of wikipedia, among many other things, including near real time news and weather info. This can help in areas where other infrastructure has been affected, or where governments restrict access to the internet. And as it’s a broadcast technology, nobody can easily track who’s receiving the data. They compare the drive to get these devices out to people like Andrew Carnegie’s building of public libraries, and it’s not hard to see why.

Whither Weather?

A long, long time ago, we had an amateur weather station (Oregon Scientific WMR-968) at our house. It had a wind vane/anemometer; a rain gauge; an outdoor thermometer/hygrometer; and an indoor thermometer/hygrometer/barometer. It came with a nice LCD display, and all the instruments communicated their data to the display wirelessly. The instruments also had a small solar panel, and a battery compartment, all weather-tight. The solar panels charged a built-in pair of small rechargeable batteries, and the batteries would power the instrument and the radio. There was also room for you to install fancy/expensive Lithium AA batteries which would allow the instruments to work down to -40 F. The console could be connected to a computer as well, and the computer could run software to gather the data from the instruments, log it, and even post it on the internet! We ran our own little weather site, a sub-domain of tastewar.com, but also posted the data to some other sites, notably The Weather Underground. (Not to be confused with the Weather Underground). It was fun knowing that we were helping to provide a “public service” and conceptually having all that weather data on file.

Well, eventually (after a good number of years), the instruments began to fail. I think a big part of it was the built-in rechargeable batteries. I made a half-hearted attempt at building new battery packs from rechargeable cells I bought on eBay, but never really succeeded, and the station fell into disuse until it was only a clock (yet another clock that had to be reset whenever the power went out). And long before that, the PC that had been logging the weather and posting it to the internet had been replaced with a Mac, and I never took the time to find good Mac software to do the same thing. So we’ve been out of the weather picture for a long time. But it’s always been on my mind to get back in the game.

This Christmas, I used my Christmas money to buy an inexpensive weather station from Costco.

It’s an Acurite 5-in-1 with a snazzy display.

It provides the same basic instruments as the old station, but all the outdoor instruments are housed in a single package. This certainly makes installation easier, but the downside is that the location for each instrument is somewhat compromised. Your anemometer/wind vane is supposed to be up as high as possible, away from any obstructions. Temperature readings, on the other hand, are supposed to be taken at four feet above ground, and the instrument should be out of direct sun, yet away from buildings, etc. Similar for the rain gauge, etc. Oh well! I am just excited to have a weather station again!

The console for this station can also be connected to a computer, and of course, you can run software on the computer to log the data, post to the internet, etc. This time, though, it’s not connected to a big, traditional PC, but rather to a Raspberry Pi,

so it’s very unobtrusive. We are using Meteohub software which is the only Linux package I could find that supports this station. You can view our weather data at The Weather Underground. Someday, we may re-create our own weather site as well.

Going out of Business!

As a kid in high school, I loved reading through the catalogs that came in the mail. Biking catalogs were a favorite. Bike Nashbar and Performance Bicycle I remember. Campmor was another with all kinds of cool outdoorsy gear. But one of the most interesting that came in our mailbox was the Hidalgo Sunglasses catalog. It was printed on cheap newsprint, in black and white, but came loaded with interesting information about sunglasses, and prescription glasses as well. It had actual size pictures of the frames, so you could cut them out and try them on for size. Of course, back then I couldn’t afford anything in the catalog, but I learned a lot by reading it.

Since the dawn of the web, I’ve kept looking for Hidalgo on the web, but they were very late to the game. They did finally arrive, however, in more of a “Web 1.0” style than the “2.0” that was gaining traction. It still looks rather dated, but is full of good information and you can still actually download the entire old fashioned catalog as a PDF. According to the Wayback Machine, they first had a web site around 2001, but it was just a handful of static pages until 2010, when you could finally order from it!

I just visited again today, mostly to find the right URL to pass along to a friend, and discovered that Hidalgo is going out of business. Now I have to decide whether to buy a pair of sunglasses from them before they go out of business…

Trip Tech

I used to have a Linksys Travel Router that I’d bring with me on trips. It was one I’d bought on eBay and had loaded special 3rd party firmware (dd-wrt) onto it. But it became unreliable. So naturally, I bought another one. But this time I decided not to complicate my life by changing the firmware on it.

Well, this is now the first trip where I’m wanting to use it, and I was immediately reminded why I’d bothered with the alternative firmware in the first place: the original Linksys firmware had a nifty feature that let the router connect to one wifi network, but then offer a different one for its clients. That means that you don’t have to start connecting to new wifi nets on all your devices. Only the router needs to connect to the new one, and everything else connects to it. Problem is, the Linksys firmware only let you connect to open networks. So at some point I’ll have to invest the hours and anxiety to see if I can put better firmware on it.

Our apartment was not advertised as having internet access, so I was anticipating having to find the occasional coffee shop (*not* hard to find here!) to stop in at and catch up on email, etc. Thankfully, it was just an oversight in the listing, because our phones, set to Airplane mode, are basically glorified iPods here in Canada, unless we want to pay roaming charges. Going without makes you realize how much we take for granted, and also how possible it is to do without.

Doing our share

This past week was a pretty big one at the Stewart household. Two “environmental” projects came to fruition this past week. First, and most important, is that our photovoltaic array went live, and we are now generating some of our own electricity. We have 28 250 Watt panels distributed among our main roof, dormers, and the garage roof, for a maximum hypothetical power rating of 7 KW. However, the DC-AC conversion isn’t 100% efficient, and by design the sun doesn’t shine on them all equally, so we won’t expect to see that number ever come up. But it is fun to see numbers, and to that end, here is a web site that is publicly accessible that shows some statistics about our power production: http://www.solrenview.com/SolrenView/mainFr.php?siteId=1910. Today we produced 35.1 kWh, and had a peak power output of 5.7 kW. Payback of our initial investment in the system is expected to take 5-6 years.

On another front, we also purchased a new vehicle today. Well, more accurately, a used vehicle. Partly because we understand that the best value to be had in cars is in ones that are 1-2 years old, but also because a friend reminded us that buying a new car implies the assumption of the environmental cost of producing a new car. I was enamored of hybrids for a time, but the same friend educated us about the environmental cost of sourcing all the rare earth materials for the batteries. So the conclusion we came to was to find an efficient gasoline powered car. But we couldn’t find one. Perhaps my standards are “too high” but I remember cars from back in the 80’s that would achieve 50 mpg. Many friends have heard me wonder aloud whether this technology was somehow lost.

It seems that there are a couple of big factors at play here. First, people expect their cars to be more powerful that those “econo-boxes” of the time. We expect to be able to get up to highway speed from a standstill in a matter of seconds. Another factor is that people have come to demand/expect many more accoutrements in their vehicles, like power windows, power locks, GPS Navigation, big, honkin’ sound systems with 12 speakers, power seats, etc. Do they still make cars without air conditioning?

I also remember reading an article a while back in an online car magazine (TopGear) about a project where a team was challenged to put together a car for less than $7000 that would get 70 mpg and be able to get from 0-60 in 7 seconds. I think I’m remembering all that correctly, it was a long time ago, and the article was taken offline quite a while ago, unfortunately. All that remains are posts that link to it, and archive.org failed to have a copy, unfortunately. Here’s one post that at least references the series, called “Project Sipster.” They took an old diesel VW Rabbit that they got for next to nothing, and put a lot of work into it, including a new engine, and new suspension. I don’t think the $7000 included the weeks of labor. Watch the video, though, and tell me you wouldn’t want to own this car:

In spite of my 13 year old truck running OK, and having no major problems, we didn’t think it would necessarily last through the next 10 years which will include paying for three college educations. And so, inspired somewhat by the above, we bought a 2011 VW Jetta Sportswagen TDI with only 18,000 miles on it. It’s fun to drive, and gets an EPA estimated 30/42, but you hear plenty of reports of people getting better. Really depends on how you drive it. Unfortunately, it is peppy, fun to drive, and encourages acceleration. Hopefully it will last through the kids’ college years. Isn’t it cute?

20130317-213218.jpg

Catch-22

Bought a new printer today, to replace the Canon Pixma MP-500 that has been our main family printer for a few years. It started being all squeaky last week, and then it started completely missing horizontal bands. Tried all the head cleaning options, and finally tried removing the cartridges and the printhead and cleaning it by hand. A lot of ink went down the drain, but to no avail.

For a replacement, I wanted a multi-function printer (to be able to send the occasional fax and make copies and scan things), and also one which supports Apple’s AirPrint so our many iDevices can print. After a couple of hours browsing Amazon, and reading magazine articles, and other sources of online reviews, and then seeing what was available locally, I decided upon an HP PhotoSmart 7520, which I could pick up at Staples for $149, plus we had a $10 off coupon, so even with the tax it came in around $149.

Brought it home, and after the unpacking ordeal I connected it via USB to our AirPort (actually, TimeCapsule with built-in AirPort). On both Macs, the new printer came up right away when going into the System Preferences, Printers area. They both had to download and install software, but all that went smoothly, with no reboot or anything. Printing worked fine, and I was able to print a couple of sheets of business cards for Clara with no problems, on card stock, too!

Later on, I wanted to get the AirPrint going, so I went through the on-screen menus to setup the Wireless. I can’t tell you how many devices I’ve connected to our home network over the years, both wired and wireless. Many vintages of Mac, PC, Linux computers; many iDevices, many other small devices, too. I have 3 WiFi routers (2 configured as AP only) that all expose the same SSID, and this has worked fine for years. But not for this printer — it would not connect. One of the AP’s (the AirPort!) is right next to it, even. I begin to lookup whether there are firmware updates. Sure enough, some digging turns up how to update your printer’s firmware. And guess what? (Hint: this is where the title comes into play), the way you update firmware is via WiFi.

Huh?? I’d like to know what brilliant person came up with *that* scheme. The printer even has a memory card reader socket on the front. Why not allow firmware updates that way?

In any case here are some of the things I tried to work around the problem:

  • connect to our “open” wifi AP, in case the problem was with passphrase recognition
  • connect to a neighbor’s AP, in case the problem was connecting to our specific router.
  • use a portable router I keep in my laptop bag. It wouldn’t stay powered on, though.
  • setup ICS on my laptop, but kept getting an Access Denied error.

Finally, I turned WiFi on, on the old Fios router that’s there for our cable boxes to connect back home. Even that took some trial and error, but did get it working, and the printer did connect, and download firmware. After that, it connected to our network OK, but when I then moved the printer back downstairs, it no longer would. I finally changed the SSID on the Apple Airport (Time Capsule), and then it could connect to the original network. Maybe it doesn’t like Airports, or maybe the signal was too strong, but all of this just goes to show that WiFi can still be tricky, and building a product that can only get updates via WiFi is ill-advised. It works now, and AirPrint works, but it was quite an ordeal.

Logging back into my router, I realized how old the distro I’m running is — it’s a version of DD-WRT from May of 2008. I had another problem with it recently, where after a power outage, it wouldn’t connect back to the internet right away. Only after a couple of hours,  (and presumably, the expiry of the DHCP lease), was it able to. Might be time to update this thing, and I’m thinking of using OpenWRT instead this time, as DD-WRT doesn’t seeem to have been updated much (at least as far as official releases go) in the intervening 4 years. Any non-spambot comments?

Unfortunately, this CharlieCard isn’t valid for usage with in the system

The MBTA has for years now had available a “stored value” type of card for subway, buses, commuter rail, etc. All very neat. You can go to a vending machine at subway stations and refill the card with cash or use a debit or credit card. It’s even possible to refill them on the bus, but I always get flustered trying to do it, and the drivers are often impatient about it. More recently, they’ve added a web-based system for refilling your card, which sounds pretty handy. But I’ve tried many times to enroll my ancient CharlieCard, only to get an error back. I assume it was because it was too old, and pre-dated when the started allowing access via the web.

Yesterday, I was on the bus and ran out of money on the card, so I went to refill it. I was asking the bus driver “What do I do next?” but he wasn’t really answering me. I failed to follow the correct sequence, and ended up with a paper ticket with $5 on it, minus the cost of the bus fare. Argh! When we got to Harvard, I picked up a *new* CharlieCard, so I’d be able to enroll it in their system. When we got home, I did try to enroll the card only to get the same error message back. Sheesh!

I emailed the support email address listed on the site, holding out little hope that I’d actually receive an intelligent answer. But less than 10 minutes later, I did get a response: “Unfortunately you would have to grab another card at the station. This error is due to a glitch in the MBTA’s system, and there’s no way to tell in advance which cards are compatible with the online system and which ones are not. I apologize for the inconvenience. Thank You”

So, kudos to the MTBA (or their partner) for providing an “answer” so quickly! Generally, at best I’d expect a response about a day later, telling me that the company had received my inquiry, and telling me how important I am to them, etc., etc. And then I may or may not hear back in a reasonable timeframe. However, the MBTA (and/or their partner) get a failing grade for the content of the response.

Guess I will be picking up a stack of cards next time…

Winter Hobbies

During the good weather, I enjoy riding my bike a bit with my free time, but in the winter I am often de-motivated. That makes it a good time to focus on one of my other hobbies: electronics. I had a pretty fruitful weekend (so far!) on the electronics front. For Christmas, I had bought Tyler a “Game of Life” kit. This isn’t the board game you are likely thinking of, but rather a one (or zero, depending on how you look at it!) player computer simulation of a colony of organisms. A grid of cells is represented by LEDs, and their death or birth is dependent on the level of crowding in their neighborhood. Tyler did a great job soldering the kit together, I think we counted over 100 connections had to be soldered! Certainly, the most challenging project he’s put together thus far.

Trouble is, although you can connect multiple boards together (very clever!), they do cost $$ and a single board ends up with very fleeting generations. I thought to myself, “Well, since this is a board with a software programmed micro-controller, I ought to be able to change the delay between generations!

That idea ended up causing me a lot of work (and/or expense…). First, I had to build the AVR programmer kit that I’d bought previously, figure out how to install a driver for it (on my Win64 system), install all the AVR dev tools, solder a programming header on the board, figure out just enough to be dangerous, mod the code, and upload the new firmware.

Happily, this all worked pretty well! Except for the final step. It should be obvious, but I can’t figure out where the delay between generations comes from, ultimately. But, in preparation, I did all the rest of the above, along with re-building the current firmware, and just reloading that.

I’ve posted a question or two in the Adafruit forums on where the delay might be coming from, so hopefully someone will help me out there.