Home Fun Work Tools
Alex Faveluke
Random Sky Canoe Garden Radio XC Ski

Hobbies, Interests, and Random Stuff

"Random Stuff" means kind of a blog here:

I haven't done much of anything other than work and take care of kids for awhile. We did keep up something of a garden, and we've got leeks in now for Winter.


Sloadhost has been upgraded to Beta status. Happy New Year!


It snowed here about 3 inches yesterday! I put the skis on and carried him around the yard a little bit, which he thought was great fun. I tried to get him to stand on the skis in front of me while I held him up.. he's still unclear on the concept, but this got laughs because of the novelty.


I played my second Tubachristmas this Saturday. Lots of fun, and very educational. The rehersal especially is a great experience for me. Our Maestro, Dr. John Richards, is the best tubist I've ever heard, a great leader, and an inspiring teacher. We also had Victor Morris as a vocal soloist, who's got the most powerful voice I have ever heard.

I wasn't sure I'd make it this year because things with kids and work have been crazy lately, but I am very glad I did. It's the most fun I've had all year!

Got to remember to bring clothes pins next year to clip the music book so it doesn't close itself.. I had to improvise a little wire clip. Last year, there were clothes pins in abundance, something I'd never seen before but very handy.

Happily, mrking99 posted a short video to YouTube! Thanks!!!


I've been using openoffice draw to do block diagrams lately. Openoffice draw is capable of doing really high quality work, but it's been difficult to get into. The defaults are a little wrong for me in many cases. Finally found how to change them, at the Openoffice.org community forum

Getting connectors to bend in the middle.. to get them around other boxes.. has been a chore. I've finally resorted to splicing connectors together... draw a connector from air to the "to" box. Then draw a no-arrows connector from the "from" box to the tail of the connector that's sitting in air. Yikes. There must be a better way, but I have not found it.

I really need a better place to dump these notes becuase they don't fit in well with things like the Rice in Piano Incident.


Our kids, especially Tessa, love to play with Rainbow Rice. This is rice that's been dyed with food coloring, then baked to dry. Basically multicolored rice. We keep the rainbow rice in a playpen to avoid too much of a mess, but it does get out on occasion.

Well, one day, I come home from work, and there's this horrified look on Lisa's face... "Wait till you've seen what the kids did to the piano!" What had happened was the playpen got a little too close to the piano, and Tessa decided to dump a few cups of rainbow rice in the keys. This wedged a few of the keys halfway down, rendering the piano pretty dysfunctional.

The fact that keys were inoperative brought the situation over the "I don't know anything about it, but I'm gonna try to fix it anyways." threshold. I was also worried about serious damage to the instrument if the rice picked up moisture, or if the keys were banged on with rice wedged in the wrong places. I did spend some time thinking about the relative level of embarrassment in calling a piano shop, explaining one of two possible situations:

  1. that we'd allowed the kids to abuse a nice piano this way.
  2. that we'd allowed the kids to abuse a nice piano and then engineer-daddy tried to fix it and made it worse.

I thought that I had a pretty good shot at this anyways, so the order-of-magnitude increase of shame in option B. seemed pretty unlikely.

To make a long story short, a few levels of wooden parts were unscrewed and set aside, then each key was removed, and dusted off with a towel. I quickly decided to go ahead and pull every single key. Even though only about 10 were affected by the rice situation, there was a huge amount of dust under everything. I went after the space under the keys with a vacuum and a brush. I left the hammers and damper mechanism alone. The hammers and dampers mechanism is under a solid board so they didn't have nearly the dust, and I was worried about knocking dust from places where it wasn't causing problems to places it would.

It wasn't that hard, but it was time consuming. Some things can't be rushed, and anyways, it was a strangely relaxing, pleasant way to spend a weekend between chasing kids. I have even more appreciation for the instrument now.. a piano is a very clever, beautiful machine made mostly of wood. This piano is a bit of an heirloom for us now. My mother's grandfather got it for her when she was a child. It's nice to have something that doesn't go obsolete in 3 years, and doesn't take any batteries.

keys coming out rainbow rice in the keys
Keys coming out. Grey stuff is 62 years of dust. Rainbow Rice in the keys.



big dust bunny Mercury head dime
A massive dust bunny.

Has cat and dog hair from at least 7 different
cats and dogs owned by various family and ancestors.

Mercury Head Dime.

I think this was worth 2 ice cream cones when it was minted.


