0% found this document useful (0 votes)
179 views7 pages

Electronica Midi Controller Keyboard

This document describes a MIDI keyboard controller design for use with a PC soundcard. The controller is powered directly from the game port, requiring no additional power supply. The design uses a PIC16F84 microcontroller and supports up to 64 keys without velocity sensing. Various versions of embedded software hex files are available for download. Instructions are provided on building the controller, and examples of realizations built by others are shown. Future enhancements like adding velocity sensing are discussed.

Uploaded by

Serefino Fino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views7 pages

Electronica Midi Controller Keyboard

This document describes a MIDI keyboard controller design for use with a PC soundcard. The controller is powered directly from the game port, requiring no additional power supply. The design uses a PIC16F84 microcontroller and supports up to 64 keys without velocity sensing. Various versions of embedded software hex files are available for download. Instructions are provided on building the controller, and examples of realizations built by others are shown. Future enhancements like adding velocity sensing are discussed.

Uploaded by

Serefino Fino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

project #1: MKC

MIDI Keyboard Controller design for PC soundcard

Description:

This is a simple MIDI keyboard designed for use with standard PC soundcard
with MIDI/Game connector. Keyboard is powered directly from Game port an
there is no need of power supply unit, and no high voltage risk. If you
need to use it as standard MIDI device, you should build (or buy) a proper
power supply and opto-isolated MIDI output buffer. You could find more
information about such buffer module on MIDI Technical Fanatic's
Brainwashing Center under Hardware projects topic.

The schematic design is based on most popular PIC16F84 (or PIC16C84)


single-chip controller by Microchip. It supports up to 64 keys without
velocity sensing. I used keyboard from an old analog instrument, just
adding a swich under every key and wiring swiches to connect them as shown
on schematic below.

Schematic:
Used parts:
U1: PIC16F84. Can be used PIC16C84. The difference is that the first one
has Flash memory, and the second has EEPROM memory. There is no difference
in way they are used in such designs.
U2: 74LS138. This is TTL decoder 3:8 used for key rows scanning.
Q1: Quartz resonator. Must be 4MHz.
C2,C3: Capacitors 27pF each. Certain quartz resonators have these
capacitors integrated. If you use such resonator, there is no need of C1
and C2.
R1..R3: Resistors 1..10 k. Used to hold up certain IC pins. I use 1.8 k.
R3: Resistor 270 Ohms to protect MIDI output from shortcut.
Diodes: Each key has serially connected diode to prevent keycrossing when
more than one key is pressed on keyboard. These can be any type of
standard diodes.
P1: An DB15 male connector.
JP1: Jumper or moment action Button, depending on HEX file version.

Embedded software:
It is NOT enough to build this schematics in order to use it. An necessary
part is embedded program. I wrote it using Mpasm by Microchip. I put here
the hex code produced by Mpasm (this is ready to use object code). By
clicking on coloured text you can download whole project (basic version)
along with some additional information and programs.
During the project developing a number of consequent versions of HEX files
have been released. The list of these versions is given below. Clicking on
list items you can download selected versions (in zip format). Downloaded
archive files contain explanations text file, hex file and schematic
diagram of device.
You'll need a PIC programmer in order to burn the HEX file into PIC. The
programmer is very simple and easy-to-make unit. The first programmer I
used is here (ZIP), the one I'm using now is here (PDF).

MKC VERSIONS:

• Basic Version (oldest)


• Versions 2 & 1.51 & 1.52
• Version 1.54 (newest)

Some of downloaded files (PDF format) require Adobe Acrobat Reader. You
can download it for free by clicking on the link above or the banner
below.
Construction:
Here you can see pictures of MKC prototype and my first keyboard. Nothing
more to say...
You made it:
Some of realizations of MKC made by you are shown below. All materials are
published under kindly agreement of their authors. Publishing these
materials could help more people to build and use MKC.

NOTE:All designs shown below will work using original firmware published
on this site (see Embedded software ).

Igor Popov from Ukraine (his site here) developed nice printed circuit
board (PCB) using OrCad package under DOS. Pictures below show photo and
screenshot of PCB design. More detailed graphic files about Igor's PCB
design could be downloaded from here. Schematic files are included in
order to track changes made in parts names. Thanks, Igor.

The next passion of Igor is VRML (Virtual Relity Modelling Language). Here
is an projection of his 3D model of the PCB shown above.

More things about Igor's work and VRML can be found on Igor's sites:

The VRML demo can be downloaded directly from Igor's site here. If would
require VRML plug-in installed in your browser. Plug-ins and many other
things about VRML modelling can be found here (site in Russian).
Future:
There are a lot of ideas about how to continue developing this project.
The first is to make it Velocity sensitive. There are some ideas about it,
especially I like the idea given by Paul Read. Unfortunately, there is an
nasty RAM limitation imposed by the PIC chip (there are 64/36 RAM bytes
only) which don't allow me to make software Velocity implementation.
Anyway, I continue thinking about it... There are other Microchip products
which have much more RAM. Let me see the prices.

