Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

AT-MIO-16E-10 Read encoders problem (a possible driver problem ?)

Hi there! I have AT-MIO-16E-10 board and i have a problem with reading the "values" from an incremental encoder.Here it's the description of the problem : I have the encoder conected via a mechanism formed by a belt and a pulley (the pulley it is connected directly to the encoder shaft) and this mechanism it is moved by a dc motor which it's also conected to the belt by an identical pulley mounted on the dc motor shaft.The motor drives a cart (by this mechanism formed by pulley-belt) on a track which has 1200 mm length.Now here comes the problem : The resolution of the encoder i use to measure the position it's 10000 ppr. The diameter of the puley it's 30.56 mm. Now the pulses given by the encoder during the full track (the total counts measured within the total length of the track i.e 1200mm) are measured with an universal counter (a hardware device) and with an aplication program (which it is attached bellow).The number of pulses for the total lenght of the track it's around 125000 (plus minus maxium 10 pulses) for the universal counter device (the hardware device) and around 128000 for the aplication program (plus minus 100 pulses).Now if we do a simple mathematical calculation we shall observe the following : if the puley has the diameter of 30.56 mm that gives us a linear length (the length of the circle) of PI*diameter i.e around 96.00424 mm (3.1415*30.56).If the total length of the track it's 1200mm that means the puley makes 1200/96.00424 rotations i.e. around 12.499 rotations and if the encoder give us 10000 ppr that means 124990 pulses for the total length of the track (for 1200mm) which it's extremely closed to the value of 125000 pulses provided by the universal counter (the hardware device) and quite far from 128000 pulses provided by the aplications program attached bellow.If we supose that the corect number of pulses it's 128000 that means the pulley should turn 12.8 times comparing with 12.5 times on the total length of the track which it's not true! (i could see with my own eyes that the pulley rotates under 12.5 rotations during the total length of the track). So after my opinion there is something wrong with the software (the program it is downloaded from zone.ni.com).I'm using AT-MIO-16E-10 hardware device,with LV6.1 (and real-time version),NI-DAQ 6.9.3 driver on XP1600+ processor,with Windows XP operating system.If any of NI aplication engineers see this please reply as quick as possible.Thank you very much for reading this and i'll be waiting for your answers as quick as possible.Best regards,Michael.
0 Kudos
Message 1 of 2
(3,370 Views)
>by Michael Antonios
The number of pulses for the total lenght of the track it's around 125000 (plus minus maxium 10 pulses) for the universal counter device (the hardware device) and around 128000 for the aplication program (plus minus 100 pulses).

>mross
IF the signal from the encoder is correct (proper voltages High and Low, and noise free), THEN the count will be correct.

This is gauranteed.

You probably have a noise problem ( I speak from experience). The counter is expecting TTL logic. In my experience, if the low of the encoder signal has noise exceeding 0.8V, the counter will falsely count the noise.

The simplest solution could be to trigger on the falling edges of the encoder signal. There is more "headroom" coming dow
n with TTL. If your high signal is running 5V, the undefined range starts at 2.4V (which is pretty much when the counter will start counting). This gives you the ability to reject 2.6V of noise. On the rising edge, you may have a 0.3V low and only 0.5V of noise rejection.

The other option is to clean up the noise. Get an osilloscope and start looking. Fix any bad grounding and wiring practices. Turn off any noisy equipment. There are ways to buffer the counter input so that the encoder signal is a differential signal. Optocouplers and schmitt triggers can clean up the encoder signals. Sometimes the encoder needs to drive some current to be less noisy. A fast Line Receiver can clean up rounded off encoder pulses (see US Digital - $16).

Good luck,

mike
0 Kudos
Message 2 of 2
(3,370 Views)