Pages: [1]   Go Down
Author Topic: Light sensor with a beeper  (Read 1099 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello.I am new to the whole arduino thing.I have to do a project for the university.The target is to make a device that can recognize light (specifically a flash from a camera) and make a discrete sound.It is important to make a discrete sound in order for the microphone that will be near this device,can distinguish this sound from any other sound in the lab.I think that the light sensor device could be something like this http://browse-tutorials.com/tutorial/light-sensor-circuit-arduino. But how can i connect a beeper or something that makes sound to this circuit?

Thanks in advance
Logged

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like the sort of thing that could be done without an Arduino! Would probably be a lot easier without one as well. Essentially you're making a "clapper" circuit, but instead of going from sound to light, you're going the other way around.

Try using your LDR/voltage divider input with a comparator IC like the LM311. Experiment until you get the right reference voltage for it to respond to your flash. You may need a peak detector on the output to hold it for a little while... camera flashes are pretty quick!

Use the output from the comparator as the trigger for an oscillator circuit built around a 555 timer or whatever you have lying around that'll do the job. A square wave of a couple of khz will drive a little piezo buzzer quite happily.
Logged

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 6
Posts: 256
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will second the idea of using a comparator in this case.  You might also be able to use an LED to sense the camera flash so long as the comparator has a high input impedance. 

You can also find buzzers that have the oscillator built in so all you need to do is supply the power. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all i would like to thank you for your quick responses.Because i am  a total newbie,could you please suggest me some sites(links) that have information about your suggestions?

Thanks again
Logged

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 6
Posts: 256
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The first step is to detect the flash.  There are two good ways to do this.  The classic way is to use a cadmium sulfide (CDS) cell.  This is essentially a resistor who's resistance is very high in the dark and fairly low in the light.  This sites gives a good example of how to use it with a comparator.
http://www.bristolwatch.com/ele/pd.html

The other way to detect the flash is to use a diode.  If you apply power to an LED it lights up, but if you apply light to an LED it will actually create a small voltage difference over its two terminals.  This voltage can actually be fairly significant, but the LED cannot support any appreciable current.  This is why you don't see any LED solar panels.  There is also something called a photo-diode that works the same way, but more effectively (these are used in solar panels).  The circuit on this site uses a photo-diode and a comparator with the LED as the output indication.  If you want to try it with a normal LED as the detector I would omit the 2.2M resistor. 
http://electroschematics.com/6110/light-sensor/

Both of these sites should have given you a good idea of what the comparator is for, but here is one more.  http://www.physics.unlv.edu/~bill/PHYS483/comparators.pdf

Lastly the buzzer is really simple.  Just make sure you get one that buzzes as soon as voltage is applied and does not need to be driven like a speaker.  Examples:
http://tinyurl.com/9tgmops Amazon
http://www.radioshack.com/product/index.jsp?productId=2062397&filterName=Type&filterValue=Buzzer
Logged

Offline Offline
God Member
*****
Karma: 7
Posts: 647
"In this house, we obey the Laws of Thermodynamics" Homer J. Simpson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably a silly question but will the detectors detect the brief light from a flash (or could it be missed) and the buzzer would presumably need to be at some unique frequency or tone for a minimum duration?
Logged

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's why I suggested using the peak detector. Here's a neat video which explains the concept:



I think it might be useful for this application smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello again!!I made a circuit like this on the video :
It works pretty well but there is something that i want to ask you.What kind of delay this kind of circuits (analog) have? I want a precision in miliseconds so the less delay this circuit has the better.
Logged

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 6
Posts: 256
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So long as you are getting a good signal from your light detector the transistor's delay will be very minimal and there is little you could do to change it much.  Depending on what kind of buzzer you are using the time it takes from getting a voltage until it starts to buzz could be quite long.  The only good way to find out about that is to see if you can get a specification sheet on your buzzer.
Logged

Pages: [1]   Go Up
Jump to: