Thursday, November 6, 2014

Stinky stuff from China?


I love getting new stuff in the mail.  This time it was a stack of protoboards from China.  When I opened the package though, I was struck by the smell.  It smells like a zoo.  Weird...  Oh well, I get to build circuits tonight.

Thursday, October 23, 2014

Why must Android be this way? Battery managment as a lifestyle....

TL;DR: Android apps are getting bloated.  Developers aren't paying attention to android being a mobile platform and are abusing memory, cpu and battery.  How can we solve this?  How can we track it easily?

Android talks to me.  What android stands for, and represents, makes me feel a bit better about the world.  It's unlikely I'll be switching platforms anytime.  (Yes, that's a hard stop there.)  Android also upsets me on weekly basis.  It's becoming tiresome...  I just want my battery to last.  And I want apps I open to stay open. 

My first android phone was a T-Mobile G1.  For those who are new to smartphones, it was the first android phone released to the mass market.  I still have it.  It's still a good phone.  But it's also where I first learned that battery management was in my hands.  I installed a AOL instant messenger client, and flattened my battery in a couple hours. 

Every so often, apps would close that I intended to keep open.  Especially while listening to podcasts.  And while using navigation. 

The G1 had a very simple suite of software on it.  Managing what was using data, and what was waking the phone, wasn't very difficult.  Within a week or three I had the bad apps removed, and I was getting at most of a day from the stock battery.  Those were some hard learned lessons, and watching a talk from Google about gaming and battery usage really crystallized things for me. 

But that was a world of 20 or 30 apps, and a mostly vanilla install on a simple phone.  But, time was passing, my 384mhz chip wasn't keeping up.  And as programs updated, they got more and more bloated. 

As soon as it came out, I moved to a T-mobile G2 (HTC Vision to the rest of you.)  I bought it knowing I was going to need and extended battery.  With lessons learned on my G1, keeping the battery life reasonable on the phone wasn't a stressfull experience.  It was rare that a hung process caused the phone to stay at high load, and cook the battery.  But those days did start to get more frequent. 

The new phone took care of my podcast program dropping out.  And navigation wasn't dieing anymore.  At least at first.  The longer I had the phone, the more often my podcast app would just shut off.  The MP3 player would do so too. I just want my audio ... is that to much to ask?

Sadly the G2 was a slow-ish dual core chip.  About two years ago, I switched to a Samsung Galaxy S Relay.  (Can you tell I like my keyboards?)  While at first, it's battery life was just "ok."  The music player, and my podcast app were working great.  And it would generally get me through the day, a little bit of gaming could leave me phone-less by mid afternoon. 

Again, I got an extended battery.  This really helped the situation.  As the stock battery on the Relay is really quite small, and it's a phone that can draw several watts under load.  And this is where the story really turns south. 

My phone's battery life, even with the extended battery, was really only about a day.  Then one week, my phone became useless.  Suddenly my phone's battery life was down to 8 hours.  And the phone was hot.  Like, OSHA issue, hot.  Like puffed two batteries hot.   I called T-Mobile.  They had no idea.  I ended up taking it to the internet at large. 

The "internet at large" is where I found out about some moderately upsetting things.  In Windows, and MacOS, there are utilities built in that let you quite effectively manage your applications.  Utilities that let you find out what, and where, is eating your CPU, Memory, and by proxy, your battery.  Tracking that sort of information in Android is.. difficult. 

I was introduced to Wakelock Detector, and SystemCleanup.  "Needing those at all" is a problem.  But the fact they're out there did provide me with options. 

Through some testing, I found that the application that was burning my battery was the latest update to T-Mobiles app.  The one that's supposed to help me manage my account, was the one that was locking my cpu to full speed and causing me to destroy batteries. 

Between Wakelock Detector, and SystemCleanup, I was able to remove, and kill, applications that were sucking up CPU and providing me no utility.  In the end, my phone's battery was able to give me a reliable 80 hours of normal phone usage.  I was proud of my work.  I was enjoying a phone that stayed cool, played my podcasts and music, and did navigation when I needed it. 

Then the updates came.  As each app updates, they seem to get worse and worse.  And apps that have no reason to suck up CPU time, wake the phone, and cause my battery to die.  For example, Amazon Marketplace.  I have nothing through amazon on my phone, yet with it's latest update, it knocked 20 solid hours of runtime off my phone! 

I wish there were some way of dealing with this.  I had the phone of my dreams just a few weeks ago.  And now I have a phone that is down to a ~30 hour runtime.  Perhaps the walls of the android marketplace need to be a little higher.  Maybe OS controls need to be tighter.  "No, you can't run in the background." should be an option.  And CPU and memory management need to be easier to get to. 

And... in the last weeks.. I can no longer run my podcast app and strava at the same time.  Both apps updated, and it appears one kicks the other out of active memory. 

This can be fixed.  I know it... 

Thursday, August 28, 2014

Parked in front of a Microsoft data center

So, I don't have a "usual" place to ride on training rides.  Last night my wandering took me past the Microsoft data center that's just off of 294.  I got this really weird feeling I was being watched as I took the picture....

Happily, my riding has been paying dividends.  The Garmin 305 is doing it's job, and I've got a goal speed to match, beat, and flog myself when I don't.  Between the speedo, and strava segments I'm putting on watts rather quickly.  If not losing pounds. 

Back to the DC though.  It's a huge facility.  The transformers that power the place, are larger than my house.  and have blast walls between them so they don't blow up the neighbor if one does fail. 

Monday, August 18, 2014

I got my microview. Microview.io A microcontroller with a built in display.

I really do love the USPS. They bring me toys. This time it was a kickstarter reward. I got in on the Microview Kickstarter. And.. finally it arrived.  Minus the packing material, and the plastic baggie on the Microview, here's what I got in the mail.


 Sparkfun boxes are so pretty.  Oh, while we're at it.  https://www.kickstarter.com/projects/1516846343/microview-chip-sized-arduino-with-built-in-oled-di Here's the kickstarter link.


How about a closeup of the hardware.  They sent me a solderless breadboard, a programmer, and the Microview.  The Microview is a completely professional piece.  It's Sony level quality.


And the Microview and programmer separate from the programming board.  Sparkfun did a really good job on the programmer too.  I'll show you the highlights of that in a moment.
 

That's a classy place to put your logo.  I like it. The programmer has every pin marked.  And it's got the fancy through headers, so you can plug the Microview into it directly, or plug it into a breadboard.
 

So, the part I liked best about the programmer is in the upper left hand corner of the board.  Instead of just marking "pin 1" as is typical.  They put a little drawing, so you can have a visual reference that doesn't need pin reading to get it right.   Between "top" and the off center display box, it'll be hard to plug the Microview in the wrong way.
 

Here's the Microview ready to be programmed.  It comes with some really fancy demo software, but that'll have to wait for another post.  


I am exceedingly pleased with this thing.  I can't wait to do something fun with it. 

And if you'd like one of your own. Sparkfun is selling them.  Here's the link:  http://microview.io

Friday, August 15, 2014

Bike Geometry Pictures, How I took them.

So, comparing bike geometries is a funny thing.  With sloping top tubes, and other various bike tricks the whole geometry thing is fuzzy. 

While helping some people sort out bike frame choices on a forum I frequent, I took shots of most of the bikes in my garage, to compare geometry.  Now, this has it's problems, taking photos that give GOOD ideas of shape is hard.  Cameras take a spherical image, and you get distortion out at the edges.  So to minimize this, I set up a tripod, about 30' away form the bikes, and zoomed in as much as I could.  This made the included angle smaller, so the distortion would be smaller. 

Here are the results.

2007 Dawes LT1000 46cm


2006 Fetish Penna 50cm

2013 Fuji Cross 2.0 48cm





2012 Mercier Nano (small)




2014 Fuji Ace 650 35cm




2011 GT series 3 42cm

The first 4 bikes are mine, and are setup for me.  The last two are bikes for a very short friend of mine.


2013 Louis Garneau X2 Comp  (Courtesy of Kamil)

I'd love to add your bike to this.  To take a picture, get your camera about 3' off the ground.  Table height is good.  Get the camera about 30' back from the bike, and zoom in.  E-mail or attach your images to the comments and I'll add your bike to the list. 


Sunday, August 10, 2014

Garmin's mistakes, and how to fix them. Edge 305 repair.

Recently, I've had trouble keeping up my pace on my bicycles.  I like to have a target to chase.. and that just isn't there without a bike computer. 

Everyone who's installed a bike computer, knows the pain of calibrating them, and then keeping their batteries fresh, and recording information off of them.. and well.. it sucks.  That's where fancy bike computers like Garmin's Edge series come into play.  By being GPS based, they calibrate versus satellites instead of wheel revolutions.  Garmin also puts a barometer on them so the can reasonably track single foot elevation changes, which GPS is a little less good at. 



Since GPS doesn't work in tunnels, and on the bike trainer, Garmin also allows the use of a wheel speed and cadance sensor.  So it's useful, even when the bike isn't moving. 

Suffice it to say, the Garmin 305 is a heck of a device.  And being six years old now, is cheap on the used market.  I found mine on craigslist, and picked it up for $55.  The seller didn't mention what was wrong with it. 

The Garmin 305 series has the battery, speaker, and USB port as part of the back cover.  The two halves are glued together.  But instead of using a wiring harness, they used spring terminals to bring the electrical connections from one side to the other. This is not a high quality coil spring, guide, and plunger setup.  It's some bent copper tabs that press on a PCB.  Those are affected by inertia, and vibration. 

The following isn't my image.. my hands were to busy doing the repair job to take shots of the guts of my garmin.


There's essentially no bulk capacitive value on the mainboard.  This means as soon as any power is removed, the whole shebang shut s down. 

This means surgery.   The accepted method of repairing this is to get some jumper wires, and solder the battery directly to the mainboard.  Which is what I did Friday evening.  I took the GPS for a bike ride on sunday, and the thing didn't shut off at all.

Here are the links I used for reference:

http://blog.mtbguru.com/2008/11/06/surgery-on-the-garmin-edge-305/
https://forums.garmin.com/showthread.php?111-How-to-Disassemble-an-Edge
https://www.jimcarson.com/2009/replacing-the-battery-in-a-garmin-edge-305/

And.. while we're at it, here's how the rest of my garmin looks post surgery.





Darned thing almost looks like new.

Wednesday, July 23, 2014

A 3d printer hot end. Everyone's favorite late night project.

Going on two years ago, I got a kit to build a hot end for my 3d printer. It's sat in my car since then. DrD kept pushing me to get my 3d printer going.. so step one, is make something hot.

The hot end I have is a Makergear V2 hot end.  Hopefully they'll read this, and take my recommendations to heart.  They're on the V3, but the issues I ran into, still stand.  (I think.)

At about 11pm last night, I spilled the contents of the bags out on shop rag and got to work.
 
Digging in, I started to build the actual hot end.  I expected that my kit would have cohearant start to finish instructions.  As it turns out, there are two separate sets, and a lot of "uh.. what's this?" bits in the baggies.  A chart identifying what the bits are would be useful.  For instance, the teflon tape comes wrapped on a little plastic spindle, that looks like a teflon tube.  Nothing about it said "this is the teflon for your hot end" so I ended up using my own teflon tape. 

As I was following the hot end instructions, I ran into a step that said "install your ceramic hot end."  And.. that was really about it.  No link to those instructions.  And no further detail.  Just suddenly a grey blob with wires showed up in the directions. 

It turns out, that the other baggie, with the brass threaded inserts was the ceramic heater kit.  I found the page on how to build that, and went about building my two heaters. 

Here's my wound heater.  What would be nice, is if they told you what the orientation of the core was.  As later on, when you're trying to attach the hookup wires, it starts to matter a little bit.  Also, the insulation on the nichrome wire, is wound on, so you can futz with it and unwind it.  The first few times I went at it, I tried a wire stripper.  ... don't use a wire stripper.


The next step is to protect, and insulate the leads.  Here's where things got a little wacky.  At these steps, knowing that you next move is to fold them back up onto the sides of the heater core, would be useful information.  Also, knowing they need to clear the teflon sleeve would have helped. 

The wiring setup, is on the next page, which doesn't have a well indicated link.  That means I didn't know there was a second page until I got there.  

At least it looks good.  Now they tell you to cure the core.  They don't hint that it will need a second curing until the next page.  Knowing there's a second cure coming, would have helped a bit.
 

I managed to get over those hurdles.   Here's what it's supposed to look like before the second curing.

 
 
Now that it's all encased in Cecobond, it's time to make sure it's all working.  6.0ohms... right on the money.  I then went an made the second ceramic heater core. 

 
I didn't take any shots of the rest of the mechanical hookup.  The two copper wires go to the thermistor.  The thermistor is held on with Kapton tape.  Oh, and it's now 2am.

 
 Next?  I need to get a x-y-z table set up so I can test this thing out.