Ordering:
The main purpose of publishing this project is to give an easy way for
everyone to build his own MIDI keyboard using ready keyboard pad from an
old instrument. Information placed here is enough for more of readers to
make the project without any additional help. Unfortunately, buying parts
from the store is not enough for building the project. An PIC programmer
with software is also required in order to burn supported HEX files into
PIC.

If, by some reason, you are not able to buy/program PIC16F84, you can
order it. You can also order DIY (do-it-yourself) kit or ready assembled
and tested unit like this:

Unit code for this item is MKC. Click here or here to see ordering
details.

Thanks, guys!
I'd like to mention the people who gave me some help and ideas about this
project:

• To my friend Emil Raynovski who opened my eyes for MIDI protocol and
for the pleasure of discussing the schematics and embedded program.
• To my coleague Luchezar Georgiev for suggestions he made for
avoiding problem with key-crossing. Go to his page to see his
project MIDI filer.
• To Paul Read for giving me some ideas about adding Velocity sensing
to the keyboard.
• To Igor Popov for developing a PCB (printed cirquit board) for this
keyboard controller also for reporting me an error in schematic
drawing (now fixed). Go to his site to see his projects.
• To Ron Fleming for introducingthe fabulous B4 software by Native
Instruments that inspired me to design drawbar encoder units
(mdbc8x9 and mdbc16x9) and the much more complicated B4 console
encoder (B4ce)
Questions and Answers:
Here are some of interesting questions I'm receiving about this project
along with my answers.

Q: I have problems while trying to connect MKC to my AWE soundblaster. It


does not seem to receive MIDI messages. What should I do?
A: I've been notified about this problem by a number of people that are
using MKC. Nik 'Rebuzz' found the answer. It appeared that AWE has serial
resistor connected between the power supply line coming from motherboard's
slot to pins #1,#8 and #9 (+5v) on MIDI/Game connector. This resistor
probably limits the current that is drawn by MKC from MIDI/Game port
(remember: the original MKC is powered directly by the port and draws
about 10mA from there). Nik just short-cutted this resistor, soldering a
wire directly on the soundblaster's PCB. And that was all. Thanks, Nik.

Q: I use a soundcard which don't recognize standard 'NoteOff' message.


Instead, it recognises 'NoteOn' (Velocity=0) like 'NoteOff'. Can MKC
support 'NoteOn' (Velocity=0) message instead 'NoteOff'?
A: Yes, version 1.54 supports both 'NoteOff' message types. User decides
which kind of 'NoteOff' message will be generated during playing.

Q: Is it possible to send 'ChangePreset' and 'ChangeBank' messages using


the same design of keyboard?
A: Yes, version 1.54 includes mkcc154.hex which supports 'ChangePreset'
and 'ChangeBank' commands.

Q: I mentioned that controller generates 'AllNotesOff' message every time


when the last key was released. What is the need of such feature? Is there
a way to walk arould it?
A: The purpose of this feature was to avoid note hanging on cheaper
soundcard due to missing 'NoteOff' message. Now a new hex file is added
wich supports all mkcc2.hex features excluding 'AllNOtesOff' message
generating during playing. The filename is mkcc151.hex. Also file
mkcc152.hex was added wich allows user to decide at runtime wether
'AllNotesOff' message will be generated or not. You could download
mentioned files from here.

Q: Can MIDI channel be changed at runtime?


A: Now it is possible. I just uploaded new HEX file to the site which
allows user to cnahge at runtime MIDI channel, Starting octave, Starting
note and default Velocity. No hardware changes are required except
changing JP1 jumper with pushbutton. Go get it.

Q: Many questions.
THE BIG ANSWER: To answer the most of questions about making MIDI
controllers I wrote an article, dedicated to practical aspects of MIDI
technology. There are a number of documents concerning MIDI and
electronics in my documents page.

Q: How to make keyboard to start with MIDI note #36 (C - Do)?


A: It is now possible to use this design to drive keyboard starting at
MIDI note #41 (F-Fa), or keyboard starting at MIDI note #36 (C-Do). The
only difference is the status of JP1 jumper (see JP1 table on schematic
drawing).

Q: Can I use this keyboard with standard MIDI stuff (non PC)?
A: In order to use the keyboard as standard MIDI device you should buy (or
build) a power supply unit (5V stabilized), also build an buffer module
like one described here (in Hardware projects). CAUTION:If you have no
good background in electrics and electronics, do not try to build these
units (especially the power sullpy unit)! Besides the risk of destroying
expensive MIDI stuff, an electrical shock could be fatal for your life and
health !!!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy