Keep AVR open


About a week ago, I posted on G+ my concerns regarding the impact that Microchip’s purchase of Atmel might have for the Arduino ecosystem. Turns out I’m not alone, judging from the comments in the post from the Arduino folks that followed the same day.

Communities build incredible product loyalty, and open source (in addition to its other benefits) is an incredibly easy way to build community. Here’s hoping that Microchip realizes this and leaves a good formula alone.

Arduino AsyncTimer library


So there I was scratching an itch when I realized the scratch would make for a good Arduino library. AsyncTimer lets you create a timer that does something when you start it (or nothing if you prefer), then waits a predetermined time before doing something else. While it’s waiting, it doesn’t lock up your Arudino the way the delay() function does—it just schedules the time-out action to take place some time in the future.

If you’re not the RTFM type, you can just get what you need from the GitHub repository.

Motorized potentiometer for FLOSS remote control


As part of my Open source audio remote control initiative, I’ve just published Volume-AlpsRK16814MG, an open source hardware design that integrates a high-quality Alps motorized quad potentiometer  with an H bridge. The design lets you control the motor’s direction using two logic-level signals: VOL_UP and VOL_DOWN. The fact that it’s a quad pot means you can use it to control regular stereo volume by ignoring one of the dual gangs or a differential stereo signal.

Here’s the schematic* to give you an idea what it’s doing. Gerbers and PCBs are available at OSH Park.

I’ve also modified the remote control receiver to better support motorized pots. There is now a compile-time option that lets you latch and unlatch the VOL_UP and VOL_DOWN signals rather than produce repeated VOL_UP and VOL_DOWN pulses—which makes control of motorized pots more fluid.

*Subject to change!

Minimal Arduino using through-hole parts

brdfront brdback

It’s still hovering around freezing, so I guess it’s time for another Arduino.

I got curious about how small I could make yesterday’s Arduino Pro Mini using through hole parts if I got rid of everything optional. And here’s the answer.

I got the board down to the width of the original Arduino Pro Mini: 0.6″. I wasn’t able to shrink the length any; it’s still 1.8″. It doesn’t have an on-board power supply, there are no LEDs, and no optional pullups for I2C/Wire. Totally minimal, baby. You can see for yourself in the schematic.*

As with yesterday’s offering, a PCB is available through OSH Park.

*Subject to change!

Arduino Pro Mini using through-hole parts


Because winters are sucky and the weather outside still not at all inviting, I decided yesterday to see how close you could get to making an Arduino Pro Mini with  through-hole parts. The answer is about this close.

The main differences are the final product measures 1.1″ x 1.8″ rather than 0.7″ x 1.3″, two extra analog inputs available on the SMD version of the ATMEGA328P are missing, and the low-power configuration is a build-time option. Here’s the schematic* as it stands today.

If you’re feeling brave enough to build this thing, PCBs are available through OSH Park.

*Subject to change!

Open source audio remote control


I’ve started a FLOSS remote control receiver project for DIY audio preamplifiers. I think it’s just about good enough to make public.

Remote control is one of the more challenging things for an audio DIY person to implement, so I thought having an open source hardware and software platform for doing this would be useful. It uses our good friend Arduino for brains and works with the Philips RC-5 protocol. I like RC-5 because its the closest thing I know of to a universal, well-documented, brand- and model-agnostic protocol.

The IR command decoding is done using Guy Carpenter’s excellent RC5 library. I also considered using Ken Shirriff’s multi-protocol IR library. Ken’s library works with a large number of protocols, but I thought its larger memory footprint might preclude porting this thing to tiny AVRs.

Details on the project are available in my RC5-Preamp GitHub or GitLab repository.

Arduino support for Komodo Edit

Komodo-edit with Arduino support

I’ve added basic Arduino support to Komodo Edit for projects that use a Makefile. This simply involved adding a menu and a toolbar for invoking make, make upload, make monitor, and make clean.

If you want to add the menu and toolbar to your Komodo, expand this file and drop its contents into your /home/<username>/.komodoedit/<version-number>/tools directory or the equivalent on your OS. (Update: see this comment for a potentially easier way to add the tools.) Add your preferred keyboard shortcuts for any or all of the commands by editing the items under “Arduino” in the Toolbox. I’m using F5 to Build, F6 to Upload, and F7 to Monitor.

To enable syntax highlighting on .ino files, add a new entry for *.ino files in Preferences | File Associations and set the Language to C++.

This setup gives me a good set of features I want, including the ability to:

  • Edit files with a full-featured programmer’s editor.
  • Perform the most used operations with keystrokes or GUI bits.
  • Create projects to encapsulate all relevant project files.
  • Navigate to all relevant project files from within the same environment.
  • View the results of building, uploading, and cleaning the project in the same environment.

Features notably absent are syntax checking and code completion. Komodo doesn’t currently parse/compile C/C++, so adding these features may be possible, but it won’t be easy.