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.

Nov 20, 2012

Direct rsync from DeltaCopy on Windows 7 to Ubuntu

I'd been meaning to set up rsync from my music server, a Windows 7 computer, to my ubuntu backup server for quite some time. I'm more familiar (though not very) with rsync in ubuntu than the DeltaCopy Server for Windows.
So, today I finally got rsync.exe going under DeltaCopy.
Here's the process in a nutshell.
First Install DeltaCopy
        * Set up the service
        * Set up the client with no authentication

Go to a terminal/Command Line in Windows
Run rsync.exe directly from DeltaCopy installation
        cd d:\DeltaCopy   (where rsync.exe is installed)
        use the following form of the command
        rsync.exe -n -arvz /cygdrive/d/music/iTunes/Purchased/ username@192.168.0.nnn:/music/iTunes/Purchased     [Note: -n = dry run, remove to run it for real!]
where /cygdrive/d/music/iTunes/Purchased/                       =====>  source
      username@192.168.0.nnn:/music/iTunes/Purchased     =====>  target
The trailing slash after /cygdrive/d/music/iTunes/Purchased/ <==  is VERY important when you already have a directory structure set up on the target. It means DON'T create a new folder/directory.
Conversely, it you leave the trailing slash OFF, a new folder/directory WILL be created.





Nov 8, 2012

PiTX Raspberry Pi Power Controller



Jason on his blog (http://www.boeeerb.co.uk/pitx-an-atx-style-solution-for-the-pi/) described an innovative approach to controlling the power on a raspberry Pi.
I've already corrupted the file system on my Pi by just pulling power, so this was a great idea!
Here's my first prototype based on Jason's work. This version uses a DC 2.1 barrel connector to a 5V 1A wall wart, a DPDT 5V NTE R40 relay, some tactile buttons from adafruit.com all soldered together on an adafruit perma-proto board.
The large tactile buttons are color-coded green for go/start, red for shutdown/stop. The shutdown button is hooked into GPIO 18 on the Pi, where a running python script checks for signal. On high, the script executes a shutdown.

Oct 14, 2012

Getting CMedia USB Sound to Work with MPD on the Raspberry Pi

This assumes that you have a working installation of mpd and mpc and you can get sound out of the analog port. Using 2012-09-18_wheezy.img, the analog sound still has loud pops when you change streaming stations in mpd, plus noticeable hiss in the background of quiet passages.

To get the CMedia USB Sound dongle (looks like this one available at Newegg) working, you need to install alsamixer (if not already installed) via the command:
sudo apt-get install alsa-utils
Once that is installed, you need to modify the appropriate section of /etc/modprobe.d/alsa-base.conf so it looks like this:

# Keep snd-usb-audio from beeing loaded as first soundcard
#options snd-usb-audio index=-2
options snd-usb-audio index=0
Setting the index to 0 allows the USB Sound dongle to be loaded first. Index=-2 prevents that.
Then, in /etc/mpd.conf, you want to change the sound section like this:
# An example of an ALSA output:
#
audio_output {
    type           "alsa"
    name         "My ALSA Device"
    device        "hw:0,0"    # optional
    format         "44100:16:2"    # optional
#  mixer_device    "default"    # optional
    mixer_control    "Speaker"    # added 2012-10-04 for USB Sound dongle
    mixer_index    "0"        # optional
}
"Speaker" is how alsa-mixer refers to the device (alsamixer partial screen show below):
 Card: C-Media USB Audio Device                       F1:  Help               │
 Chip: USB Mixer                                      F2:  System information │
 View: F3:[Playback] F4: Capture  F5: All             F6:  Select sound card  │
 Item: Speaker [dB gain: -26.69, -26.69]              Esc: Exit     
         
If you have problems, examine the output of mpd from /var/log/mpd/mpd.log by tail. When I was troubleshooting this, the log was helpful. Here are some sample messages which pointed me in the right direction:
Oct 14 19:46 : avahi: Service 'Music Player' successfully established.
Oct 14 19:46 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
I tried using PCM because that is associated with the first installed sound card. Making the changes shown for alsa-base.conf to allow the USB Sound card to start first changes the alsamixer output to Item: Speaker from Item:PCM











Oct 4, 2012

Open WiFi settings on raspberry Pi

If you are trying to connect to an open wifi router with your Pi, change the following settings in
/etc/network/interfaces. These settings worked with Raspbian 2012-09-18-wheezy-raspian.

# my wifi device  auto wlan0  iface wlan0 inet dhcp wireless-essid [ESSID]   # your router SSID wireless-mode [MODE]  # usually mode is "managed"

Oct 3, 2012

LCD and Pandora on raspberry pi



Went to town on the raspberry pi this week while I stayed with my friend John in Eureka.
The picture shows my new Pi in a laser cut case I made at TechShop SF last week. On top is a TextStar tiny LCD showing one of 4 screens, this one the wireless USB adapter's IP address. See the post at jeremyblythe.blogspot.co.uk, "Raspberry Pi with TextStar Serial LCD Display" on how to set this up with python.
I used adafruit's nice Occidentalis v0.2 release for the main software, based on Raspbian Wheezy Debian. This has a lot of good packages already built in, including ssh. I just used my Mac Terminal program to set the Pi up over Ethernet initially.
To get pandora going, I used pianobar. The install is simple:
sudo apt-get install pianobar
Set up the config file for automatic login and you're good to go.
To get streaming radio on the Pi, I installed mpd, the Music Player Daemon. This is an easy install also:
sudo apt-get install mpd mpc
See the article at www.t3node.com/blog/streaming-audio-with-mpd-and-icecast2-on-raspberry-pi for setup.
Getting the Pi to work with the popular mpd iPhone client, MPoD, was a bit of a challenge. MPoD could see the Pi via avahi/bonjour, but not connect to it. John found out you have to have bind_to_address for "local host" commented out for MPoD to be able to connect to it.

Sep 3, 2012

Make a micro SIM adapter from a full-sized SIM

The rumor mill is pretty confident there will be a new iPhone announced on September 12, 2012. I knew I was eligible for an upgrade and wanted to get the new iPhone when it came out. What to do with the old iPhone? I checked gazelle.com for their prices on an unlocked iPhone 4, about $172 for good condition at the time I checked. But eBay had them going well north of $300.

So, I priced my iPhone 4, which I thought was in very good condition, at $350 Buy It Now / $250 auction reserve. BAM! Sold in 35 minutes.

Now, what do I do for a phone until I get the new iPhone? Hmn... I have an old Samsung BlackJack II locked to the AT&T network, that should work. Except for the size of the SIM - the iPhone 4 uses a micro SIM, and the BlackJack used a full-sized SIM. I had a dead, previously used AT&T standard-sized SIM from yet another phone. I decided to cut the full-sized SIM into a kind of tray adapter for the micro SIM. There are actual commercial products like this available on Amazon, but I didn't want to wait for shipping.

First, line up the contacts of the micro SIM approximately where the same contacts are on the full-sized one. Draw an outline for cutting, I used a fine point Sharpie. This doesn't have to be very precise, just an opening big enough to hold the micro SIM. Then, using a box cutter or Xacto knife, first carefully score the outline all the way around. Then slowly and carefully cut deeper into the outline. Work slowly, you don't want to break the plastic. Add Scotch tape to hold the micro SIM in place. The whole process should take about 15 minutes.


Aug 13, 2012

SiliconDust HD HomeRun Prime CableCard Set-Up

My current DVR solution, BeyondTV, was ageing and appears not to be the long-term focus of Snapstream, so I went shopping for a new solution that had some legs. I have the Extended Basic tier with Comcast and due to encryption of the "channels" above 30, I was only able to record about half of the content I was paying for. I could get HD local channels nicely with my twin Hauppauge 2250's, but couldn't record the likes of History Chnnel, Discovery and others.

Turns out my local Fry's had a special on the SiliconDust HD HomeRun Prime networked-attached cablecard tuner for $30 less than the current Amazon price. Newegg and Amazon reviews were favourable. The downside was dealing with Comcast to get the required cablecard and get the card activated once installed. Forums were full of postings of long waits, both in-store to pick up the card and hours spent on the phone to Comcast Tech Support to get the card activated. 

Decided to bite the bullet, figuring the possible short-term pain would be worth the long-term gain. Turns out, things went quite smoothly. Maybe not butter, but at least cake.

Visited the local Comcast store at 9:21 on a Monday morning. The walk-around greeter told me it would be about 10 minutes wait. Yeah, sure!  I had to recant my cynicism when I walked out of the store with Multistream cablecard in hand at 9:31.

The rep at the Comcast store-front told me to insert the card SLOWLY and call the number at the bottom of the invoice ASAP after install. Do both of those things, and I'm waiting on the line, when I notice the invoice says you can activate over the Internet at comcast.com/activate. OK, I can try that whiIle I'm waiting. The three-step activation has me done in about five minutes and says wait 45 minutes for activation to complete, so I ditch the phone call.

The HomeRun Prime works with Wndows Media Center under Windows 7. While I'm waiting for the activation to complete, I install the HomeRun Prime software on one of my three Windows boxes. As one of the last steps in the install, I did a channel scan expecting no channels to appear. But, no - channels start appearing in the HomeRun config tool! So, in my case it looks like activation took less than 30 minutes. Cool.The odd thing was, the web page that the HomeRun config utility takes you to (a 192.168.0.* address on your network under DHCP) indicated no channels were downloaded to the three tuners even after activation was complete and I could view channels in WMC. I refreshed a couple of times and still got the same report back, no channels.

Get to work on configuring WMC. Go to Tasks/Setup/TV and begin. PlayReady ( for DRM content) and DCA (Digital Cable Assistant) download if they are not already present in WMC. At one point, WMC tells me that my computer is unable to receive digital channels, but I keep going. Don't know what WMC was trying to tell me, but after waiting for the Program Guide to download, my spot checks showed I could view even formerly unavailable content just fine. 

The only slightly rough spots were when I set up the HomeRun on a WMC machine previously configured for the Hauppauge 2250. First, the DCA wanted a Product Activation Code and they weren't talking about the Windows OS. They meant the HomeRun product code. A little googling turned up a valid product code in the SiliconDust forums:
263DJ-2Y9YT-6X9G6-W28DB-697TF
This is for the forum entry: http://www.silicondust.com/forum/viewtopic.php?t=10080
The other problem I had was due to my previous tuner installs with the twin Hauppauge HVR-2250's. Although WMC would recognize all of the installed tuners including the HomeRun, the Program Guide information looked like it only used the 2250's which were not able to receive the encrypted/non-clear QAM channels. To fix this, I went back into the TV tuner setup and picked the manual option, then set up ONLY the HomeRun tuner.
In summary, for me this was a fairly straightforward set-up; perhaps I just got lucky this time.
Pro's:
  • can watch TV through WMC on any computer in the house with HomeRun software installed
  • fairly straightforward set-up for HomeRun
  • self-activation with Comcast actually worked and was painless (quelle surprise!)
Con's:
  • the HomeRun seems to only show SD content; the Hauppauge HVR-2250 also shows HD local channel offerings
  • a little laggy in WMC when you first start up, say a few seconds of unsynchronised lips/audio

UPDATE:
I was confused on the HD offerings due to different presentation styles. On the HVR-2250, local HD channels are interleaved with SD channels like so: 2 (SD), 2.1 (HD) and so on. The CableCard presents the local HD channels and other content in the 700's-800's band of channels.










Jul 9, 2012

Getting ATTINY45 to work at 8MHz with Arduino-1.0.1 and USBtinyISP

Working on a project to get an IR remote to work with an ATTINY45. The stock '45 comes with fuses set for 1Mhz.
I had a problem with the remote codes not being recognized and needed a way to see exactly what was going on. ATTINY doesn't natively support SoftwareSerial, but you can include the library for that. Problem is, the lib wants to run at 8Mhz or above. There is a way to easily change the fuses so the '45 runs at 8MHz,  using the 1.0.1 IDE and an add-on mentioned by the Hi Low Tech Group of MIT (here).
Make SURE you get a version of the ATTINY download that contains the folders variants and boards.txt and place them in the folders mentioned in the Hi Low blog above. Start arduino-1.0.1.  On my Ubuntu system, I need to run the USBtinyISP under sudo, so I navigate to the folder the arduino program lives in and type in sudo arduino-1.0.1 from the command line to start the IDE. Plug in  the USBtinyISP and set it in Tools\Programmer. Follow the instructions on the blog to "Burn Bootloader" after choosing Tools\Board\ATTINY45 (internal 8MHz clock). This normally won't show the results of the fuse burning command. To verify the fuses are being burned, before running "Burn Bootloader",  under File\Preferences, check the box for "Show verbose output during    upload".
To get the fuses and program burned onto the ATTINY45 chip, I mount the chip on a small breadboard and attach the pins to the USBtinyISP like so (from Maarten Damen's blog):
  • ATtiny Pin 2 to USBTinyISP SCK
  • ATtiny Pin 1 to USBTinyISP MISO
  • ATtiny Pin 0 to USBTinyISP MOSI
  • ATtiny RST pin to USBTinyISP RESET
and +5v to Vcc. GND to GND.
Here are pinouts for the ATTINY45 and the USBtinyISP. The pinout shown is for the ATTINY25, which is the same as the '45/'85.


Attiny25-pinout


Adafruit_usbtinyisp_pinout_6and10pinstd

To show where the *.hex program is located after a compile, check the box in File\Preferences\"Show verbose output during compile". On my Ubuntu system, this is located in /tmp/buildnnn.tmp/program_name.cpp.hex (where nnn = some alpha-numeric identifier). I compile from the command line like so:
user@mybox:/tmp/build3204698977405188542.tmp$ sudo avrdude -c usbtiny -p t45 -U flash:w:program-name.cpp.hex
If everything went well, you should see something like this:
sudo avrdude -c usbtiny -p t45 -U flash:w:attiny45_serial_example.cpp.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9206
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "attiny45_serial_example.cpp.hex"
avrdude: input file attiny45_serial_example.cpp.hex auto detected as Intel Hex
avrdude: writing flash (3894 bytes):
Writing | ################################################## | 100% 11.50s

avrdude: 3894 bytes of flash written
avrdude: verifying flash memory against attiny45_serial_example.cpp.hex:
avrdude: load data flash data from input file attiny45_serial_example.cpp.hex:
avrdude: input file attiny45_serial_example.cpp.hex auto detected as Intel Hex
avrdude: input file attiny45_serial_example.cpp.hex contains 3894 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 7.21s

avrdude: verifying ...
avrdude: 3894 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done.  Thank you.













Jul 6, 2012

Making Two-Sided PDFs with a Single-Sided Scanner

The Canon Automatic Document Feeder (ADF) on my MP-830 is pretty good, has the capability of scanning double-sided pages into a PDF document. However, I was having trouble scanning a large, dog-eared document - it kept jamming after a few pages. I could still scan single-sided pages OK, but that only got me every other page in the document. What to do?
Use the wonderful pdftk, available here for most OS platforms.
The process is as follows:
  1. Scan the ODD pages first, just putting the document through the ADF in the normal reading order. Face up, this will be a stack like: Page 1, 3, 5, .... etc. Save the resulting file as something like doc_odd.pdf
  2. Scan the EVEN pages next. Take the document and TURN IT OVER, so the last page is on TOP. Take the last page and start a new stack with the EVEN side face up. Stack the EVEN pages one-by-one on top of this stack. For example, if you have a 40 page document, page 40 will be on the bottom of this stack, then 38, 36, etc. up to page 2 on the top. It's actually easier to do than describe... Put this stack through the scanner and name the file doc_even.pdf
  3. Put both of the new PDF documents in the same directory
  4. Burst the pages for each of the documents and merge them with the following code:
pdftk doc_odd.pdf burst output doc_pg%04d_A.pdf
pdftk doc_even.pdf burst output doc_pg%04d_B.pdf
pdftk doc_pg*.pdf cat output final_merged_doc_name.pdf
The pages will be combined in the order of: 1A/1B, 2A/2B and so on, giving the correct odd/even ordering.

There is a script for this documented here.


Jun 20, 2012

Sugru fixes a Sansa Clip clip

The clip broke on my Sansa Clip. Sugru to the rescue. I actually put more Sugru on than necessary, and I didn't align the jaws - they overlap when they should just touch. That makes the clip harder to spread.
It still works, but I probably will break the plastic body of the clip over time.


Sent from my iPhone

Jun 11, 2012

First full prototype, Christmas Lumineria

Here's a photo of my first attempt to Laser-cut a full lumineria lantern from a single sheet of material. The idea is to have a tab-and-slot construction to hold the thing together, and then be able to take it apart and lay it flat for storage.
In the photo below, the sample on the left is cardstock, the one on the right is a heavier material from Staples called illustration board. The cardstock is easier to work with, but the illustration board is sturdier.

Lumineria_first_full_prototype
I used the color mapping parameters of CorelDraw to set up a perforation vector cut on the fold lines of the lumineria. I used Speed=60, Power=10, and Frequency=10 on an Epilog 60W laser. That worked perfectly on the cardstock, but didn't cut through on the heavier illustration board.

I'll have to experiment with the power settings on the illustration board to see if I can get perforation cuts, and also see if I can reduce the charring/smokiness left by the full-power cuts. 

May 27, 2012

Adding Arduino Libraries in Mac OS X Lion - Arduino 1.0.1

I already had arduino-0022 on my MacBook Air and wanted to keep a separate application of Arduino 1. I have at least 3 years' worth of *.pde sketches that I don't want to convert right now.
I easily downloaded Release 1.0.1 of Arduino for Mac OS X, but didn't know how to add a Library. Here's what worked for me:
  • Download and copy the Library you wish to install
  • Open the Application folder, then Command-Click on the new Arduino 1.0.1 Application. This will open a New Finder Window
  • Select your Arduino 1.0.1 Application
  • Click on the icon that says "Perform Tasks for Selected Item" when you hover over it
  • Select Show Package Contents
  • Double Click Contents; Double Click Resources; Double Click Java; Double Click Libraries
You can paste your new Library into this open folder, then restart Arduino 1.0.1 to see the new Library.
You can also do this from the Terminal.Starting at your Downloads folder (or wherever you have the new Library):
cp -R NewLibraryName /Applications/'Arduino 1.0.1.app'/Contents/Resources/Java/libraries/NewLibraryName
The -R is to recurse the new folder for all its contents.

May 21, 2012

Windows XP Install - Fix for "Can't Activate/Can't Login" Problem

I recently bought a refurbished HP/Compaq DC7600 for  < $100 for a client of mine. This unit came with Windows XP installed, included a valid (special refurb) COA and a CD with Windows XP and SP 3 slipstreamed on the same disk. That was worth $100 right there!

Powered the unit up and was treated with the Dialog Box, "Can't login, you must Activate first". OK, let's activate. "Cannot connect to activation server". Uh, oh - networking isn't set up, I need to login for that. So, I can't login until I activate, and I can't activate until I login!
Zugzwang!
I googled a bit for how other people fixed this one. Got the idea from them to use Safe Mode under Administrator, (NOT Safe Mode with Network). The I used the "Setup Internet Connections" wizard under Control Panel. Rebooted. Bingo! Activation complete.

May 18, 2012

LED Edge-lit Acrylic Valentine's Day Sign


Img_0759




This project is a variation of the work of yergacheffe at the atomsandelectrons blog. I wanted to create a Valentine's Day present for my wife, and thought a nice edge-lit sign would go over well.

On his recommendation, I tried out some octobrites from macetech. Although I have some experience with arduino and other electronics projects, I quickly realized I would have to really dig into how the octobrites work in order to achieve the effects I wanted. I didn't have that kind of time, Valentine's Day was quickly approaching, so I decided to go with an array of 10 Ultra-bright white LEDs available from adafruit.com. I used the LED Array calculator to determine the resistor values for the array. Note: you need to know the Forward Voltage value and Foward Current value of your LEDs to use this calculator, but that is easily obtained from the LED data sheet.

Img_0755


I used an adafruit Perma-proto full-sized PCB as the base for the array, cutting the board in half length-wise to fit. I used a Dremel-like rotary tool to cut out the base and shadow box of an IKEA picture frame as yergacheffe did. I was surprised that I was getting smoke off the material as I cut it. I used fluorescent red acrylic, 1/8" thick cut on a TechShop Epilog Laser. The actual heart logo was clip art I grabbed from the web, then did some smoothing in CorelDraw. I used the trick yergacheffe discovered of mirror-etching the sign on the front of  the acrylic, then mounting the sign reversed so the text was the correct orientation and was brighter. Good tip!

Img_0757



Finally, I added a switch and a 5V voltage regulator circuit. That way, I could use either a battery or wall power to light the sign. The result is a bit dim, even on wall power, but where my wife has placed it, it's plenty bright.


Img_0758








May 17, 2012

Music Box Based on ATTINY45


Img_0753
Img_0754
Img_0751
Img_0752
I saw this post (http://elm-chan.org/works/mxb/report.html) about WaveTable synthesis and creating "music box" like sounds on an ATTINY45 and thought I would try it. That post documented the code and schematics needed to build a "music box" song generator. I have some experience with the Arduino platform but hadn't used the ATTINY before, although I bought some to have for future projects. Chan laid out enough info to get started with this project, code and a schematic, so i rigged up an Adafruit USBtinyISP to a breadboard with the MCU and loaded Chan's code with avrdude. Rigged up a test with a small Radio Shack speaker and it worked like a charm!There's a saying in Science Fiction writing, "Make the metaphor real", so I thought, why not make this look like a real music box? I got a craft "treasure box" at Michael's Art Supply for around $1.00. Then, I downloaded some clip art of musical staffs with notes on them. I combined these with some text and laser cut the top of the craft box with an Epilog 60W laser at TechShop SF.
Next, I got a hole saw drill bit about the diameter of the speaker I had and cut a hole in the craft box, gluing the speaker down. I found a Mercury switch at Fry's - this would turn on the music when the top was tilted open. A better choice would have been magnetic switches, freely available on eBay. The Mercury switch will activate if you tilt the whole box, not a desirable effect.
I put a laser cut piece of mirror acrylic over the works to hide them and feel more like a real music box, just held in by friction. I cobbled this all together with a deadline of my wife's birthday. She was delighted to receive such a cute, personal gift.





Feb 28, 2012

SOLVED: Win 7 SP1 Install Error 0x800f0a12 on Dual-Boot System

I have a system that boots Ubuntu10.04 from sda and Windows 7 from sdb. Sdb is a recent reinstall of Win 7 on an SSD.

Windows Update finally notified me that  it had downloaded SP1 for installation, and my troubles began. Kept getting Error 0x800f0a12, which isn't terribly descriptive.
I tried a number of suggestions I found on the web, including marking the System Reserved partition active (turns out it was in the first place), giving it a drive letter, and other "solutions".
Then I found this page on the Microsoft site:  http://windows.microsoft.com/en-US/windows7/windows-7-windows-server-2008-r2-service-pack-1-sp1-installation-error-0x800F0A12
The first suggestion in the web page fitting my error code was to make sure the system volume was mounted using:
mountvol /E
Nope, same error.
Read a little more in the page and saw this:

If a disk management tool from another software manufacturer was used to copy (sometimes called clone) disks or partitions on your computer, the SP1 installer might not be able to identify the correct system files.
  1. Turn off your computer and physically disconnect any external disks or drives that aren’t required for startingWindows. 
That worked! Windows must not have liked having the GRUB2 startup manager on the first disk. Or something..




Anyway, it got me past the problem.

Jan 10, 2012

Laser Cut Lumineria Panel

Below is another Laser Cut project I did recently at TechShop SF. As an experiment, this is one panel of a kind of lantern common in Santa Fe, New Mexico, known commonly as a lumineria but more accurately referred to as farolitos. These traditionally were small bags containing candles set in sand.
These are seen at the Christmas Holidays.
The finished lumineria would consist of two of these panels on opposing sides, and a different design panel on the other two sides, glued/attached to form a box lantern.
Material for the experiment is just reclaimed sandwich cardboard.
The cardboard retains a smokey odor and some of the edges are just slightly blackened.

Photo

Sent from my iPhone



Jan 9, 2012

First TechShop Laser Cut Project

Visited TechShop yesterday to cut some faceplates/stands for two different VFD displays using the Epilog laser. Cuts were straightforward, had to adjust the settings (power, speed and frequency) slightly to get the lower left screw hole cut properly. Other than that, it took about five minutes or so to cut the 1/8" acrylic sheet.

The pictures show a hacked router displaying local weather from wunderground on an Epson VFD.

Photo_1

Front of stand showing "reclaimed" Epson POS VFD. A hacked Asus router is attached to the stand behind the VFD.
I know, the white screws on black are a fashion faux pas - I didn't have any black screws in 4/40.

Photo_2

Pointing out one 4/40 screw hole for the router.

Photo_3

A matte version of the laser cut acrylic sheet for seeing cut detail. I used a glossy version for the final display.

Photo_4

Back of weather display showing Asus WL-520GU hacked router and controlling Arduino on protoboard .
Sent from my iPhone