Thursday, August 18, 2011

1 Second to Shine

I listen to several hundred new songs each month, typically keeping only 40 or so for a second listen.  I've gotten to the point where I can listen to less than a second of a song and know if I don't like it.  Questionably-good music might get a few seconds of air time, while decent music that doesn't lose my attention in 5 seconds gets binned for a subsequent listen once all the trash is gone (otherwise, you lose your reference and any song with a good beat sounds amazing).  One MAJOR exception is classical music, which takes an exceptionally long duration to draw any conclusions.

When a particularly large set of songs are added, I'll whip out my custom-scripted USB PS2 controller to speed up the process.  When the smoke clears, I might keep 20 or so songs from the original several hundred.

I've kept 192 songs thus far in 2011, 210 from 2010, 203 from 2009, 386 from 2008 (I was in college, plus a great year for music), 115 from 2007, and 252 from 2006.  Due to a rather unfortunate data loss (and subsequent backup recovery failure), I do not have year-by-year breakdowns from 2001 - when iTunes 1.0 released - through 2005, but said time period accounts for the remaining 695 songs.  

During the past decade, I've listened to well over 900GB of music (~180,000 songs); 400GB from an internship working on portable MP3 players with full access to u$oft's now-defunct "Plays-for-sure" server, 150GB from 'theoctagon', 50GB here, 30GB there, etc.  It's a daunting task, but I can easily knock out 1000 songs in a couple hours, keeping between 15 and 45, depending on how good the library owner's tastes are.  

At this point I have a script that automatically prevents importing any song I've previously deleted; it's hacky and not ready for prime time, but it works as described and saves a ton of time since most people listen to similar veins of music.

Man we've come a long way!  I remember encoding a single song with an early, terrible codec such that it fit on 4 floppies (before 'MP3' *gasp*).  As you might have guessed, you had to change the floppy three times during the song.  My computer at the time only had 8 bit output and a frequency response of 40-12KHz, but man it was awesome!  I remember when Mac OS 8 came out and had - wait for it - a 100MB 320x240 music video of the Barenaked Ladies' "The Old Apartment"... I remember watching it in 256 colors, then upgrading the VRAM from 512KB to 1MB - enabling 32,768 colors - HOLY SHIT!  For reference, YouTube was over a decade out.

Back to 2011:
I'm highly selective of what tunes get to stay in my library.  At least once a year I review every single song.  I finished the 2011 review last night.  In all, I deleted over 1100 songs, leaving a select 2055 gems to peruse.  Logically, songs from 2006 have withstood 5 reviews and thus have either awesome staying power or strong sentimental value, whereas a song added in 2011 is less likely to make the pending 2012 cut.

Plenty of people have libraries spilling with thousands upon thousands of songs, but most of that music is shit, or uncategorized, or duplicate, etc.  I just press play and rock out to any of the 6.6 days of quality music!  Aside: A great hidden feature in iTunes is the "skip count" index, which indicates the number of times a song has been skipped... gold for finding music you don't actually like.

After finishing the review, I decided to start upgrading my library to lossless quality music.  MP3 audio files are highly compressed and take advantage of numerous psychoacoustic deficiencies in human hearing.  In short, the music you hear from MP3s in no way resembles the native audio signal, but casual ears are easily fooled.  On cheap sound systems, it's often hard to tell the difference, but when you're constantly surrounded by high end audio equipment - Etymotic ER-4Ps, AKG 701s, Sennheiser 650s, Headroom Amps, Carver AL-IIIs,  Carver tube amplifiers driving Magnepan 3.6 planars, etc - you begin to notice the difference.  


Unlike MP3, Lossless audio exactly reproduces the original audio stream with 100% bit accuracy, typically at less than half of the native file size.  I prefer the Apple Lossless codec, but since most audio out there is available in FLAC, I usually end up converting using X Lossless.  

Long story short, I wasn't feeling great today, so I stayed home and sourced a ton of Lossless audio.  At the moment, 729 lossless songs consume 21.21GB of space (30MB/song on average), while 1326 lossy songs consume only 9GB (7MB/song on average).  I'm not upgrading every song; just the audiophile stuff.

If I converted my entire library to a lossy codec, I could keep a mirror on my phone, but sacrificing quality isn't worth it to me.  Granted, on the iPhone, quality isn't a huge issue, but since Apple doesn't provide a convenient method of converting songs to lossy formats when syncing to the iPhone, I'll live with that sacrifice to keep the quality high when playing back from my computer through a USB Headroom Amp.  I could keep two copies of each song, but that wouldn't be ideal.

Friday, August 12, 2011

Battery Tech Update

18 months go by and my how the battery tech has improved!  The price has come way down, the energy density has increased, and the capacity per cell has increased.  Everything's coming up Milhouse!

A123 now sells a 20Ah LiFePO4 cell, which means I could use just 16 individual cells - instead of the 192 I use now - to achieve 80% of the nominal capacity of my pack on day one... as I've discussed previously, the pack no longer hits nominal due to some in-flight learning adjustments to the charge cycle over the last year.

The amazing thing is that these new 20Ah packs are not cylindrical, yet still push high current.  Typically, blister pack cells don't get quite the discharge/charge performance, but A123 has pulled it off.  The flat nature and lack of exoskeleton on each cell result in a huge volume reduction; I can fit 40Ah in 75% of the space that 25Ah fit in now!  That works out to a 105 mile range using my pessimistic experience over the past 18 months (remember, this was my ideal range goal with the pack I have now; I've never hit it).

The price is fair, too.  A single A123 20Ah cell costs ~$51, which works out to $816 to achieve 80% of my original capacity, or $1632 to achieve 160% of my original capacity (still fits in my existing PVC battery compartments).  $816 is a couple hundred dollars less than I paid for the pack I have now, but remember, I only paid 33% of the retail price due to an interested $100 of $150 coupon that I was allowed to use multiple times (I asked).

So am I going to go out and replace all of my cells?  In short, no, but it's good to see technology press on.  Why 'No'?  I originally planned on using the electric bike as a segway into designing an electric car.  After selling my truck and going carless, I realized I didn't even need an electric bike, hence I use it very little.  If at any point this changes, I'll swap the batteries in a heartbeat...

...but first, I've promised I will build a battery management system to completion. I've several times started a BMS design, but I've yet to focus 40 hours straight to follow through.  At this point, I have at least 5 different half-baked plans, but nary a circuit to prove any thoughts.

I'm watching a guy convert his 2000 Honda Insight into an electric vehicle using 50 of the above A123 20Ah packs in place of the stock 8Ah cell... he's able to get 30 miles with this much juice, which is pretty good considering he's still got the engine and is using the stock (and highly confused) motor. 

My room mate has a 2000 Honda Insight, too, and it's brand new battery pack (from Honda) is having numerous reset problems on a weekly basis... maybe I can convince him to drop $2500 on A123 cells and $1000 on various other junk to interface it to his car? :)

Thursday, August 11, 2011

Probably Another Long Stream of Consciousness

Work has stressed me out lately.  To recap, last month I switched over to an analog digitizers front end ..design position (C), but did not give up a few major responsibilities from my TWO prior positions (A and B).  The first two weeks, I focused on learning the hardware I'm destined to design (in new position C) AND finishing a new product that I've conceived along with another coworker (started during A).  We're in that phase right before the bits of information become a real life, physical entity, fraught with the impending "oopses" that go along with any tangible, alpha design. 

