About rlankenau

I do software for work, hardware for fun.

Audible Donation Box

Our local library recently asked us to help them out with their summer reading program, which is raising funds to support the Willowbrook Wildlife Center.

Here’s what I came up with:Glen Ellyn Public Library Token Box


When a patron turns in a book they’ve read for the summer reading program, they get a token to drop into the box.  Since the Willowbrook Wildlife Center rehabilitates native animals that have been injured, I thought that playing local native animal sounds would help create a connection between the program and the organization it is supporting.

Here’s what the box looks like inside.

Glen Ellyn Public Library Token Box Electrionics


The speakers are driven by an Adafruit Music Maker Shield run off of an Arduino Uno, using the Adafruit VS1053 library.  The token detection mechanism uses a high-intensity LED and a voltage divider, consisting of an 180 ohm resistor and a CdS photocell, to create an optical detector.  The voltage across the small resistor is checked with an analogRead() in a tight loop to detect a token falling through the slot.  Volume control is done through software on the VS1053, so I just hooked the sweeper on a 10K linear potentiometer up to a second analog input.  When a token is detected, I play a random sound from the SD card in the background while continuing to check the volume control.

Here’s the schematic and a breadboard layout.  I’ve just shown the control circuitry, as the Music Maker shield should be pretty easy to hook up.Coindrop SchematicCoindrop_Breadboard

All of the code, these schematics, and a Fritzing file are available on Github. Pay particular attention to the pin assignments at the top of the sketch if you’re using the Adafruit Music Maker board.  They are hard-wired on the shield, but Adafruit’s tutorial is based on their breakout board, which you have to wire to an Arduino yourself.

One thing I had to consider with this build was power.  I initially powered the box off of 4 AA batteries, and it looked like it worked great.  After a few days of testing, it started to act a bit flaky.  After being on for about 10 minutes, the speakers would just play static.  After some testing, I found that the supply voltage was too low, so I swapped in a USB power supply for the batteries, and it worked much better.  Since this has to run all day long for a couple months, USB is a better solution anyway.

We’re teaching a couple audio classes this summer, make sure to check back for scheduling details if you’re interested in doing something like this project yourself!


Bart Dring talks LinuxCNC and BeagleBone Black

Bart's Delta Router - Probably not going to be there on Saturday, but look at how awesome it is!

Bart’s Delta Router – Not going to be there on Saturday, but look at how awesome it is!

Bart Dring of MakerSlide fame is going to be out at Workshop 88 on Saturday, March 1 demonstrating CNC concepts and giving a brief talk about how he has constructed several CNC builds.  This talk immediately follows Arduino 301: Controlling The World, so come out for both! He has designed and built many great tools, such as a laser cutter, several types of 3D printers, including delta style printers. One of his most recent creations is a delta-style CNC router. Very cool! We look forward to having Bart out at Workshop 88 to share his expertise.

This event is FREE and OPEN to everyone! Please come out and bring a friend.


Ham Radio at Workshop 88

There’s been a lot of activity around amateur radio at Workshop 88 in the last few weeks.

The biggest portion of that was organized by Eric S. and Paul R., who had a table at the WCRA Mid-Winter Hamfest. Andrew M. helped with the table as well, and Tom M. and I also stopped by.

Paul and Andrew man the table at the WCRA Mid-Winter Hamfest

Paul and Andrew man the table at the WCRA Mid-Winter Hamfest

We’ve had a lot of electronics gear donated over the last year, and most of it just wasn’t being used. We were able to sell quite a bit of it to people who will actually get some use out of it, and raise some money for Workshop 88 in the process.

In addition, we’re talking about organizing some sort of study session or workshop to help people get their start in amateur radio. We have several very knowledgeable hams who are members, and a number more who are interested in getting their license for the first time.

If you’re interested in radio or want to find out what it is all about, come out to a public meeting night at Workshop 88 (every Thursday at 6:30) and introduce yourself!

New (well, old) Workshop Phone

I picked up an OBi100 adapter for the space a few weeks ago, and have been hunting around for a phone that we can use with it.

I stopped by the local Goodwill on my way in to the workshop one morning, and picked up two phones for $1.99 each.  One was a Lucent speakerphone that was missing a power adapter (I managed to dig a compatible one out of our giant box of wall warts in the electronics room).  The other was a fantastic old GE Model 500 rotary dial phone.  One of our members with a bit of experience in the area pegged the year of manufacture as 1965, with the last service in 1984.  I cleaned it up with some rubbing alcohol, and we swapped the old phone number placard for a W88 circuit board mask:

It took about 10 minutes of googling to find the pinout on the 4-prong adapter so we could hook it up, and it was hooked up to our Google Voice phone number and ringing.

Model 500 Plugbox Render (top)

The alligator clips aren’t a great solution, so I started designing a box to plug it into.  I used OpenSCAD to do the design.  The source files are available in my GitHub repo, but here’s a couple quick screenshots of the render:

I measured for the holes on the top using a pair of digital calipers, and then did some quick trig to figure out the offsets from the center point of the box.

Model 500 Plugbox Render (bottom)

The pins on the plug are arranged in a trapezoidal fashion so you can’t insert the plug backwards.  The bottom of the box is set up so that I can drop in a Radio Shack perfboard with a standard phone line connected to a couple of spring contacts on the wider pair of the two holes.  The standoff holes in the perfboard line up with the blocks in the corner of the box, and I have a second 3D model for the bottom of the box that sits below the perfboard.

The most difficult part of designing the box was getting the Workshop 88 logo to come out right.  I found this great tutorial on how to use InkScape to build 3D shapes in OpenSCAD and I used the source image for the same circuit board mask that we stuck on the phone.  Once I had that in place, it wasn’t too difficult to use it in OpenSCAD.  Check out the GitHub repo for details.

Model 500 Adapter with perfboard

I did a couple of test prints on the MakerBot to make sure everything fit together, and it looks like it is working pretty well.  I haven’t done another print with the logo, but judging from the generated STL, it is going to be much more involved than the basic prints.

When I added the logos, the STL went from about 300K to over 2MB.  I’m hoping that the print itself will be stable enough that the logo won’t lose resolution and look bad.  We’ve got a new stepper motor extruder ordered for our MakerBot, so that may help a little bit with the resolution.

Model 500 Adapter 3D print (bottom)

The next project is to get this puppy to dial out.  We’ve had a few suggestions, from converting the pulse dial to DTMF using an Arduino Teensy to hooking up a Blue Box with an acoustic coupler.  Right now the easiest way to use it is to dial out on a different phone, and then pick up the handset.  That really isn’t all that much fun.  I’m leaning towards the acoustic coupler method, but early experiments with DTMF generators on our cell phones didn’t go too well, so we may have a bit more work cut out for us.  The Wikipedia article says that blue boxes no longer work due to changes in the switching infrastucture, which… ahem… anecdotal evidence would tend to confirm.

Raspberry Pi thoughts


I got my Raspberry Pi (model B) in the mail a few weeks ago, and I’m just starting to dig into it.  I ordered from Newark/Element 14, and got it in just under 2 weeks.  They’re quoting quite a bit longer, so it was a bit quicker than I expected.

If you’re not familiar with the Pi, it is a $35 700MHz ARM processor with 100Mbps Ethernet, HDMI, composite video, 1/8″ audio, dual USB, SD card reader, and a number of 3.3V GPIO pins.  There are several different Linux distributions available that run on the device.  The model A is about $10 cheaper, and doesn’t have Ethernet.

I’m a Debian user from way back, so I was pretty happy that there was a Debian release for the Pi.  I’m currently running on a 2GB SD card that I had lying around, but it is a fairly tight fit, so I’d suggest (and I believe they do as well) that you go with at least a 4GB card.

Out of the box, I was able to get the GUI running and run some basic applications.  SSH access is also enabled, so I was able to hook the board up to my switch and access it over the network for package management and command-line tools.

I was extremely happy that the distro included native packages for ARM.  I run DD-WRT on my switch at home, and the busybox packages are a bit limited for my taste.

I’m thinking about running Nagios on the board and breaking out the GPIO pins to show some Nagios metrics on a LCD screen or LED bar graphs.  I’ve done LCD stuff with the Arduino, but having Linux on the board itself really gives me a lot of flexibility on generating the data to be output to the screen.  I’ve been looking at the elinux wiki for reference on how to use the GPIO pins, but haven’t really done anything with it so far.  I’m a bit nervous about interfacing directly because these boards are a bit pricier than Arduino boards, but the GPIO pins are supposed to be able to source 500mA, so that should be plenty for what I’m trying to do.

Love to hear your thoughts on what you’re planning on doing with your R. Pi in the comments!