Category Archives: Projects

Introducing the MightyOhm Geiger Counter Kit

Geiger Counter Kit - Finished

Look!  A new kit!

I admit that I’ve been working on this one for a while.  Sorry for the lack of updates, but I have been far too busy doing everything last minute and fixing bugs to post here!

I designed this Geiger Counter kit specifically so I could give a workshop at Chaos Communication Camp 2011.  I just couldn’t fly halfway around the world only to show up at a hacker conference empty-handed!

My workshops are tentatively scheduled for Thursday and Saturday.  I’m not bringing very many kits, so if you’re coming to Camp, sign up early!

More information about the kit is here.  I’ll be adding more documentation over the next couple weeks.

Hopefully I’ll also be showing off this kit next month at the OSHW Summit and the NY Maker Faire.

CD101 PID Controller stop mode issue

The CD101 is an inexpensive (under $40) PID controller sold by Sure Electronics. Aside from the incomplete documentation that is shipped with the unit, I’m pretty happy with this controller. I’m planning to use it to replace the failed PID controller that controls my soldering hotplate.

I am having one small issue with the CD101 – stop mode doesn’t seem to do anything. By that I mean it doesn’t disable the outputs or seem to affect the controller in any way. Based on my interpretation of the user manual, the outputs and alarms should be disabled in stop mode. This is mostly an annoyance in my application – if I want to disable the hotplate I’ll just turn it off. However, I can imagine that the lack of a standby mode might cause problems in some applications.

I contacted Sure Electronics about the problem, and they requested a video. I figured I might as well post it here, since I went through the trouble of making it and everything. 🙂

By the way, since it can be hard to find information on this controller (eg. how to change from Fahrenheit to Celsius display), I have been slowly putting together a wiki page for the CD101.

PS: The video was shot with my new Canon PowerShot S95, which seems to take great footage, except that there is no autofocus or zoom control while shooting. (?!)

New Product: ICSPOV

The ICSPOV is a 6-pin ICSP programmer adapter for the Adafruit Industries miniPOV3.

The miniPOV3 is a great kit, but it has one big problem – if you want to change the pre-programmed message to something else, you have to use a crude programming interface called DASA, otherwise known as ‘bit-bang mode’.  This wasn’t a problem back when most PCs and laptops came with serial ports, because most COM ports could handle DASA just fine.  However, these days, computers don’t come with serial ports.  Instead, USB-serial adapters are the most common way to add a COM port to a newer laptop or PC.

DASA does not like USB-serial converters.  What used to be a cheap,  easy programming method is now so slow and unreliable on most USB-serial converters that it is almost unusable.  What was a fun and easy kit is now much less fun when it comes time to change the displayed POV message.  Programming a new message into the miniPOV can take over five minutes depending on your operating system and serial port setup.   That is, if it works at all.

Introducing the ICSPOV:

The ICSPOV aims to solve the problem of programming the miniPOV3 by providing a way to connect a proper AVR programmer instead of using the DASA interface.  The ICSPOV adapts the 9-pin serial connector on the miniPOV3 to a 6-pin ICSP header used by many other AVR projects and supported by most low-cost AVR programmers.   After making one simple modification to the miniPOV3 and editing the project Makefile, an ordinary AVR programmer such as the Adafruit USBTinyISP can be used to program the miniPOV.

Programming times of several minutes are reduced to seconds.

The ICSPOV should work with most 6-pin AVR programmers.  It has been tested with the Adafruit Industries USBtinyISP as well as the Atmel AVRISP mk II, as shown below.

ICSPOV with AVRISP mkII

The ICSPOV is completely open source.  Schematics and layout files are available for download.

You can purchase a kit on the ICSPOV product page.

Improved firmware for USBTinyISP fixes USB issues

I am a big fan of VirtualBox.  I have used it in various forms over the past couple years: to run Windows within Linux, Linux within Windows, Linux within OSX, Windows within OSX, etc.  It is fast, powerful, configurable, and best of all, free.

However, there is one major disadvantage to using a virtual machine for hardware development.  Sometimes USB devices don’t get along with the VM very well.  What’s worse is that sometimes certain combinations of host and guest OS will work for a given USB device, while others won’t.  This can make debugging very frustrating!

I recently set up VirtualBox on my Windows 7 x64 PC so that I could run Ubuntu 10.04 alongside Windows.  Everything was going great until I plugged in my Adafruit Industries USBTinyISP so I could flash an AVR from within the Ubuntu virtual machine.

Instead of seeing the USBTinyISP show up on the VM, I got something like this:

The USBtinyISP is shown as “State: Captured:” in the VirtualBox USB device menu but there is no checkmark along side it, it doesn’t show up in lsusb, and avrdude can’t find it either.

When I tried to attach the USBtiny in Virtualbox again, I got this error message:

Bad news.

I tried various combinations of relaunching VirtualBox, rebooting, adding USB filters to the VM, unplugging, replugging, etc.  No dice.

I decided that there must be an issue with the USB stack running on the USBTinyISP.  Most USB devices can handle the hand-off between the Windows host and the Ubuntu virtual machine, but for some reason the USBTinyISP can’t.  (It’s also worth mentioning that the Atmel AVRISP mkII programmer doesn’t work with Virtualbox either.  It shows up but can’t flash a device.  I’ll have to look into this someday, but since I mainly use the USBTinyISP, fixing the AVRISP wasn’t a priority.)

The firmware that powers the Adafruit USBTinyISP is based on Dick Streefland’s usbtiny project.  Dick has released a couple more revisions of his code since the v1.3 release that Limor Fried used to create the USBTinyISP v2.0 firmware.  There have been a few bug fixes and improvements to the code, including some that address USB enumeration/communication issues.  In addition, the usbtiny code now includes a branch specifically for the USBTinyISP.  A pre-compiled hex file is provided for easy flashing to an ATtiny2313.

I was hopeful that these fixes might solve my Virtualbox problems, so I downloaded Dick’s new usbtiny-1.5 source and used my spare AVRISP mkII (within Windows) to burn the main.hex file to a spare ATtiny2313.

Flashing ATtiny2313

The USBtinyISP source sets the fuses on the ATtiny2313 for an external clock, so  I had to wire up a ceramic resonator (small orange blob to the lower left of the AVR) to verify the AVR after setting the fuses.  You can see my Sparkfun AVR ISP adapter on the right.  I also wired up  an external 5V power supply (the test leads at the top of the breadboard).

After burning the new usbtiny-1.5 firmware to the ATtiny2313, I installed it in my USBTinyISP and connected it to my computer.

At first, I still couldn’t get the USBTiny to attach to the VM if I plugged it into my PC and then selected it from VirtualBox’s USB menu.

However, when I created a USB filter in VirtualBox for the USBTinyISP and restarted the VM, it started working!  This was a huge improvement over the original firmware, which never worked once, despite all of the combinations I tried!

Here is the USB filter setup, accessible from the VM settings:

Note that the revision is now shown as 0105 (instead of 0104 with the old usbtiny firmware):

lsusb shows the USBTinyISP (1781:0x9f Multiple Vendors) and avrdude no longer complains about finding the programmer.  (The initialization failed message shown below is because I didn’t have an AVR connected.)   The red LED on the USBTinyISP flashes when I run avrdude – a sure sign that the VM is communicating with the programmer.

Here is my modified USBTinyISP, with the reflashed ATtiny2313 and shorted R4 & R7 (handy for programming devices that try to pull up/down the SCK/MOSI lines!)

Modified USBTinyISP

I hope this helps anyone else who is trying to get the USBTinyISP working in Virtualbox on Windows.  It may help solve other USB problems as well – the fixes in the newer usbtiny code may apply to other situations as well.  If you are having problems with USB and the USBTinyISP, try upgrading the firmware and post your results here!