Wednesday, April 24, 2013

12V to 5V USB Charging in a Camper

I've got a pickup truck camper.  The internal electrical system is 12VDC.  I wanted to be able to recharge my phone and tablet while sleeping.  I wanted to install some 12V sockets in the over-the-cab sleeping area.  Not satisfied with just adding chargers, I decided that I wanted some LED strip lighting in the area too.

This is a photo blog on how I used my Makerbot Replicator2, LED lights from Ikea, and components from Radio Shack & Fry's to make a cool addition to my camper.

Using the now-defunct 3D modeling Web site, I designed a control plate with spots for a 12V utility socket, some switches, a power indicator LED and a socket into which I could plug LED strip lights:

The 3D print of the control plate took about six hours.  It's already fitted with all the holes that I'll need forthe 12V socket, switches and power indicator.  The hole on the side will be the port into which the the LED strip lights will plug in.

This shows how the 12V socket mounts in the center of the control plate.

I want the wiring to be neat and tidy, so I've gone to the 
trouble of using proper lugs. 

The loops in the wires is a style that I learned long ago: make sure you have enough wire to reach anywhere into your project. You never know when you'll going to rearrange everything, so you don't want the wires to be too short. 

The little LED light that I wanted to use as a power indicator for the 12V socket requires a step down resistor, so I had to do some soldering. 

You'll see in later images that I used shrink tubing on the resistor wire.  While not strictly necessary, I thought it made the project look neater. 

I discovered that the Ikea Ledberg LED strip lights were 12V, I realized that it was an opportunity to for some very inexpensive lighting for the camper.  I started by liberating the end socket from its 120VAC to 12VDC adapter.

Discarding the transformer, I now needed to test to make sure that the +/- labeling on the bottom edge of the socket was to be trusted. 

It was, indeed, properly labeled as I tested a single strip on a 12V battery. 

Wired into the switch, the LED socket was then hot glued into the channel on the underside of the control plate. 

Using a saw on a Leatherman tool, I cut a access into the side panel inside the camper.  Not shown was running a 12VDC power connector into that space, too. 

The control plate dropped into the hole perfectly and, once wired and powered, I demonstrated that the power indicator light worked correctly. 

I then plugged in the 12VDC to 5V USB converter and I suddenly had a way to recharge my phone and tablet on the bedside in the camper.

The LED lights work, too.  I reproduced this in mirror image on the other side of the bed giving me great diffuse lighting and the ability to recharge two phones, and two tablets at the same time.

Sunday, April 14, 2013

New Socorro Processor Outperforms the Old One

I was beginning to look over my shoulder to see if advancing glaciers were going to overrun me.  It seemly has taken forever, but my rewrite last year of the Socorro processors has finally made it to production.  The switchover happened on Thursday afternoon (while I was at the dentist) from the old processor (Processor2008) to the new processor (Processor2012).

The new processor was written as a Fetch-Transform-Save Configman app.  This just means that the steps to process a Firefox crash were encoded in a modular manner and, through configuration, attached to the FTS framework.  Many of the Socorro apps follow that basic FTS model allowing them all to share the same multi-threading framework and storage schemes.

What's the advantage of doing this?

First, sharing code between apps allows us to reduce the shear size of the codebase that we have to maintain.  No more repeating similar mechanisms between apps.   This also allows the steps to accomplish a  task in a Socorro application to be isolated and reduced down to a single action.  For example, in the processor, there is now a single method called 'convert_raw_crash_to_processed_crash'.  That method knows nothing about storage mechanisms, queuing, or threading.  Its target action is its only concern.  The external framework handles all the other details.

Second, with that focus on a single action, the methods can be optimized.  Here's some stats comparing last weekend with Procssor2008 and this weekend with Processor2012:

Average Time from submission to completed processing:

Processor2008: 40 seconds
Processor2012: 16 seconds

Average Time for actual conversion from raw to processed:

Processor2008: 2.7 seconds
Processor2012: 1.7 seconds

I really don't think I need to say anything more. I'm just smiling today.

disclaimer: Processor2012 has only been running for a few days, long term stats will have to be collected to get a more focused picture of the performance characteristics.

Thursday, April 11, 2013

No, you cannot see my ID

I contend that every time you show your ID to someone, you compound the likelihood that you will suffer identity theft.

I encountered the issue when a doctor's office wanted to see my ID before they checked me in for an appointment.  Further, they wanted to make a copy of my driver's license and save it with my electronic records.  I asked how making a copy of my ID and saving it in a computer system that I do not control protected me from identity theft.  I got an answer that had nothing to do with my question - they said that they wanted to make sure that my insurance wasn't being used fraudulently.  I pointed out that they were protecting the insurance company, not me. 

At that point, I refused, declining to show them anything but my insurance card.  I stated that disseminating the contents of my ID puts me more at risk.  I'd rather protect myself than protect the insurance company.

Getting frustrated with me, the doctor's receptionist asked how showing my ID put me at risk.  I answered like this, "Show me your driver license for five seconds and I'll have your name and license number memorized.  Give me a total of ten seconds with your card and I'll have your address, too.  What kind of damage could I do with that information?"  This disturbed her.  I didn't even have to go into my mistrust of the integrity of their Microsoft computer systems with the wide open WiFi access to the HP Laser Printer behind her. 

"Are you going to refuse me service?" I asked.  She backed down and has never asked for my ID since.

I do not have eidetic memory, however, I've practiced memorization techniques to help my aging brain.  If I were a professor, I would be categorized as an absented minded, forgetful one.  I believe that almost anyone could easily learn the memorization trick. 

The doctor's office could easily set up a "secret passphrase" system to verify my identity.  Rather than ask for my ID, they could ask me to regurgitate a phrase or password that I set up at my first appointment.  They get verification, I get to protect my private information.

Holding a Grudge Forever

Microsoft burned me in 2002 when I was running a small retail nursery business selling rose bushes online. Through their puppet, the Business Software Alliance, they accused my tiny business of having pirated software. I was threatened with hundreds of thousands dollars of liability. They offered an amnesty program that would still cost me thousands, forcing me to layoff an employee. I had no pirated software in my business, but I couldn't find any of those "Certificates of Authenticity" that had come with my three Dell computers, I just about bit their amnesty hook. I had a week of sleepless nights as I agonized who I was going to layoff and how I was going to get by short an employee for a whole season.

Just as I was about to pay, I figured out that the whole thing was a scam: a protection racket. Microsoft knew nothing about my business, they had bought a marketing mailing list and SPAM'd every one with the same accusations. They were just trying to pump small businesses for money. I think what they did was a crime. 

Microsoft turned an enthusiastic customer into an enemy. I excised all Microsoft products from my business, embracing Open Source Software. Linux replaced Windows.  Microsoft keyboards and mice went to electronic recycling. Open Office trumped MSOffice. Python took over for MS C++. Postgres shoved SQLServer aside.  Never again would Microsoft be allowed to have their hand in my revenue stream. I will hate them and their products forever.

Now some eleven years later, I delight in seeing Microsoft falter. The day that vile company files for bankruptcy, I will pop a champagne bottle. I would love to see a "For Lease" sign on their corporate headquarters building. There are certainly companies in the world that are probably even more deserving of my ire, but my focus is still the Redmond Racketeer.

Articles like these make me smile:

Infoworld: The death of the PC
Windows 8: Epic Fail of the Decade?
Five reasons why Windows 8 has failed