Laser Instrument (advice is needed)

Hello Arduino Forum,

I'm (hopefully) going to make a musical instrument with lasers instead of strings for my final school project.
I will use 8 lasers and 8 LDRs. All lasers will have a dedicated LDR they are pointing at, and if the contact is interfered, a MIDI signal will be generated. I just drew the schematics: .
I don't have an awful lot of experience with (complex) electronics, and I'm hoping you could give me some advice/corrections.

As you can see I will have two circuits, one for the lasers and one for the LDRs and the arduino. The lasers (20mw green diodes) use 3v and 250mA, and I want to be able to plug it into a wall sockets, hence the transformer.

Thanks in advance!

Edit: The image doesn't seem to work, so here is the link: http://postimage.org/image/swhfyjyed/full/

The lasers (20mw green diodes)

Why such powerful devices?

AWOL:

The lasers (20mw green diodes)

Why such powerful devices?

I want to be able to see the beams. I guess I could use 5mw, but will those be visible? (I have acces to a smoke-machine)

I want to be able to see the beams. I

Get it wrong, and they could be the last things you see clearly!

AWOL:

I want to be able to see the beams. I

Get it wrong, and they could be the last things you see clearly!

They wont be pointing towards people, but on an LDR, so once installed it's completely safe.

Something else: Is my drawing correct? I was wondering if it is possible to just draw the cable through all the cables after the LDRs, and connect it to the ground (like i've drawn)

so once installed it's completely safe.

Provided nothing can deflect the beam.

I don't think the drawings is correct. You need 8 resistors in series with LDR to form a voltage dividers, than connect middle point to digital input. Probably, you could activate internal pull-up resistors for this, than LDR would be between input and ground (not +5V).
The powering lasers using transformer is also not gonna work right, lasers would light up for short period of time, so your LDR would constatnly read 50/60 Hz square wave, not saying that forward peak current should be limited somehow.

FYI a LDR has much slower response than a phototransistor or photodiode. If you're moving your hand through the beams slowly it won't be an issue, but it would be possible to move your hand through quickly enough to miss the signal.

I'd also suggest adding a way to switch the lasers on/off so you can calibrate your sensors. Turn the lasers off, take a reading, turn them on, take a reading, then set your threshold somewhere in between.

As Magician mentioned:

All the LDRs in the original image are connected to digital inputs. I'm not sure how you would calibrate that.

With a soldering iron.

dxw00d:
All the LDRs in the original image are connected to digital inputs. I'm not sure how you would calibrate that.

Indeed. In that case the OP needs to use a variable resistor in place of the fixed resistor to calibrate the sensitivity of the LDRs.

dxw00d:
All the LDRs in the original image are connected to digital inputs. I'm not sure how you would calibrate that.

http://www.ladyada.net/learn/sensors/cds.html
If you scroll down it says how to connect LDRs to digital inputs, although I will have to edit my schematics for it.

Magician:
I don't think the drawings is correct. You need 8 resistors in series with LDR to form a voltage dividers, than connect middle point to digital input. Probably, you could activate internal pull-up resistors for this, than LDR would be between input and ground (not +5V).
The powering lasers using transformer is also not gonna work right, lasers would light up for short period of time, so your LDR would constatnly read 50/60 Hz square wave, not saying that forward peak current should be limited somehow.

Thanks for the feedback, I'll look into the resistors, although I doubt I will need them (check out the link above)
Also, why would the lasers not work? If the transformer turn 220v AC into 24v DC, it should work, right?

I'll look into the resistors, although I doubt I will need them (check out the link above)

Not sure you are looking at the same drawing, but picture in the "Analog voltage reading method" section shows 10k resistor in series with LDR.

Also, why would the lasers not work? If the transformer turn 220v AC into 24v DC, it should work, right?

Wrong, transformer outputs 24 AC, according to your drawings.

Also, why would the lasers not work? If the transformer turn 220v AC into 24v DC, it should work, right?

As well as the fact you are feeding it with AC, there is nothing to limit the current. You will blow all the lasers.
Driving a laser is far more complex than this see:-
See this for how to do it.
http://www.repairfaq.org/sam/laserdps.htm

Magician:

I'll look into the resistors, although I doubt I will need them (check out the link above)

Not sure you are looking at the same drawing, but picture in the "Analog voltage reading method" section shows 10k resistor in series with LDR.

Also, why would the lasers not work? If the transformer turn 220v AC into 24v DC, it should work, right?

Wrong, transformer outputs 24 AC, according to your drawings.

At the bottom of the page it says: "BONUS! Reading photocells without analag inputs". As I've stated, I will use digital pins, not analog ones, because I won't have enough of those. According to the drawings, I'll just need 0.1 uF ceramic condensators.
About the transformer: I now see my drawing was wrong. I've been searching, and found this: http://www.security-systems.nl/377-Diversen/220V/110V-50Hz/60Hz-24V-DC-250mA-Power-Supply.html.
But as Grumpy_Mike has said, it probably wont be that easy to power the lasers, since they will blow up at a current peak.

BTW, thanks for all the feedback guys!

not analog ones, because I won't have enough of those

You can use a 4051 to multiplex more analogue inputs. Reading an analogue signal with a digital pin will take too long for you in this situation.
Look at this project for how to use a 4051:-
http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html

Grumpy_Mike:

not analog ones, because I won't have enough of those

You can use a 4051 to multiplex more analogue inputs. Reading an analogue signal with a digital pin will take too long for you in this situation.
Look at this project for how to use a 4051:-
MIDI Footsteps

A multiplexer can only read a single signal at a time. It would be nice if I'm able to read multiple signals, so I can hit multiple "strings" (lasers) at a time. Is there any other way that will have quick response time, other than buying an Arduino Mega?

A multiplexer can only read a single signal at a time.

But you've only got one A/D anyway, so you haven't lost anything.

You missunderstand, you can't read more than one signal at a time on an arduino, even a mega. There is only one analogue to digital converter and a multiplexer inside the chip. For what you are doing you will not notice any extra delay from an external multiplexer.

AWOL:
But you've only got one A/D anyway, so you haven't lost anything.

what do you mean exactly?