Gasworks 2015

The Fourth of July. Pretty day. Clear sky. Sitting here with my Ennie at Gasworks park on the hill overlooking Lake Union and the rest of downtown Seattle. 

Fireworks at dusk. 

The catch the bus home. 

Sometimes I have to say that Seattle is pretty spectacular.

I know that other cities have these things too. Somehow this is special in a way I can’t put my finger on. Whatever it is, it makes me happy.


Yet another USB charger design change

I know, I know… at the pace this is going I’ll never get thing thing built. I will… I really will.  :-)

All of this is iterating over the various design constraints and trying to lower the bill of materials (BOM) cost.

So the start of this was with an Arduino controlling the various charging circuits. That brought with it a limited number of analog to digital converter (ADC) channels and likewise a limited number of general purpose IO ports (GPIO). So, given those constraints I needed to have a smart controller for the charge current. I found this with the TI TPS2561A. This also needed some control signals so I specced in an IO expander running over the I2C bus. Also on the I2C bus was a pair of ADCs converting the result of the current sense to something I can work with.

Fast forward to the next stage of the evolution and I have a more capable microcontroller. With more GPIO and ADC resources I can now get rid of the IO expander and the ADC chips saving a bunch on on the BOM cost. I was still sitting with the charge controllers however.

Today while I was working on the bike I had another thought. The reason I had the charge controllers in the first place is that the sampling rate I can get with the ADCs over the I2C bus is pretty limited. Each charge controller needs two IOs — one for the enable and one for the fault detect. But here’s the cool thing: the microcontroller I’m speccing now (a Cypress part) can do some fast ADCs over multiple channels. Now I no longer have the constraint of slow readout of fault conditions that the charge controller was used to get around!

The current iteration: replace the charge controller that costs $3 for 2 channels for a pair of MOSFETs that cost $0.12 each. (granted, I need two, but it’s still 10x cheaper) This also frees up 16 GPIOs that I was going to use for fault reading… So I can have more ports and be cheaper at the same time.  :-)  The advantage of the fast ADC is that I can trap short circuits before it causes damage to the MOSFET. It does make the design a bit more critical to get the firmware correct, but it gets things way cheaper.

In theory I might be able to get rid of the current sense amps, but I’m not sure how much noise margin I have on the ADC — even if I step to the better controller. (And it’ll use twice as many analog inputs — or I can trade off not as precise… alas…)

First draft of the 2015 trip map

Basically, the biggest destination we have is to get up to Liard River Hot Springs again. We go there last time and it was simply amazing. We would like to go back again.

Otherwise, the general route is to head northeast to Banff, take the Icefields Parkway up to Jasper, then follow the Alcan up to Liard River. After that it’s just a trip back south to our home in Seattle.

Google estimates that we’ll be on the road for 62 hours. This is nice… even with some buffer each day we’re less than five hours of transit time per day. Some days will be longer… and we might make some side treks just for fun.

But the intent isn’t to kill ourselves with the driving.

We want to take it easy and get some hiking in and stuff like that.

Relax a bit.  :-)

Chevy Spark

In Cleveland Ennie and I rented a car. We were just going to drive from the airport to various events. We didn’t need much so we didn’t ask for much.

Honestly we were hoping up for something that was actually a but smaller: the Fiat 500 like we got last time. The lady behind the Dollar counter told us to pick from any car in the “economy” row when we walked out. We had a choice amongst three white Chevy Sparks, each from a different state.

Having driven the car for around 200-300 miles I can say that I don’t mind it. Yes, it’s a small car. It’s a nicer car than I was expecting. I can say it drives a lot better than a Smart Car — it’s terrifying on the highway for instance — and it has a lot better pick-up.

For what you’re getting you’re getting a pretty good car. You aren’t, however, getting a spare tire.

The front-right tire had a slow leak from someone in the past which the tire pressure monitoring system alerted us of. I started to look in the trunk for a spare in case I needed one. What I arrived at was an air compressor and a bucket of sealant. It saves weight I suppose. It actually fixed the problem — since it was a really slow leak we just aired it up and forgot about it.

Interestingly, when we filled it up before handing it back to the rental place, we found that it has a smaller gas tank than my bike. !!! It also has the same size engine. !!!! (1.2L!)

For the MSRP of just over $16K (as we drove it), hell, it’s a good car.


My old set of tires on the bike still had a little bit of life left in them, but not enough for the trip in a couple of weeks. Looking closer I could definitely see a lot of degradation and even a bit of cracking as well.

The old set of tires were acquired back in 2010 if memory serves and mounted last summer before last summer’s trip.

For the new set I decided to switch things up a bit. The old tires were the tried and true Tourance tires from Metzeler, a 90/10 road/dirt tire. The new set I went with the Continental TKC-70s which are a 80/20 tire.

The tire swap, from end to end was only around two hours or so with only perhaps an hour of bitching thrown in. (I’m not counting time to eat dinner)

They feel fine, though different from the old shoes. The turn-in is noticeably quicker. It also tends to catch pavement grooves a bit more than the old set.

Not worse. Not better. Just different.

I’m sure I’ll have a stronger opinion of them in a month or so after the trip.

Surface mount – 100 QFP

Up there is the microcontroller that I’ll likely use on the USB charger project.

It’s a CY8C5268AXI-LP047 processor from Cypress. It came in from a Mouser order today along with a mass of capacitors of various values.

I mounted it on a proto board that I got from China.

The thing is that I’m rather proud of the soldering job. It’s neat and tidy. All the pins are within around 0.1mm from where they should be. The solder isn’t too much or too little. (Well, a tiny bit too much on the right on the picture above) All hand-done!  :-D

I used to think that surface-mount was hard. Now, not so much. I kind of enjoy it really.

Grid of the city

Flying out of Seattle on Wednesday night we were flying an uncommon pattern from SEA. Normally takeoffs and landings are going south into the prevailing north wind.

This time we were flying a north pattern. Instead of flying south over Tacoma we flew north over our fair city.

The flight took off right around midnight so it was dark.

I was reminded of the Liz Phair song about her flying into her home town of Chicago. The grid go the city. The backbones of the roads and neighborhoods.

We flew over Elliot Bay and made a great loping right turn as we came even with Lake Union. Seeing the city — seeing our house —put things into perspective. At once it felt big and small.

The city that we drive through and around all the time seems big. Seattle is a big city. It grew by subsuming the then outlying neighborhoods. It grew to be big enough that on I5, even with clear roads, it easily takes 20 minutes to drive from the northernmost to southernmost location.

It took far less than that in the plane.

Looking at the bright lights of Aurora it just seemed to knit the city together somehow. It’s the oldest highway in the city that originally linked California with Canada. It saw the World’s Fair come through. It saw the blight. It saw the rebirth.

The downtown was run down back in the days. It had a fourth birth in the late 80’s (second was after the fire, third was the Fair). Another wave came in the late 90’s. The next is coming now.

Looking down I saw a city that’s alive.

Looking down I saw home.

Another change in the USB charger design…

Will it ever stop? Well, it should once I get a board made I suppose. Even then it’s possible that it’ll it change again.

The latest change is a move from the TI MSP430 microcontroller which is intended for a very low power application (the sleep states are speced in nano-Watts!) to the Cypress CY8C52LP family (or, more broadly the PSoC5LP family).

The advantage of this over the TI part is that it has a more configurable front-end to allow for more flexibility in the design and layout side of things. While it chews up more power (by a little bit) it brings a lot of configurability in terms of how the IO is used since each pin goes not to a single function, but rather to a bus that can be used anywhere on the chip. Another plus is that is has a built in PLD (programmable logic device) that can manage a bunch of the front-end work.

Another benefit is I can build in a USB port. What I’ll do with that isn’t yet know, but it’s something that I can leverage in the future.

The design and redesign rollercoaster continues…


Today was a good day for marriage.

The national news, of course, was all abuzz with the Supreme Court of the United States declaring that marriage equality is what we have here in this country.


It was also the day that my friends got married.

(I was the unofficial official photographer. I like to take pictures and hide behind the lens. Just the way I’m wired I suppose.)

This was a “regular” wedding, but it was made way more special by the fact that everyone in this country now has the privilege to marry whomever they want.

Today. Today was a good day.

(more pictures later… much processing to do…)

Guides, Documentation

When we landed in Cleveland one of the first tasks we set out to accomplish (and yes, we understand this is uber geeky. Deal with it.) was to visit and tend to our geocache.

We had marked the trail with some blaze orange marking tape when we first set the cache. The plastic tape ages over time and gets brittle and starts to degrade. Our first stop after getting into our rented car was Jim’s Open Kitchen. After that was, quite oddly, Home Depot, where a acquired some more marking tape.

We’ve not gone to the cache since we moved. While we had walked the trail dozens of times over the years before we left for Seattle we needed the remaining blazes to help us find our way.

That got me thinking about documentation. As programmers we uniformly dislike writing it. Using wrong documentation might be, arguably, even worse. But having just a few simple guideposts can make the difference between getting lost and success. The bits of documentation — the marker tape — made the difference between easy success and either a delayed or failed attempt.

We didn’t spend a lot of time marking in the past… or today. But the time we spent was as valuable in the future as good documentation is for software. You don’t have to be very anal about it, just enough to save the time of rediscovery of the key features that make your path — literal or figurative — to the solution less time-consuming,

%d bloggers like this: