Building an RCD Breakout Panel

Posted in Modules on September 2nd, 2010 by Dann Green – Be the first to comment

How to make an RCD Breakout

For PCB version 1.0.2 and later….

You will need:

  • RCD with PCB 1.0.2 or 1.0.3 (see the bottom for instructions on pcb version 1.0.1 and 1.0)
  • 4HP panel or similar size (large enough to fit 6 SPST switches)
  • 6 SPST switches
  • 16-conductor cable with a 2×8 connector on one end (standard Doepfer power cable, cut in half).

To make it easier to see what’s going on in this tutorial, I’ve used rainbow colored wire, but the normal gray/red cables are just fine.

Here’s how it goes together in a nutshell:

RCD Breakout wiring guide

RCD Breakout Wiring -- Click to enlarge

Let’s start by looking at the connection to the board. There’s only 12 pins on the board, but the connector has 16 holes. That’s OK! Just let the bottom four holes hang off (those four wires don’t go to anything anyways, as you can see in the first diagram). To be clear, by the “bottom four holes” I mean the four holes on the right hand side in the photo below (they are on the bottom in the photo above). The edge of the connector should not stick over the edge of the board.

Cable connection to RCD board -- Click to enlarge

Cable connection to RCD board -- Click to enlarge

OK, now let’s look at the wiring of the panel. There are six switches, each has two connections.

Notice the Max Divide 1 and 2 switches are flipped from the other 4 switches: the lugs are on the right side. That’s just because of the way I labeled the panel (which is the same one included in the 4ms kit, so do it exactly like this if you got the panel in the kit). For the top two switches, flipping the switch lever to the left will open the connection (same as removing the jumper) and flipping it to the right will close the connection (same as putting on the jumper). For the bottom 4 switches, flipping the switch to the right is like removing the jumper, flipping to the left is like installing the jumper. See the User Manual for a description of what the jumpers do!

Back of breakout panel -- Click to enlarge

Back of breakout panel -- Click to enlarge

Allrighty… Now let’s look at the front of the faceplate. Nothing special here… The artwork will improve before we start selling the kits, this is just a test demo!

Breakout faceplate Beta version (test)

Breakout faceplate Beta version (test)

PCB version 1.0.1 and earlier

For PCB version 1.0.1, it’s the same process, but the switches are in a different order. Using the same rainbow cable above, it goes:

Max Div Range 1: 1 Blue & 2 Green
Max Div Range 2: 3 Yellow & 4 Orange
Auto Reset 1: 5 Red & 6 Brown
Auto Reset 2: 7 Black & 8 White
Up/Down: 9 Gray & 10 Purple
Gate/Trig: 11 Blue & 12 Green
Not used: 13, 14, 15, 16

Obviously you will have to upgrade your chip firmware to v1.0.2 if you want to use Gate/Trig or Up/Down counting. You can read about upgrading on the RCD page on 4mspedals.com

For PCB 1.0, there’s only 4 switches hard-wired to the breakout connector pins, so you have to solder two wires from the back of the PCB to get use of the Auto Reset jumpers. I will post a photo of this soon… Until then you will be able to use the other 4 switches

Updating firmware on AVR chips

Posted in Autonomous Bassline on May 10th, 2010 by Dann Green – Be the first to comment

A number of 4ms devices use an AVR microcontroller. These chips run a small program. On most 4ms devices that use an AVR chip, there’s a 6-pin header (2 rows of 3 pins) near the chip. This header lets you update, upgrade, or hack the AVR chip.

Here’s how to do it:

You will need…

  • ISP (In-circuit Programmer): I recommend the AVR ISP MKII available from Mouser for $34, or elsewhere sometimes cheaper! In Europe, try Farnell
  • A computer with a USB port. Windows actually has the most seamless installer, but I also use Mac and Linux to burn code just fine. Download and install one of these:
    • Windows: AVR Studio 4, download it from atmel.com. Scroll down and get the latest version (4.18, build 6 as of this post). You’ll have to “register” by typing in a real or fake name and address.
    • Mac OS X: If you just want to upgrade your firmware, you can just download AVRFuses (version 1.4 was the latest at the time of this post). If you want to hack/edit/compile code, you need OSX-AVR which is actually called Crosspack now.
    • Linux: You just need the avrdude program to burn code, but can install the whole avr-gcc toolchain if you might be compiling your own firmware.
  • The hex file: This is the actual file that contains the firmware update. If you’re upgrading a device, this will be available for download on the device’s web page. If you’re an advanced hacker, you’ll probably compile your own code using avr-gcc (part of AVR Studio and OSX_SAVE/Crosspack) which will generate a hex file for you. The file should be in intel hex format, ending in .hex

Detailed instructions:

PLuig the AVR ISP mkII into the 6-pin header of your device, making sure to line the red stripe up with the printed white box on the PCB

Plug the AVR ISP mkII into the 6-pin header of your device, making sure to line the red stripe up with the printed white box on the PCB

Windows (AVR Studio 4):

  1. Download and install AVR Studio 4 from atmel.com. Make sure you are downloading AVRStudio4Setup.exe, not just a service pack upgrade!
  2. Run the installer and click OK/Next to everything. Yes, you want the “Jungo/USB” driver to be installed.
  3. Plug in your AVR ISP mkII into the USB port and make sure Windows finds and automatically installs the drivers. The green light near the USB plug should come on.
  4. Power your device up (that is, plug your Rotating Clock Divider into your Eurorack system, or power up your Bend Matrix, etc…). Your device should be running normally, but don’t plug any patch cables into it
  5. Plug the 6-pin ISP header of the AVRISP mkII into your device. Note the orientation: the red stripe should go towards the white box that’s printed on the PCB: see photo above.
  6. The light near the 6-pin cable on the AVRISP mkII should turn green, indicating that it detects power. If you plugged it in backwards, it might flash orange. Nothing’s damaged, just flip it around…
  7. Run AVRStudio 4
  8. Click the little “AVR Programmer” icon: AVR Programmer
  9. If it doesn’t automatically detect your AVR ISP mkII, then select it from the box on the left, and click “USB”, and then click “Connect…”
  10. Click on the “Main” tab, and select “ISP mode” from the bottom box. Click “Settings” and choose an ISP Frequency of 125kHz.
  11. Select “ATmega168″ for the RCD, or ATtiny84 for the ABG, or ATmega32 for the BM, from the top drop-down box. Click “Read Signature” and it should say “Signature matches device”
  12. Click the “Program” tab. Under “Flash” click the “…” button next to “Input HEX File” (the top one). Make sure you’re not under EEPROM! Select your hex file that you downloaded (or compiled yourself)
  13. Now, click “Program” (again, under the Flash section, not under the EEPROM section). It should give you no errors at the bottom of the window
  14. Unplug your ISP 6-pin header and you should be good to go!

Please let me know if you have any problems!

Mac OSX (AVR Fuses) –the easy way to upgrade your firmware:

  1. Download and install AVR Fuses from http://www.vonnieda.org/software/avrfuses
  2. Download the hex file for your upgrade from 4mspedals.com
  3. Plug in your AVR ISP mkII. The green light by the USB plug might not come on.
  4. Do steps 4, 5, and 6 of the Windows installation (power up your device, plug in the AVR ISP mkII, make sure the green light comes on)
  5. Open up the AVR Fuses program that you downloaded.
  6. Select the AVR chip type that you’re using (the name of the chip is also printed on the chip itself, use a flashlight to read the tiny letters!)
    Bend Matrix uses ATMEGA32 or ATMEGA32A
    RCD and SCM: ATMEGA168 or ATMEGA168P
    AutoBassGen: ATTINY84
  7. Select the hex file you downlaoded in step 2, and burn it onto your chip!

Mac OSX (Crosspack) –the advanced way to hack your code:

  1. Download and install Crosspack from here: http://www.obdev.at/products/crosspack/index.html]
  2. Download the hex file for your upgrade. Save the file in your Home directory, so you can find it easily with the Terminal.
  3. Plug in your AVR ISP mkII. The green light by the USB plug might not come on.
  4. Do steps 4, 5, and 6 of the Windows installation (power up your device, plug in the AVR ISP mkII, make sure the green light comes on)
  5. Open up your Terminal program (in Utilities folder)
  6. In Terminal, type “ls” and hit enter. You should see the name of the hex file that you saved in your Home directory (along with everything else in your Home directory). If not, you didn’t save it in the right place.
  7. Now tell it to burn the code. For the RCD, type this command:
    avrdude -P usb -c avrispmkII -p atmega168  -U flash:w:clocker.hex -v -v

    And press enter. This assumes your hex file is named “clocker.hex”. It should say “avrdude: Thank you” and have no errors above that. If all goes well, unplug your 6-pin cable and your RCD is updated!

    If you’re using a fresh chip, you’ll need to use this command to burn the fuses:

    avrdude -P usb -c avrispmkII -p atmega168 -U hfuse:w:0xd7:m -U lfuse:w:0xef:m -U efuse:w:0x01:m -U flash:w:clocker.hex

Linux:

  1. Install avrdude. You can probably install it with your package manager, such as Aptitude: (type “sudo aptitude install avrdude”), or Ubuntu’s Synaptic
  2. Follow the OSX instructions starting at step 2. Hint, if avrdude is not finding a usb connection, you might need to type “sudo” before the avrdude commands. Then it’ll ask you for your password before running avrdude.

Solar Pump display panel design

Posted in Uncategorized on March 22nd, 2010 by Dann Green – 1 Comment
4435547099_cb89302c52_b

Solar charging station at the Austin fire station Trinity/4th

Sol Design Lab’s Solar Pump, a solar-powered charging station for mobile electronics, was an official part of South-by-Southwest this year. The stations have standard outlets, so anyone can walk up and charge a cell phone, laptop, or even an electric bike or scooter. The power comes from solar panels on the roof of the stations, so there’s no charge for charging (sorry… couldn’t resist). Refurbished 1950’s gas pumps provide a retro-future look that catch the public’s eye and twists the concept of “fill-up station”.

We set up three stations throughout Austin, including a large station downtown by the convention center, a smaller “pump” outside the South Lamar Alamo theater, and a mobile “pump” at Auditorium Shores. The Solar Pump grew out of Beth Ferguson’s MFA project, and these represent the third generation of prototypes.

LED display panel

LED display panel

My main role was the design and construction of the digital display, which used LEDs to indicate solar panel voltage, power output (to the inverter) and battery bank voltage. More technical details below….

Each station is a little bit different, with either 2 or 4 deep cycle 100AH 12V batteries creating a 24V system. A 1100W inverter supplies standard 110VAC power to the user through a GFCI outlet (including a big red Emergency-Stop button!). Between 2 and 4 bi-facial Sanyo solar panels charge the batteries through a Morningstar charge controller. We used the Pentametrix system to read the shunts and voltages, and then send that data digitally over RS-232 to the custom digital display module.

Solar charging station at the Austin fire station Trinity/4th

Gotta love that E-stop button!

solarpump

Solar Pump at Alamo Drafthouse, South Lamar

Tech details

Here’s the schematic:

Front panel schematic

Front panel schematic

Here’s the code (avr-gcc, using AVR Studio 4): solarpumppanel.c

Software

An Atmel AVR ATmega32A chip is at the core, communicating with the Pentametrix meter over a serial cable. The AVR makes a “request” to the Pentametrix every 500mS or so, and the Pentametrix responds with the latest readings: voltage on the solar panels, voltage on the battery bank, and current flowing out of the batteries to the inverter. The AVR then scales and converts these numbers and outputs them to the LED displays. The UART runs at 2400 baud, and the final byte is a checksum. If the checksum is off, or if the AVR doens’t hear a response from the Pentametrix, an error light goes on inside the box. Not terribly useful for debugging on the field, but on the bench this was handy.

Hardware

A Max232 chip handles the RS232 voltages, converting RS232 levels (-7V/+7V) to/from TTL levels (0V/5V). This directly connects to the AVR’s UART pins (RX/TX). These chips rule, they are totally worth the cost and board space.

Driving the LED displays turned out to be a little harder than I originally thought because the super-bright displays we found drop 7.4V, which is obviously higher than the 5V the AVR chip runs on. So I had to use an NPN/PNP transistor pair for each blue LED digit to switch +9V. (Q4/Q4B, Q5/Q5B, Q6/Q6B). This turned out to work well once I became OK with modifying the PCB and changing the code invert the “on” and “off” signals on the AVR pins for the blue digits only.

The yellow digits drop much less voltage, so I ran them on +5V and only needed on PNP transistor per digit (Q1, Q2, Q3). I’ve used the 2N5401 PNP transistor with good results for switching LED segments in other projects, and also have seen it around in the Peggy project… it’s fast and can drop a good amount of power… a keeper.

Finally, there’s a “bar graph” LED display which is 5 sets of LEDs, with 4 LEDs in parallel in each set. Each LED set is a different type of LED so they have a trimpot to set their brightness. I used the same 2N5401 PNP transistor on a 5V rail for these.

I went super-conservative on the powersupply, dropping the original 24V down to 18V, then to 9V, then to 5V.

Oh did I mention I found Pink LEDs! Yeah!!

Enclosure

Beth and drew up the front panel graphics in Illustrator, and I sheared some panels from 2mm aluminum. I then took that to a friend with a mill, who cut the rectangular holes for the numerical displays. I drilled out the round holes figured out a (perhaps excessively elaborate) way to mount the PCB to the front panel, and bend a flanged box to shield the circuit from the rear. The front panel is the main structural element and is mounted to braces which mounted to the frame of the pump.

I powdercoated the front panels white, and then applied the graphics with a decal, and baked that on. It came out pretty nice!

Guitchurn

Posted in Autonomous Bassline on February 21st, 2010 by Dann Green – Be the first to comment
Making butter and basslines

Making butter and basslines

Michael Merck asked me to collaborate on upgrading his Guitchurn, which was (at the time) an acoustic musical instrument coupled to the shell of a common hand-built olde tyme kitchen appliance. Naturally I thought any cottage churner would enjoy electronic basslines while doing the deed, so we connected an Autonomous Bassline Generator to it for the Cantanker Magazine show (issue 7) at the Big Medium Gallery in October ‘09, and then later at the Creative Research Gallery.

The Guitchurn works by a little paddle on the arm breaking an infrared light beam each time you bring the arm down. The Bassline Generator detects the broken beam and plays the next note in the autonomously-generated melody. So you only get music if you’re making butter and vice-versa.

Bread was set out, with a note asking you to “wait until the butter comes”, which surely was incentive to take a turn on the churn. For some people it was their first time churning butter and playing electronic bass! Imagine! Copious amounts of hand-sanitizer, wine bags hanging from framed art, banana pudding in lettered mugs, and Marcel Duchamp speaking backwards also added to the festivities.

Guitchurn Installation at Big Medium Gallery

Guitchurn Installation at Big Medium Gallery

SimSam

Posted in Uncategorized on January 19th, 2010 by Dann Green – 7 Comments

SimSam 1.0

Unveiled at the beginner’s class at Handmade Music Austin #4, the SimSam (Simple Sampler) is a single-chip “sample-rate cruncher” that’s glitchy as all-get-out but only costs about $8 in parts. It’s an effect with an input and output jack; and it’s a noise-maker since a jumper shorts the output back into the input when nothing is plugged into the input jack. We built 28 SimSams in a couple hours at the workshop.
read more »

Handmade Music Austin #3

Posted in Autonomous Bassline, Handmade Music Austin on December 22nd, 2009 by Dann Green – Be the first to comment


YouTube via EA78751
“Video from Handmade Music Austin #3, Dec. 20th 2009. At this workshop 13 people built the free project, Mini Space Rockers. After that we witnessed live electroacoustic sound by Lustigovi. And then 19 people built the upper division project, Andromeda Mk-4 Analog Bass Drum. And last there was an open jam with DIY bassline and drum machines from this workshop series, plus acid lines from a MIDIbox SID.”

Handmade Music Austin #2 superfun!

Posted in Autonomous Bassline, Handmade Music Austin on December 6th, 2009 by Dann Green – Be the first to comment

It was a success, we built 30 mini-Space-Rockers and 25 Autonomous Bassline Generators (in 5 hours!). Treasure City was there selling some used electronica miscellanica… Douglas Ferguson & Steve Marsh , Red X Red M, and Telepathic Friend rocked the house, and we capped it off with a set using a couple dozen Andromeda Space Rocker devices… yeah!

Andromeda Space Rockers interactive jam

Posted in Autonomous Bassline on December 6th, 2009 by Dann Green – Be the first to comment

4ms Pedals and Eric Archer teamed up to present an interactive bass&beats installation at the Hope Center last night in Austin, TX. There were four stations around a table, each station had three Andromeda MK analog drum machines and one Autoanomous Bassline Generator. Each station also had four LEDacle bendy-light tentacles courtesy of Bleeplabs, which you could  shine on the photocells to sweep the filter sounds. Each device kept in time with an IR beam, and a MIDI clock ran between each board to bridge Nathan Wooster’s MIDI-IR Sync devices. It was packed!!

We’ll break it out again at the next Handmade Music Austin event Dec. 20 at the Salvage Vanguard Theater…. Maybe some more events too?

Handmade Music Austin #1 video

Posted in Handmade Music Austin on October 29th, 2009 by Dann Green – Be the first to comment

HMA October was a success! Here’s a video… Next one is Sunday November 14, 2009

Autonomous Bassline kit

Posted in Autonomous Bassline on October 26th, 2009 by Dann Green – 4 Comments

I finally finished the ABG kit! The boards are here and we’re ready to roll for the Nov 14 workshop at Handmade Music Austin…

You can purchase the kit, the PCB, or a programmed AVR chip here
Basic Demo:

What it does with default settings:

IR Sync Demo: