analogue pulse counter?

Status
Not open for further replies.

throbscottle

Well-Known Member
Is there a simple way to cause a voltage to increase according to the number of pulses the input has seen, irrespective of pulse width? I tried simulating charging a capacitor from a square wave input, but the voltage built up due to the time constant, not the number of pulses, so now I'm a bit stuck. Needs to be quite simple or it's not worth doing; I'll try something else. Any suggestions?

The purpose of this is to use a linear optical encoder to show how far a moving part has moved, driven by small motor (actually a CD drive head mechanism), so I don't want to add the extra load of a potentiometer to it. The idea is to produce a voltage change which can be used for linear feedback. End stop micro-switches will reset it if the part overshoots. No need for good accuracy, so long as it can track an input pot's movement.
 
I am not sure that I fully understand the problem, but how about just counting the pulses using a binary counter and then using the output of the counter to drive a D to A converter.

JimB

Edit
Looks like Ken types faster than I do!
 
Better than what I just came up with. I was trying to go for something just using a few discreet components. I just had another play and came up with this, it does one half of what I want. I'll look at low res DACs, though.
 

Attachments

  • Draft1.asc
    1.1 KB · Views: 138
  • countme.png
    28.6 KB · Views: 215
LM2917 ?

**broken link removed**

*Edit - I think I misread the original requirement but if it is a frequency to voltage then the 2917 is a great chip.

Otherwise a counter and R / 2R on the output to give a voltage which increases proportionately to the number of pulses.
 
What resets it? (beit a digital counter or analog intergrator)
 
In analogue you could use a 555 to generate an exact pulse each time you geta trigger, use the o/p from the 555 to gate a current source which then charges a cap, each pulse will charge the cap a similar voltage each time, if the votls is regulated you could just use a resistor there will just be a bit on non linearity.

Instead of end stops you could use a resstor/transistor to detect overcurrent on the motor and reset the cap with that, no microswitches.

Another interesting way would be to use a dekatron, these are a neon counting tubes.
 
picbits - looked at that before. F-V isn't what I want. I need to turn approximate position, given by the number of pulses, into a voltage. As long as it tracks, accuracy isn't important.
MikeML - the original idea was that it would reach some preset voltage, and reverse itself, so the voltage would start going down instead of up. But it's a flawed approach, the reversal needs to originate from the controlling device (a pot on a foot pedal). So a reset (or set, I suppose) only occurs in the event of overshoot.
dr pepper - a more precise version of what I posted above, then (where the output voltage is from C2, btw). Ok trying my existing simulation with a constant current. Horribly slow...
Dekatron! I thought those were just display devices?
I'm thinking there's going to be maybe 100 bars on my encoder strip - cut from a length pulled from an old printer, so I need 8 bits, if I do counter/dac route. Hmmm, 74hc590 and dac0832 are cheap on eBay...

Maybe I would be better to ditch the foot-pedal pot and use another encoder, do it all with a microcontroller. I soooo wanted to avoid that
 
Maybe the dac is an easy solution, clock a 4040 to drive the dac.
The current source/cap neednt be slow, something like that can work at mhz's.
A dekatron is a display device, isnt that what you wanted a display device, that being hte case why not divide down your pulses and clock a 4017, or pair or more of them driving leds as the display, linear display device!
 
I may have missed it, but do you want the pulse-to-voltage circuit to respond correctly, up and down, with the "part" moving in both directions?

Ken
 
Epot is a good idea, if you can make the encoder 2 phase use a flip flop to determine whether to clock up or down.
 
I may have missed it, but do you want the pulse-to-voltage circuit to respond correctly, up and down, with the "part" moving in both directions?

Ken
Yes I do, but it can be told which way it's supposed to be going, doesn't have to auto-magic it
 
Epot is a good idea, if you can make the encoder 2 phase use a flip flop to determine whether to clock up or down.
Ahahaahaaaaa! X9C10x does exactly what I want In fact, it's considerably better than what I want...
And now I have to investigate this 2 phase encoder + flip flop, I did not know you could do that

Don't how you got the idea I want a display device, though
 
Last edited:
I cant clain credit on the epot, it was einar's idea.

Heres a link t someone who's got a direction o/p from a flip flip, they used a 74 series and 2 d type ff's, I htink a 4013 is a dtype in cmos, 74hc4013 is a good choice.

You did day that you wanted a display device, first post.

https://profmason.com/?p=775
 
I said I wanted to use an optical encoder, meaning a strip with bars on it, an led and a photodiode - by "show" I meant, show the feedback amp, not show me! Anyways, that's a really useful circuit - thanks!
And thanks EinarA - I think I'll go with your idea
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…