lundi 6 août 2012

The Relay Board

This is the board in which the audio signal goes through.

This board includes 8 DPDT 5v relays, each will switch on or bypass an effect pedal. The board is directly connected to the output of the ULN2803 power driver, on the Output Board.

I bought several relays here. They work but I haven't tested them with an audio signal, I'll update the blog with the results. Hope there won't be any parasite noise ! 

Each relay should be wired like this :


I soldered all the eight relays on the same board, in order to make the shorter audio patch possible. Not sure that's a good idea, I may design 8 separate PCBs (including the FX In/Out audio jacks + LED) to make a cleaner build.

As you can see, the current prototype shown here does not include any LED, resistor or FX wire to the audio jacks :


The Output Board

This board includes :
- two 74HC595 chips for controlling the outputs
- a ULN2803 chip for driving the relays
- a huge mess of wires !


The two 74HC595 are used in the opposite way as the CD4021 : they'll convert the serial signals sent by the ATMega chip into two 8-channel outputs.


The first 74HC595 is used to connect 8 LEDs used to notify the user of the current loaded patch. These LEDs will be found on top of each footswitch.

The second 74HC595 is connected to a ULN2803 power driver that will toggle the 8 relays (and also 8 LEDs that will notify the user if the corresponding effect pedal is bypassed or not).
Note that the ULN2803 chip inverts the value given in input, this behavior will be bypassed using a little trick in the software.

Once everything soldered, the controller board looks like this :




I've made two huge mistakes when wiring the relay outputs on this board :
- wiring the (8 - n)th pin of the 74HC595 with the nth pin of the ULN2803 was stupid : intead of using a bunch of yellow wires (see below) to reverse the pins, I should have wired those pins front to front, then reverse the order of the relays !
- I forgot to include eight 220 ohm resistors between the ULN2803 output and the effect-control LEDs. I'll have to solder them directly on the LEDs (and boy, I hate doing that).


The Controller Board

My prototype is made on perfboards bought here. I don't really recommend using these, they're of very low quality and I had several issues with them.

This board includes :
- the ATMega chip wired in standalone mode
- a CD4021 chip for footswitch input
- a voltage regulator

The eight momentary footswitches are directly linked to a CD4021 chip, that will read the current input and transmit it to the ATMega with a serial signal.

The footswitches could be directly connected the the ATMega I/O pins, but I wanted to reduce the number of pins needed, thus the CD4021 chip.

Here's a great tutorial about this.

The 7805 5V regulator is wired this way :
Once everything soldered, the controller board looks like this :






Burning a vanilla ATMega328P chip

Since I'm more confident with software than with hardware, I decided to use an Arduino platform to control the looper.
Debugging was done using a standard Duemilanove board, but the final product will embed a ATMega328P chip in Standalone Mode for cost effectiveness.

However, before updating a vanilla ATMega328P chip (you've bought it somewhere where it's cheap) with code written in the Arduino IDE, you have to burn the Arduino Bootloader to the chip first. I had some trouble doing this (using MacOS and my Duemilanove board as the programmer) but I found the solution eventually. Here's the summary of how it's done :

Configure the programmer
Open Arduino IDE, in the menu, choose File > Sketchbook > ArduinoISP
In the heartbeat()function, change the line :
delay(20)
to
delay(40)
In the menu, choose Tools > Programmer > Arduino as ISP
In the menu, choose Tools > Board > Arduino Duemilanove (or your own board)

Wire the Vanilla ATMega chip
Pin 01 >>> Arduino I/O 10
Pin 01 >>> 120 ohm reistor >>> +5v (*)
Pin 07 >>> +5v
Pin 08 >>> Ground
Pin 09 >>> 22pF capacitor >>> Ground
Pin 09 >>> 16MHz quartz >>> Pin 10
Pin 10 >>> 22pF capacitor >>> Ground
Pin 17 >>> Arduino I/O 11
Pin 18 >>> Arduino I/O 12
Pin 19 >>> Arduino I/O 13
Pin 20 >>> +5v
Pin 22 >>> Ground

(*) You have to wire a 120 ohm resistor between the RESET pin (pin 1) of your chip and the +5v source. You must be as close as this value as possible. I used 100 ohm + 15 ohm resistors in series, it worked fine.

Wiring in progress...

Ready to burn !


Burn the bootloader !
In the menu, choose Tools > Burn Bootloader

Done, you now have a cheap-o Arduino compatible chip :)


Specifications

Here are the specifications for this looper. It should be able to drive the audio path through 8 effect pedals, and use true bypass to (de)activate each effect.
Each user patch should be able to switch on or bypass any effect pedal.

Unlike Carl Martin's Octaswitch, the looper should store the 8 user-defined patches to a flash memory, and does not use mechanical DIP switches for patch programming/saving.
I don't know yet if this is the best practical option , but the first goal here is fun :)

Main specs :
- 8 user-programmable patches
- uses flash-memory to store patches
- uses a bazillion LEDs for quick overview of current patch
- 8 DPDT relays for pedal bypass
- easy programming without additional switches
- A/B box feature for dual-guitar input
- 12v or 9v DC in

I think the looper should be easy to use :

- A click on any footswitch will toggle the matching FX patch on/off (so we can have a true bypass). A LED just above the switch will notify the user that the current patch is active. The eight LEDs above the jack effect loops will set be set on to show which effects are active, and which are bypassed.
- A long press (2 seconds) on ant footswitch will activate the programming mode for the matching FX patch. The patch LED starts to blink to notify this.
From now on, pressing any footswitch will toggle the matching FX pedal on/off for the current patch. Performing a long press on the patch's footswitch will leave the programming mode and save the chages to the flash memory.


More features could be added quite easily :
- Tuner-out
- Input buffer
- Split the chain to have 4 pedals in amp input, 4 pedals in amp's FX loop
- Built-in boost pedal

Building a guitar looper/switcher

My guitar pedalboard is currently loaded with a bunch of pedals.

A common issue with separate pedals is that switching from one sound to another needs a bunch of foot clicking, which isn't as fast as using a multieffect patch (and also leads to many errors).
In order to switch quickly from one sound to another, I decided to build my own looper.

Similar tools already exist ready to sell (something I didn't knew before starting my build), like the Carl Martin Octaswitch, however I decided to make my own anyway...

My looper is still in an early prototyping stage, has a few bugs, and has not been tested with my pedalboard yet. 
I still have to buy an expensive metal enclosure, so I'm still trying to find a cheap option.

The prototype : a huge mess of wires !

More coming soon.