Dec 25, 2012

Update: Makezine MonoBox Speaker



In an earlier post, I showed the LM386 amp I made from the Makezine tutorial. This post covers the actual speaker build.
I used a small wooden "cigar" type box with a loose lid that held some kind of Tommy Bahama product. I followed the Makezine MonoBox instructions and used a dremel to cut out a circular hole for the speaker, after first tracing the speaker onto some paper. The result was pretty rough and ugly, with some wavy spots and some flat spots. Didn't like that at all.

I was casting about for some kind of covering to hide and smooth out the edge of the hole. First tried glueing split heat shrink but that was a disaster - it didn't take curves without kinking up and didn't glue well. What I finally hit on was using sugru, an old go-to tool for me. I shaped the sugru around the edges and gave the top a kind of a peak with a slightly inward tilt. While still not perfect, this gave the edges a more finished like, as if a gasket had been applied.

I liked the original build idea of using brass finishing washers. It turned out that when I drilled the holes for 4/40 screws to hold the speaker in, the exterior wood splintered horizontally. I needed something to cover that and the washers worked prefectly. I also found some size 4 brass acorn nuts that worked nicely on top of the washers and made it more interesting.

I drilled a hole for my 2.1mm ID barrel power connector and 1/8 inch audio input on the side of the box. I don't really know why I preferred the right side of the box instead of the back. Guess it's because I'm right-handed and hold the box steady with my left while I insert cables.

When I tested out cable inserts, I realized that I hadn't accounted for the thickness of the box walls, about 1/4 inch. This meant I had to attach a longer 2.1mm barrel connector to my battery holder to make good contact. It also meant I didn't have enough space to attach the nut for my 1/8 in audio connector. So, both the power connector and the audio connector were hot glued in. I held the pieces in place with their connectors inserted to get proper alignment for the holes.

With the speaker installed, the top fit loosely on the base and could easily tilt from one side to the other, wouldn't stay level. To seal the lid in level, I used hot glue, first applying it to the problem side and letting it set. Then I went after the opposite problem side (the tilting side) and did the same, letting it set. Finally, I glude the other two sides at the same time, taking care to lay down an even bead of glue and covering any gaps between the lid and the base.

I have yet to figure out how to put a handle on this box. I bought some nice satin nickel handles for $4 US but their screws were far too long to attach to this small box. I didn't have any shorter screws with the same diameter. I tried glueing the handle in place, but it just wouldn't take.

Even without the handle, the box looks good. And, it ROCKS!

Dec 21, 2012

HTC EVO 4G Digitizer & Screen Replacement



I find a lot of discarded technology on my daily walks with my dog. So far, I've found one camera, a Samsung BlackJack 2 phone and most recently, an HTC EVO 4G cell phone.
I found the EVO on the street next to a restaurant with the heavily cracked digitizer as shown in the before ("From this...") picture above. I replaced the screen at a cost of about $8.00 with install kit, shipped from ebay using the video show here as a guide. Unfortunately, I wasn't careful enough pulling the old digitizer away from the bezel. Too much pressure from the broken screen caused cracks in the LCD under the screen.
So, ordered a new LCD at about $22.00 shipped. I repeated the same procedure and resused the digitizer screen, being more careful to go very slowly with the nylon removal tool around the edges. I also learned from the first install attempt not to use the removal tool around the very bottom of the screen. That's where the fine copper cable slides through a small hole to attach to the phone mainboard. You can bend and crack this cable easily with too much force.
If you are doing this repair, make sure that you get the correct size of cable for the LCD. There are two sizes: narrow and wide. The narrow ones are relatively rare. You can check which one you need by taking the phone apart and looking at the back of the LCD. If the model shown is 2WCA, you need the wide flex version.
Depending on your experience level, this repair should take about an hour. I worked very slowly and carefully, having never done this before, and took about an hour and 45 minutes to make sure everything was correct.
One thing to be careful of is removing the flex cables from the mainboard. The referenced video made the removal of the cables seem very straightforward. I found this was more difficult than the video indicated. Also, the clamps holding the tiny cables in I thought were quite fragile. I made efforts to be careful and I broke the camera cable clamp off completely and the LCD cable clamp slightly in one corner. However, both of these still work.
When I powered up the device and tested the camera, I got an odd sepia/brown tone to photos, even on the LCD.Thinking this was some kind of photo effects filter, I started poking around in settings. Didn't see any obvious filters, but I did see a setting to "Reset to defaults". This fixed the problem!
For $30 in repair costs and a little time, I have a fairly nice extra device with WiFi (but no cell coverage, don't need it), Android 2.3, Pandora, Google Maps, Google Mail, Music player and quite a few goodies. It's kind of like getting an iTouch-class device for cheap.

Dec 15, 2012

Nokia 5110 LCD on raspberry Pi

I'm just taking baby steps here, trying to duplicate the work of others. I compiled a C program from binerry.de that talks to the 5110 from the GPIO's on the Pi.
These Nokia graphical screens are cheap, about $10 at adafruit and eBay, and they're used enough that there's starter sets of C and python out there.
Eventual goal is to have a display powered by python. Idea is to output current song from mpd, along with other interface info, for a wifi radio.




Dec 8, 2012

Controlling pianobar Pandora client with keyboard shortcuts

I've been wanting to get pianobar, a CLI for Pandora, installed on a raspberry pi as a stand-alone player. This post talks about "baby steps" on the way there, a work-in-progress.
First, since I'm running Ubuntu 10.04, I had to install from source. Make sure you have the following dependencies:
sudo apt-get install install build-essential
sudo apt-get install libjson0-dev
Download from the pianobar github and untar/unzip.
cd to the pianobar download folder
Do the following:
make
sudo make install

Test it out just by running:
pianobar
This should bring up your stations and start playing, if you have your login configured properly.
You can find a list of commands by pressing the "?" key. Obviously, you can enter these commands in the same terminal session as pianobar.
But, as a step toward getting a raspberry pi interface going, I wanted to be able to send the commands from some other terminal session. That would sort of emulate sending from a python program and/or serial connection.
To do this, you need to create a FIFO file.  Here's how:
cd ~/.config/pianobar
mkfifo ctl
Now, when you issue the commands (from another terminal session):
echo "i" > ~/.config/pianobar/ctl       # for example, song title
You will get back info on the playing song, although this will be in the original terminal session.
More on this at the Copper Thoughts blog, and a better way to do actual keyboard shortcuts.

















Dec 7, 2012

Makezine MonoBox Speaker



Tried to make an LM386-based amplifier in the past from a couple of designs and the results were unsatisfactory.
This is a nice build with excellent tutorial-style documentation. The amp worked well just off a 9V battery and sounded good.
Recommended!
See the article at Makezine.

Dec 6, 2012

Fixing stuttering/high CPU mpd on Pogoplug

Recently got a special on pink pogoplugs, two at $12.95 each. My friend John also bought, and he clued me to the fact that these were labelled B01 on the outside, but were really E02 models as shown on the device itself.
I quickly had Debian Squeeze on the box using Jeff Doozan's script, then upgraded to Wheezy. Since I like to set up boxes as music players, I added mpd and mpc to the install.
I was listening to music in no time. However, there was a problem. My favorite classical music streaming station is KVOD from Denver, cpr.org. Of the five classical streams I had in my playlist, they were the only one to stutter every few seconds - the other stations played fine.
After hours of trying different things to fix the problem, I finally hit on a combination of factors that somebody had an answer to. I noticed that ONLY the problem stream showed high CPU in top, and also
had the stutter.
If you look in mpd.wikia.com/wiki/Tuning, you'll see references to samplerate. One suggestion was to change to:
samplerate_converter "internal"
I tried that and it immediately fixed the problem, at the cost of reduced sound quality.
There are other suggestions on the Tuning page, so check there for more detail.

Dec 2, 2012

ATTINY45 Angel Bell



This is a mod of Jeremy Blythe's raspberry Pi solenoid alarm bell. I turned it into a kind of Christmas decoration/art thingy, prototyping on an arduino and then moved it to an Attiny45 for implementation. The sign is just an acrylic photo holder with a printed message. US visitors will recognize the reference to the inescapable seasonal movie, "It's a Wonderful Life".
The sketch is trivial. It's just the arduino Blink example with a HIGH for 80ms, then LOW. The low has a random delay of 30 seconds to 2 minutes.