Pages: 1 [2] 3   Go Down
Author Topic: Laser Instrument (advice is needed)  (Read 1521 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
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?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25682
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

what do you mean exactly?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
So, how does it work? Does the arduino quickly read the analog values one by one?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes if that is what your program tells it to do.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes if that is what your program tells it to do.
Which means I should be able to let him read multiple inputs quickly after eachother, right? Do you know how long it takes the arduino to read a series of 8 analog inputs?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Asked too quickly, just found this:

Quote
It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25682
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you know how long it takes the arduino to read a series of 8 analog inputs?
Between 800 and 900 microseconds, assuming they're well matched.
Figure on about 110 microseconds per conversion. (finger-in-the-air figure)
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that fast enough for you, I think it will be. You can speed it up if you reduce the resolution but there is no need.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that fast enough for you, I think it will be. You can speed it up if you reduce the resolution but there is no need.
Yes it probably will be. This means it would be possible to play multiple tones at once, right? Providing I have the right piece of code, I could put my finger through a laser, giving a signal to the arduino. If I then keep my finger there and interrupt another beam, that would also be detected (in +-100 microseconds).
Thanks for the suggestion Mike!
All I need is 4051 now. This seems okay?: http://pieterfloris.nl/shop/product.php?id_product=386
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 287
Posts: 25682
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If I then keep my finger there and interrupt another beam, that would also be detected (in +-100 microseconds).
No, on average it will be 400 or so microseconds.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, on average it will be 400 or so microseconds.

Oops, misread. Thats fast enough too.
So with that IC it should be very doable.

Something else: It has been mentioned that driving the lasers is going to be rather tough, because of current that won't be completely constant. Heres the thing:
I've been looking at these: http://www.dealextreme.com/p/20mw-532nm-green-laser-module-3v-11-9mm-26887 lasers, I already have the 50mw version, and as you can see on the pictures, it already has some sort of IC on it, and I was wondering if maybe that is to stabilize the current? And if not, what IC would I need to do such a thing?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33301
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can't wire modules like that in series, you will need a stabilised supply.
They are very powerful, make sure you construct this with the lasers pointing down and don't have anything that could give a reflection.
This is a video of my LED harp made about 12 years ago.
https://vimeo.com/35657529
Logged

Pages: 1 [2] 3   Go Up
Jump to: