Aug 20, 2014

HPLIP Reporting Missing Plug-in after Ubuntu 14.04 LTS

I installed Ubuntu 14.04 LTS a couple of days ago and hadn't checked out my attached HP printer (M1212nf MFP). The system could see the printer, but was missing a plug-in, as shown on the highlighted line in the screenshot below.

  • Download the latest HPLIP driver from sourceforge; in my case it was version 3.14.6
  • Set the *.run file you download to be executable; run it
  • Run hp-doctor from a terminal to do the actual install of the required plug-in

Jul 28, 2014

Useful SMS Commands for Adafruit's Fona

Was playing around with Adafruit's new Fona, a cellphone board for DIY. I wanted to register my T-Mobile SIM card on the T-Mo site so I could check the balance on my pre-paid account.

The T-Mobile sign-up process sends a password SMS to the phone number of the card you're using for the Fona, to be entered on the registration web page. Hmn. I had already sent SMS messages using the nice Adafruit Fona tutorial. But how do I receive an SMS?

Here, LMGTFY: a nice guide found here.

 check if text mode is supported (probably don't need to do this)  
 list SMS modes available for your SIM card  
 +CPMS: ("SM","ME","SM_P","ME_P","MT"),("SM","ME","SM_P","ME_P","MT"),("SM","ME","SM_P","ME_P","MT")  
 at+cpms="sm" <enter>  
 to list #messages received, total msg storage available  
 +CPMS: 2,30,2,30,2,30  
 at+cmgl="all" <enter>  
 to list all message texts received  
 +CMGL: 1,"REC READ","1511","","14/07/27,13:41:39-28"  
 Welcome to T-Mobile! Dial #BAL# to check your balances. Your T-Mobile number is 1925xxxxxxx  
 to read a specific message  
 +CMGR: "REC READ","456","","14/07/28,07:42:58-28"  
 For your security, never share your password. T-Mobile will never contact you to ask for your password. Your temporary password is xxxxxx  
 to delete a specific SMS message  

Jul 6, 2014

Jul 2, 2014

Sharing Folders with Dropbox

My wife and I have separate Dropbox accounts. Why? We were sharing one Dropbox account for awhile and then she started to use her iPhone camera more and more. I also started documenting my projects with the iPhone. This meant we were each adding off-topic photos that mixed in with the other person's albums. Plus, we were starting to get tight on the free Dropbox space.

The fix for that was separate accounts. This works well with iPhones - Dropbox will automatically backup your iPhone photos if you set it up that way. What's even better for my wife, sharing photos with her friends is a breeze: open Dropbox Photos (Camera Uploads) on your iPhone; select photos to share; click share; email. This will send a link to your photos to the contacts you choose. Slick!

We still had a need to use the same files for some things, like the password manager file. For this, use the sharing feature in Dropbox.

Here's what I did in Ubuntu 12.04:

Share a folder on Linux

You can share a folder right from your computer if you've installed the Dropbox desktop application.
  1. Open your Dropbox folder.
  2. Right-click on the folder you want to share to bring up a menu.
  3. Select Share This Folder.... This will open the Sharing page on the Dropbox website.
    Share this folder option Select Share This Folder... from the contextual menu
  4. Enter the email addresses of the people you want to invite.
  5. Add a personal message if you'd like and click Share folder.
There are a couple of scenarios to stop sharing.
  1. You want to delete a file in the source dropbox and all of the shared locations:
  2. You want to delete a file only in the source and allow the copies to still exist
For scenario 1:
  • Stop sharing the folder(file) on the source dropbox
  • Delete the formerly-shared folder
For scenario 2:
  • Delete the shared folder (don't stop sharing first!)
  • The shared copies will still exist in other Dropbox accounts

Jun 23, 2014

CMoy Headphone Amp Build

A friend of mine told me about the Chu Moy (CMoy) headphone amp, sounded interesting - just google it, it's all over the web. If you just want a headphone amp, the FIIO E6 @$27.99 USD is highly recommended. Watch out for counterfeits, though! You won't save any money self-assembling from parts vs. buying a CMoy ready-made. 

I wanted to make my own just for the learning experience. I saved a few dollars out of pocket because I had all the resistors and some capacitors in inventory, also some heaphone jacks and an 8 pin IC socket. Here's a list of the parts I ordered:

Cost (USD)
OPA2132PA Op Amp
10K Potentiometer with
on/off switch
Aluminum Knob
0.15uF Film Capacitors (2)
Fred's Amps Circuit Board

Fred's has a good set of instructions here. The build is easy, less than an hour for an experienced builder, but you need to pay close attention to the polarity of the electrolytic caps and the battery leads.

Because the headphone jacks I used were taller than Fred's specs, I couldn't use the punch-out template he supplied. I made several attempts at drilling/punching holes, but somehow things were off a tiny bit and I couldn't achieve a nice, snug fit.

I looked around for an alternative in my inventory of saved tins. Hmn. The Trader Joe's "Extra Dark Chocolate Wedges" round tin seemed up to the job. I simply made crude cut guidelines on the side of the tin and cut a space out with a nibbler tool. Followed that up with a bit of sanding the rough edges with a rotary tool. For attaching the board to the tin, I turned to the magic go-to tool, Sugru. It insulates, it decorates, it attaches, it smooths! It's the wonder room-temperature curing silicone.

Now, I have a tin that not only fits my battery, but is a nice size and shape to store my coiled up ear buds and headphone cable. 

I really enjoy having a discrete volume control over fiddling with buttons on an iPhone or other device. The CMoy is a nice upgrade to the sound - definitely noticeable, but not hit-you-over-the-head dramatic. Instruments and voices are more defined, the bass is improved and the sound stage is a little fuller. Nice!

UPDATE: 7/12/2014
Made an acrylic case for the amp - laser cut 1/8 in green translucent.

Raster etch logo is clip art of a sound wave mirrored on each side of the text; text in Boombox TTF font, converted to curves. 

Jun 17, 2014

Back in Black - a DIY raspberry pi Boombox: Inspiration

One of the items on my geek bucket list has been to build my own version of a boombox. The boombox was introduced by Philips in 1969. Refinements were introduced by Japanese manufacturers and introduced to the US in the 70's. They became a hit with urban youth. By the 80's, boomboxes had reached an age of gigantism - bigger, blasty, bassy. See the Wiki for det's.

My desire was to build a box that echoed back to the old school days, but took modern design cues. I wanted a box that looked good, sounded good (well, loud, anyway) and I could customize easily.

As a prototype, I built the Day & Night Sampler, a little music player in a re-purposed tin box. The "Back in Black" (BinB) Boombox started with what I learned in that build and grew from there. This was a journey, where I made several prototypes to visualize what I thought the boombox needed.

I reached a point where I was happy with the basic frame of the BinB, but it was missing something - the magic something i like to call 'minimal viable blinkenlights'. It just had to have flashing LEDs.

I had read (and experimented with) John Boxall's tutorial on using the Sparkfun Spectrum Shield. The Spectrum Shield works with an Arduino to display two channels of 7 audio frequency bands each. I used a VFD to test the Spectrum Shield display. It worked, but not very dramatic.

About this time, I saw the work of David J. Watts on Adafruit's Show & Tell Hangout. David presented a very creative small boombox.  His used the MSGEQ7 IC, which is also the heart of the Spectrum Shield, to display the frequency bands on a matrix of LEDs. Hmn... John Boxall showed how to do that with a Freetronics Dot Matrix Display, also an LED matrix. "What a minute! I have a Sure 0832 LED matrix someplace in inventory...[rummages around for awhile]... Yeah, here it is. I can use that to look like the graphic equalizer on old boomboxes."

But it was still missing... something. Well, what if I put in some Adafruit Neopixel Rings where the tweeters would normally go on a boombox? Googled around a bit and discovered the work of Chris Wilson on youtube, using an Adafruit Neopixel Strip as a VU Meter.  Perfect. A few easy tweaks to Chris' code and I had Neopixel rings bumpin' in blue to the beat.

And the name... What could be more iconic of an era than the 1980 release of "Back in Black" by AC/DC? Plus, my boombox was black... REALLY black... extreme GLOSSY black. 

Bill of Materials - Next

Back in Black - a DIY raspberry pi Boombox: Bill of Materials

See the Inspiration section.

Bill of Materials

The BinB Boombox reuses many of the components from the Day & Night Sampler build:

  • raspberry pi; I got mine from, $35 plus shipping
  • Patriot WiFi USB dongle, model PCWUSB1150, on sale at Fry's, $7.99; 
  • adafruit perma-prototype board, part ID 723 $5.95
  • adafruit Vacuum Fluorescent  Display 20 Char x 2 Lines, part ID 347 , $29.95 (Since Discontinued!)
  • adafruit panel mount 2.1 mm DC barrel jack, part ID 610  $2.95
  • Syba (C-Media) USB sound adapter, available at $7.99
  • 3.5mm headphone extension, male-to-male, under $5 on ebay
  • USB Short Extension cable, Type A Male to Female, about $3-5 from ebay; use with the C-Media USB sound adapter
  • adafruit 8 Bit (TTL) Logic Level Converter for interfacing the VFD to the pi, product ID 735, $1.50
  • adafruit mini remote control, product ID 389 , $5; Or, any surplus remote control you have
  • IR Sensor, TSOP38238, available at adafruit, product ID 157 , $1.95; also Mouser and others
  • SDHC Card, available at adafruit and others, adafruit part ID 102, $7.95
  • Lighted push button switch, about $4.00
  • Misc jumpers and wire
New or changed for this build are:
  • Enclosure/Frame - I used an 18in x 24in sheet of 1/4in black cast acrylic, $45 at Tap Plastics
  • 12V Power Adapter - 3 A or above with 2.1MM DC Plug output (mine was from inventory)
  • Optional - battery; recommend a 12V SLA (Sealed Lead Acid), but will add significant weight
  • Adafruit UBEC - Universal Battery Elimination Circuit to step 12V down to 5V, $9.95
  • Sure Electronics 0832/3208 LED Matrix - under $20 on ebay
  • Adafruit 20W Class D amp, $19.95
  • Adafruit 20W 4 Ohm Speaker (two needed), $14.95
  • Adafruit Neopixel 12 Ring (two needed) for the "VU Meters", $7.50 each
  • Sparkfun Spectrum Shield, $24.95
  • Arduino Stackable Headers from Sparkfun for the Spectrum Shield, $1.50
  • Additional 3.5mm male to male headphone extension (Spectrum Shield to amp)
  • Arduino Uno (substitute can be Leonardo/Clone), $24.95
  • Sugru, Hot Glue, E6000, double-sided tape to fasten things
  • Cable ties. Lots of them. Corral those loose wires.
Required Skills, Next