Connect with us

Signal conditioning for 555 circuit

Discussion in 'General Electronics Discussion' started by iPanos, Apr 10, 2016.

Scroll to continue with content
  1. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Hello guys,

    I have an issue with a circuit I am building and I wonder if someone could contribute a little...

    I have a device which outputs an alarm signal which I want use in order to make an audible alarm.
    The device outputs a continuous +12V output, Ground and a trigger output.
    When the alarm is activated, the trigger output oscillates +3V at 1Hz. When the alarm is in idle state the same output gives a +3V pulse every 10 seconds.

    I need a circuit that senses the alarm oscillation and gives a continuous +12V for as long as the pulses last, so I can connect a 12V buzzer. My problem is that the pulse sent every 10 seconds in the idle state spoils it all for me. I have to find a way to filter that pulse out, so that my circuit ignores the first pulse if it is not followed by a second pulse within 1 second.

    I have googled for hours. The only thing I could find was this which I built but could not manage to make work. The output goes high immediately at power up and the input has no effect (I used 4.7uF for C1 and 220KΩ for R1).

    Also the circuit has to be self reseting, i.e. if pulses stop arriving at the expected frequency.

    If anyone could shed some light on this it will be greatly appreciated.

    Thank you in advance,
    Pete
     
  2. michan

    michan

    22
    1
    Feb 21, 2015
    If I was you I would buy an arduino and write some simple code that does exactly what you said. One pin on the arduino would be connected to this voltage, when the voltage increases above 0 more than once within 1 second then the arduino would send a signal from another of its pins to a transistor or a mosfet that you can use to switch a separate circuit on when the alarm signal is active. Im not sure what you want it to do once the alarm signal is active so im not sure if you actually need that last part with the transistor/mosfet but hopefully this helps. If you search arduino alarm or something similar on youtube im sure there would be plenty of people with similar projects that even show the code they used, in which case you can basically copy what they wrote and mess with it a little to suit your project.

    Also if you need it to be simple there are arduino nanos which are a tiny version of the arduino that are really good for projects where you don't want a chunky kinda expensive board dangling about.

    HMM sorry just realised this may not work, i dont think arduino is able to take more than 5v on its pins, in which case you could make a simple voltage divider http://www.ohmslawcalculator.com/voltage-divider-calculator to let the arduino monitor the voltage
     
    Last edited: Apr 11, 2016
  3. Merlin3189

    Merlin3189

    250
    69
    Aug 4, 2011
    Yes, an interesting problem.
    Maybe something based on a retriggerable monostable with an output of a couple of seconds. This would remain active so long as pulses arrived at least one per monostable period. With the 10 sec pulses it would simply generate a series of elongated pulses.
    My first guess at how to use this is to the input of a JK flip flop, with the signal going to the clock input. If the input is already high when the clock pulse arrives, the JK will become set on the fall of the clock pulse. But if the input is not already set, changing it during the clock pulse will have no effect and the JK will remain reset.
    We'd need to check the timing to ensure the monostable pulse could not rise until after the clock was stable and the JK had finished latching the input. If necessary, one could add some delay here or before the trigger input to the monostable, but I think it would not be needed.

    I haven't thought of anything else for the reset detector, but you could have a similar cct with a longer monostable, so that this was kept on by either signal, then its fall would indicate absence of any signal.

    I haven't had a good look at your 555 cct yet, but I have a theory that almost anything can be done with 555s and a bit of ingenuity! So I'll have a fuller look at that when I've got time.
     
  4. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Thank you both for your replies.

    Merlin, I am with you on the 555, actually this is the preferred method and the way I tried to do it but failed.
    I am pretty sure the schematic I posted can be made to work, only I did not manage to make it work.

    Maybe someone with more experience on the 555 could help in this direction...
     
  5. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    What is the pulse duration?
     
  6. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    100ms according to the manual (I don't own an oscilloscope).
     
  7. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    Does the manual also say what the duty cycle of the 1Hz signal is, or can we assume 50% (i.e. 0.5 sec at 3V, 0.5 sec at 0V)?
     
  8. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Well, it does not say but...
    I just used a NPN to light up an LED from that signal. It looks close to 50% (maybe the on time is a little longer than the off, but not much)...
    Sorry I cannot be more specific, I hope this helps...
     
  9. AnalogKid

    AnalogKid

    2,494
    717
    Jun 10, 2015
    This is very doable, but a bit more complex than a pair of 555's. Because the first pulse is used to enable a detection window for the second pulse, the detector has to not see the first enabling pulse as a trigger. Normally this would mean there has to be a true edge detector, an edge triggered flipflop. BUT, because your input pulse is relatively narrow, we can use both edges and do everything with gates. Perceived LED on-time is not accurate because of retinal persistence. To start, lets assume the output pulse is 0.1 s in both the alarm and non-alarm conditions.

    Input signal is connected to the Set input of a flipflop that drives the buzzer.

    The input also is differentiated such that its *trailing* edge starts a 1.1 s detection window. This is a retriggerable monostable that drives the Reset input of the FF.

    Input signal fires a 1.1 s retriggerable monostable that removes the Reset from an edge-triggered flipflop. By the time the reset is disabled, the first pulse already has passed and is not seen by the Set input of the FF.

    The leading edge of the next pulse sets the FF and drives the buzzer. The trailing edge of the same pulse restarts the monostable for another 1.1 s detection window.

    If the input positive edges are greater than 1.1 s apart, the FF is reset by the output of the monostable. This stops the buzzer.

    All of this, two timers and one flipflop, fits in one hex inverter. Note, no 555's were consumed in the design of this circuit.

    ak
     
    Alec_t likes this.
  10. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    Ok. I think this will do what you want :-
    Multi-pulse-detector.PNG
    Even if the on time of the 1Hz signal is only 100mS, adjustment of the trimmer should enable a distinction between the 1Hz period and the 10 sec period.
    And here's the simulation file
     

    Attached Files:

    Last edited: Apr 11, 2016
  11. AnalogKid

    AnalogKid

    2,494
    717
    Jun 10, 2015
    A frequency-to-voltage converter - excellent!

    Alec wins, but here's my version, more of a digital domain solution. This one does not assume that the alarm and non-alarm pulse widths are different.

    ak
    Alarm-Discrim-1-c.gif
     

    Attached Files:

    Alec_t likes this.
  12. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    If U1a is to be switched by a 3V input signal then U1 will need to be run from a 3V-4.5V supply. Could the R3 pull-up to 12V cause a problem? Current would be minuscule, but is latch-up or other malfunction possible? Also, Vgs(th) for a 2N7002 might be as high as 2.5V, so a 3V output from U1f to switch it would be marginal. Perhaps use a different FET?
     
  13. AnalogKid

    AnalogKid

    2,494
    717
    Jun 10, 2015
    Off my feed today, missed that. And at 12 V Vdd, the hysteresis thresholds are more than 3 V apart. So maybe an NPN saturated switch input stage instead of U1A.

    oops.

    ak
     
  14. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Guys you are amazing!
    I will built this probably tonight and see how it goes!

    To summarize, the expected behaviour is like this:

    111.jpg

    Right?

    Thanks again!!!
     
  15. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    That would do it. Or, run the 40106 from a 9V supply, bias U1a input just below the lower threshold and capacitively couple the input signal?
     
  16. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Actually I was going for Alec's circuit, not for the one with the 40106. Is it still OK?
     
  17. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Alec you are a star!!!!! Just built your version, works a treat!

    The trimmer pot did the magic at about 1/3 turn.

    One little issue:
    When the alarm signal stops, the first every-10-seconds pulse also gives a pulse on the buzzer. After that, everything works as expected. This means that after the alarm stops, 8 to 10 seconds later I will hear a short buzz. If you guys think there is a straight forward solution to this, please point it out, otherwise it is really nothing I cannot live with.

    Thanks a million once again, you are both fantastic!!!
     
  18. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    Nice to hear it works! Try reducing R2 to, say, 47k, to shorten the C1 discharge time, then re-adjust the trimmer.
     
  19. Alec_t

    Alec_t

    2,947
    803
    Jul 7, 2015
    Here's a variant which should make triggering by the 'every-10s' pulses less likely, even if one occurs fairly soon after an alarm session ends.
    This uses a .......wait for it........'555 IC :D. The Q1 stage is much as before. When the C1 voltage drops below the 555 Trig threshold the 5555 output goes high to turn on the buzzer. When the 555 output goes low after the alarm session it pulses Q2 base via C2 to switch on Q2 and thus discharge C1 quickly.
    Multi-pulse-detector2.PNG
     

    Attached Files:

  20. iPanos

    iPanos

    10
    0
    Apr 10, 2016
    Well...
    I built this without rechecking the forum since Wednesday...
    I tried replacing R2 with a 47K as you recommended, still same behavior...
    I think I will use the first version despite the little bug. At idle state it draws 1.5mA!!!! It'll go 10 times up with the 555, plus I will have to redo the circuit. One short buzz after the alarm stops is not a big issue...
    Thanks for all mate, you've been great!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-