Friday, December 25, 2009

Using my hacked espresso machine

I recently bought a Saeco Titan coffee grinder, and have been very pleased with the consistency and control of the grind size. I had to hack it (of course) to get the grind fine enough for espresso, but it's working, and it seems like a well-built machine.
For info on adjusting the grind size outside of the factory settings, see here:
http://www.ineedcoffee.com/07/hack-starbucks-grinder/
The Saeco Titan, Starbucks Barista, and Solis 166 are all the same machine. There are probably a few other rebranded models out there too.


A few years ago, I took a Krups "steam-powered" espresso machine and retrofitted it with a temperature control and air pump. The air pump pressurizes the air above the hot water in the heating tank, and the water is conveyed from the bottom of the tank to the group head. Thus, the air pressure will be the same as the water pressure. This differs from commercial espresso machines which use a water pump to move a specific volume of water through the coffee. The pressure is determined by the resistance the coffee poses to the set flow rate of water.


The temperature control was hacked from an old meat thermometer. It has a very basic proportional control. The air pump was salvaged from a 12V tire-inflator compressor. The large circuit board is a computer power supply that provides high current 12V to the compressor.

About 14g of coffee, finely ground and tamped down into the portafilter.

http://www.youtube.com/watch?v=WfhszeLt40k

I realize my shot is a little fast and pours out too violently. I'm still figuring out the ideal pressures and valve opening sequences for this machine. Since this is essentially a constant-pressure machine and commerical machines are constant flow-rate, there may always be some differences in how the coffee is made.

Lots of crema. This demitasse holds about 2 oz with additional headroom for the crema. It tastes great! I am very happy with the espresso that it makes. On cold days, I usually take a sip from the demitasse, then dump the rest into a large mug of hot water for an Americano.

Wednesday, December 23, 2009

Fixing file permissions in Vista

I downloaded some MP3 files from lala.com, and put them into my shared music folder on a Vista computer. Surprisingly, they didn't appear in my music player when I connected to the Vista machine with a client Windows XP machine. I could see all the other MP3 in the folder, but not the files from lala.com. I right-clicked on a working file and compared the file permissions to a non-working file. Sure enough, the non-working file was missing permissions for "authenticated users". I guess the lala app normally creates files with restrictive permissions. Windows explorer, when making a copy, will make files that are readable through Windows file sharing. I tried to fix the permissions through Vista's dialog boxes -- a hugely complicated and difficult process.

Instead, I found this:
icacls c:\ben\music /grant "Authenticated Users":F /t

This fixed all files in one command!

You can run icacls all by itself to see its usage.

Sunday, December 20, 2009

Making bowls from vinyl records (LPs)

I've seen pictures of bowls made from vinyl records, and decided to try it myself. I have a colander and a stainless bowl that fit together pretty tightly, which is what I used to mold the records. I put one record at a time in the oven for a few minutes at 200*F. After the vinyl had softened, I put the record into the colander and forced the bowl down on top.



The record cools in a few seconds.Neat! I think the next thing I would try is vacuum-forming. It would probably leave a much more attractive finish with fewer if any folds and overlapping sections.

Saturday, December 19, 2009

Bluetooth AVRCP failure

I learned that the mysterious behavior of the AVRCP (audio/video remote control protocol) failure on my HTC G1 is actually systematic and repeatable. If the phone is sleeping when the Bluetooth device is powered on, AVRCP will not be setup correctly. However, if the phone is awake, the connection will proceed perfectly. Here is a side-by-side comparison of the logs for a successful setup (left) and a failure (right):
It appears that the failure occurs because the phone doesn't initiate the A2DP connection. Note the time differences between the "AT sent OK" and "Auto-connecting A2DP" for each scenario. I have posted this on the Cyanogenmod issues tracker:
http://code.google.com/p/cyanogenmod/issues/detail?id=611

I've also been looking through the Cyanogen code, but I haven't noticed anything yet that would cause the device's behavior to change based on whether it is sleeping or not.

Wednesday, December 9, 2009

More bluetooth a2dp debugging on Android Cyanogen

There are a few different failure modes that I have encountered, however these are the most obvious and annoying one:

12-09 17:56:53.949 D/BluetoothA2dpService( 944): state 00:02:76:64:F7:4A (/org/bluez/audio/device1) 0->1

12-09 17:57:01.453 E/BluetoothA2dpService.cpp( 944): onConnectSinkResult: D-Bus error: org.bluez.Error.Failed (Stream setup failed)
12-09 17:57:03.469 D/BluetoothA2dpService( 944): state 00:02:76:64:F7:4A (/org/bluez/audio/device1) 1->0




:10:40.214 D/BluetoothA2dpService( 99): state 00:02:76:64:F7:4A (/org/bluez/audio/device1) 0->1
12-11 18:10:40.214 E/BluetoothA2dpService.cpp( 99): onConnectSinkResult: D-Bus error: org.bluez.Error.Failed (%s)

12-11 18:10:50.574 D/BluetoothA2dpService( 99): state 00:02:76:64:F7:4A (/org/bluez/audio/device1) 1->0







12-22 14:48:39.111 D/AudioFlinger( 78): set output to A2DP
12-22 14:48:39.121 D/BluetoothA2dpService( 94): state 00:02:76:64:F7:4A (/org/bluez/audio/device0) 1->2
12-22 14:48:40.321 W/KeyCharacterMap( 148): Can't open keycharmap file
12-22 14:48:40.321 W/KeyCharacterMap( 148): Error loading keycharmap file '/system/usr/keychars/AVRCP.kcm.bin'. hw.keyboards.262149.devname='AVRCP'
12-22 14:48:40.321 W/KeyCharacterMap( 148): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
12-22 14:48:40.391 W/Service ( 963): setForeground: ignoring old API call on com.android.music.MediaPlaybackService
12-22 14:48:41.403 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c3b70, server=010c1370
12-22 14:48:41.403 E/A2dpAudioInterface( 78): a2dp_write failed err: -110
12-22 14:48:41.411 W/AudioFlinger( 78): write blocked for 1010 msecs
12-22 14:48:42.411 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c4570, server=010c1d70
12-22 14:48:42.411 E/A2dpAudioInterface( 78): a2dp_write failed err: -110
12-22 14:48:42.421 W/AudioFlinger( 78): write blocked for 1010 msecs
12-22 14:48:43.431 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c4f70, server=010c2770
12-22 14:48:43.431 E/A2dpAudioInterface( 78): a2dp_write failed err: -110
12-22 14:48:43.451 W/AudioFlinger( 78): write blocked for 1021 msecs
12-22 14:48:44.452 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c5970, server=010c3170
12-22 14:48:44.462 E/A2dpAudioInterface( 78): a2dp_write failed err: -110
12-22 14:48:44.472 W/AudioFlinger( 78): write blocked for 1010 msecs
12-22 14:48:45.472 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c6370, server=010c3b70
12-22 14:48:45.472 E/A2dpAudioInterface( 78): a2dp_write failed err: -110
12-22 14:48:45.482 W/AudioFlinger( 78): write blocked for 1009 msecs
12-22 14:48:45.721 D/dalvikvm( 938): GC freed 842 objects / 41408 bytes in 124ms
12-22 14:48:46.484 W/AudioTrack( 78): obtainBuffer timed out (is the CPU pegged?) 0x58dd0 user=010c6d70, server=010c4570