# Laser Maze - Start/Stop Circuit

Discussion in 'The Projects Forum' started by CoachKalk, Jun 17, 2012.

1. ### CoachKalk Thread Starter Member

Sep 20, 2011
139
2
Happy Father's Day to all the Dad's on the forum today.

First, let me just say how grateful I am for this site and the incredible help it is - I am a complete beginner and everyone has been very patient while offering much needed help.

In my continued mission for a play at home laser maze, I am now working on the laser control portion. Thank to elec mech, my display issues have been resolved.

After much thought about how to contol the lasers, I have been considering a shift in design. I really wanted a way to control the lasers individually and I think a controller like an arduino may in fact be a great option.

So, I have a few questions about this simplified laser circuit. If it passes your scrutiny, the end result would have up to 12 of the same set-up.

Number 1
Even though an arduino has 40mA per I/O pin, I had read that the I/O pins really shouldn't be used to drive external components. I had already ordered a 5V - 4A power supply back when the arduino was unknown to me, so I plan on just using that.

But, you will see I am using 2N3907 transistors which will be controlled by the arduino. I am trying desperately to learn from all of the help provided so I would like explain where I came up with my numbers and see if you agree.

The collector will have 5V from the Laser Power Supply. The laser runs/draws? approx. 25mA. The voltage drop across the 3907 is 0.7V. The base will have 5V from the arduino.

Based on previous help, I need 1/10th of the 25mA to the base.
So ... (5.0 - 0.7)/2.5mA = 2K base resisitor. Is that even close?

When Pin 22 goes HIGH, will the lasers light? Pin 22 LOW = Off? Will the transistor "protect" the arduino from any excess current issues, if that is a potential problem?

Number 2
I plan to use SCR's for the difficulty/start buttons. I have never used a SCR (yeah, I know you are surprised) and I am not sure if I can just use a resistor at the gate to trigger the SCR? If yes, is there something on the datasheet that would tell be what size?

If this new design direction works, I will be able to feed each LDR into an analog pin and "dial in" the sensitivity from 0 - 1023 units. My fingers are crossed that I haven't missed something.

Also, we sold our short bus that we used on vacations and I made sure I took out the PA/Siren/Animal Noise toy we had bought from Farm and Fleet. Thanks to elec mech, I now know how to measure the current that it draws: 31mA @ 12V. Needless to say I am still trying to figure out a way to get that to the party now too.

Anyway, I would appreciate feedback reagrding the "new" direction and specifically to my base resistor calculations and SCR question.

Thanks everyone,

2. ### wayneh Expert

Sep 9, 2010
11,923
2,857
That's an NPN transistor that you're trying to use in a high-side switch. It would work better if you moved it down below everything else and let it control the path to ground (low-side switch). Then, pin 22 high = light on.

If you replace the NPN with a PNP, then the circuit works fine with pin 22 low = lights on (reversed logic).

Either way, the base resistor does indeed protect the Arduino from an excessive load.

Why SCRs? Or, put another way, why not a (cheaper) MOSFET?

3. ### CoachKalk Thread Starter Member

Sep 20, 2011
139
2
Thanks for the input Wayne. Actually, I had been searching the forum in the meantime and found the exact same advice you just posted. I have updated to a 2n2222 on the bottom of the load. Other than my first calculation for the base resistor being messed up, I got it working.

The game style PB's I have are either NO or NC, but they return to the original position. When I first started looking over the forums, I found info showing how I could use a SCR for a switch. Have the NO Start button turn the SCR on and then have a NC stop button shut it down.

Hopefully, my plan is to have the Start PB connected (via arduino) to several laser/ldr units. After the initial start-up, the control of each laser/ldr unit would then be "handed off" to and controlled by the condition of the analog pin that reads the LDR.

Somewhat off topic, I just realized you are in Roscoe. I am in Lena - just west of Freeport! Small world!