Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Laser Matrix (???)

Status
Not open for further replies.

Q__Hybrid

New Member
Hi everyone,

I stumbled on to Andrew Kilpatrick's Laser Harp recently and got really excited about what I saw. Recently I posted something about wanting to use photoelectric eyes as my "sensors of choice" to trigger notes on a synthesizer, but they were too expensive. Well, the basic architecture of this design is pretty much the same thing at a very low cost. Sweet!

What I intend to do is expand the design of the harp into a 10 x 12 grid so that it can provide simultaneous control of 10 octaves. The triggering of a note depends on the intersection point of an interrupted beam, alot like keystrokes on a matrix keypad. A position along the 12 unit axis determines the note in the given octave, while a position along the 10 unit axis determines the octave. Sounds simple enough, but I want to be able to have more than one note triggered at once, which could become problematic, seeing as how it is conceivable that all beams could be interrupted at once, yielding 120 simultaneously triggered notes. I don't think this is possible on any synth, but I'm still uncertain.

How should I handle this? Simply duplicate the architecture that Kilpatrick made ten times and then use a master PIC to poll the other twelve, or what? I'm a little lost as to why he uses two lasers instead of just one all the way through. Anyway, I'm a little lost here as to what I should change or improve, so show me the light if you can.

Many thanks in advance,
+Q__
 
Simply duplicate the architecture that Kilpatrick made ten times and then use a master PIC to poll the other twelve, or what?

That is probably the easiest thing to do. You could probably make thw whole setup work using one PIC and some multiplexers but just using a bunch of PICs is probably easier and less confusing.

I'm a little lost as to why he uses two lasers instead of just one all the way through

Each beam splitter ideally will split the single beam into two beams with the same power. If you keep doing this to the beam, like in his picture, the final beam will have very little power and will be hard to detect. Two lasers would keep the number of splitters in a row to a minimum.

I want to be able to have more than one note triggered at once, which could become problematic, seeing as how it is conceivable that all beams could be interrupted at once, yielding 120 simultaneously triggered notes

You can have more than one note by adding the signals together. You can build opamp circuits that add signals together. The easiest way, since you are planning to use a bunch of PICs anyway is to do Direct Digital Synthisis (DDS) and add all the resulting signals together digitally.

DDS is fairly simple to do. You use Excel to generate the values in a single cycle of a sin wave - something like 256 points, sin(0) to sin(360). This is the signal your PIC will play back. The PIC outputs the points at a fixed rate. This rate detirmines the frequency. If you want a higher frequency you just skip every other point while outputing at the same rate. This would double the frequency. You just choose the playback rate and number of points so you can play all the frequencies you need to.

If each PIC is responsible for 12 lasers then that PIC would detimine how many different signals to generate and then add them together. The main PIC would get all the values from the separate rows and add them together to get all the generated tones added together. You could then convert this value to analog, and send it to your sound system.

This method would require a lot of computation so you will want to check to make sure you have enough processing power. The advantage is that it is completely digital except the last analog output. Since you are using a bunch of PICs you can spread the processing out among all the PICs.
 
DDS, Roaming Control

bmc:

sounds like a good plan to use DDS, albeit a tad confusing.

I am opting to use this design to output MIDI to an external synth, like Kilpatrick did, but ideally this project would utilize FM Synthesis circuitry.

If you aren't familiar of FM, it's basically a constant audio signal with variable speed, just like you described, except that there are two independently controlled signals mixed together. The phase of the two signals overlap such that opposing phases cancel each other out and corresponding phases boost each other.

Musical notes can be approximated by leaving one signal at a constant speed and then adjusting the second signal until the oscillation reaches a recognizable tone. These tones usually exist where the speeds of the two signals are mathematically scaled in relation to each other, such as signal 2 being twice or three times the speed of signal 1, etc.

I have yet to find a schematic for building one of these, but they do exist and I'll track one down soon.

thanks for all the input,
+Q__
 
If you aren't familiar of FM, it's basically a constant audio signal with variable speed
"speed" isn't really the right way to talk about what's happening. The correct term is frequency. Frequency is the number of high to low cycles per second.

The great thing about DDS is that you can build whatever sound wave you like in excel and the DDS can frequency shift that whole sound. All the sound design happens in excel and so the PIC doesn't have to worry about the synthesis of the sound - just the playback.

A note on a piano sounds different than that same note on a guitar because the two contain different harmonics. They are the same note because their main frequencies are the same. Harmonics are signals that have a multiple of the original frequency. So if your main frequency is 220Hz then the first harmonic is 440Hz (220Hz*2) then 660Hz (220Hz*3) then 880Hz (220Hz*4) etc.. FM Synthesis is an analog way to add these harmonics. Adding the harmonics digitally is much easier. You just generate the sin waves of the main frequency and of all the harmonics you want and add them together.

The MIDI solution is a good way to start though. It shouldn't be too hard to come up with a cool way to arrange MIDI sounds with a lot of beams triggered even though the synth can only produce a limited number of tones at one time.
 
Now keep in mind that the laser beam itself won't be visible except where it intercepts the fingers unless you have some kind of fog effect going on here. It does limit your ability to bring it out in most places. Also the lack of tactile feedback may make it pretty hard to play.

It is a cool concept though.
 
Excel...??

I thought Excel was just a spreadsheet program. Little boxes full of text and pictures and the like. But it can actually generate audio too? Please elaborate.

+Q__
 
Excel does math on data. I wouldn't use it on minutes of audio but to generate a couple sin waves and add them together over a couple thousand points Excel should be fine.

Digital audio is just a series of numbers that represent the desired audio waveform.
 
PICs aren't great sound chips. There are sound synthesizer chips out there that the PIC can drive, though.

The other possibility is to make a midi controller out of it, then you can plug it straight into a keyboard or whatever.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top