To prevent as many green wires - mistakes that require precision soldering skills to fix - as possible, our design undergoes extensive review.  This is very taxing, because a lot of people ask a lot of questions.  As a developer, you must defend your creation's chances of success by meticulously pouring over every last detail.  And people still find problems, and it's a wonderful, iterative process that ultimately ensures a LOT of revA modules ship... but it takes a ton of time.  After two exhausting weeks, we're I'm more or less waiting for HW before taking any more action.

Next up, week three: Last year I brainstormed a trade show presentation with one of our marketing guys about how to not destroy relays when switching nonideal signals.  FF to 2 months ago: I've since moved from group A to group B, but considering the immense knowledge I gained during my time with group A, I agree that I will give a presentation titled "A Day in the Life of a Relay" (Beatles-themed).  Two weeks later, I'm offered a position in group C.  Another week later, marketing guy asks if I'm still up for vaguely defined A-topic trade show presentation.  The logical "you can't possibly do this during normal work hours" side of me wants to say no, but the "I have so much to share and have already verbally committed" side trumps and I hear myself utter "sure".  5 minutes later, my inbox pings me with a "thanks for signing up for vague topic presentation!"

What did I just commit to, you ask?  When it was all said and done, 31 hours of additional work - including a functional hardware demo with digitizers, a power supply and programmable load, a custom-wired DUT box and a visible lack of sleep - to flesh out the marketing prompt "maximizing relay life".  For the entirety of the slide-making process, I kept telling myself "nobody is going to come to this.  You're wasting your time, but you've committed, so you must do well."  Hours and hours of work, potentially presented to nobody.  Three days before the presentation, the end was nowhere in sight.  I was stressed.  I started the HW demo two nights before, finishing at 4AM, then off to sleep in the woods - too tired to bike home - only to awaken a few hours later, 5 minutes before breakfast was over.  I must have looked like a zombie drudging into the cafeteria with a hurriedly-packed tent under my left arm. 

The day before I was to present, I spent 14 straight hours on slides.  The goal of any great presentation is to impart as much knowledge as possible without the use of bullet list, animations, overwhelming statistics or pages and pages of derivations.  I hate how everyone thinks they can slap a few talking points into powerpoint and suddenly have a presentation... My slides are pictures, graphics, important words and scarce equations.  Of course, this takes more time and is not how PP is designed, so I end up doing a ton of the work in Paint and Photoshop (a shank and a surgeons knife by comparison, but for the most part Paint does what I want it to... I've used LabVIEW to kludge in a rudimentary N degree rotate and a threshold algorithm to remove white borders so that images blend in with the background.  The most difficult part is sourcing non-copyrighted images.  Even public domain images can be marked as "not for commercial use"... so I ended up creating, microscoping, snapping numerous illustrations to show the inner workings and faults of the various relay types.

I can tell you this: the night before the presentation (specifically, at 11PM) was the first time I felt the burden of creation-or-doom lift off my shoulders; I was done, and I knew it.  Now all I had to do was present.

FF to 11:30AM: Our keynote just ended and I'm up in a neighboring room, ready to present.  To my surprise, over 50 people show up, which is a ton when you think that each individual potentially represents a single, multi-national company to the likes of  Boeing, Raytheon, Lockheed Martin, etc... I'm thrilled!  I give the presentation and everything works exactly as I want it to.  The demo goes off without a hitch and I think my delivery was 100%. 

What a relief to be done with it!  Over the next few days, I solicit feedback from the coworkers that attended.  I'm surprised how much my fellow engineers say they've learned from my slides: proof that spending over a year on a single topic (and another year with mixed studying) leads to intense knowledge... imagine the intricate nuances others possess with their own time-entrenched widgets!

...

So as of this Monday, I'm now 90% dedicated to position C.  The only problem is group C is in prerelease mode and it's super-hectic.  The past three years have done little to prepare me for the specification derivation I'm tasked to do; there's so much work to be done in so little time with little more direction than "ASAP!", so people are outputting sloppy mistakes that I'm too inexperienced to recognize are invalid.  I had to toss two entire days of work because I didn't know to look at one little piece of data before crunching a ton of numbers.  Yikes!

Position C brings back the fear of my first day of work.  I had just finished college and had a piece of paper that represented vast theoretical knowledge... but now I needed to apply it, and I didn't understand the tools.  My main fear right now is that the combination of poor documentation, scant instruction, and HUGE expectations (I didn't even have to interview) is going to cause an internal meltdown as I flounder in the idea-boxes of others' past creations, trying to understand why we chose X over Y or N.  For each new task, I must first evaluate whether or not I even understand what X, Y and N are, lest I discount a subproperty of even a single parameter and thus totally hose something down the line.

One thing's for certain: I have a new-found respect for each and every specification that comes with all scientific instruments.  Right now I'm running temperature chamber tests on our new product with the hope that all goes well.  If I don't go crazy or totally drop the ball, hopefully one day soon engineers the world over will casually inspect my masterpiece.



 

Saturday, July 30, 2011

4mm

Symptom: Shock.  
Cause: Serration 40% through the last 4mm of left ring finger; another 20% through 20% of the last 2mm.
Background: An 8' beam of formed sheet steel dislodged from one end and pivoted around the other, striking my hand on its path to earth.

It didn't hurt because I couldn't feel my finger at all.  I rushed to a sink to evaluate the damage.  I got dizzy, wanted to vomit and got fatigued.  My ears rang.  Voices made my head hurt.  I sat down in a chair someone brought over, still wanting to vomit.  Tunnelvision, trying to drink water.  Lied down on the floor.  Broke a sweat.   My faint heart rate dropped well below 40.  Covered in sweat.  Someone covered my finger with a bandage.  Still awake, but I couldn't see... anything... completely black.  20 minutes later I didn't have to vomit.  My tunnel vision came back.  Dizzy, still on the floor.  Fortunately, a sports medicine guy was around and walked me through every emotion as they occurred, explaining that I'd be alright soon; perfectly normal.  

We looked at the wound some more.  Went to the minor emergency clinic.  Got some "adhesive stitches".  Doctor told me I'll probably lose feeling and some portion of the end of my finger.  Still can't feel it now, which is good because it doesn't hurt.  

We'll see how this affects climbing.  Dr. specifically mentioned not to climb for a month; that won't happen, but I'll definitely not use it.

Bummer.

All is well.

Friday, July 29, 2011

Old Man Mac Rant

Warning: Mindless Apple fanboy rant.

I started using Macs in 1991, briefly used a Windoze box in 1992, and then picked up a Quadra 605 in 1993 (still have it).  Since 1993, I've continuously owned a Mac without pause.  A couple Windoze machines have come and gone, but never by choice and never for long.  I threw my Dell off a parking garage... trash.

We toughed it out through the terrible misadventure that was the late 90s, jumping onto the clone bandwagon before Stevie J nixed that open platform, replacing the mess with iMac in 1997 (2MB VRAM, 2GB HD, USfuckingB); I boo'd along with the faithful as Bill got up on stage at Steve's keynote and introduced IE for Mac, the default browser... straight into the lion's den.  We were different.  Nothing was compatible with our ecosystem unless we made it.  People left in droves; we stuck it out.

We stood fast as Mac OSX10 (.0.0) beta rearranged our world, tearing the floor out from the rats nest that was OS9 (a PowerBook G4 in the corner of my room lets me relive the wonderful simplicity).  We chewed our nails off suffering through the pains of dual booting between OS9 and OS10 for the apps yet to get rewritten in 10 or failed to get written in 9... and the DVD playback issues (not initially supported until Mac OS 10.1, then through a class action lawsuit when promised features didn't materialize).  I had hope that OSX10 was the wave of the future and created Apple ID 'osx10', which to this day is still my user name.

I remember DJing parties in 2001 with an original iPod - with a rotating, mechanical wheel - people asking "what is that?"  5000 songs... everything, right here in your hand.  Stuck through with the PPC architecture, even though x86 was the way to go, changing computers every 6 months to keep up with the cutting edge.  I dropped my jaw when Steve announced the x86 Mac OS X ninja coders... for the better in the long run, but 'too PC'.

I remember yearning for years and years for a smart phone that didn't totally suck on the Mac... suffered through so many feeble attempts, and then: iPhone, amazing.  I've watched every keynote since 1997 within 24 hours of its release, and more recently, live when possible.  It's a pilgrimage.

Apple creates wonderful products, but over the last few years, I've felt a growing divide between Steve's direction and what I want in a personal computer.  I guess this is similar to the fact that my dad still uses a 30 year old calculator; I never understood why until I adopted my own calculator that I know I'll use until I die; I've got it rigged up with a USB cord so I don't have to replace the batteries.  People get comfortable with what they're used to and I guess I'm comfortable with Apple circa 2008.  Since then, I've grown more and more disenfranchised with each new product, with one notable exception: iP4.

Post-2008 design decisions I disagree with:
-removal of true UNIX file permissions.  Pain in the ass.
-major Expose GUI changes numerous times since 10.4.11 (my favorite version of OSX to date).  I was able to hack the 10.4.11 core into every subsequent release until 10.6.8... guess what, I reverted to 10.6.7.
-10.7 Lion.  I will never use this OS if it stays in its current form.  I held off on 10.5 for a couple years, and 10.6 for a year... but I didn't feel anything as strong as the hatred I have for the 'iOS' operating system.  Don't get me wrong, on the iPhone I love iOS, but it's odd to neuter a sophisticated operating system such that it behaves like a phone.
-glossy screens.  Matte is far superior, easier on the eyes, and doesn't have any glare.  I will use my matte cinema display until it breaks.  And then I'll buy another one and use it until there aren't any left.
-0 button trackpads.  Why?  It might be ok if the click force was uniform across the trackpad, but it's not: too easy at the bottom and too hard at the top.  Not to mention accidental interpretation from all the multitouch gestures Apple has added.  I sincerely appreciate two finger scrolling, but nothing else.  No 3, 4, pinch, right click (that's what control is for).  At the end of the day, I want my mouse to move when I move my fingers... I don't want the OS to guess what I'm trying to do.
-translucent menu bar.  Why?  No reason whatsoever for this.  At least 10.5.2 added the ability to revert.
-Magic mouse.  If I wanted a mouse with a terrible trackpad that misinterprets everything I touched, I'd be in heaven.  The USB Mighty mouse with 2D scroll ball (2005) is optimal; the wireless variant is too heavy.
-getting rid of Expresscard on MacBook Pros... for an SD card.  Is there a part of "Pro" that doesn't include the need to connect to external PCIe devices?  When Apple finally neglects the Mac Pro into obscurity, this will leave few established external low level buses.
-Thunderbolt... It's just PCIe wrapped into Displayport... you already had that before you nixed Expresscard... nothing new here, move along.
-Increased pixel density on desktop displays.  The 27" display has the same resolution as the 30"... only it's impossible to realize this because the pixels are so small you end up resizing the window larger.
-Removal of Firewire 400... come on, y'all introduced this ecosystem and then summarily destroyed it.  FW800 will never get the share 400 had.
-Can't take the battery out.  While there are few reasons to do this, I don't like the ninny 'we'll do everything' approach.
-retreat towards completely unserviceable.  The PB G3 Pismo is the pinnacle of a serviceable machine.
-Real DVI connectors... small saves space, but damn it sucks buying an adapter.
-use of 4 different video out schemes in 5 years; it really sucks buying an adapter for each new Mac.  Apple is particularly horrible at this.

So what do all these gripes work out to: I can't fathom using an Apple laptop made after 2008.  Until recently, I had a wonderful MacBook that met an untimely death... so I picked up a 27" iMac.  The screen had none of the appeal of the 23" Cinema display from 2007.  It was boring to use.  After just a couple months, I decided this week I wanted a laptop again.  I wanted all of the features I griped about above, so after a few days on craigslist, I picked up a mint condition 2008 2.5GHz Core 2 Duo MacBook Pro with 6GB of RAM, an expresscard slot (for PXI chassis), firewire 400, a real mouse button, a real graphics card, a matte screen.  It's sitting on my desk right now, driving my 23" matte cinema display.  Total price for the Laptop and display: $730.  I added an Intel X25-M SSD and am now sipping heaven.  New, expensive iMac with 3 years AppleCare... time to go.

Once an outsider, I'm now part of the 'grumpy old man' class, reveling in yesteryear.  Each new computer revision kills a little more of my different soul.  I don't see the situation getting any better, so I'll hang onto this MacBook until it dies.  I've deemed this 2008 relic worthy of an original, 6 color Apple logo to cover the boring white.

No real content, just bitching.

Wednesday, July 20, 2011

Not Quite Imaginary, but Free

I switched into an analog digitizers position at work.  The day I joined the team (last Monday), all my new peers decided to take 2 weeks off, so I've been analyzing our products and figuring out all the various high speed circuit theories we've implemented into shipping products.  I moved from a high precision, low speed group to a high speed, low precision group, which means all the circuits I'm used to are moot.

So today I browsed Wikipedia researching:
phase locked loops
history of timekeeping accuracy
direct digital synthesis clocks
fractional frequency converters
future time event synchronization across GPS (sweet)
voltage controlled oscillators
phase accumulators
bang bang charge pumps
interpolations filters
positive dual emitter long tail paired circuits
linearization of active opamp circuits
overlimit safety modes

etc. (this is about 1% of the hyperlinks I clicked on today)

I did similar research yesterday, too.  It's like I'm in college, only I'm getting paid and I'm spending 10 solid hours a day learning a very specific subset of high speed analog front end design.  With this knowledge, I've already been able to help people understand problems in our designs, and I'm in the middle of troubleshooting a clock coupling issue and a floating ground problem...  I'm in hog heaven, but nervous because I've been doing a bunch of research and little development for the digitizers group.  I am, however, still working on a project from two positions ago; I spent 4 days on it last week and the beginning of this week to try and wrap it all up.

...

After reading about phase locked loops, I decided it would be neat if we could pull our power from the utility without it registering on the meter.  This is just an exercise... I have no plans on 'stealing' power, but it would be difficult to prove that I'm stealing it because no meter tampering would be required.

So unlike old meters, which literally had an analog, continuous current meter and an analog multiplier for voltage, newer meters are discrete, which means they do not continuously sample the voltage or current.  Voltage and current, of course, are used to determine the real power your house is consuming.  The imaginary power usually isn't billed to the customer, even though the utility still has to generate it.

So these new meters have discrete analog to digital converters that sample the voltage and current every N milliseconds.  If you knew the sample rate of the V ADC on a utility meter, then you could make a load that only pulls power in short increments between samples.  If that load were, say, a 1:1 AC-AC high frequency converter that that only drew power when the meter wasn't discretely calculating the power you're pulling, then you could switch power into a rectifier and then use that output to charge a capacitor.  Then ,using a simple inverter, you could convert the power back to AC.  


Considering a utility meter is able to calculate power factor, the sample rate is at lest 10x the 60Hz frequency, but an AC-AC transformer phase locked to the 60Hz line could easily operate in the 100kHz or higher range using a switched mode power supply.  Ultimately, if the ADCs in the meter are running less than 10kHz, a simple PLL with an offset adjust and a >10x divider would allow you to pull peak power when between discrete ADC samples.  This would mean the utility meter would register less consumed (real) power than you actually pulled through it.  If you could pull enough power in the ~80% window between samples, the perceived power consumption would approach zero.  


So with this in mind, I wanted to see how a typical power meter ADC works... what would hose us from the start would be if the meter used a delta sigma ADC, which 'continuously' streams the input into the ADC somewhere around 15MHz or so, producing a 1 bit high speed output that when averaged digitally returns the true voltage (or current) at the meter.  Fortunately, no, my meter doesn't use a delta sigma ADC... it uses a SAR operating at about 1kHz.  This means I only need to divide the 60Hz frequency entering the phase locked loop by at least 17 to lock to the mains frequency.  Why do I need to lock to the mains frequency?  Because the kWh meter uses a direct digital synthesis converter to generate its clock, which, surprise, is derived from the 60Hz mains frequency.  


So with a 5 bit counter (8, actually, but set to count down continuously from 32 to 0, 32 to 0, ad infinum), we're able to generate a 1920 Hz signal that is in phase with the 60Hz mains frequency.  This gives us about twice the frequency of the ADC, which means we could turn the high frequency AC:AC converter on every other clock cycle (using a flip flop).  Then, by simply watching the kWh meter and placing a huge load on the other end of the AC:AC converter, we'd see one of two things: 1) The actual real power consumed by the low would register on the kWh meter (because we're in phase with the ADC) or 2) No real power would appear on the kWh meter (because our charge circuit is enabled ~180 degrees out of phase from the kWh meter's ADC... whenever the voltage ADC in the kWh meter measures the voltage, it reads the 120V, but unfortunately whenever the current ADC (which is actually measuring a voltage across a known resistance to derive the current using I=V/R) takes a measurement, it reads very close to zero amps.  The AC:AC converter will stay 180 degrees out of phase because both the ADCs in the kWh meter and the digital control of the high speed MOSFETs are phase locked to the same 60 Hz reference frequency.  Even if the 60Hz frequency drifts, the phase locked frequency on both downstream devices will shift accordingly, and stay out of phase.


So that's it, right?  Ship it? 


Well, no.  First, this is highly illegal.  Second, the circuit isn't optimized.  We have an 8 bit counter dividing the voltage controlled oscillator return to the phase locked loop, so why not use all 8 bits (count down from 255 to 0 repeatedly)?  What does this do?  This makes the AC:AC converter operate at 15,360 Hz, which means we can increase the time we're pulling power while the ADC is off.  Before, with the 1920Hz signal, we're only able to achieve 52.08% of our ideal load without the AC:AC converter installed (100% minus the 1000Hz ADC clock rate divided by the 1920 Hz Phase locked loop frequency.  Now, with 15360 Hz, we can get 93.49% of the power we'd get without the DUT.  While this isn't necessary unless you're pulling close to the rated current of your power meter, it's a freebie.  One side effect is that the transformer used in the pure sine wave DC:AC inverter will be audible (because the human hearing range is ~20-20,000 Hz).  So you could either 1)Not care about this or 2) get a 10 bit counter for 5 cents more and count down from 1024 instead (bringing the frequency up to ~61kHz).  A power inverter operating at such a high frequency will have reduced efficiency due to the Eddy currents in the transformer, so if it were me, I'd count down from 256 and just live with the noise...


During my research, I found that my utility meter is programmable.  
http://www.landisgyr.com/za/files/pdf1/MAP120_UserManual.pdf


Using the irDA port on my 1998 PowerBook G3 Pismo (I knew I'd have a use for it) and a fresh install of LabVIEW interfacing over the Palm Sync API (which accepts straight serial data, God this is easy), I was able to verify my assumption that my utility provider does not change the default password, leaving the entire meter open to my perusal.  Obviously, changing anything on the meter is highly illegal, so I just looked... but it's quite simple to change the parameters.  For example, one could manually set the number of consumed kWhs by changing the 64 bit 'kWh total' register.


Conceptually discussing these shortcomings is not illegal, but implementing them is... I do not condone theft, but was more interested in the proof of concept.  


How could a utility company prevent this?  For starters, they could use a local oscillator instead of a phase locked loop to derive the frequency.  Since the ADC clock isn't referenced to the 60Hz mains frequency if the clock is generated by, say, an onboard quartz reference, it would be impossible to phase lock loop to the crystal frequency without opening up the meter.  Even if you knew the exact frequency of the meter, the phase in your circuit would never match the phase of the meter, which means your power consumption would appear to alias (i.e. a constant load would appear to sinusoidally consume power as the crystal and hack circuit drifted into and out of phase with my lock).


Another option would be to use a delta sigma converter, which I mentioned previously.  These converters continuously digitize the input voltage and current due to a fixed low value capacitor on the input and a high frequency oversampled clock running well into the 10s of MHz.  It would be difficult to design a high power transistorized circuit to operate at the bare minimum 2x sample rate.  Efficiency would be crap because FETs generate heat as they transition from on to off (due to the voltage ramping up while the current ramps down when turning on and vice versa when turning off).


Or the utility could generate a pseudorandom direct digital synthesis mechanism that randomly sampled the input.  


But they don't, because they know that a EE isn't going to steal power.  We work hard to route electrons... trillions at a time... from here to there.


This entire post is more of a rambling exploration than anything else.

Saturday, July 16, 2011

I Heart Parts

With freshly minted driver licenses at the ripe age of 16, my uncle handed my brother and I the keys to his 1992 Chevrolet pickup.  Tip-top shape; A+ condition, but after a few years of sweaty football clothes, windows down in the rain, mudding down a river, and a freak incident with ten bags of cereal, tampons and streamers, it shared an uncannily olfactoric relation to a post-apocalyptic locker room filled with moldy towels.

My neighbor at the time had one of those THE Sharper Image THE Ionic Breeze units that made his house smell clean, so we asked if we could borrow it to clean out the stink in the truck.  After plugging it in, we heard the spark of death, followed by an electrical engineer's nightmare: letting the magic smoke out.  Now the truck smelled like the aforementioned grime with a hint of that smell a power tool gets right before you know something bad is about to happen.

**Poof!**

After extensive apologies and a subsequent analytical post-mortem autopsy, we determined that THE Ironic Breeze required a ground plug to keep the high voltage Boost converter reference correct; UL allows lazy manufacturers to leak up to 1mA to ground as part of an onboard reference circuit, which almost certainly saved The Idiotic Brains team the hassle of designing one themselves.  Kids, don't break them ground tabs off your extension cords!

After covertly reapplying the "VOID IF REMOVED" label, we trekked out to THE Snarker Innit and exchanged the still-in-warranty THE Iconic Beat for a new unit.  On our way out the door, we noticed a miniaturized 12V cigarette lighter version, which we snatched up and used until it's untimely death the next time the windows were left down in the rain (a common occurrence; don't let me fool you into thinking we learned our lesson and rolled the windows up).  

Fast forward a couple years and you'll find my brother* and I driving our pickup north on I-25 towards Granby, Colorado, listening to music with the windows down, when all of the sudden THE Stupid Idiot lights up in flames, again releasing the magic smoke.  In a quick motion, I launched the flaming hunk of inferior engineering out the window and then we looked at each other and double-shrugged.  

*note: not 'bro', but my 'brother' (i.e. 'real life doppelganger')... fucking alpha male idiots

Within a week, the stench of truckenstein had returned, so we found ourselves on eBay browsing for a better unit.  A few days later, two AUTO Air units sat at our doorstep, waiting their turn for the gauntlet that was our venerable cigarette lighter.  And they kept working.  And working.  And working.  Rain, sleet and snow didn't phase them.   

And then we went to college and the beastly black truck sat mostly unused.  The smell faded, and when I sold it you would never guess it's former condition.  THE pseudo-Ionic Breeze units fell into disuse and eventually ended up in a drawer somewhere, waiting for that day when they could once again roam the roads spewing out ozonic fumes.  

When my dad's place flooded a few months back, they were two of the few things I kept from all the other crap I recycled, threw out, or gave away.  Today I found them again and decided to see if they still worked.  Rather than plug them into a car's cigarette lighter (I have no car), I kludged them up to a 2.35W solar panel and they instantly sprang to life, humming away in unison.


They sounded louder than I remembered, so I hooked them up to a volt meter and measured 18 Volts, which meant they weren't pulling enough current to keep the panel voltage around the 14V they would see in a running vehicle.

Since I didn't care about using the additional power, I rigged up four 1N4729A reverse-biased 3.3V zener diodes in series across the panel output. 


 In this configuration, no current will flow through the diodes until the voltage reaches 13.2 V (3.3 V * 4 diodes in series).  Unlike a normal diode, which will not allow current to flow through it in the reverse-biased direction until it catastrophically breaks down at a very large voltage, zener diodes will resist current flow until a predefined voltage, at which point they will allow current to flow in a controlled manner until the voltage lowers down to said voltage, at which point their resistance increases such that no current flows.  What this means is that the Zener diode will consume all of the power the panel can generate above 13.2 V.  Note that Voltage is not equivalent to power (i.e. Watts), but I'm foregoing an explanation for the current response curve of a solar panel at different Voltages... 

I felt it was a shame to leave these guys sitting in a box, so I reached back in my brain for a use and remembered these guys generate ozone as they purify the air.  Excited, I rigged the solar panel up to the roof and swung the ionizers down below the roofline to keep them dry.  "Why not generate some ozone and help mother nature out?" I thought.  You're welcome, Mother Earth.  After marveling in my shoddy work, I wondered just how much I was helping regenerate the ozone hole (I was ballparking 0.000000000000000000000001%), so I did some internet sleuthing and uncovered my new contraption's demise:

While ozone up in the atmosphere is good at preventing UV light from burning our buns, low-level ozone is designated as a level 4 OSHA health hazard, causing immediate, long term harm.  After a few more minutes of reading, I got the ladder back out and took down my attempt to green this wonderful planet.


Moral of the story: Knowledge is power.  People are stupid.  Power and stupidity = research.

Friday, July 15, 2011

Order Optimization

Order notation is a field of computer science/statistics with a goal to optimize algorithms such that they execute in as few cycles as possible O(x).  Without going into too much detail, the number of iterations it takes for an algorithm to finish with the correct output varies based on the algorithm itself, the best case input, the worst case input, and the statistical long term average case input.

College computer science classes focus on optimizing code such that the worst case number of cycles is as small as possible so that the code executes faster.  With this in mind, I spent the better part of three days this week writing the driver for a product I'm designing to have O(N) instead of O(N^2).  In theory, my code would run faster because I'd run my algorithm fewer times (up to 24 instead of up to 16,777,216).  So I plugged and I chugged and I theorized an awesome boolean search algorithm to successively approximate the answer, which worked on paper, so I wrote the code and thought it worked, and then I kept finding weird little pockets of input values that didn't output the correct array.  I slowly chugged and troubleshot these corner cases, and then I only had 216 cases left (out of up to 16,777,216) and suddenly I realized I had added so much complexity that my O(N) algorithm approached (but did not meet) the juvenile O(N^2) brute force method AND it took forever to execute due to the recursive branching nature of the algorithm followed by a parametric lookup table to verify the selection...

... so today, after 24 man hours on the algorithm, I got on my bike and rode home.  With only 3 hours of sleep the night before, in my delusional state I conjured up an O(N^2) algorithm so simple that it's per iteration execution time had to be miniscule.  I pumped my tired legs home and launched LabVIEW.  Twenty minutes later I had the brute force algorithm cranking away.  The function takes 0.017 seconds to initialize and then takes 0.0000008 seconds each time it is called after the first time.

Compare this to the juggernaut code I narrow-mindedly created, which takes 0.0001 seconds to initialize, but then takes 0.0001 seconds each time it is called after the first time.

Moral of the story: Don't let education box you into an answer.  I focused on my teaching and designed a terribly complicated algorithm that executed as few times as possible, but which took forever.  The better solution was to design a terribly simple algorithm that runs numerous times, but executes as fast as possible.  Obviously, there's a tradeoff between the number of elements you're looking at, but in my case the simple algorithm's inputs never exceed 2^24 elements, and thus never takes longer than the complex algorithm to execute.

Also, note that in 20 minutes I replaced three days of work.  It's important to be able to recognize when the path you're on is not the one you want to get to the end of.  The new algorithm is so simple it needs almost no verification compared to the previous one.  So now I can focus on everything else that's stressing me out trying to get this product shipping.

Saturday, June 4, 2011

API for Random.org

LabVIEW's built in random number generator is pseudorandom, but uses the same seed, and thus the first value returned is always the same and the pattern is quite predictable.  This hosed me for a project I was working on, so I wrote an API to fetch truly random numbers in LabVIEW from RANDOM.ORG.  I've posted it here if you need it (you most certainly don't):
https://decibel.ni.com/content/docs/DOC-16419

Thursday, May 26, 2011

Making the Bed

Just put sheets on the bed for the first time in over a month... I almost never sleep in it, preferring a hammock in the backyard; the rug, couch, or chair in the living room; a tent or the open air around Austin; a throw rug or thermarest on the back porch; under my desk at work.

The bed's not even two years old.  It's physically comfortable, but mentally immobile.  It's a tradeoff: I feel more rested during the day after I've slept in the bed, but during the night I'm more restless.  I've considered selling it, but meeting someone without a bed is a bit odd.  I've added it to a list of worst purchases:

1. Bed
2.

I gave my old bed away on craigslist.  The family that picked it up needed it.  I'd had it since I was 12.
My roommate's grandpa has a chair that folds out into a twin sized bed.  It's got a cheap foam pad on top.  It's the most comfortable matter I've ever slept on.  You can't feel the bar.  It's in Florida.
My brother made a bed out of plywood and a thin layer of foam.  Maybe I could do the same with just the foam.

Thursday, May 19, 2011

A Happy Life

For the past few years, I've kept a file on my desktop titled "A Happy Life" which contains things I've conceived or found online that reorient me as I drift.  On occasion, I read it in it's entirety:


Contentedness is a matter of being satisfied with what you have.

Be content with less.  Simplicity means examining why you want more; at the root of wanting more is not being content with what you have. Once you’ve learned to be content, you don’t need more.  Stop acquiring and start enjoying.

If You Don’t Need It, It’s Not A Great Deal

We choose whether we are happy or unhappy.

Discontented people tend to be complainers, or grumpy, or negative.  People who are content tend not to complain and tend to have a more positive attitude, and in my experience that almost always leads to more opportunities.

Focus on the good things in your life.

Learn to be content with the person you love, just as they are. Remind yourself that you should try to be happy with that person for who he/she is. Take a moment to think about the good things about that person, the reasons you love that person. Then accept their faults as part of their entire package.

If you’re unhappy with your job, change it.

I have learned that being a content person in other areas of my life, and being content with my life in general, has generally helped me at any job.

keep a 30-day list … when you want something, put it on the list with the date, and if you still want it in 30 days, you can buy it.

Worried that you might miss it? Put it in a box with the date on it. Check it a month or so later. Did you miss it?

Appreciate your life.

Show people you appreciate them.

breathe and smile.

21 day complaint free test.  Try it.

yoga

running

gym

fire in a pit in the backyard

pour used water on plants, even when waiting for hot water.

Be careful about collecting things.  They are dorky and waste space.

Glass jars are very handy.

Netted produce bags can be made into scrubbers by balling them up.

Just ask. Call everyone you pay a bill to and ask them for lower rates. This can be applied to cell phones, cable, internet, credit cards, loans, etc (I no longer have any debt, but still good advice).

state farm can discount by combining home and car insurance, also low mileage.

A man who does not know loyalty does not know men.

confidence is leaving the lights on

Always make sure you have something to do, something to love, and something to hope for.

Ask others "what do you want to happen"

A man always judges himself by the balance he can strike between the needs of his body and the demands of his mind

Don't use time to make money; use money to make time.

Excess crap restricts freedom.  To keep an item, it must have specific, valuable purpose.  See through your clutter.

Happiness is the people around you, not the places.

Wednesday, May 18, 2011

Losing Weight

Saturday morning my dad called me frantic that his water heater had ruptured.  My room is right next to the water heater.  My brother happened to be in town, too, and his room happens to also be next to the water heater.

Pops was all apologetic that our stuff got wet, but most of it turned out to be dry or salvageable.  I took this  as a wonderful opportunity to get rid of years worth of junk.  My brother and wheeled two 90 gallon trash cans into the house and went to work.  Occasionally one of us would laugh as we savored a precious memory, but for the most part everything went in a pail.  The bins were overflowing in under two hours.  We also filled up a smaller bin with electronics and took them to work (they have an electronic waste drop off).

What's left at my parents:
-my yellow stuffed bear (yellow bear, you rock)
-a small drawer full of sentimental electronics (minidiscs are the future :)
-a briefcase full of scouting stuff
-the solar robot I built in high school (I yoinked the panels years ago... they're sitting on my porch now)
-a small box of sentimentals
-a few year books
-high school and college diplomas

That's it.

In all, I imagine I threw out 400 pounds of junk.  Now that's weight loss!

...

At least once a day, I stop by the electronic recycling bins at work and grab neat things.  My employer has an open policy that if you can use something and don't and won't sell it, you can grab it.  This is great because we make some pretty awesome equipment and often times a group will throw away said awesome instrument when the next model ships... since none of my projects require the cutting edge, I've picked up an impressive rack of stuff at work... probably close to $50,000 in hardware at full price (I have no intention of selling anything, just trying to provide context).  I've also picked up a lot of junk.

Last time I relocated, I moved into a larger desk with more shelving, so I just piled everything on a cart and wheeled it over to my new desk.  When I moved this week, I moved into a smaller desk with a great window view up on the 8th floor (sweet).  After dropping all the boxes off, I had no desk space... couldn't even set up my computer.  Following hot on the heels of my recent childhood clutter removal, I grabbed a 250 gallon (33.4 cubic feet) recycling bin and then proceeded to fill it up in under 3 hours.

I literally had over 100 of some cables... 5 of a particular instruments, 30 of another, thousands of feet of cable, every type of thermocouple, dozens of DAQ boards, too many power cords, USB cables, firewire cables and DAQ cables to list, etc.  Trash!

I wheeled the overflowing bin down to the ewaste bin and while I was down there found a 20" touch panel LCD with a blown out power supply, no enclosure, but otherwise in good shape... I wheeled a second bin and the screen back up to my desk, threw out the old CRT I had used on a test computer and rigged up the new LCD such that it's hanging on my wall like a picture frame.

I filled the second bin halfway full, this time focusing on hardware that didn't work 100%.  As a service to other scroungers, I noticeably break hardware I know has problems to prevent a repetitive cycle of find and pitch.  My two favorite 'this is broken' indicators are to crush the connectors with pliers and/or hammer the largest chip.  Anything that passes my cursory tests gets a 'recycles treasure' sharpie brand and a sticker with my name on it... much of my non-accuracy-critical hardware bears said brand.

I did keep a lot of hardware, but not a lot of duplicity.

In all, I imagine I threw out 1000 pounds of junk.  No joke.  Half a ton.  Good thing the bins are  designed for that.

...

With those two victories under my belt, I placed all the junk I had spread across the house into my room. I'll repeat a similar exercise, only this time I'll probably sell most of the junk (because I can and because a lot of it is worth $$).  For sure, I'll get rid of at least half of the 30 or so hard drives I have, my college fridge (which lies dormant on my floor), three laptops in various need of repair, stools, excess camping and climbing gear, a bunch of electronics, bike gear I don't use, a 0 degree sleeping bag that has no practical purpose in Texas (and is quite large to fly with), shoes, gun stuff, etc.

What does all this mean?  I often savor my college days when everything I owned fit in the back of my truck (not everything, per se, but everything I wasn't storing at my pop's place).  Each year I'd haul everything back home, and each fall I'd haul it all back.  What a waste of time!

Paul Erdos lived a nomadic lifestyle, showing up at colleague's houses to write papers, leaving when he was done.  As a constant traveller, he carried few possessions, but left a lasting impression on the hundreds of mathematicians he consorted with.

I don't expect to get rid of all possessions, but I would like to be able to fit most everything I own into a space the size of my old (and no longer owned) truck.  This is going to be a tough feat because I've picked up a bed, rather large speakers and a safe, but I think it's possible... those three items fit in the conceptual truck bed, leaving little room for anything else.

...

I forgot to add this picture of Agricola during our island excursion.  We're heading out again beginning of June.

 The pure sine wave inverter blew out another driver, but we squeaked by with modified sine (I'll do a post on this).

Classic wiring nest.

I always climb from the same end of my rope, so it wears unevenly.  I cut this one down to 35 meters (tall enough for most climbs in Austin) and...

...used the worn out 25 meters to hang some swings.
I'm riding the electric bike sans the batteries right now... it still hauls a bunch, but as a 44/15 single speed it doesn't climb well under weight ;).

Mountain bike tire ballooned.

Monday, May 9, 2011

More Red Swings

UT just installed a 40x25 bank of 300W solar panels, 300,000W during full sun, or approximately 1800kWh per day... about $216 worth of energy per day if you go with coal.  Total cost was $1,500,000, or around 19 years to pay back.  The city of Austin will refund a large portion of the cost, but all things considered I'm still a believer that pn solar cells aren't the way to go for large scale generation.  I do believe in harnessing the sun, but via focusing techniques... also support wind... but solar is a bit expensive for now.  There are some amazing companies bringing the environmental and $$$ costs down, so in the very near future I'll be on board.

The garage


Various leftovers of new chains I've used over the years... I'm saving them to eventually build one for free (I think I'll need 13 or so more... another 10 years)


Memorial ride for a fallen comrade (hit and run)

#UnlockedBikesStolen/#BikesUnlocked=1
Lock your shit up.  Fortunately, Texas has a Lethal Force to Defend Property clause... that I hope to never have to use, but since I know the pain of bike theft, I'd ask questions later.  Is human life worth more than a bicycle?  Not if you're a bike thief.  

Didn't realize you could get to this hill.

I previously mentioned redswingproject.org.  I didn't mention I'm a contributor.  My old climbing ropes is getting put to good use.


That stencil was a bitch to cut out.

4:30AM-7:30AM walk around Austin... with a 40 pound pack.  Wonderful to see it wake up.

Here We Go Magic's new album is out this week.  Here's my favorite track from their last record.

RSS Purge

My name is John and I'm an internet addict.  It's been 20 seconds since my last RSS fix. 

...

A friend introduced me to RSS readers in college.  I was initially hesitant to use them, but after I saw how much time I saved not browsing individual websites, I was hooked.  When I initially collated everything through RSS feeds, I found that I saved at least an hour browsing the same content, but over time I added more and more feeds, and now I'm at a point where I receive on average 4000 items per week... since June 2008 I've sifted through 137827 items, reading on average 31% of all postings... it's scary.  Mondays are the worst.  

My typical browsing habit is to bookmark all of the RSS feeds I'm interested in while I'm waiting in line, returning nature's call, or traveling shotgun.  Then, when I get home, I read all the sifted material, often into the wee hours of the night.

Over the years I've added and subtracted feeds several times, but I've always normalized out to around 4000 items per week.   About two years ago I finally got swamped enough that I deleted several reddit feeds, which averaged  around 2000 items per week.  Since then, I've subconsciously added more feeds to make up for the lost content.  For the record, reddit is a timesuck no motivated individual can afford... but damn it's fun to browse (summary of the internet).  I still browse reddit, but only via their website for the top hitters and a few select subs (reddit.com/r/austin, etc).

One problem is that I'll often go days without RSSing, resulting in massive binge sessions until 4AM or later... not healthy and not actually that fun, but I'm addicted.  Pressing 'mark all as read' when I know I haven't bookmarked the good items is not in my vernacular.   The internet/RSS are wonderful tools, but damn they eat up a lot of time.

...

Last night I had zero feeds.  Today I have 641.  It's been 16 hours.  I have a problem.

Step 1. Admit I have a problem.  Status: Done (see above).
Step 2a. Ponder.
Step 2b. Ponder more.
Step 2c. Do 2b or not 2b some more...
Step 3. Start deleting feeds

Gameplan: I'm gonna start deleting feeds that I don't read often or that are particularly low in actual content.  More often than not, the same articles appear across multiple feeds.  It'd be great if I could find a reader that intelligently removed similar duplicates.

First, I'm going to delete all the reddit feeds.  Done.
Then, I'm going to delete Gizmodo.  How did I make this decision so quickly?  Well, starting about 3 months ago all the pages on Gizmodo started loading slowly.  I pointed this out several times via email, but was continuously told the problem was on my end, so I isolated it to the exact hanging script and sent that email... and then didn't get any reply.  It's been a month now and it's still slow, so goodbye Gizmodo.  For the record, Gizmodo's content is amazing.  DELETE.  You will be missed.

No brainers:
Atheist Media Blog (Yes, I'm atheist, but this blog is too smug; believe in whatever you want).
Austin News (covered by YNN)
Austin American Statesman (you guys seriously don't know how to post... the same articles are listed multiple times).
TechBlog (tired of your "World's Best"articles with zero content and your split-page stories - it's 2011 for fucks sake).

Next on the chopping block:
A VC
Danger Room
kottke
Seth's Blog
Ars Technica
Afterdowningstreet
Maniacal Rage
robots.net.  

Y'all are great sites, but your content is mostly duplicates of similar feeds.

Now I'm down to 330 unread items; time to put away the ban hammer and get my scalpel.
Exempt:
Blogs of people I know.

Not getting deleted any time soon:
Hack a Day (captivating)
Austinist (summary of key events in Austin)
DailyTech (to the point)
Lifehacker (well thought out posts with wonderful 'good to know' tips)
Engadget (does a great job posting the best tech articles from around the web)
Hacked Gadgets (amazing)
Make (DIY wonderfulness)
TUAW (all things Apple; I'm an original fanboy (1992... I was 7)
TreeHugger
Austin Bloggers (a collective of posters, one of which points out that of the 39,000 burglary calls over the last couple years, there have been 11 burglary arrests... yikes)
YNN (concise Austin news feed)
Sparkfun (DIY)
Wired Science
Backcountry (crazy world exploration)
Consumerist (great way to stay informed of corporate fuckery)
MakeUseOf (your soundsunday posts are gold)
20-Nothings (interesting peer with great life outlook)
LifeMusicPeopleEvents Austin,Tx
Chicks&Bikes (chicks... bikes... Need I say more)

On thin ice:
Gadgetizer
I Will Teach You to be Rich (this was my original inspiration to save, save, save, but now Ramit appears to have sold out, charging a fee to browse his premium content)
Everything else... too much to list

Thursday, May 5, 2011

Shower in Reverse

Wanna make monotonous tasks less mundane?  Do non-order-specific lists in reverse order.

-Soap up first, then shampoo.
-Load the bottom rack, then the top.
-Have fun all morning, show up to work at 1PM... work feverishly into the night, sleep under your desk, wake up at 5AM the next morning, leave at 1PM, repeat.  24 hours without work FTW!

From 11/27/07: "I can only imagine how stale corporate air is"
Stale.  Red tape.

Sunday, May 1, 2011

Analog Game Night... On an Island

Last week, Lee and I happened upon an island on the east side of Town Lake:

It's just east of the heart of Austin, yet remains undeveloped:

From the shore:
Don't let the undeveloped shore fool you: a wonderful green belt snakes along the river as it goes through Austin, hiding the city in certain spots if you're good with a camera (full disclosure: I'm not ;)... 'Austin' is hiding out of view and behind the branches on the left.

Kayaks in tow, we voyaged across the ocean sea lake 200 feet of water from a nearby peninsula to explore the unknown.  Our seafaring approach:

We found a nice landing bay on the eastern side of the island:


















That lead up to the rest of the island:


















The island is roughly triangular at 200'x220' with a 300' hypotenuse:



















Once on land, we found two big swings put up by redswingproject, an anonymous swing-hanging project that started in Austin, and has since spread around the world.  Check them out.

There were also some chairs and a table, along with a crude rope swing and an empty, dug out grave, complete with welded cross (odd).  We definitely weren't the first, but are surely part of a small slice of Austinites that have enjoyed the unnamed island.

Over the next few days, we brainstormed how we could host the next Analog Game Night on the island (Analog Game Night is a weekly gathering of geeks to play real, physical board games, complete with beer, tunes, and the dorkiest conversations imaginable).  After some initial planning , we hosted "Analog Game Night... on an Island".  To pull this off, we needed:

-Boats/ Solved by using Lee's two Kayaks to bring people/gear over one at a time.  We originally planned to borrow a larger paddle boat to haul everything at once, but the trailer had a 1 7/8" ball that wouldn't mate with our 2" hitch.  
-Good weather/ Solved by living in Austin.  It was windy, so we setup a 10'x20' tarp that worked perfectly to keep our game pieces stationary.
-Lighting/ Solved by bringing along four desk lamps with CFL bulbs:

-A power source for the lights/ Solved by borrowing the batteries from the electric bike and a power inverter:

-Legal authority to stay on the island/ This wasn't solved, but we did determine that neither the city nor county police have jurisdiction.  This means only the LCRA, TWC, or State Troopers could issue us a citation... we took our chances, relying on the fact that the police don't spend their nights looking for board gamers camping on an island.  We later learned - through details id rather not clarify, except to say that when the event occurred, we were sober - that you can fire a gun and nobody on land will blink an eye.

-Lots of obscure beer to satiate the beer snobs/ Solved by:
Moylan's Hopsickle Imperial Ale
ESB Special Ale
DogFishHead Chateau Jiahu
Houblon Chouffe Dobbelen IPA Tripel
Arrogant Bastard
Mippeller Red Ale
St Bernardus Christmas Ale
Lobotomy Bock
Breckenridge Vanilla Porter
Lagunitas Wilco Tango Foxtrot
Breckenridge Summerbright Ale
Ayinger Oktober Fest-Marzen
Rogue Dead Guy Ale
Independence Convict Hill Oatmeal Stour
Amnesia IPA
Green Flash Double Stout Ale
Boulevard Bully Porter
Boulevard Pale Ale
Boulevard Unfiltered Wheat
Boulevard Singlewide IPA
Boulevard Amber Ale
Boulevard Irish Ale
Malheur Belgian Ale
Brother Thelonious Abbey Ale
Petrus Aged Pale
Lagunitas Cappaccino Stout
Lagunitas Hop Stoopid Ale
St Sebastian Golden
St Sebastian Dark
Maui Coconut Porter
and the quality stuff: JOOSE, CORE Spiked, and Four Loko...

Of course, Lee and I forgot to bring any games, but our guests didn't (phew).  We played agricola and chicken foot, drank about half the beer, and had a gratis midnight dinner comprised of bread, turkey, lettuce, etc, all compliments of a buddy who works at a sandwich shop:

I won't mention names, but at some point one of us wandered off into the woods, too drunk to coherently place pieces:
...and stayed there for 4 hours.

...

The trip was a blast.  11 people showed up, which is pretty good considering we send the invites out the day before we left.  We all liked it and will definitely be back.

Sunday, April 24, 2011

State of the Bike Statement

The original focus of electrosanity was documenting an electric bike build:

But now it's just a reflection of everyday life with a loose biking theme:

Molting after a cold ride in (it's warm now except for a cold snap)

Breakfast.  Eggs, oat meal, pineapple.

Rappelling 95 feet down the back side of NI parking garage (shhh...)

On a telephone pole

(Male) cats

Mother Falcon throwing down

...

...

So how's the electric bike?  I'm not riding it much at this point (10 times so far in 2011).  Instead, I'm riding single speed pretty much full time.  I sometimes ride it to work with the mountain bike in tow for our Tuesday night rides, but it mainly sits in the garage, waiting like a sad dog for its owner.  I feel bad about it, but I'm just enjoying the exercise of a real bike.  

So how's the electric bike?  It's holding up quite well, with the exception of a couple of battery banks that are pretty much shot, but 13 out of 16 are still pulling strong. 
One bank in particular (bank 9) is pretty much destroyed; banks 5 and 7 aren't that great, either:


Some reflections on the above date (which took days to collect):
A123's nominal rating is quite nominal... the best bank is only 85% of the rated capacity.  If you dig through A123's spec sheets, they mention that their claimed life is taking the cell from 3.65 down to 2V, which is not good for the cells.  Technically, you aren't supposed to bring them down below 2.9V or above 3.6, so A123's rating will result in premature damage to the cells, which is exactly what's happened:
Above we can see that during a full charge cycle, bank 9 (which has 56.2% of the energy storage of bank 15) was the first cell to empty (down to 2.2V) and the first cell to reach full charge (3.62V).  Every single time the battery bank as a whole gets 'empty' it's the 12 cells in bank 9 that reach empty first (the other 180 cells in the other 15 banks still have quite a bit of charge left).  Unfortunately, as soon as the first bank in series goes empty, the remaining energy stored in the other 15 banks is unusable without damaging the empty cell... without a battery management system.  Right now, without a BMS, there's no way for the bike to tell me the first cell has reached empty; the only indication is that the voltage RAPIDLY drops from 50.0 to ~48.x over about a mile.  Thus, by the time I know the first cell has died, I've already pulled it way below 0% and caused permanent cell damage... because bank 9 was originally the lowest energy storer, it always ran out first and always got pulled below 0% state of charge, and thus it's taken quite a beating, hence it stores only 56.2% of the charge of bank 15.  Banks 5, 7, and 9 will need to be replaced.

I was curious what the useful voltage range of an A123 cell was, so I plugged a leftover cell into some hardware I borrowed from work and have been repeatedly charging and discharging it for a few days now... my plan is to keep doing this until the cell dies (maybe 200 days or so... A123s used within limits are supposed to last 2000 cycles).  Here's the voltage ramp during a single charge/discharge cycle:
Starting on the left side, the cell is sitting at 3.6V and is fully charged.  The programmable load (PXI-4130) then begins discharging at 2A (1C), and continues discharging for around an hour (because we're discharging at 1C).  As soon as the cell hits 2.95V(1/3 of the way from the left), the 4130 holds and continues to discharge until the cell outputs less than 100mA@2.95V, at which point the 4130 immediately begins charging again at 2A (1C) for an hour, until the cell hits 3.6V(middle), at which point the cell is held at 3.6V until the current falls below 100mA... then the cycle starts over again (right side).  I've been doing this for 3 days, so the cycle is repetitive.  Here's the last 14 cycles:
Note that below 3.1V is only 5% of the total energy during discharge, so limiting discharge to to 3.1V would result in 5% less distance, but much longer battery life.

I'm logging all of this data to disk so I can see how the cell fails over its lifetime.  Data thus far:

I compared the data to the temperature during charge, and there's a strong correlation between temperature and energy stored.  I previously noted that the batteries don't heat up much during charging. The data shows that charging 192 cells at 1500W only generates 42W of heat (the cells chemically convert 97.2% of the applied power into useful storage, with only 2.8% wasted as heat).  

I've been mentally conceiving a battery management system - the lack thereof is why 3 banks are shot - for around 6 months.  The BMS I've come up with is a single unit for each battery bank that scales to any number of banks (for later use with electric cars).  Each unit has a 2 bit bus that provide four state conditions: 00 is "bank less than 2.95V", 01 is "bank between 2.95 and 3.6V", 10 is "bank over 3.6V", and 11 is "fuck, something happened and we don't know what to do."  11 is connected to an AND gate and will override the microcontroller by disconnecting the cell from the stack no matter what.

I imagine you'd be shocked to know that this is how must engineering designs are initially conceived :).  I've got much more detailed drawings with parts, etc, but the design isn't quite perfect, so it's conceptual. A single microcontroller with a muxed data I/O bus means you can add as many channels as you want without having to add a ton of pins to the controller... you just scan through.  As each cell in the series bank reaches full, it's switched out by two SPDT solid state 60A relays... enough to handle 17kW@288V, but if you want more (I don't for now), you can simply drop in higher current relays.  The microcontroller then tells the charger to lower down 3.6V for each removed cell.  

On the flip side, as each cell is discharged below 2.95V, it is simply removed from the circuit, which simultaneously prevents damage to that bank and allows you to keep on riding until the last bank is depleted... because the motor is current controlled, the voltage drop causes the controller to demand more current... so the cells that are in series are taxed harder, but within spec.

Overall, I've got a bunch of work to do to implement a BMS... for one, all those cells I soldered together will need to be separated into 16 banks, with relays in between each one... I'm ok with this because I originally conceived this bike as a prototype for an electric car.  

Yup.