All posts by UFanders

Torch Grid

A centrally-controlled grid of wind-sensitive tea candles.


I wanted to make a light-art piece for my barren walls at home to impress unsuspecting female co-workers who happened to stop by.

What it does

It generally looks like a grid of typical electronic tea candles, until you induce a wind current by blowing across the grid. The wind makes the candles wig out in a semi-natural manner.

What it’s made of

Theory of operation

I pulled the main workings from a brilliant Cornell ECE project created by Philip Ching. I added a 16-bit PWM matrix driver to the equation so the main loop can be reasonably responsive, and wiring becomes far easier. PIC32s with a crypto engine contain a very cool hardware (True and Pseudo) Random Number Generator, “TRNG” and “PRNG” respectively which we use to do flickery for all torches in the grid.

Suggested reading: 



A heating system to keep me toasty in my slumber.


I live in San Francisco. Naturally, the 4000W in-wall heater in my bedroom is placed such that I can’t use it. Also I have what used to be a fireplace in there.

So I stuffed an in-wall heater into the fireplace hole.

What it’s made of

What would be nice to have

What it does

I set the thermostat to a temperature and the heater maintains it during the frigid San Francisco summer.


Import Texas Instruments components into EAGLE

Just a fun fact I discovered recently and wish I knew years ago: Texas Instruments (along with many other companies) publishes component symbols/devices/footprints for their parts that you can import into EAGLE easily.

Let’s use a nice power convertor as an example:

1. On the tab row underneath the datasheet link, click “Quality and Packaging”. It will take you here:

2. Scroll down to “CAD/CAE symbols”, look to the “CAD File (.bxl)” column and you should see a download link. Click it.

3. After you have this file, follow the instructions immediately to the right of the “CAD/CAE symbols” table:

“Texas Instruments and Accelerated Designs Inc. have collaborated together to provide TI customers with schematic symbols and PCB layout footprints for TI products.

 Step 1: Download and install the Ultra Librarian software ZIP: 62MB

Step 2: Download the Symbol and Footprint .bxl file.

Step 3: Open the .bxl file with the Ultra Librarian software.

You can always access the CAD/CAE Symbols database at

Both PCB footprints and schematic symbols are available for download in a vendor neutral format which can then be exported to the leading EDA CAD/CAE design tools using the Ultra Librarian Reader. The reader is available for free download ( ZIP: 62MB ).

 The UL Reader is a subset of the Ultra Librarian toolset that can generate, import, and export components and their attributes in virtually any EDA CAD/CAE format.”

4. When you launch Ultra Librarian, just uncheck all the other CAD packages that aren’t EAGLE.

5. Click “Export to selected tools” and follow the instructions in the log file that pops up:


*************  Important Instructions Follow  ************


All files exported to: C:\UltraLibrarian\Library\Exported\Eagle\2015-07-27_17-10-08\2015-07-27_17-10-08 

To import your new library into Eagle:

1. Start Eagle.

2. Select File -> New -> Library from the menu.

3. In the blank library window, select File -> Execute Script from the menu.

5. Browse to your newly exported Eagle Script file (“.scr” file extension)

6. After opening the file, the script will populate the new library.

7. Use File -> Save (or Save As..) to save the library to the desired location in Eagle native format.

For additional information, please visit this site:

You may also find this video helpful:

6. You may now place the part as you would any other part. I always take an extra step to move the symbol pins around so it fits with my schematic most efficiently, sometimes splitting the symbol into two or more sections.


Princess Phone


My cousin inherited a vintage Danish telephone (meets USA signal spec apparently) from our grandmother but lamented that she had no land-line to actually use it. Still, it would make a wicked cool addition to her nightstand.

So I was all like “I can Bluetooth that ish” then she be like


What it does

Makes and receives phone calls via Bluetooth and a paired mobile phone. Basically a big, heavy Bluetooth headset.

What it’s made of

Theory of operation

TL;DR: Works like a typical telephone.

Plug it in and pair it with your mobile phone using the standard method – press and hold the pairing button.

When a call is received, the phone rings. When you pick up the receiver the call is connected, when you put it down the call is ended. You speak and listen through the original handset. Furthermore, the MCU samples the rotary dial so you can initiate calls from the phone.

The MCU provides:

  • Regionally-appropriate dialtone when you pick up the handset
  • Regionally-appropriate busy tone

Trials and Tribulations

  1. How do I bypass the microphone gain stage to use the RN-52 with a pre-biased (1/2 of 3.3v), line-level audio input signal? This is referenced in the usage guide and datasheet but there is no command documented to use this. Does my application require a CODEC? I sure hope not.>>> The microphone gain can be changed from -3dB to 42dB in linear steps. If the gain is set to less than 24dB using the ‘SM’ command the line in mode is automatically entered.
  1. Is the audio output intrinsically a line-level signal?>>> The audio output is a speaker level signal and not line level signal.
  1. Which input channel (left or right) is used when in HFP mode? I’m making a device to turn a standard telephone into a bluetooth handset by way of a SLIC.>>> MIC_L+/- is used for HFP mode.
  2. Is this a typo? Do they mean the “microphone gain level” can be set from 00 to 1F?>>>>Yes that is correct. It is a typo. Should be ‘microphone gain level’. I will save this as an update to be captured for document revision.
  3. If the -3 to +42dB gain (45dB range) is entered from 0x00 to 0x1F, that means each increment equals a +1.4dB change. This means the default setting of 0x09 = +9.6dB gain. Is this correct? >>>>Yes it is a linear increment and should be an increment of 1.4dB per step. Did SM command work for your design line level input needs?



Debian on BeagleBone Black, Eclipse on OSX – Cross compiling

– I never got this working fully but maybe there are some bits here you can use –

The story

I got a BBB and started with Derek Malloy’s awesome tutorial so I could finally put my awesome blinkery to work as an enormous wall-mounted, internet-synchronized clock.

Adafruit decided after customer feedback that it would ship the BBB with Debian installed. This is all fine and good (I actually have no idea) but the version of Debian that it runs requires that projects be compiled with hardware FPU (Floating Point Unit) support. When I compiled my program and executed it on the BBB I got an error:

If you download a popular ARM-linux toolchain like Carlson-Minot’s arm-none-gnueabi, your program will build beautifully but not run at all on a BBB running Debian. It’s not Carlson-Minot’s fault, it’s that the BBB build of Debian requires a hardware FPU enabled toolchain.

If you use a Linux or Windows environment to create your BBB programs using the arm-none-gnueabihf toolchain, then everything’s hunky-dory. If you use OSX however, things are not so easy.

I found an arm-none-gnueabihf toolchain built for use on OSX here:

When I dragged the toolchain over to my local disk, the copy routine decided to quit when it ran into a file that had a matching version expressed in CAPITAL LETTERS because I have a case-insensitive filesystem on my Macbook. To get around this (ignoring errors during the copy) I used Ditto from the terminal:

NOTE: With the above I think it skipped “xt_connmark.h”. It looks to have content to it so I copied that over manually. The version of the same file expressed in capital letters did not seem to have any useful content.

If Eclipse shows nasty icons where C++ library calls are present, even though the project builds/runs successfully:

If Eclipse cant’ find GDB, you’re probably using the GDB built for the host system (x86). You need to point Eclipse to the GDB that comes with the target toolchain. In my case:


You also must select the shared library for the target under “Shared Libraries” in Eclipse debugging settings. In my case:


Otherwise you’ll get some crap:

Other maybe useful info

Building an arm-none-gnueabihf toolchain for OSX:

A more detailed account of building an OSX toolchain:

Will™’s cross-tool ng configuration:

Linaro, a company that hosts lots of toolchain builds for different OSes. I asked them to provide an OSX build, we’ll see how they respond!:

Lots of BBB Debian info:

MatriLED Watch

This is a full 4,096 color 8×8 LED matrix based wristwatch with software-driven 4-bit PWM for each channel at 60 full PWM sweeps per second.


I wanted to see how much performance I could squeeze out of the then-newly released PIC16F1 series of MCUs.

Video of time display

What it does

  • Displays time in a totally tubular way.

What it’s made of

Theory of operation

Press a button and the time shows up for three full seconds before putting the MCU to sleep. With the PWM blazing away at 60 full refreshes per second, there remains 50% CPU time available to do work. Pretty amazing for a ~$0.75 part. How time is represented:

  • Current second: fading yellow pixel, going from upper-left to lower right.
  • Current minutes (units): two-pixel wide blue column on far right. 0-8 are shown as pixels emanating from top as zero and bottom as 8. 9 is shown as a red pixel at the bottom.
  • Current minutes (tens):  two-pixel wide blue column on middle right.
  • Current hours (units):  two-pixel wide blue column on middle left.
  • Current hours (tens):  two-pixel wide blue column on far left.



Sunset Fader

An artsy night-light that glows with the phases of a Puerto Rican sunset.


For a few summer months I managed to trick a beautiful blonde dancer into hanging out with me for a while. In my bewilderment I made a night-light as a present for her 30th birthday.

What it does

The sand dollar glows with the main phases of the sunrise (contrary to the project’s name) and looks rad.

What it’s made of

Theory of operation

A potentiometer on the controller board mounted to the rear of the shadowbox cycles through five colors and ‘off’. Each 1/6 of a turn sends the next color in the palette to an RGB LED controlled by a local PWM driver.


Worked like a champ.

Protest Sign

An oversized scanned-matrix display using 10mm LEDs.


When Steven Colbert and Jon Stewart announced the Rally To Restore Sanity and/or Fear, my politically zealous brother wanted to add some flair to the party. We devised a satirical protest sign that would scroll conservative absurdities on one side of the sign and liberal nonsense on the other, reading such garbage from a hand-curated text file.

What it does

  •  Displays arbitrary text/graphics in a variety of ways.

What it’s made of

  • 74AHC595-series 8-bit shift registers
  • PFET transistors (to source current through columns)
  • NFET transistors (to sink current through rows)
  • LM3150 DC/DC buck convertor
  • 10mm LEDs
  • A bunch of support components
  • Custom PCB designed in EAGLE and fabricated at PCBExpress
  • Firmware written in C using MPLABX, compiled by XC16 and loaded using an ICD3

Theory of operation

Send it bunch of bits over SPI a zillion times a second and you get pretty text! The code linked to above just sets the stage – it’s up to you to send the display what you want to see. When I get some extra time (LOL) I’ll hook it up to a WiFi module and use it as a wall-clock.


It works, yay! Lessons learned:

  • Light-bleed into adjacent LEDs is easily fixed with some opaque heat-shrink tubing.
  • Each row has a considerable amount of capacitance that needs to be discharged with each row switch. Write an all-off sequence to the column drivers to do this.
  • Light output is considerably reduced when you scan the display, essentially reducing it to 1/7 (in this case using 7 rows) of the original brightness. You can overdrive the rows by 7x (in this case using 7 rows) to get around this but you must make sure your OE line is de-asserted until you start switching the rows or you’ll pop the LEDs.


Seven Segment Watch

Sometimes you just need a wristwatch, and sometimes you come across a bunch of super-sweet retro LED displays pulled from calculators of yore. I mean, what else am I going to do with my time?


Back in late 2009 my roommate was heckling me about never finishing my projects. At the same time, technologically absurd wristwatches were all the rage in the Maker community. Nixie Tubes, high-res OLEDs and discrete LEDs were the thing to have, battery life be damned.

I wanted a slightly different aesthetic and found exactly what I was looking for.

What it does

  • Displays time in a variety of formats

What it’s made of

Theory of operation

Push the “Display” button and the time glows at you for 3 full seconds.

That’s all the tutorial I have for now – you can read through main.c to see what the setting fields mean.


The watch worked well. One thing to note is the LED segments aren’t very bright when used with a coin-cell battery because those ultra long-life batteries can only source about 2mA sustained and 10mA pulsed. Attach a reasonable battery and things will lighten up.