Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Signal and Digital Timer Issue

Status
Not open for further replies.

tbass2k

New Member
I am trying to clean up a signal for timing purposes, I am switching a motor in a device and timing the switch in milliseconds with a digital timer. The timer is only timing the first pulse on the output signal from the motor which is only around 35-45 ms, the actual/entire switch time should be between 200-400 ms (I think). I believe there is some bouncing from the motor switching positions giving me this funky signal. Will an edge triggered flip flop get me closer to the correct signal/time? I have attached an image in PDF of what I'm getting and what I need. Any help is appreciated.
 

Attachments

  • Switch Signal.pdf
    8.7 KB · Views: 138
Should the trailing edge of "Needed" be coincident with the trailing edge of "Current"?

What is the min/max time from rising edge of "Current" to the trailing edge of "Current"?

Is the noise pulse much narrower then either the initial pulse or the final pulse?

Toggling an edge-triggered flip-flop wont work as the only fix because it will toggle on all three rising edges, the initial pulse, the noise pulse and the final pulse. A retriggerable one-shot with a period of about one-third of the total time you are expecting might help, because it will stay high for the duration.
 
Last edited:
Well, I would like the trailing edge of the 'needed' to match up as closely as possible with the trailing edge of 'current.'

There is no min time for rising to trailing edge of current, but 40ms is obviously too short of a switch time for the mechanical device I am working with, which is the reason I am trying to get a time < 500ms (max time), which more closely correlates with the 'signal needed' waveform.

The noise pulse, based on the scope, appears to be much narrower than initial or final pulse...the waveform I attached closely resembles what I am seeing on the scope. I believe my timer is timing the first pulse only (obviously) when I need it to time the rising edge of first pulse to falling edge of the last pulse (or as close as I can get to that).

So based on this and the previous info, you still think a retriggerable one shot might work?

Thanks again for the feedback.
 
Try a positive-edge re-triggerable one-shot with a period slightly shorter than the third pulse in your diagram. Hopefully, that will bridge across the gaps in "current".

Rather than timing the signal directly, I would use a digital scope to capture the actual waveform. You can determine the relevant timing after the fact by inspection. Any one-shot solution may work for a time, but it is unlikely to work for all potential conditions.
 
Thanks for the fast reply, I was told by another engineer that the 54/74ls123 retriggerable one-shots are some of the most unreliable chips you can use and most engineers don't use them, as they may trigger with a +/- 3 degree change in temperature. At any rate, is there no other solution to clock on the first rising edge and final falling edge?
 
Last edited:
Not if you dont know for sure how many rising edges there are going to be.

The engineers who complain about '123s don't know how to use them, or they try to use them to solve your kind of problem:D

In your case, any fix using a one-shot, or counting edges will only work if the noise pattern happens the same way every time.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top