Introduction: Laser MIDI Instrument for People With Physical Disability
I want to share with you instructions on how to build a MIDI music interface. The interface is designed to be controlled by head mounted laser pointer and can produce wide array of musical tones and scales.
You will notice that the method used is very similar to building a laser harp.
Please feel free to leave your feedback and improvement suggestions and maybe this product will little instrument will help to bring joy of music performance to people otherwise deprived of it.
Step 1: Build Materials
If you look at the assistive technology market you'll notice the prices of similar devices can be and often are outrageous. This is one of main reasons I decided to keep construction cost at minimum level.
1. Arduino Mega Board: not the least expensive choice but offers 16 analog inputs and will save you hassle writing code for multiplexer
2. Laser: I used key chain laser pointer can be purchased form any electrical or office supplies shop. http://www.maplin.co.uk/p/keychain-laser-pointer-...
2. 14 x LDR: Excelitas Technologies VT43N2 LDR (Light Dependent Resistor) 8Ω Light, 300kΩ Dark, 2-Pin. I decided to use these as they are nearly 1cm diameter and larger size LDR will increase your target area. can be purchased here http://ie.rs-online.com/web/p/ldr-light-dependent...
3. 14 x Resistor: you can choose value according to data sheet, but you can adjust the range of analog reading by changing the resistor value. This will come in handy if your laser pointer has low power output.
4. Jumper Wires
14 x LED and Resistor: these are used to provide visual feedback for trigger selection
1 x A3 thick cardboard: this will be used to construct the box and front face
1 x A4 polyfoam: this is used to construct the sensor modules
Cardboard and Aluminium foil: LED housing
Model Making Pen Knife: this comes in extremely handy when cutting out little shapes.
Step 2: Start With Threshold Value
First step is to prepare your test circuit. You need to put LDRs into small tubular housings to minimise the impact of environment light in LDR readings. This will help you improve the difference between LDR reading in idle state and when you trigger it with laser. The length of housing is up to you. The deeper the LDR sits at the bottom the better protection from ambient light. But if the housing is too long you will reduce the angle of impact for laser beam. This is why I came up with trade off situation and lined the inside of housing with reflective foil.
Next step is to set up value for threshold. You will use this number as a note trigger event in full code. As I already mentioned the choice of LDR resistor is dependent on materials and approach you choose. I used very simple code to see the analog values and adjusted resistance to get maximum overhead room between idle and trigger value.
The sets files are really simple I have attached code for 1 pin and 8 pins. REMEMBER: you are recieving analog values therefore need to use analog pins on baord
Step 3: Now You Are Ready to Start Building Your Test Circuit
I have build the circuit using bread board first as there are too many loose ends that can cause you headache later. The diagram is only for 8 inputs but you basically just copy the process until you reach your desired number of inputs. Make sure you connect the MIDI output to PWC~ pin 3 on your Arduino as the code is set to send signal via pin 3.
You need to connect the output to MIDI device or alternatively you can use MIDI to USB converter and MULAB to play sounds through your PC speakers.
You can check the signal flow using serial monitor. The code is included here.
Step 4: Expand
Now once you've proven your circuit works correctly, you are ready to push on further.
We are ready to add more features to the circuit that make this instrument really fun to use.
From diagram point of view, you just copy the same connection as I mentioned before.
The features we will add are note shift for beginning not by a value of semitone. This way you can play instrument in any scale!!!
Second cool feature will include scale pattern change. There's no point having access to any scale if you can only play in Major. This feature allows you to choose from various scale patterns like Major, Minor, Pentatonic, etc.
To understand better please, refer to 2D array in the code.
To implement this feature you need additional 6 sensors. Four to shift begin note and scales UP/DOWN and two more that reset the settings to default state. Unless you have perfect pitch, you can get lost very easy :)
Full code is attached here.
Step 5: Here It Comes
Step 6: Get Your Soldering Iron Ready
So you have successfully tested your prototype circuit and are ready to complete the project.
I used copper strip board to construct individual LDR circuits. This is only matter of preference. You can use your own PCB or larger strip board. Carefully solder LDR to wires that you'll later connect to Arduino, so make sure you leave plenty of slack. "Alway measure twice and only cut once"
I have also used LED feedback to confirm the trigger event. You will see in next step I have soldered the LEDS in position on polyfoam board of main module.
Step 7: Control Modules
The size of main module and control modules depends on your preference. Larger size will reduce the unwanted trigger events. Smaller module on the other hand reduces the time between tone selections.
Put together your LDR housings and polyfoam cut-outs. You can use glue but you are precise the module will hold together without glue and will be easy to access for troubleshooting or future modification.
I would strongly recommend if you intent to use instrument often to get your enclosure laser cut.
Also please note I have soldered the LEDs already in place on the board to provide better stability.
Step 8: Enclosure and Laser Pointer
Use the thick cardboard or material of your preference to construct the enclosure. I have based mine layout on Punnet MK1 file or you can alternatively go to http://boxdesigner.connectionlab.org to get pdf file of box, just type in your dimensions.
For the front face just cut out the outline of control module.
Mount modules and Arduino inside the box.
You can see I have used old headset to attach the laser pointer.
You are now ready to enjoy hours of endless fun, just pug and play :)
Step 9: Voilà
We have a be nice policy.
Please be positive and constructive.