Author Topic: Laser Trip Wire, How To Toggle  (Read 7773 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownTopic starter

  • Contributor
  • Posts: 45
Laser Trip Wire, How To Toggle
« on: October 31, 2013, 02:13:54 am »
So I made AfroTechMod's laser trip wire circuit, link , and I was wondering how to make it toggle the LED without an Arduino
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Laser Trip Wire, How To Toggle
« Reply #1 on: October 31, 2013, 02:57:57 am »
Edit: I can't read I swear. Missed the WITHOUT
« Last Edit: October 31, 2013, 03:16:31 am by kizzap »
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline Alex

  • Regular Contributor
  • *
  • Posts: 175
  • Country: gb
Re: Laser Trip Wire, How To Toggle
« Reply #2 on: October 31, 2013, 03:06:23 am »
I was wondering how to make it toggle the LED without an Arduino

D-type flip flop comes to mind wired as a Toggle flip flop by connecting the D input to Qbar output. Googling these keywords will take you there.

Alex.

 

Offline BrownTopic starter

  • Contributor
  • Posts: 45
Re: Laser Trip Wire, How To Toggle
« Reply #3 on: October 31, 2013, 03:20:04 am »
I want the led to stay on even if the laser has been broken again. The led should turn off when I press a reset button, will a D Type Flip Flop do this?
 

Offline Alex

  • Regular Contributor
  • *
  • Posts: 175
  • Country: gb
Re: Laser Trip Wire, How To Toggle
« Reply #4 on: October 31, 2013, 03:28:35 am »
Please confirm: The LED must turn ON when the beam is broken. It must then stay on continuously, no matter what the beam does. To reset it, you want to press a switch. Correct?
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Laser Trip Wire, How To Toggle
« Reply #5 on: October 31, 2013, 03:30:31 am »
I want the led to stay on even if the laser has been broken again. The led should turn off when I press a reset button, will a D Type Flip Flop do this?

So are there two signals that control the state of the LED now? the tripwire and a button? In that case look at a SR (Set Reset) flip flop.
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline BrownTopic starter

  • Contributor
  • Posts: 45
Re: Laser Trip Wire, How To Toggle
« Reply #6 on: October 31, 2013, 03:32:00 am »
I'm new to EE, I don't know what flip flops are, and yes Alex
 

Offline Alex

  • Regular Contributor
  • *
  • Posts: 175
  • Country: gb
Re: Laser Trip Wire, How To Toggle
« Reply #7 on: October 31, 2013, 03:41:55 am »
Great, as kizzap said an SR flip-flop then. Flip flops are very specific circuit blocks usually found in digital logic circuits. They come in the form of small integrated circuits, chips. Kizzap could you show Brown how to wire this up please, otherwise i will draw you a diagram tomorrow.

Alex
 

Offline BrownTopic starter

  • Contributor
  • Posts: 45
Re: Laser Trip Wire, How To Toggle
« Reply #8 on: October 31, 2013, 03:44:14 am »
Thanks Alex and Kizzap! My first post and in minutes I got replies Thanks!!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11858
  • Country: us
Re: Laser Trip Wire, How To Toggle
« Reply #9 on: October 31, 2013, 04:33:24 am »
I'm new to EE, I don't know what flip flops are, and yes Alex

A flip flop is highly technical term in electronics for a circuit that flips one way or flops the other way. Usually such circuits stay flipped or flopped in whatever state they are in unless given the appropriate trigger to change. If the circuit is currently flipped it can be made to flop, and if the circuit is currently flopped it can be made to flip.
« Last Edit: October 31, 2013, 06:05:18 am by IanB »
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Laser Trip Wire, How To Toggle
« Reply #10 on: October 31, 2013, 05:56:21 am »
Great, as kizzap said an SR flip-flop then. Flip flops are very specific circuit blocks usually found in digital logic circuits. They come in the form of small integrated circuits, chips. Kizzap could you show Brown how to wire this up please, otherwise i will draw you a diagram tomorrow.

Alex

Oh I guess I can, even have the pin numbers on there.

If you use a 74HC02 this circuit should work, if not let us know. Same if you have any questions.

-kizzap
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Laser Trip Wire, How To Toggle
« Reply #11 on: October 31, 2013, 07:01:22 am »
You can latch it with the addition of one more PFET to AfroTechMod's circuit.

See what I've done below. Although the SR latch will work too, you don't need an SR latch.
I've added Q2, a P-channel MOSFET.




 

Offline Alex

  • Regular Contributor
  • *
  • Posts: 175
  • Country: gb
Re: Laser Trip Wire, How To Toggle
« Reply #12 on: October 31, 2013, 10:33:54 am »
I can
-kizzap

Thanks!

Brown, codeboy's circuit is very good too since you have one transistor, but you will need a 'normally closed' pushbutton as indicated. Maybe you can build both to introduce yourself to more electronics.

Alex
 

Offline kizzap

  • Supporter
  • ****
  • Posts: 477
  • Country: au
Re: Laser Trip Wire, How To Toggle
« Reply #13 on: October 31, 2013, 12:43:48 pm »
Brown, codeboy's circuit is very good too since you have one transistor, but you will need a 'normally closed' pushbutton as indicated. Maybe you can build both to introduce yourself to more electronics.

Alex

It would be trivial to change to an normally open button, simply tie the source for the mosfet the button is connected to, through a resistor, to +V, then use a normally open button to short the source down to ground. Single extra resistor (which you should have a few of already, and cheap) vs. going out to find a not all that common button (yes I know that they do exist.)

-kizzap
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Laser Trip Wire, How To Toggle
« Reply #14 on: October 31, 2013, 10:22:37 pm »
It would be trivial to change to an normally open button, simply tie the source for the mosfet the button is connected to, through a resistor, to +V, then use a normally open button to short the source down to ground. Single extra resistor (which you should have a few of already, and cheap) vs. going out to find a not all that common button (yes I know that they do exist.)

-kizzap
I gave it some thought before posting, how to use a NO switch, and came up with the same idea. But the math was more involved and he said he was just learning so I didn't want to complicate it, but it can be done if it's hard to find a NC switch like that. I figured that there are many SPDT push buttons or DPDT so it should be not that hard.

If you do use a single NO switch, just make sure the resistor pulling the source of Q2 up to 5V is an order of magnitude lower than the dark resistance of the LDR, like maybe 20-30 ohms, 1W or so. For home use, or prototype, or just playing and learning, then a 1/2 W will be ok.It's a pulsed load on the reset switch. Just don't hold it down too long, the resistor will be over its rated wattage, and don't use 1/2W in any production release of something like this.

The dark resistance of the LDR is pretty low, like 250 ohms, and may go as low as 100 ohms in a really dark room.
so the source resistance plus the dark resistance of the LDR forms a voltage divider that has to have a voltage higher than the Vgs(on) of Q1. This means that the top resister of the divider (the source of Q2) has to be pretty low. And making it low enough to overcome the LDR dark resistance means that it needs to be high-wattage to handle the connection to ground without smoking..

In fact, this simple switch covers the basics of ohms law, voltage dividers and MOSFETS pretty well.
There is lots to learn from making this work, and making it safe.

 

Offline BrownTopic starter

  • Contributor
  • Posts: 45
Re: Laser Trip Wire, How To Toggle
« Reply #15 on: November 01, 2013, 01:23:09 am »
I think I have a NC switch, So I'm ordering 74HC02  and a IRF9540 P Channel MOSFET. If I don't have a NC swtich can't I just connect a wire and disconnect it to reset it? Thanks Kizzap, Alex, and Codeboy2k!
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Laser Trip Wire, How To Toggle
« Reply #16 on: November 01, 2013, 04:22:59 am »
I think I have a NC switch, So I'm ordering 74HC02  and a IRF9540 P Channel MOSFET. If I don't have a NC swtich can't I just connect a wire and disconnect it to reset it? Thanks Kizzap, Alex, and Codeboy2k!

You're welcome. Yes, you can use a wire like that. You really only need the switch if you want it in a box or on the wall :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf