Maker Pro
Maker Pro

Photography Laser Trigger

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Hello everyone, first post here, hoping to get a bit of advice :)

Not done any electronics since I left university (oh heck is it 2 and a bit years already)

What I am trying to create is a system where as an object or animal breaks a laser beam it will trigger my camera. I would also like to be able to add a delay between the beam being broken and the camera being triggered.

So this is what I've come up with

circuit.gif

I was thinking of the ATTiny45 as I want something with enough IO but that's cheap and small.

The thinking behind it is the photoresistor and R1 form a potential divider, when the laser beam shines on the PR the resistance is low and then when the beam is broken the voltage on pin 2 shoots up.

The variable resistor on pin 7 will control the delay time.

The switch on pin 2 will control the range of delay time, ie so the variable resistor will change the time between 0s and 1s or between 1s and 5s (not decided on the times yet)

Then when it needs to trigger the camera it outputs on pin 6 to complete the circuit that the trigger is on

So then, what have i missed, where am I being a total idiot?

Also what should I use for actually programming the chip? I used one of these in uni

http://cpc.farnell.com/microchip/pg164120/programmer-pickit-2/dp/SC09206
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I think you'd be much better off with an IR Photo Transistor. PR's are changing value in slow motion in comparison. I would think a common 555 would do fine for the triggering and timing. Regarding microcontrollers: If this is a one off project it's hard to beat a Picaxe.

http://www.picaxe.com/

Chris
 

penfold

Oct 24, 2012
12
Joined
Oct 24, 2012
Messages
12
I agree with cdrive, a photo transistor or photo diode would much better suite your purposes: they give a much snappier (certainly not a photography pun) response.

You might want to consider whether or not the unit will be operating during day or night, ambient light will certainly cause a few issues with a light dependent resistor, the photo-diode or photo-transistor preferably opperating in the IR region (aligning the invisible beam could be an issue). There are plenty of clever things to do in order to mitigate ambient light issues in visible spectrum receivers.
 

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Thanks guys

I had considered IR, but like you say aligning the beam could be an issues. That said most cameras can pick up IR light so I might be able to use the video feature on my camera to view the beam and align it that way.

I have also considered a 555, may reconsider that as I think it may well meet all my requirements and may be cheaper over all as I dont have to buy a programmer
 

penfold

Oct 24, 2012
12
Joined
Oct 24, 2012
Messages
12
If you are using something like a 555 timer, and you want to be slightly resistant to ambient light situations, then you might want to consider using a watchdog timer type circuit and using the laser to send regular pulses. The 555 timer would basically form a mono stable circuit with an on time slightly longer than the repetition rate of the laser pulses, when the beam is interrupted, the output will go low and you can use this to trigger the camera. This arrangement relies on a pulsating nature to the light and will be less susceptible to spurious changes in light and precise sensitivities of devices.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I have also considered a 555, may reconsider that as I think it may well meet all my requirements and may be cheaper over all as I dont have to buy a programmer

Picaxe uC's do not require a programmer and the software is free..

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Thanks guys

I had considered IR, but like you say aligning the beam could be an issues. That said most cameras can pick up IR light .....<snip> .....

This is worth a mention to nubes and even old dogs that may not know. A quick and simple way of checking TV and other IR remote transmitters is with your cell phone cam. You can visibly see it flashing digital data. ;)

Chris
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I would also recommend that your light source should flash on and of at a moderate frequency (say 1000Hz or more).

The reason for this is that you can easily amplify the signal without amplifying any background (i.e. ambient light).

Then your detector software should look for missing pulses (you can also do that with electronics)
 

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Ok so i've had a thought.

How about I pulse the laser, sample the voltage from the PR potential divider both when the laser is on and off, then say if the value when the laser is on is higher than when the laser is off. That way it doesn't matter what the ambient light value is?

The Pseudo code would look something like this


Turn laser off

Wait

X = sample

Turn laser on

Wait

y = sample

if y > x

do nothing

else

trigger


Thoughts?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
As previously noted, PR's are too slow to respond in missing pulse detector circuits. Use a PhotoTransistor. You don't have to use a uC's ADC input for this. Any digital port will do. Therefore, you can eliminate the voltage divider too.

Chris
 

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Ok so I know i'm probably being really dim here but, the photodiodes are digital correct? IE on and off?

In that case how does the missing beam circuit provide any advantage over a continuous beam?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Ok so I know i'm probably being really dim here but, the photodiodes are digital correct? IE on and off?

In that case how does the missing beam circuit provide any advantage over a continuous beam?

Photo Transistor is a linear device. Just like saturating a transistor they can be operated as a switch, IE in digital environments too.

Chris
 

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Right I think I get it now, when light is on the photo transistor it outputs a voltage currect? And this voltage varies with the amount of light, therefore I can sample this voltage and determine if a beam is missing?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Right I think I get it now, when light is on the photo transistor it outputs a voltage currect? And this voltage varies with the amount of light, therefore I can sample this voltage and determine if a beam is missing?

No, light striking the photo sensitive base forward biases the Base Emitter junction causing conduction between the Collector - Emitter junction. This, in turn, causes current to flow through the Collector resistor supplied by the Vcc supply.

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
so the voltage varies with the level of light, or just the current?

How I answer this depends on how you answer this.. Do you understand basic BJT theory of operation?

Chris
 

JonnyFGM

Oct 24, 2012
14
Joined
Oct 24, 2012
Messages
14
Not really, I mean I know how to use transistors as switches, but thats about it
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
so the voltage varies with the level of light, or just the current?

If used in the place of a resistor in a voltage divider, it will essentially act the same as an LDR with a few exceptions:

1) it's a lot faster
2) the sensitivity will be different
3) the range of apparent resistances will differ
4) the impedance will likely be higher

Have you mentioned the range you require for this device?

Or the operating conditions (day, night, both?)?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Ok so I know i'm probably being really dim here but, the photodiodes are digital correct? IE on and off?

I think that's been answered...

In that case how does the missing beam circuit provide any advantage over a continuous beam?

The advantages are many:

1) the signal you're looking for will be distinct from overall illumination, so ambient light falling on the device (within reason) will not trigger or inhibit the device.

2) because the signal can be isolated from the main source of interference (ambient light level) you can amplify the signal much more and achieve sensitivity.

3) reliability is improved because you can cater for the occasional missed pulse without false triggering (perhaps it is caused by a relatively slow event like dappled sunlight falling across the sensor). If we're talking about 1000 pulses per second, if you are willing to tolerate 10ms of delay, you only need receive 1 in every 10 pulses to know that the beam is not broken. Potentially you can miss 900 pulses every second and still not trigger.

However the major disadvantage is complexity. Given your struggle with optotransistors, I can't imagine you're going to leap from my explanation to a design, and if we provide one, you may not be able to troubleshoot it (given that we're unlikely to build one just to play along).

However, the need for this complexity may be mooted if we know what you want to detect. Birds in flight are a different beast (haha) than a rat in a narrow tube (for example).
 
Top