Athlete photogate timer

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Hi everyone I am an engineering student and an athletic training intern. I work with a lot of college and highschool athletes and often run sprinting drills with them so I tried to contstruct my own fully automatic timer system using photogates. The Relay I used is shorting out the lap timer connection right now jamming the stop watch I was wondering if any of you can tell looking at this circuit if I have too much power going to the relay and need to thin it out with some resistors before I put a new one in or did I just get a lemon relay. The Voltage source is two 9v in series, R1 is a 100k ohm resistor, R2 is a cadmium sulfide photo resistor, transistor Q1 is an 2N4401. Thank you for your time. http://youtu.be/7XxLl8ZZyDY
 

rfredel

Joined Jan 23, 2011
25
Hello,

I think, it is better to use a 12V battery because a 12V relay take to much current from a 18V battery. This current makes more magnetismin the coil and will make a delayed switch off.

Best regards

Rainer

PS: Sorry, if my English is not so good
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Oh sorry it's actually a 5v OMR-C-105H relay from radioshack I drew the circuit with circuitmaker and wouldn't let me change the label on that relay I attempted to power the circuit with just one 9v but that was just barely enough power to make the relay coil squeak so I added a second 9v in series but that has possibly broken the relay unless I just got a bad relay.
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
It looks like there is nothing wrong with the relay I soldered it out of my circuit board and examined it I have a short somewhere that I have to find that is shorting out the lap butting contacts but for the life of me I can't find it everything looks fine
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
WOW! after 3 hours of pulling my hair out undoing soldering and cursing at my multimeter all it was the stupid battery in the stop watch wasnt seated correctly AAARRRRG!
 

WBahn

Joined Mar 31, 2012
29,976
Oh sorry it's actually a 5v OMR-C-105H relay from radioshack I drew the circuit with circuitmaker and wouldn't let me change the label on that relay I attempted to power the circuit with just one 9v but that was just barely enough power to make the relay coil squeak so I added a second 9v in series but that has possibly broken the relay unless I just got a bad relay.
You don't want to power the coil with a whole lot more voltage than it is rated for. Having said that, I don't think you are. I think you are dropping a lot of voltage across the transistor.

I think the problem preventing you from running on one 9V battery is that your base resistor is too large. Your relay probably needs something on the order of 20mA to pull in. Let's assume that your transistor has a beta of 200. For 20mA, that means that you need a base current of 100µA. With a 100kΩ base resistor, that means that the base resistor has to have at least 10V across it.

Because transistor betas are highly variable, it is best not to rely on them to set the current. Instead, use a small enough base resistor to firmly saturate the transistor. To get 20mA of collector current, establish 2mA of base current. From a 9V battery, this would requite a base resistor of (9V-0.7V)/2mA = 4.2kΩ. There's some comfort margin in this, so anything between 3.3kΩ and 10kΩ will probably work fine.

That will make the transistor look like a switch with about 0.25V across it when it is ON. To limit the coil current to 20mA (or whatever it needs to be), put a resistor in series with the coil (either side of the coil is fine) that results in the voltage across the coil being about 5V. If the coil has a DC resistance of 250Ω (what I've been assuming), then you will need to drop the remaining (9V-0.25V-5V) across the resistor at 20mA. So that would be 187.2Ω. So expect to using something between 150Ω and 220Ω.

Also, I suspect that you could interface the transistor circuit directly to the display without using the relay, but we'd have to see the specs for the display module to determine that.

Let us know how it works out.
 

rfredel

Joined Jan 23, 2011
25
Hello Aaron11,

additional to the corrections of Wbahn, I see there is no recovery diode parallel to the relay.

This diode protect the transistor against the high induction voltage, when the Transistor is switch off.

Here you can see the complete circuit with all corrections:
http://www.rainers-elektronikpage.de/Andere_Foren/Relaissteuerung mit Fotozelle.pdf

Best regards

Rainer



PS: Sorry, if my English is not so good
 

Attachments

WBahn

Joined Mar 31, 2012
29,976
Hello Aaron11,

additional to the corrections of Wbahn, I see there is no recovery diode parallel to the relay.
Yes, good catch. Very important, otherwise your project will work for a while and then become erratic and then die.

I've often wondered why most relays don't have a suitable diode built in. Maybe some do, but I haven't seen them that I was aware of.
 

absf

Joined Dec 29, 2010
1,968
Well, I have seen some Omron relays have the diode built in. Some even have LED and resistor built in too.

May be the industry has not yet come out with a standard. Some manufacturers have similar relays. One might want the diode wire anode on pin 1 and cathode on pin 8, while another manufacturer want them the other way round. Putting a diode inside a relay also makes it directional and extra precautions have to be taken when designing the PCB with the correct orientations.

Allen
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Thanks for the heads up on that diode I'll put that in before I run anymore tests at my college they gave a circuits teacher who took circuits like 50 years ago so there is some stuff I didn't learn and most of what I know from that class I taught myself lol. My final concern in testing now is will the relay respond fast enough this is a sprinting photogate and not a jogging photogate I'm worried it might not trip fast enough we will cross that bridge when we get there I have special violet lasers for the gate being shipped over in a few days I'll run the tests probably this weekend see how it goes.
 

wayneh

Joined Sep 9, 2010
17,496
I'd be tempted to look at using a MOSFET, or maybe a SSR to perform the switching. These would be far more "instantaneous" and reliable than a mechanical device like a relay. The MOSFET approach would require the stopwatch to share ground with the sensor circuit, and would require you to figure out which type of switch you need, high (application of voltage from CP pin to pin1) or low (pull pin 1 to CP, which is at ground).

I haven't used a SSR but I think they latch after they are thrown. Could be useful.

You may want to de-bounce the signal from the sensor, so that the relay (or whatever) will trip for, say, a minimum of 0.5 sec once thrown. A 555 timer monostable circuit is a standard way to accomplish a de-bounce.
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
If the relay doesnt respond fast enough I will need your guys help to replace the existing circuit with a mosfet setup in fact I plan on building more of these so I will plan on using a mosfet design in the next ones I make I search the internet and see what I can find on mosfet citcuit design and try to find the simplest I can use.
 

wayneh

Joined Sep 9, 2010
17,496
The circuit is simple once you can answer the question I posed above. You need to know whether the MOSFET will touch the pin to ground or to voltage, to operate the stopwatch. Operated properly, the MOSFET will be much like a relay; a "short" when on and "open" when off. But you must determine which pole you need to connect to.
 

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Ok so something like this to phase out the relay? So R3 when illuminated by the laser will short out the upper loop connected to the gate leaving the lap timer button to (stopwatch/photogate circuit ground) open but when the laser is blocked current can then flow to the gate closing the lap timer's button circuit generating a lap time.
 

wayneh

Joined Sep 9, 2010
17,496
That'll short your CdS cell.

You need to control the gate very much as you were controlling the base of the transistor in your first post. Pull it low most of the time (light on, CdS conducting to ground) but go high when a runner passes (no light, CdS not conducting). 9V is a bit low to switch a MOSFET but will probably work if you actually get a full 9V on the gate, versus the source pin, which should be grounded. If you're using a 9V battery, you may only get 7V or so and that may or may not be good enough. A logic-level MOSFET would remove any doubt, as it needs only 4V or so to be fully on.

Have you confirmed that "CP" is indeed a ground pin for your stopwatch? If so, then an n-channel MOSFET as a low side switch will work fine.
 
Last edited:

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Oooh I think I get it MOSFET works by the potential difference in voltage between the gate and the source so if the PD shorts out the connection between the two there is no potential difference and the lap timer stays an open circuit but if the PD has no light its resistance goes up lowering the voltage on the source side and increasing the difference in voltage once past 5v the MOSFET triggers closing the lap timer circuit dude that is soo cool!! :)
 

wayneh

Joined Sep 9, 2010
17,496
You're getting closer. The MOSFET is in the right place now to switch the timer contacts. But the arrangement of the batteries and CdS will still put too much current thru the CdS cell - you need a resistor in series with it as in your first post. And battery ground, not positive, is shared with the MOSFET and the timer. The change in state of the CdS is what should cause battery voltage to be applied (light on) or removed (light off) from the gate of the MOSFET.

Do you have specs on the CdS cell? Choosing the right resistance to put with it will affect the performance of this whole idea. You need to choose a resistor to maximize the voltage swing. A little experimentation will help determine this if you don't have the data already.

Note that a P-channel MOSFET turns on when you draw it's gate voltage below the drain. An N-channel like we are discussing is turned on when the voltage of the gate is drawn up over the source.

Oh, and you should measure the normal voltage between pins 1 and CP, to confirm which type of switch you need.
 
Last edited:

Thread Starter

Aaron11

Joined Jun 23, 2012
22
Like this then? I'm not sure what I should do with the values I get from the CdS inside of the inclosure in ambient light it has infinite resistance and when illuminated by the laser it has pretty much zero resistance. There is a 2.3v reading at lap timer connection.
 

wayneh

Joined Sep 9, 2010
17,496
Woohoo! That's a circuit to move forward into testing. The value of R3 is a mystery but I think you'll be able to test and sort it out quickly. You may need extra resistance in series with R3 - just experiment a bit. For ruggedness you may want to replace the variable resistor with a fixed one once you have determined the resistance you need.

FWIW, a more advanced approach - used in remote controls and such - would be to modulate the light source at, say, 80kHz. Then your detector can be tuned to reject anything that's not near that frequency. This allows the sensitivity to be much higher without false triggering from ambient stuff. Perhaps this won't be an issue if you're using a narrow wavelength laser. You should be able to use a filter on the detector that will diminish wavelengths not relevant to your signal.
 
Top