Looking for timer counter ideas

Thread Starter

inwo

Joined Nov 7, 2013
2,419
What would be the simplest way to accomplish this, using a couple timers and cmos chips?
Would like to avoid programming methods at this time. It's been too long since I've worked with pic etc.

An ideal solution would be a couple 555s or retriggerable timers, maybe a gate or two.

Taking a signal from hall sensor, <10hz to ~400hz, output follows input in frequency. Duty cycle and symmetry not important. It just goes to a processor that tracks rpm and total rotations.

When reaching a set frequency, say 350hz, output continues, but limits to 350hz maximum.

Intuitively it seems a retriggerable configuration would work, up to a set point, then output would remain "high" at speeds over set point.
That high could be used to switch, somehow, to a 350hz clock output.

Also considered d-a converter and a-d conversion with high limit.

Lost in the details. Have not yet come up with anything worth testing.
 

wayneh

Joined Sep 9, 2010
17,498
It just goes to a processor that tracks rpm and total rotations.
I'm confused by this. What output do you want, and what does the processor do?

It seems to me one approach would be to run a clock and send the time of each pulse (leading edge, maybe) to the processor. That's all the data you need. The processor could count the pulses and make any calculation you want to compute the frequency, whether it's between any two points, some smoothed moving average, or whatever.
 

jpanhalt

Joined Jan 18, 2008
11,087
Are you looking for a frequency to voltage converter, for example, one that counts rising edges per given period and converts that to a voltage? The reason to use a single edge is to remove the effect of duty cycle and peak symmetry.

John
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
Counting pulses and measuring rpms. ie. tachometer.
But tachometer will be limited to a certain rpm reading. Say 400 hz.
Tach will read speed correctly, but only to set point. Then read 400 at any speed over setpoint.

Reason for circuit is to "spoof" an rpm limiter. Yet retain correct readout up to maximum rpm.
Rpm will be permitted to rise, yet tell controller it is 400rpm.
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
I'm looking at something like this, but haven't checked for correct logic and timing components. Retriggerable monostable into a gated astable.
retriggermono.png
 

jpanhalt

Joined Jan 18, 2008
11,087
400 Hz is 24,000 rpm, assuming one pulse per revolution.

The CD4047 is edge triggered and either retriggerable or non-retriggerable, which shouldn't make a difference, if your pulse width is short enough. If you set your pulse width at less than 2.5 ms (i.e., 400 Hz), you should get a nice pulse train from your sensor. I would set the pulse width at 1 to 2 ms just to be safe. Then just integrate the pulses for a voltage that is proportional to rpm. There are some F--> V chips that will do the whole thing for you. Interested or do you want to DIY?

John
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
Thanks for input.
Sorry to be confusing.
This is a circuit that will be connected between an existing sensor and tachometer. No F-->V need be added.
Thus it has to switch from a pulse train that follows input, to astable. Astable needs no synchronization to sensor or high accuracy.

Just noticed the 4047 has astable mode enable pins. Wonder if it's possible for a one chip solution?
 

jpanhalt

Joined Jan 18, 2008
11,087
So, if I interpret what you is just the frequency output. The CD4047 will do that. Do you need to change that frequency, like X2, X10, X0.5, X0.1 etc. for your current tachometer?

Why do you want an astable. What will set that astable's frequency proportional to the frequency you are receiving?

John
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
I'm having trouble explaining.
You would have no trouble designing a solution, if I could explain better.
My problem does not seem logical, hence the misunderstanding.
There are two type outputs needed. Either output goes to the existing tach.

The first one is simple. It feeds sensor signal to existing tach, just as the original circuit.
No conditioning or change is needed.

The tricky part is setting a limit to the tach reading.

As rpms rise, tach reads properly.
When rpm is over 400hz, tach reads 400hz. (only) No relation to sensor signal!

I'll try to find a picture.
 

jpanhalt

Joined Jan 18, 2008
11,087
What you have not told us is what TYPE of signal the existing tach uses. Many older ones just used voltage. I had one that used a frequency directly from the mag. Newer ones may even be stepper motors and need to be driven as such. There is quite a difference!

Please let us know.

John
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
It uses the 0-12v signal direct from hall effect sensor.
4 pulses per revolution.

I have used this for testing previous products. http://www.ebay.com/itm/DIGITAL-Red...ash=item5b288eae1c:g:XvwAAOSw~gRVuCA9&vxp=mtr
If it drives this, it will work in machine.

