Category Archives: Projects

Torch Grid

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

Background

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: 

Conclusion

Fireplace

A heating system to keep me toasty in my slumber.

Background

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.

Conclusion

Princess Phone

Background

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

2

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?

Conclusion

Resources

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:

http://stackoverflow.com/questions/11471722/libstdc-so-6-cannot-open-shared-object-file-no-such-file-or-directory

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:

http://will-tm.com/cross-compiling-mac-os-x-mavericks/

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:

https://discussions.apple.com/thread/1462340?tstart=0

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:

https://stackoverflow.com/questions/10803685/eclipse-cdt-symbol-cout-could-not-be-resolved?answertab=votes#tab-top

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:

/usr/local/willtm/bin/arm-willtm-linux-gnueabi-gdb

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

/usr/local/willtm/arm-willtm-linux-gnueabi/sysroot/lib

Otherwise you’ll get some crap:

http://stackoverflow.com/questions/13678923/eclipse-failed-to-execute-mi-command

Other maybe useful info

Building an arm-none-gnueabihf toolchain for OSX:

http://www.benmont.com/tech/crosscompiler.html

A more detailed account of building an OSX toolchain:

http://tblog.rool.at/?p=57

Will™’s cross-tool ng configuration:

https://gist.github.com/Will-tm/8f31886c7c25a1aba7b0

http://derekmolloy.ie/beaglebone/setting-up-eclipse-on-the-beaglebone-for-c-development/

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!:

http://www.linaro.org/downloads/

Lots of BBB Debian info:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

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.

Background

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.

Conclusion

Yuuuuup

Sunset Fader

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

Background

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.

Conclusion

Worked like a champ.

Protest Sign

An oversized scanned-matrix display using 10mm LEDs.

Background

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.

Conclusion

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?

Background

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.

Conclusion

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.