Author Topic: Edge Detection  (Read 2390 times)

0 Members and 1 Guest are viewing this topic.

Offline delphes123Topic starter

  • Contributor
  • Posts: 44
  • Country: be
Edge Detection
« on: September 19, 2024, 06:21:01 pm »
Dear All

Let me explain my problem

I have a 5 volts signal starting at T0 (Positive edge from 0 Volt to 5 Volts)

At this time I need to start a timer to wait for T1 seconds (need to be adjustable in range of 0 to 20 sec with potentiometer)

After T1 I Need to switch TTL signal (going to optocoupler) for T2 seconds (need to be adjustable in range of 60 secs to 120 secs with potentiometer)

I would like to achieve this with some gate and probably one or 2 x 555.

During T1 and T2 the first 5 Volts signal will stay at high level, system will restart the complete cycle only on positive edge detection.

Any help would be appreciated.

Rgds
 

Offline amaschas

  • Regular Contributor
  • *
  • Posts: 148
  • Country: us
  • checking for causal domain sheer
Re: Edge Detection
« Reply #1 on: September 19, 2024, 07:17:15 pm »
Are you opposed to using a microcontroller for this? It would be trivial with interrupts and timers. Otherwise something like a binary counter might do the job. I was playing with a timer a few weeks ago that used a 4060 binary counter with a built-in oscillator. I'm pretty sure you could do both timers with a single IC as well, if the two time intervals have a shared factor that you can set the clock rate to.
 
The following users thanked this post: Randy222

Offline delphes123Topic starter

  • Contributor
  • Posts: 44
  • Country: be
Re: Edge Detection
« Reply #2 on: September 19, 2024, 07:20:38 pm »

Yes with MCU I can do it right away, but I can not use Microcontroler for this project only digital IC.
 

Offline SteveThackery

  • Super Contributor
  • ***
  • Posts: 3474
  • Country: gb
  • 50 year novice
Re: Edge Detection
« Reply #3 on: September 19, 2024, 08:20:51 pm »
It's probably asking a bit too much to expect someone to design it for you. I suggest you have a stab at it yourself and then come back with specific questions.
If it ain't broke, keep fixing it until it is.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4275
  • Country: us
Re: Edge Detection
« Reply #4 on: September 19, 2024, 08:44:11 pm »
There is a basic building block of digital electronics called the "monostable multivibrator" or "one-shot" which might help you to design this circuit.

A one-shot is edge triggered and will emit a pulse for a certain duration regardless of what the input does during the pulse. The triggering can be positive or negative and the pulse can be high or low. Naturally the ending of a one-shot pulse can be the trigger for another one-shot.

There are several ways to implement one-shots including with 555 timers.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22523
  • Country: gb
  • 0999
Re: Edge Detection
« Reply #5 on: September 19, 2024, 09:25:11 pm »
Two monostable multivibrator circuits cascaded will do that. The 555 is negative edge triggered and you need positive edge. The classic two NOT gate circuit will work and given you're using potentiometers, it doesn't need to be accurate.
https://www.electronics-tutorials.ws/waveforms/monostable.html
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7207
  • Country: de
Re: Edge Detection
« Reply #6 on: September 19, 2024, 09:34:23 pm »
CD4538/MC14538 will do this for you.
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 6131
  • Country: au
    • send complaints here
Re: Edge Detection
« Reply #7 on: September 19, 2024, 10:27:05 pm »
Yes with MCU I can do it right away, but I can not use Microcontroler for this project only digital IC.
555 is analog, potentiometer is analog... only digital is very hard in comparison.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3438
  • Country: au
Re: Edge Detection
« Reply #8 on: September 19, 2024, 11:16:54 pm »
...
At this time I need to start a timer to wait for T1 seconds (need to be adjustable in range of 0 to 20 sec with potentiometer)
After T1 I Need to switch TTL signal (going to optocoupler) for T2 seconds (need to be adjustable in range of 60 secs to 120 secs with potentiometer)
I would like to achieve this with some gate and probably one or 2 x 555.
You could cobble something with 555, but those are long time constants, and timing becomes a lottery.

If your tutor says do not use MCU, then smarter would be to use CMOS counters like 4060/4521/4541, which allow much faster RC oscillators and more precision

You can select a choice of two pots with a SPDT analog switch, so chosen out = LOW = t1_POT and out = HI =  t2_POT
One counter/divider then manages both delay and pulse times.

Zero time is not a real thing, so you need to choose some sensible pot ratio eg 100:1 for T1 gives 0.2s-20s or 20:1 gives 1s-20s

Add a schmitt part like 74HCS74 or 74HCS72 for your choice of _/= or =\_ trigger and you are done. (eg uses a 74HCS72 to halt after pulse =\_  )
 
The following users thanked this post: Someone

Offline Randy222

  • Super Contributor
  • ***
  • Posts: 2029
  • Country: ca
Re: Edge Detection
« Reply #9 on: September 20, 2024, 04:48:57 pm »
How stable does the "control" need to be? 555's with just passive components, will experience some drift with temp swings. I assume stable accuracy is not in the design.

If the project is just for learning some basics, then 555's can do it.

Where exactly does T0 come from? Is that a manual trigger?

Not sure about the "reset" part, I guess you can build a 60sec 555 and wait for that to reset the rest?
 

Offline PGPG

  • Super Contributor
  • ***
  • Posts: 1366
  • Country: pl
Re: Edge Detection
« Reply #10 on: September 20, 2024, 11:21:23 pm »
What you need are long times so big capacitors and problems with their stability.
Look at CD4060 - it is oscillator + 2^14 divider in one chip. You can use small capacitor to get long time.
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 777
  • Country: sc
Re: Edge Detection
« Reply #11 on: September 20, 2024, 11:28:46 pm »
Implementation aside, considering the way OP describe the trigger signal I wonder if OP want the circuit to continue to delay and output the pulse if the trigger signal is de-asserted mid-delay. I certainly had encountered either variations, both were safety critical.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4275
  • Country: us
Re: Edge Detection
« Reply #12 on: September 20, 2024, 11:36:56 pm »
Implementation aside, considering the way OP describe the trigger signal I wonder if OP want the circuit to continue to delay and output the pulse if the trigger signal is de-asserted mid-delay. I certainly had encountered either variations, both were safety critical.

i think this is a homework exercise and the triggering pulse was specified that way to make the assignment easier.
 
The following users thanked this post: Someone

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3438
  • Country: au
Re: Edge Detection
« Reply #13 on: September 21, 2024, 12:01:20 am »
Implementation aside, considering the way OP describe the trigger signal I wonder if OP want the circuit to continue to delay and output the pulse if the trigger signal is de-asserted mid-delay. I certainly had encountered either variations, both were safety critical.

Good point, as well as no mention of retrigger.

The spec says system will restart the complete cycle only on positive edge detection so that seems to exclude any /RESET action, but retrigger is vague.
The words complete cycle hint at no retrigger.

Maybe students get an A if they spot reset and retrigger aspects ?  8)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->