I really should transition this to WordPress to get something that looks decent. I'll need to learn it and get comfortable with it.. I don't need the CMS stuff, but I really like the visual style of blogs done with it.


Lowell (my dad) and Sue visited today, on the way back from a big show in Newport, bearing gifts and entertainment for the kids. The Let-Us Weeder is winning praise and accolades from all over the country now! Check out this review in May Dreams Gardens.

I wish I could get that sort of attention for my open source microcontroller bootloader!


Sloadhost v0.11 has been released. Major change is getting the Windows side code to work. Now maybe more people will use it and I'll become famous! My ulterior motive here is that if people use it on the Windows side, they'll at least have some measure of comfort that they'll be able to target the part from Linux, and maybe take the Great Leap.

I had a real issue with the write() call.. don't know if it was mingw or the Windows API or a combination. What was happening was that anytime I tried to write binary file to disk with an 0x0a in it, the write() call would automagically stick in a 0x0d!!! (carriage return before line feed) How a write() winds up thinking "text file" I do not know.

I couldn't get this fixed by passing O_BINARY flag in the open() call. The fix turned out to be setting a weird little magic global in the main program context.. very weird for me.

unsigned int _CRT_fmode = _O_BINARY;

I found this on oldwiki.mingw.org/index.php/binary The strange thing is all this pertained to file pointers.. and I'm using write() and file descriptors. One thing that may be important is that my mingw environment is rather old now.


Came up with a stripped down example... more on this later, but here it is. This uses the firmware library v2.. I need to try out their V3 library. In my actual code, I replaced a lot of the libary with my own code.. becuase I don't like the increased code size and all the wierd casting warnings (type-punned pointer) Anyways, here is blinky.. which sends a msg out the serial port and blinks a led on PC12. Blinky0.1.tar.gz


I released Sloadhost into the world: hosted on Sourceforge. Sloadhost is GPL'd software that runs on Linux targetting various microcontroller boot loader protocols. The first supported is the STM32 ARM Cortex M3. The build tools on Linux for code generation are great for ARM parts. (I use Codesourcery packaged gcc, THANKS CODESOURCERY!) Unfortunately code downloading tools are generally not availible. Every manufacturer writes code to target their chip from Windows, usually they don't even release their source code. So I decided to take matters into my own hands.

I've done this before for the Analog Devices ADUC 8051 Hopefully I learned something. I will probably integrate Aducprog into Sloadhost. What I'd really love to do is create a framework and method for developing boot load hosts.. trouble is, all bootloaders are different, all chips are different. There's also the time thing. Due to circumstances beyond my control, I continue to have to scrape up any profitable work I can get right now.

If you're looking for JTAG support on Linux, check out Openocd After a lot of work, I've had good luck using Openocd with the Olimex ARM-USB-OCD pod. I am in awe of the Openocd project.. and very thankful for it. They support many many chips. Good JTAG support will be a huge enabler for microcontroller firmware work on Linux, which obviously I'm very interested in.


I use Cadsoft Eagle, have always had a bit of trouble getting prints scaled right... I use ps output then run ps2pdf to get a pdf. Just found out the way to get a 11x17 pdf page size is done with ps2pdf... it has to have the environmentvaraible PAPERSIZE set...

PAPERSIZE=11x17 ps2pdf print.ps

creates a 11x17 printout. Found this out from a search which turned up a post at current.workingdirectory.net Thanks Jamie!


For lack of a better place to take these notes, here they are. This is the second time I've had to "discover" how to do this, I don't want to lose the notes. At some point I'm going to do a howto on getting the STM32 up and targettable with the Olimex-arm-usb-hoo-haw-Jtagger, + Codesourcery command line gcc toolkit and the works. It's been a bit of a struggle.

USB-serial devices register themselves as /dev/ttyUSB0, /dev/ttyUSB1, etc, etc, etc when they're plugged in. But they're not immediately usable by the unwashed masses.. permissions are wrong. Unfortunately there's no good error message on this passed thru minicom.. you just get nothing back.

To make them accessable when they're plugged in, you need to create a rule in /etc/udev/rules.d. Like this: Create a file named something like this:
45.keyspanadapter.rules
and put in it the rules to pick up that manufacturer's vendor and product id.

BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="kcontrol_rules_end" SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", MODE="664", GROUP="plugdev" LABEL="kcontrol_rules_end"


The parts to change are the SYSFS{idProduct} and the SYSFS{idVendor} You can get these numbers by running lsusb:

faveluka@wanda:~$ lsusb
Bus 007 Device 001: ID 0000:0000  
Bus 006 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 006 Device 004: ID 06cd:0121 Keyspan USA-19hs serial adapter
Bus 006 Device 001: ID 0000:0000  
Bus 001 Device 003: ID 15ba:0003  
Bus 001 Device 001: ID 0000:0000  
Bus 008 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 002: ID 046d:c00e Logitech, Inc. M-BJ69 Optical Wheel Mouse
Bus 002 Device 001: ID 0000:0000  
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  

To discover which devices the usb-to-serial adapters register themselves as, just watch /var/log/messages when they're plugged in:

tail /var/log/messages
Apr  3 10:36:54 wanda kernel: [  129.239090] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232BM
Apr  3 10:36:54 wanda kernel: [  129.239168] usb 6-2: FTDI USB Serial Device converter now attached to ttyUSB0
Apr  3 10:55:31 wanda -- MARK --
Apr  3 11:07:20 wanda kernel: [ 1954.120117] usb 6-1: USB disconnect, address 4
Apr  3 11:07:20 wanda kernel: [ 1954.120623] keyspan_1 ttyUSB2: Keyspan 1 port adapter converter now disconnected from ttyUSB2
Apr  3 11:07:20 wanda kernel: [ 1954.120644] keyspan 6-1:1.0: device disconnected
Apr  3 11:08:06 wanda kernel: [ 1999.721131] usb 6-1: new full speed USB device using uhci_hcd and address 6
Apr  3 11:08:06 wanda kernel: [ 1999.920770] usb 6-1: configuration #1 chosen from 2 choices
Apr  3 11:08:06 wanda kernel: [ 1999.923706] keyspan 6-1:1.0: Keyspan 1 port adapter converter detected
Apr  3 11:08:06 wanda kernel: [ 1999.923806] usb 6-1: Keyspan 1 port adapter converter now attached to ttyUSB2


I haven't had the telescope out in awhile. From right out front of our house with binoculars on the 25th, I could kind of see where Lulin was, in Leo, So I hauled out the scope for a better look.

Oops. I'd left the LED on the Telrad finder on. Dead batteries. Put in new batteries, but no light. I could barely get the scope pointed on Saturn that night.

Turned out the battery holder in the Telrad had gone bad... After getting fed up trying to fix the battery holder, I just made a pack with some wire and heatshrink. Not sure you're supposed to solder on batteries, but it works.

Friday.. (Feb 26) was cloudy, but there was enough of a hole in the clouds I could get it. Of course, especially with the clouds and non-dark sky so close to Portland, it was the standard fuzzy blur of an astronomical object.. but it was nice to see it.


prototype bobbins
SLA prototypes from the Dimension Printer.

I've got access to a Dimension BST1200 3 dimension printer. This will print solid models from ABS plastic. I'm using it here to produce transformer bobbins for a prototype small three phase transformer. ABS is not a good bobbin material (low melting point) but this will allow me to prove a concept without having a special bobbin made. Why there are no "standard" bobbins for "standard" transformer laminations, I don't know, maybe I just didn't look in the right place.

The printer belongs to RMS.. but I've bought a cartridge of prototyping material on my own dime. I'm looking to share the expense of this, if anyone needs arbitrary 3d parts. There'd also be some time involved for our machinist to program the machine, unless you can give me an STL file that just works.

A single bobbin (they're fairly large, 61mm square and 38mm high) took a long time to run and used a ton of support material, so I had our machinist do the tube and flanges separate. These solvent weld together great. In fact, they're much stronger glued because the flange-to-tube interface was a very weak point.



Perhaps this is a good omen for world peace and harmony. Cleo (white cat) will rarely tolerate Thomas (black-and-white cat) anywhere near her.

cats at peace
Cleo and Thomas share the best spot in the house. Not an everyday occurance.



Just knowing a 10 Gigatesla field (or at least a very good theoretical probability of one) exists somewhere made me feel completely insignificant as an electrical engineer for a solid hour. (I don't work for a large firm, so I did not bill this to anyone.)

Making chicken broth is pretty easy and it's a lot better than the canned stuff. Good comfort food after having your confidence demolished by astronomical entities. When I get time, I'll post some quicky directions here for my fellow domestically challenged gen-x'rs.