Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

neuroscientist needs advise on PC based probe monitoring

Status
Not open for further replies.

jayblundon

Computer
Oct 3, 2022
2
0
0
US
I have a rotary encoder which sends out 1000 TTL pulses for every one rotation. I need to be able to capture the analog voltage output signals, convert them to digital with my PC, and then produce a running real-time graph of the pulse frequency vs. time. Do you have hardware and software products that will work? Not looking to spend much money. I only need 2 channels and the sampling frequency does not have to be high. I just need to be able to display the captured waveform and then quantify it in real time.
thanks.
 
Replies continue below

Recommended for you

How many pulses per second will there be? Unless the computer has eyes, it cannot see a "rotation." If it's on a motor shaft at 100,000 RPM then that's 100 MHz. If it's once per day it's much lower. Either way, you do the calculation.

You ask for two things: Display the waveform and display the frequency.

Which is it?

How much detail needs to be in the waveform? Many conditions are only detectable at 100-1000 samples per half-cycle.

There are a ton of USB oscilloscopes that will do the job. It might also be done with a sound card.

What's the budget? You might find renting equipment to be a better option.


 
The rotary encoder is being empowered by a mouse running on a disc attached to the encoder. So we're talking less than 1000-2000 pulses per second output. A sampling frequency of 20K is more than sufficient. My previous software/hardware configuration (which would cost me another $16K if I had the funds) would allow for a digital oscilloscope window to capture the waveform and a second window for real time statistics display, which in this case would be the number of times per second that the TTL pulses crossed a threshold, thus providing a real time display of the mouse locomotion. I could do it with a sound card but that of course would distort the waveform since sound cards don't have DC coupling. Still I could have the O-scope program detect the AC transients produced by the DC pulses. But all of the O-scope programs I've seen display the waveform but don't give a real time display of pulse rate over time. I've found one program that displays pulse frequency but doesn't save the display over time, and I'd like to be able to get a visual display of mouse locomotion over the course of an hour. I'd like to keep the budget below $1K. I've seen several low price examples of AD cards or plug in boxes... looking for a suggestion of one that also comes with the software analysis tools I need. Renting isn't an option as this is a long term project.
 
Since you know the mouse is running one way or the other you don't need the wave form. You just need the time between pulses.
I presume this is mouse the mammal and not mouse the computer input device. Do they like running in a small circle?

You could use a sound card by biasing the signal voltage via an op-amp, perhaps even a resistor-divider would work, but it doesn't seem like you need that.

Most oscilloscope software has a frequency analysis function for managing Pulse Width Modulation problems but, again, you only need the pulse rate and that's something a microcontroller can manage for a few dollars as they are easily programmable to watch for transitions.
 
You have not given very detailed specs, but the solution could be simple if you did, or much more complicated if you don't have any design skills.

This is just a digital tachometer. THere are lots of solutions used for other things that can be adapted for your needs.

To use something industry compatible you will scale the frequency with a counter divider then the sample rate is much lower to read RPM or cm/s or MPH or kph or anthing you like including total distance covered by counting pulses with a binary or BCD counter for your duration of 1 hour.

1st, define the required data resolution for speed in samples per second (not pulse sampling) that you need. Maybe 10 samples per minute or 1 sample per second or something else?

If you like define the resolution and range for total distance travelled and any other parameters like. Busy duration. resting duration.

1k pulses per rev seems like overkill so this frequency can easily be scaled down or converted to a 0 to V+ range using a 0.5ms oneshot (74HC123) and averaging the voltage with a resistor capacitor RC flow pass filter like 20 Hz which attenuates 2kHz pulse ripple by a factor of 100 or 40 dB for a simple RC filter when converted to a speed analog voltage.

There are single 14 bit counters IC's that cost pennies or complex ones with serial read ports or make a custom program with a uC to do this.
So there are many many options depending on what resources you can find locally. It's hard to transport a design to do everything you imagine here and we don't work for peanuts. ;)



Here is a simple F to V converter (Tach circuit) 0 to 2kHz = 0 to 5Vdc

Send one expresso coupon for time spent. :)
 
Status
Not open for further replies.
Back
Top