To recap. Tach will read correct speed, until over-speed condition. During over-speed it will just read 400.
No modification to sensor or tach alowed.
This board will be inserted in line on an existing machine.
 

AnalogKid

Joined Aug 1, 2013
11,042
A critical question is the detection and release timing windows.

1. How soon after the frequency increases above 350 Hz must the circuit shift to a constant 350 Hz output?

2. How soon after the input frequency drops below 350 Hz must the circuit shift back to passing through the input signal to the output?

Most frequency discriminators are as you describe, some form of frequency-to-voltage converter and a comparator with a voltage trip point that corresponds to a specific input frequency. The problem is noise near the trigger level. This can cause the output "switch" signal to bounce around when the input is very near the transition frequency. Hysteresis and other noise suppression techniques have the effect of widening the detection window gap.

ak
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
I have the code for the Pic solution, I would think it should work very simply, even includes the display, or if not needed use a smaller Pic.
Max.
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
I have the code for the Pic solution, I would think it should work very simply, even includes the display, or if not needed use a smaller Pic.
Max.
I was afraid of that. :) May take you up on it.
Explain how it works to see if we're on the same page.
There are several ways that I manipulate this signal. If I would have started with a pic design, would have saved a lot of trouble.
One just halves the signal, one lowers reading 20%, another divides by two after reaching 350hz.

Have all the stuff I need to get back into pics. Except the desire. :(
If I went that way, I could make one potted circuit with programming pins. Universal design.
Pick a pic for me. I'll see if I have similar to play with.

Jumping from one project to another right now.
Boards came in today for my shunt reg. (see other thread)MVC-011F.JPG

http://forum.allaboutcircuits.com/t...uring-charge-cycle.125841/page-2#post-1025578
 
Last edited:

Thread Starter

inwo

Joined Nov 7, 2013
2,419
A critical question is the detection and release timing windows.

1. How soon after the frequency increases above 350 Hz must the circuit shift to a constant 350 Hz output?

2. How soon after the input frequency drops below 350 Hz must the circuit shift back to passing through the input signal to the output?

Most frequency discriminators are as you describe, some form of frequency-to-voltage converter and a comparator with a voltage trip point that corresponds to a specific input frequency. The problem is noise near the trigger level. This can cause the output "switch" signal to bounce around when the input is very near the transition frequency. Hysteresis and other noise suppression techniques have the effect of widening the detection window gap.

ak
Not critical. Needs to fine tune to 20hz or so.
It does need a smooth transition, to keep either the accurate display or the bogus 400hz. A loss of signal will throw an error code. Nothing life threatening, just a nuisance.

Have you thought about my idea of a retriggerable one-shot feeding an astable?
The output of the astable would be enabled by the one-shot. A pulse at a time. In sync. Until the one-shot continually retriggered, holding it's output high. The astable would then be continually enabled, and output a fixed frequency.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
Explain how it works to see if we're on the same page.
Pick a pic for me. I'll see if I have similar to play with.
The PDF pretty much explains it, basically it is a simple low frequency tachometer.
It should be possible to adapt to what you seem to want to do, it goes to 255 rpm but easy to extend it, also if necessary the 3 digit 7 seg display could be replaced by a LCD ver.
Any small Pic with T1 32Khz crystal input and a couple of ports at most is needed, a 16f872 is used in the design but a 16f628 etc should also do it.
The code I have for it is in Assembly.
Max.
 

wayneh

Joined Sep 9, 2010
17,498
Couldn't you accomplish your goal with just a 555 monostable circuit? Set the output pulse long enough that a continuously retriggered stream of them cannot register more than 400 rpm on your tach. Incoming sensor pulses will trigger the one shot linearly at lower frequencies, as the 555 will have reset before the next sensor pulse comes along.
 

Thread Starter

inwo

Joined Nov 7, 2013
2,419
Couldn't you accomplish your goal with just a 555 monostable circuit? Set the output pulse long enough that a continuously retriggered stream of them cannot register more than 400 rpm on your tach. Incoming sensor pulses will trigger the one shot linearly at lower frequencies, as the 555 will have reset before the next sensor pulse comes along.
Thanks for the idea. That would be a minimum circuit. If I follow you, that circuit will divide by 2 after the high limit. Triggering on every other pulse.

By using a retriggerable monostable, the output goes high after the high limit, continually retriggering.
I can then use the output to gate an astable 555, set at the maximum rpm that I want displayed.

All I could find was TTL 74123 to test the idea.

retriggermono123.png
 
Top