Archive for October, 2017

16
Oct
17

The Binary Winder

I’d been planning a circuit which required a rapid input of binary numbers, ideally from a microprocessor, and it occurred to me that this could be a useful companion to the Bigfoot sequencer or the Chessboard Keyboard  – both methods I was using for sending binary data to keyboards and other devices.

I figured that this could be done manually by using a 16-way hex switch with no end stop – as they are commonly found – and a winding handle as used for re-stringing a guitar.

I bought a couple of these very cheaply on eBay:

and glued the switch inside the body of the string winder – the part which normally fits over the guitar machine head:

This would be the part of the device which did all the work.  Connecting +V to the common pin of the switch would enable it, as it was turned by the handle, to output the 16 binary numbers from 0000 to 1111.

The actual circuit itself was built inside one of the small transparent plastic boxes – described as ‘jewellery cases’ – which I had previously used for small projects such as the Touch-Radio and various effects devices.

In the above pictures the 16-way switch can be seen on the right-hand side, the 5-pin DIN binary output socket at the bottom, and 4 LEDs at the top to indicate the binary number.

The purpose of the 4 DPDT switches in the middle is to change the order of the 4 bits of the binary number.  This was so that winding the handle wouldn’t just produce an output running up and down the scale, but could be changed to give a bit of variety.

*

The actual circuitry consisted essentially of passing 9v to the 16-way switch, and the outputs of the 16-way switch to the 4-pin DIN socket via the 4 DPDT switches and a 4050 output buffer.

There was space inside the case for a 9v PP3 battery, so I included a battery clip inside, but also added a 3.5mm socket for external power.

As with many of my devices, I stuck a square of velcro on the back of the box so that a PP3 battery in a holder could be attached.

Space was a little tight inside, but not enough so to cause problems, and after some time the switches were all connected together with the 4050.  I didn’t bother with a circuit board, but just soldered all the connections to the 16-pin i.c. holder which the 4050 was plugged into.

Surprisingly, the case  closed without difficulties, and I was able to test it out with a couple of recent devices with binary inputs, The Telephone and the Carousel Keyboard.

In fact, there is a limit to how quickly these devices can respond to the winder – especially when the pitch is lowered, which seems to slow down the instruments’ responses as well.  However, it was very effective indeed in creating an instant sequence more quickly and accurately than it could be played on a keyboard – especially a keyboard with tiny keys like the Carousel.

Advertisements
12
Oct
17

The Carousel Keyboard

‘Carousel’ was just the brand name of this toy keyboard, it didn’t unfortunately look like a carousel . . .

. . . but having just finished the Animal Band and The Telephone, I wanted, while it was in my mind, to work on another device that could be controlled by the Bigfoot, only this time with a full two octave span, the ability to play a variety of different scales, and be tuned to play these scales in any key.

I opened up the Carousel, and it looked as though it would fit the bill.  The chip on which it was based was securely hidden under a black blob, but there were sufficient additional components to make me think a few simple hacks would be possible.

First of all, I wanted to check the instrument’s ability to be tuned.  I inserted batteries, switched on and began testing the circuit using the traditional wetted finger method – that is, starting the instrument playing one of its demo tunes and applying a wetted fingertip to different resistors on the board.

After a short test, I found the resistor that controlled the instrument’s pitch and timing.  It was a tiny SMD (surface-mounted) component, just 3 or 4 millimetres long, so was easily – though carefully – removed.  Its value – again, printed on the circuit board – was 300k, so after it was removed I replaced it with a 1M potentiometer, to increase the range of notes the instrument could produce.  The spot from which the resistor was taken is arrowed on this photograph, and the two leads going to the potentiometer can be seen:

(Also visible in the background are the wires connected to the PCB tracks required to trigger the notes).

I experimented with the resistance and found that the minimum the device would accept without crashing was about 200k, so I added an extra couple of 100k resistors before the 1M potentiometer, and found that a considerable variation in the pitch was achievable.

*

Early on in this process I disconnected the internal speaker, which was quite terrible, and added my standard 4mm banana sockets for attaching an external speaker.  The sound was 100% improved, and experimenting became a great deal more pleasurable.

Just beneath the speaker sockets a switch can be seen, which I connected up to allow the internal speaker to be selected, if an external speaker wasn’t available.

I later added an audio out socket, to allow the Carousel Keyboard to be played through the Taurus amplifier.  At first this didn’t work at all – virtually no sound came out, even though it would work with the internal or external speakers.  But I realised the output of the circuit needed a load in place of the speaker, so I put a 10 ohm resistor between the audio out and ground pins on the audio out socket, and after that it worked fine with an external amplifier.

*

I was saved from having to do the job I had performed on the Animal Band and The Telephone, working out which PCB tracks needed to be connected to produce the different notes: to my surprise, this was printed on the back of the circuit board.

There appeared to be an 8 x 5 matrix, so connections were made to the relevant PCB tracks, ready to be brought out to a new board.

*

The intention was to be able to control the keyboard with the Bigfoot sequencer, so I added a 5-pin DIN socket and 4050 buffer, as usual, ready to accept the Bigfoot’s 4-bit binary input.  This is in the form A B C D, where A is the last – rightmost – bit in the binary number, and D is the leftmost.  A is sometimes referred to as the LSB (Least Significant Bit) and D the MSB (Most Significant Bit).

The binary number 0010, for example (the number 2) would mean that D was 0, C was 0, B was 1 and A was 0; in practical terms this means that input D was 0v, C was 0v, B was +v and A was 0v.

I needed one of the inputs (D) to be inverted – i.e. if the input was 0v, I needed +v, and if the input was +v, I needed 0v – so with the 4050 was a 40106 inverter, with sections which change 0v to +v and +v to 0v.  There was very little space inside the keyboard case, so the board with the 4050 and 40106 was tucked under the output socket.  (This was before I added the 10 ohm resistor on the socket).

The circuit of the input section was like this:

There are 6 buffers in the 4050 chip; 4 of these are used (marked A B C D) and the inputs of the other two are connected to ground.  Likewise, there are 6 inverters in the 40106; 1 of these is used and the inputs of the other 5 are connected to ground.  Unused inputs on CMOS chips should normally be grounded like this to ensure correct operation.

Normally, I would use a 4067 to cover the two octaves produced by the Bigfoot – as in the Animal Band and The Telephone – but in this case that wouldn’t work.  The 4067 is essentially a 16-way switch with a single pole; in this case there were 4 different ‘poles’ to which connections needed to be made, since the notes are produced by a matrix.

Using four 4067’s would be perfectly possible, but unnecessarily expensive – each one costs between 30 and 50p, and is physically quite large, being in 24 pin wide format.  As there would only be 4 or 5 connections to each pole, it would be more effective in terms of cost and space in this circuit to use 4051’s.  The 4051 is an 8 pole switch which works in more or less exactly the same way as the 4067, but is physically smaller  – and costs less than 15p!

An important difference between the 4051 and the 4067 – related to the number of outputs – is that the 4067 requires a 4-bit binary input (16 numbers, from 0000 to 1111), but the 4051 only a 3-bit (8 numbers from 000 to 111).  This means that a different way must be found with the 4051’s to ensure that outputs for the first 8 numbers are separate from the outputs for the second 8 numbers.

This can be done by using the Enable/Inhibit pins of the 4051’s.  Each 4051 – just like the 4067, in fact – has an Enable/Inhibit pin: if this pin is at 0v, the chip will work, and convert its binary inputs into individual outputs; if the pin is at +v, it won’t work.

So, the first 3 inputs from the Bigfoot binary input socket, A B & C, are passed on to the 4051’s in the next part of the circuit, but the 4th input, D, is not.  Instead, the 4th digit is used to turn pairs of the 4051’s off and on via their Enable/Inhibit pins.

4051’s 1 & 2 output the lower 8 numbers (0000 to 0111), so as long as the 4th, leftmost, digit is ‘0’, these two 4051’s are enabled.  0v at the Enable/Inhibit pin achieves this.

4051’s 3 & 4 output the higher 8 numbers (1000 to 1111), so if the 4th digit is ‘1’, an inverted signal from the 40106 sends 0v to enable these two.

The circuit to convert the binary input to separate outputs looks like this. (The 40106 gate is repeated from the diagram of the input circuit):

The lower 8 notes are divided between the top two 4051’s in the diagram, which work together with no overlap in notes, and the higher 8 notes are divided similarly between the bottom two, according to which common pin they must connect to.  The pin connections are named in the diagram as they appear printed on the keyboard’s main PCB: the 4 common pins are connected to tracks named BP10, BP11, BP12 and BP13.

The reason there are many more than 16 output pins shown is connected with the principle of the Bigfoot sequencer.  The idea is that the sequencer outputs the notes of a scale – do, re, mi, fa, so, la, ti, do – but the exact scale – major, minor, melodic, harmonic, etc. – is determined by switches on the receiving instrument.  Normally there would be 5 double pole switches, but due to the configuration of the pins in the Carousel keyboard, one of the switches (SW2) needs to have 3 poles.

*

As with other of my designs like this, there wasn’t a lot of circuitry as such – just a lot of interconnection between the chips.  After soldering the dozens of wires needed to link the 4051’s with the switches and the Carousel keyboard’s PCB, the inside of the instrument looked like this:

There was just enough room for the new circuit board with the four 4051’s on it.

The Chessboard Keyboard proved very useful in checking that everything was working properly – one wrong note revealed a connection error on one of the switches! – and the 4 LEDs were a good double check that the binary input was being interpreted correctly.

*

Although the pitch control potentiometer worked well, I decided there was a need to be more precise about the pitch, which would effectively set the key the instrument would be playing in when controlled by Bigfoot.  So, as I had done earlier with The Telephone  – referred to above – I added a switch to change between the potentiometer and a 12-way switch.

Between each of the output pins of the switch, I inserted a 100k trimmer – with an extra 100k trimmer before pin 1 – so that the pitch of the instrument could be set to any one of the 12 steps in the octave.

In The Telephone I used ordinary single-turn trimmers, but I though it would be a good test to see if multi-turn trimmers would be as good – that is, as accurate in establishing the pitch, remaining in pitch, and not taking up too much space in the cramped enclosure.

The type I chose looked like this:

Buying 20 at a time enabled me to get them at a reasonable price – about 8p each, although this was probably twice as much the single-turn trimmers I had used in The Telephone.  They were also much more than twice as big.

However, I soldered them all in place and set about adjusting the pitches.

In this instance, I didn’t really find a big advantage in using the multi-turn trimmers.  I was tuning the pitches by ear – maybe I was able to be more accurate than with the single-turn trimmers, maybe not.  It took longer to tune each note, of course, because of the number of extra turns required.

I would have been glad if the potentiometer/trimmer arrangement had been a bit smaller, but I found space on the right-hand side of the keyboard to fit it in with the potentiometer and the other switch.  This picture shows 1 – the 12-way switch with trimmers, 2- the 1M potentiometer, and 3 – the SPDT switch which allows either the 12-way switch or the potentiometer to be selected.

I chose two knobs which fitted the space available on the top surface, drilled holes and fixed them in place.

*

That was everything I planned to do with the Carousel keyboard for now, so I carefully closed up the case and screwed it back together.  I had to cut some rectangular holes in the base to make room for the 5 switches, but surprisingly everything else fitted in.

 

09
Oct
17

The MIDI CPU Project – 3. Bass Pedals

After building the MIDI CPU box and programming it to accept input from keys, switches and potentiometers, it was necessary to build MIDI instruments to use its features.

As the MIDI CPU accepted input via a 25-way DIN socket, it would just be necessary to equip each instrument with such a socket and link it to the MIDI CPU with a suitable cable.

The first instrument I’d planned was a set of 13-note bass pedals, and the initial SysEx file with which I’d programmed the MIDI CPU was suitable for this application, with the first 13 control terminals, 0 – 12, configured as a complete octave from C0 to C1.

I got the pedals from a local seller on eBay who dismantled and repaired Hammond organs.

They were in excellent condition, and the switches on each of the pedals seemed to be still wired.  They looked like this:

and the actual connections were like this:

Pedal switches

The two tabs on the front linked one side of all the switches together; when a pedal was pressed, this bus would be connected to the other side of that individual switch, the tab on the top.  This was perfect for this application, in which an individual switch connected to 0v would be interpreted by the MIDI CPU as a note command.

My main task, then, was to connect each of the 13 switches to a 25-way socket, in order to pass the switch presses to the MIDI CPU box.

In addition to this, I wanted to have Octave Up and Down and Hold commands available, so there would be 3 further connections to the 25-way socket.

Finally, I would have to construct a housing in which the pedal unit would sit.

*

There were no circuits as such involved in this project – it was just a case of wiring up the switches and connecting them to the socket.  At the same time I decided to add a couple of extra sockets that would enable the pedals to be used in a different way if necessary.

The additional sockets added were a 15-way socket, which would be compatible with the Superstylonanophone (another MIDI device, with  a built-in MIDI-USB interface):

and a 9-way socket compatible with the Apple IR remote:

*

I connected the switches to the sockets and, because the enclosure I had planned was designed to have another instrument on top of it (another MIDI foot controller, a Digikick Footar) I connected the Hold and Octave Up and Down connections to 1/4″ sockets so these switches could be external, rather than on the top of the pedals.  All the sockets were housed in a small panel, which would be attached to the rear of the enclosure.

*

After connecting the switches to the sockets, I found a D25 cable and attached the Bass pedal unit to the MIDI CPU box.  At the moment the MIDI CPU box is connected to a laptop via a Midisport 2×2 MIDI-USB interface – along with the Digikick Footar – and controls software instruments in Apple Logic.

I added 2 or 3 different bass instruments to the Logic set-up and tested the pedals.  All notes worked as they should.

With an external switch I tested the ‘HOLD’, ‘OCTAVE UP’ and ‘OCTAVE DOWN’ functions, which seemed to be working OK, so deemed it safe to screw down the top of the case in which the pedals were housed and fix the panel to the back of the case.




andymurkin

October 2017
M T W T F S S
« Sep   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Enter your email address to follow this blog and receive notifications of new posts by email.