Victoria, B.C. Canada


 
HOME
 
PROJECT
 
TEAM
 
FILES
 
GALLERY
 
LINKS
 
THANKS

@

@

What is Pedalboard?

[+]  Introduction
[+]  Objective @
[+]  Midi Specification @
[+]  Hardware Design
[+]  Software Design
[+]  Midi Programs
[+]  Features of our Midi Compatible Organ Pedal
@


I.     Switches

Objective: the objective of the switches is to output low when a pedal is being pushed and output high when a pedal is released or not pushed.

Explanation: the switch is simply made of normally open push button. Upon further investigation of the pedal board, we found that there is a built in switch for each pedal (32 in total), so there was no need to construct build an external device to mount onto the pedal board. Instead, a connector was purchased and connected to the built in connector on the pedal board.

II.    Multiplexers

Objective: the objective of the multiplexer is to retrieve 32 pedal notes and transfer them to the PIC microcontroller.

Explanation: although PIC18F2320 supports 3 ports (24 Input/Output), Port C is reserved for crystal oscillator and SPI communication. So that leaves 16 input/output available. Moreover, 3 outputs are reserved to control the multiplexer input select. Therefore this is not enough to retrieve all 32 signals from the pedal board. As a result, four 8 to 1 multiplexers were used.

The first multiplexer is responsible for the 1st 8 switches on the pedal board. The second multiplexer is responsible for the next 8 switches.
The figure below shows the system block diagram of hardware connection.

III.   PIC18F2320

Objective: the objective of the PIC is to retrieve key note data from the pedal organ, convert them to MIDI data bytes and transmit the data to a midi port via serial peripheral interface.

Explanation: the PIC is responsible to control the multiplexers. When an input is selected from the multiplexer, the PIC has to know which input from the multiplexer corresponds to which key note from the pedal board. These data must be stored in the PIC and transferred to a MIDI port via SPI.

Port RB0, RB1, RB2 and RB3 are set as input. These ports are used to retrieve signals from the multiplexer. When the signal is received, it is immediately stored in an array.

Port RA0, RA1, and RA2 are used for multiplexer select. Multiplexer select is used to select one of the 8 multiplexer inputs. This method allows us to use one output for 8 signals.

Port RA3 is used to enable the multiplexer. When set to low, multiplexer is activated.

Port RA4 and RA5 are used to select the types of instrument to play. The default is set to Church Organ as it is a pedal board after all. The instrument select is just an additional thing that we added into the circuit for fun. Since MIDI allows us to play up to 128 different instruments, we thought itll be fun and will be a good presentation on the presentation day.

Port RA6 is used to select bass or middle C. Since keeping the setting at bass when we change the type of instrument to play will not sound very pleasant. As a result, this switch is implemented so that if the user would like to use the pedal board as organ bass, he/she can set it by pressing the button connected to Port RA6 (shown on circuit schematic). If the user leaves as default, he/she can play middle C notes.

After all 32 signals from the organ pedal is retrieved and stored. The PIC converts these data to digital signals in MIDI data format. The data is then transmitted to a midi port through SPI.

Port RC6 is used for sending data to a midi port serially.

@

Summary Table of PIC Port A, B and C

Port

Pin Name

Input/Output

Function

A

RA0 V RA2
RA3
RA4
RA5
RA6

Output
Output
Input
Input
Input

Multiplexer Select Input (S0, S1, S2)
Multiplexer enable Input (active low E)
Change program (decrease)
Change program (increase)
Change to bass or middle C

B

RB0 V RB3

Input

Multiplexer output to PIC

C

RC6

Output

SPI TX to cable

  

Summary of Multiplexer Input Select

Select Input (S2,S1,S0)

PIC Input (key notes)

S2

S1

S0

RB3

RB2

RB1

RB0

0

0

0

25

17

9

1

0

0

1

26

18

10

2

0

1

0

27

19

11

3

0

1

1

28

20

12

4

1

0

0

29

21

13

5

1

0

1

30

22

14

6

1

1

0

31

23

15

7

1

1

1

32

24

16

8

Multiplexer 1 is responsible for switches 1-8 as you can see on the table port RB0. Multiplexer 2 is responsible for the next set of switches, then multiplexer 3K

As you can see from the table, 8 switches share a multiplexer output. This allows us to use four bits of port B to retrieve 32 signals.
These data are stored in an array in the following order:
1,9,17,25,2,10,18,26,3,11,19,27,4,12,20,28,5,13,21,29,6,14,22,30,7,15,23,31,8,16,24,32
@

IV.   Overall Hardware Connection


@

       

Copyright © 2005, Midi Tech Ltd. All Rights Reserved

@