Friday, 22 June 2012

Arduino MIDI playground boards

In preparation for the BuildBrighton Midi Workshop this weekend, we've been busy etching and making up boards for the attendees to use with their Arduino microcontrollers.

These take the form of "shields" which sit on top of the main Arduino board.
Jason did a great job designing the circuit and PCB and Steve really made them look the business with his custom silkscreen/sticker job.

After etching and drilling, the stickers had to be carefully lined up. The easiest way to do this was to hold the board up against a bright light, and apply the sticker, taking care to get the pin holes shining through from the back into the correct places on the sticker front.


To make adding the components easier, we used a drawing pin to prick a small hole in the sticker at each point where a hole had been drilled on the PCB.  The end result was quite impressive!


After populating and soldering all the components onto the board(s) they're finally ready for testing before the big day. We wanted to make sure that we spent as much time as possible working around MIDI and actually creating something like an instrument, rather than lose half-a-day or more running a soldering workshop, so each lucky attendee will get a pre-made MIDI shield as part of their day's training.


Included on each board are
Opto-isolator (to conform with the MIDI specification)
4 x pushbuttons
8 x LEDs
1 x potentiometer (variable resistor)
1 x LDR (light dependent resistor)
1 x MIDI in DIN socket
1 x MIDI out DIN socket
Through headers to allow boards to be stacked on top of each other
1 x jumper to disconnect the LEDs to allow the digital output pins on the Arduino to be re-purposed

All in all, making the boards has been a lot of work, but we think they're worth it. They look really impressive when soldered up, and we're looking forward to seeing what ideas other people can come up with for them.


Tuesday, 12 June 2012

MIDI bass frets - exploded view

Here's a quick diagram showing how our MIDI bass fret system works.
We've already removed the fingerboard off our bass guitar, and plan to replace it entirely with home-made circuit boards (each section between two frets is a separate PCB).


The pcbs are fixed to the guitar neck, screwed down on top of some sections of rubber padding. This serves two purposes. The first thing it does is create a "pocket" for the surface-mount electronics on the PCB to comfortably fit without getting damaged. Secondly, it pushes back against the board mounted upon it.

This allows us to use copper table, placed over the fret (each fret is a piece of laser-cut acrylic) to create a single, continuous circuit up the entire length of the neck.
For each guitar string, the circuit is simply a resistor and LED, so each PCB has four resistors and four LEDs (one for each string)

Monday, 11 June 2012

BuildBrighton midi workshop

Over at BuildBrighton, we're working on putting together a make-your-own-MIDI-instrument workshop to teach people the core basics of MIDI messaging and how to send and receive MIDI commands. As part of the workshop, we'll be providing all attendees with an Arduino shield with some buttons, LEDs, volume/pitch bend pot and more.

As the workshop is just a few weeks away (on Saturday 23rd June) we've got some boards to make up!
Which means the nerd session or two is going to be taken up etching and drilling PCBs.


Using a mixture of press-n-peel blue and the cheap Chinese alternative, we've managed to toner transfer about 20 boards.


After a marathon etching session (about three hours!) here are no less than sixteen boards (the final three boards were still etching when this photo was taken)


All we need now are some spanky cool looking stickers (for the component side) from Robot Steve then we can drill and populate the boards next Thursday night.



Saturday, 9 June 2012

MIDI bass fret setup

We're replacing the entire fingerboard for our MIDI bass, and replacing it with a number of PCB sections. We're basically creating a resistor ladder on the underside of the fingerboard, for each string on the guitar. The idea is that the resistor ladder creates a voltage divider and we take an analogue input from the resistor network into the PIC microcontroller


If all the strings are connected to ground, and all the frets on the fingerboard are connected at different points along the resistor ladder, we should be able to tell which fret the string is being pressed against, and therefore which note to play.

In the example above, if the (grounded) string was held on the second fret, the total resistance between the nut end of the board and the input pin would be quite high - so the voltage divider creates a high voltage on the input pin.

But if the player holds the (grounded) string on, say, the 18th fret, the 5v going through the resistor network goes through fewer resistors between the input pin and ground, causing the voltage on the input pin to drop. With clever use of resistor values, we should be able to create a look-up table in firmware such that we know instantly which string is being held against which fret. No more latency issues trying to sample and decode the frequencies that the strings are vibrating at!

Friday, 8 June 2012

MIDI bass instrument

As we haven't got everything quite to hand to finish off our multi-effect pedal circuit, and with Thursday being the regular BuildBrighton meet-up, we needed something else to work on. And, having access to a full equipped workshop with some really cool tools, it wasn't time to play about with resistors and microchips - we needed to do something BIG!

As we're working on some MIDI Arduino shields for an up-and-coming MIDI workshop, it made sense to work on a MIDI instrument. But exactly what?
We've already spent some time considering making a midi guitar - where the input from the strings against the frets is converted into a midi signal and fed into a synth. A few years we tried this, taking the audio output from the jack socket on the instrument, and analysing it to try to work out which note(s) were being played.

It turns out that this is very difficult.
To try to simplify things, we looked into making individual string pickups (so each string has it's own signal to analyse instead of trying to work out which chord is being played across all six strings!). This is exactly how the Roland's GK-3 "divided pickup" works. The signal from each string is sampled and an output value given to a different channel. The only problem with this approach is that there's a noticeable delay between plucking the string and the sound being played. It gets worse with lower notes and makes a bass guitar almost unplayable!

So we're back to using the contact of the strings against the frets as our signal, which removes the need to analyse the audio output. We started by:

Removing the traditional fingerboard from a bass guitar. This was quite easy (once we decided we'd never want to reuse the original fingerboard). Just plenty of heat from a hot gun, and some levering with a couple of screwdrivers.



It actually took three of us to do this! The neck was removed from the body and one person held it with one hand while hacking at it with a screwdriver with the other hand. The second person also levered away with a screwdriver, while the third waved the hot gun up and down the neck of the guitar. It took less than 10 minutes to remove the fingerboard!


(the scorch marks on the neck will be sanded out when we come to finish the instrument!)

With the fingerboard removed, it was time to design a replacement.
We're going to be making the replacement fingerboard from copper clad board, cut into sections, with an acrylic fret (3mm) between each one.

The first fret of the bass was measured as 46.5mm long.
Given that the length of a guitar string is exactly half one octave higher (i.e. the string length when the 12th fret is played is exactly half the string length of the open low E string) we came up with the following formula:

Length of next fret = length of previous fret / (2^ 1/12)
where 2^(1/12) is two to the power of one over twelve.

We made a cardboard template to try the idea out:


By the time we'd reached the end of the neck, we had 23 frets.
The original bass had only 22 so it looks like our original measurement on the first fret was a little out. However, it's still within a reasonable distance to recreate the original bass "feel" when playing.
Exact length isn't critical because we're never going to be playing the bass "acoustically" - our replacement frets will actually be switches, activated by the string being pressed against them. More details in the following post(s).....

Multi-effect pedal update

The Ferric Chloride yesterday evening, so we got on with etching our multi-effect pedal board, made with the (much cheaper) press-n-peel alternative. The result was pretty impressive. In short, the cheaper alternative works as well as the real thing for us. Which is just as well, as we've invested in about 50 sheets of the stuff!


A bit of drilling and filling and a bit later, we had a populated board!


Of course, the eagle-eyed will spot that there are still components missing off this board. Can you believe we can't find a 10K or 1K rated resistor in amongst all the junk in the nerd cupboard?! It's not like we're after some obscure rated component, just some common-or-garden, everyone-uses-them 10K resistors....


Here's the board soldered up (minus a few critical components) complete with "pass-through" switches. By setting these switches, you can have the input signal directed straight to the output jack (clean sound), have it pass through the fuzz circuit then straight to output, have the input go to the wah circuit only, or have the input go into fuzz then wah before hitting the output jack.


Still not quite ready for testing, but it's looking quite promising so far....

Wednesday, 6 June 2012

Components for onboard wah pedal

While waiting for our eBay Ferric Chloride to be delivered to test-etch some Press-n-Peel alternative a different parcel appeared in the post today - it's an order from Farnell for parts for our multi-effect pedal.
There's a fabulous selection of resistors, capacitors, buttons and switches:


Also included are some rather beefy 500mH inductors. They're for use in the wah part of the effect (just hope we've left enough room on the board as they're quite chunky!)


In fact, a quick trip to Maplin might be in order to see if our local Brighton store has any ferric chloride it (it probably won't - the Brighton store must be the worst stocked Maplins in the UK - unless, of course, they're all as hopeless as this!). I'd be great to get something at least working, if not finished by the end of the day!