Circuit to activate only when high for more than 1.5 seconds?

Discussion in 'The Projects Forum' started by kyroguy, May 12, 2010.

  1. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    I am trying to put together a circuit to take a signal from a fingerprint reader and turn it into a signal to open a latch.

    Long story short, I have located pads on the fingerprint reader that are high (~3-3.5v) when the proper fingerprint is swiped and low (0v) when no finger or the wrong finger is swiped. Here is my problem. To activate the reader a button is depressed. For a split second the area that I would like to use goes high then immediately goes back to low.

    To remedy this I need to make a circuit that will only accept a high signal that lasts more than 1 or 2 seconds. It will disregard any high signal that lasts less than one second. Then this circuit can ultimately trigger my relay or latch to open the door.

    I know this probably sounds simple, but I am a beginner. To give you an idea, I have been poking around on this circuit board for days (literally) with a multimeter looking for a suitable set of contacts. I understand basic resistors, capacitors, transistors and that sort of thing. Please ask any questions needed for clarity. Also, when responding talk like you would to a 2nd grader. :)
  2. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    How big are you? "SO BIG" aww now eat your peas.
    (that may be younger than 2nd grade)

    The easiest way I can think of would be a microcontroller.

    It could be a simple few lines of code. Start a timer when an input pin goes high. Stop when it goes low. If the elapsed time is >1.5 seconds then output a high on an output pin else reset and wait for the next high.
  3. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    I am familiar with that concept but have not the slightest idea how to put it into practice. What is the best microcontroller for this project and how do you program it? Part numbers and sources would be really helpful!
  4. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
  5. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    And programming this thing is easy?

    I plan posting a writeup when this thing is completed. I can't wait to get flamed for using such a powerful tool for such a dumb simple task.
  6. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    This thing is super easy to program. It has its own 'C' language and about 10 million tutorials on line to get you going.

    But for your project, you will use around 5 lines of code. really.

    Another thing. After you are done with the programming, you can remove the chip and put it in your circuit, then spend $5 and get a replacement micro. Or, to make connections easier, use the whole thing as-is in your design.
  7. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    Sounds like a no brainer.

    Last thing...do you think the arduino would be happy running off the 4-6 volt supply provided by the onboard battery of the reader? Is it stable when removed from power or does it erase the program? I may end of having to hook it to a spot on the board that is only powered on when the reader is on. Hmm...

    Every time I think I have this project figured out another question comes up.
  8. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    It runs off 5v and has an onboard regulator. You will be fine.

    you can power it off your existing circuit.

    It uses flash memory which holds its memory through power off and power removal. It is idiot proof. ;)
  9. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    Not until you have seen how easy this can be done.

    You just need a CD40106B CMOS IC and three other components. If you change the value of resistor, the time before triggering can be adjusted.

    As there are five more inverter gate left over, you can use them to buffer the input signal(recommended, using two inverters in series) and change the polarity of the output trigger to positive going edge.

    [​IMG]

    Attached Files:

  10. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    Awww, but whats the fun in that?

    AND that would only cost like $1.



    WAIT, wait, wait.. I think I miss read your first post.

    You want to take the very fast pulse and PRODUCE a 1 to 2 second high?

    or ignore any any pulses shorter than 1.5 seconds?

    Regardless, after the circuit is triggered, how long do you want the high signal?
    or
    how long do you need the resulting high to remain high?

    The way Im seeing it is, you want the people to have to hold th button for at least 1.5 seconds, then send a pulse.
  11. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    For clarity.

    When the proper finger is swiped the signal goes high for several (more than 1.5-2) seconds. This is the signal I want to take advantage. When the circuit first powers on it goes high for a very brief time (really probably less than 1/10th second) This is the signal I need to ignore.

    So the circuit I build must discern between the two lengths of signal. When it determines that the signal has persisted long enough (long signal of more than 1.5-2 seconds that indicates the proper finger has been swiped) it produces its own signal that will open a latch. Most likely it will be a small solenoid something similar. The signal to open the latch should probably be somewhat adjustable since I am not sure how long it will take for the latch to open.

    Hope that clears it up.

    eblc, any chance you could elaborate a bit more on your suggestion? It sounds pretty awesome!

    *edit* I should also add that I need something that is not going to be a constant draw on the battery since this is going to run (hopefully) off of 4 AA batteries.
    Last edited: May 13, 2010
  12. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    Now that you have made your requirement clear I can provide you with a revised circuit, one that provides a fixed length pulse to drive your external latch.

    The CD40106B is a common CMOS HEX inverter with Schmitt Trigger input. It means there are six inverters inside one single IC. These inverters are all identical and so one can use any of the six as U1 or U2...etc in the schematic.

    Search the internet to obtain a datasheet about this IC which shows where each inverter is located on what pins and also the power supply pins.

    The leftmost two inverters in the schematic forms a voltage buffer so that the loading to the external circuit is minimal. This voltage is then fed to the next inverter via a resistor/diode combination(R1/D1) so that the charge/discharge timing of capacitor C1 is made different. The charging rate is slow while the discharge rate is fast.

    The resistor value in the schematic would allow the capacitor to charge up to the schmitt trigger input trigger level only if the input voltage remains HIGH for 1.5 seconds or longer. This is labeled as the T1 timing.

    The circuit has been simulated in LTSpice and the green trace denotes the possible input voltage high timings and how the circuit response to this voltage. It represent input voltage high timing of 0.1, 0.5, 1, 1.5 and 2 second duration. As can be seen, there is nothing happening on the output if the input voltage goes high with less than 1.5 second duration.

    What follows after that is the circuit to provide a fixed pulse output to drive your external latch. At the present it is about 0.75 seconds but you can lengthen the drive pulse(T2 timing) to about three seconds with R3=22MΩ and C3=0.2uF. Output1 is the same as Output with reversed polarity only.

    The CMOS current draw is minimal and will not drain your batteries.

    [​IMG]

    Attached Files:

  13. retched

    retched AAC Fanatic!

    Joined:
    Dec 5, 2009
    Messages:
    5,198
    Location:
    Baltimore, MD
    That is definately the way to go if your power supply is only 4 AA batteries.

    This will also only take up about 2" x 2" of PCB space or less if you choose surface mount components.

    Using a pot, it can be possible to vary the "door open latch" solenoid time. You may want it to stay open for 5 seconds or more to allow handicap people to have time to access the door after the fingerprint scan.
  14. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    Now we're talking! I think that is exactly what I need! Over the next few days I will go over this circuit and try to gather some of the components.

    As far as power and wiring (not to beat a dead horse), I want to hook the CMOS directly to my battery and only draw the high/low signal from the existing board, right? In other words, the fingerprint reader and the CMOS circuit will both be hooked directly to the battery and the cmos will read the intermittent high/low (when a finger is swiped) from the reader board.

    Thanks for your patience. This project is huge for me.
  15. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    Just ordered the CMOS. Quick question. What is VDD?
  16. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    Yes, you can connect the whole circuit to the same power supply of the fingerprint reader.

    VDD = positive of power supply = +6V of the battery connection in your case.

    It is just a label used in the schematic to join together all labeled points to the same positive supply, much like what the common usage of "GND" does for connection to 0V or negative terminal of the battery.
  17. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    Ok, I have all my parts on hand now. I have been checking out my latch doing some poking around with the multimeter.

    After carefully breadboarding the circuit that eblc1388 made for me I am at a dead end. Hopefully I am making a simple mistake. I am using a 9v battery to keep testing simple. I have attached the 9v to the chip (positive at 14 and negative at 7). I have attached all other components as indicated in the schematic. I am using the same 9v as the "trigger signal" that I am using to power the chip. Long story short, I can't make it work.

    I am operating under the assumption that if I make a "trigger signal" for more than 1.5 seconds the led will light. Maybe this is where I'm going wrong? Anyway, I'm at a dead end here so any help would be greatly appreciated. I have added a picture of the breadboard itself. I also labeled everything and added that pic too. If anyone can take a quick look and give me some direction I would owe you forever!

    Pics here:
    http://monsterminibow.com/nowoodchips2
  18. erich_7719

    erich_7719 Member

    Joined:
    Oct 14, 2009
    Messages:
    92
    Location:
    Detroit, MI (GMT-5)
    I don't know the forward voltage of you led, so I will assume 3.3V.

    With that assumtion you will need a 1/4 Watt 300Ω resistor between Pin 11 and your LED.
  19. kyroguy

    kyroguy Thread Starter Member

    Joined:
    May 12, 2010
    Messages:
    77
    Location:
    Eastern Iowa
    I have used resistors in the past to protect the leds. In this circuit I don't feel it is necessary since the led is rated for 3 watts and I am not worried about damaging it. It is an old junk one I use for testing. I put 9v straight across it and it lights fine so I don't think the lack of resistor is why it won't light when placed in the circuit.

    But your advice is sound. Leds can/will fry quickly is not used in conjunction with a current limiting resistor.
  20. Markd77

    Markd77 Senior Member

    Joined:
    Sep 7, 2009
    Messages:
    2,796
    Location:
    Birmingham
    That LED is probably rated at about 500mA at 9V. There is no way the logic circuit can provide that so it will reset itself or burn its output.
Similar Threads
Forum Title Date
The Projects Forum Help - circuit to activate a relay from ~50mv audio signal Nov 5, 2011
The Projects Forum HELP! Magnet activated circuit Jun 6, 2011
The Projects Forum How to activate a circuit when current flows through another given circuit ? Aug 26, 2010
The Projects Forum Pressure-activated circuit Apr 18, 2010
The Projects Forum Current Activated Buzzer Circuit Advise Apr 15, 2009

Share This Page