This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Speed sensor mystery

Hello all,
I am in the midst of a very strange problem. the machine has a metal detector sensor connected to my processor via an ADC channel. it is working fine, otherwise errors would have appeared on the display. the sensor also generates the expected 6 flank waveform when the shaft turns the wheel that moves the metal targets in front of the sensor. the problem is a 3 counters, that are incremented by 1 after 6 pulses, are incremented by 2 or 4, depending on the RPM of another shaft (the PTO, lets call it the main shaft) that is connected to the above mentioned one via a gearbox. the sensors shaft always turns at the same speed. so the counters are incremented by 1 of the main shaft of turning at 1000 RPM, but by 2 if it turns at 800 RPM, and 4 if it turns at 600 RPM. this behavior is reproducible on the machine. I ran the software on a simulator, injected 6 pulses using a signal generator but I cannot reproduce it in the lab. the person(s) that wrote the software did leave so many holes when it comes to interrupt safety - this is no exception - but I don't feel this problem is related to that. I haven't sent out test software with extra logging yet - will do that next week - I was hoping for some ideas first...
here is what I excluded: probably no EMC involved, sensor functioning, no tremors of the assembly, software that increments counters is only invoked when it should (I hope), and the counters are only incremented at one location.
I never see more than 6 pulses in a row (I think - I didn't do the measurement, but the waveform looks good on the scope capture) even on a machine.
Any ideas?

Parents
  • Hello Per,
    The input signals are required to remain stable for at least 10 milliseconds (but the software only executes that test every 20 milliseconds - you see how wonderful this legacy software actually is :-)....). Looking at the scope's captures I don't see serious fluctuations. The signal is nice and rectangular. the range of the measurement is something like this: anything above 7,2v is error, as well as below 500mv. voltage above 5,5v is high, the rest low. no problems there.

Reply
  • Hello Per,
    The input signals are required to remain stable for at least 10 milliseconds (but the software only executes that test every 20 milliseconds - you see how wonderful this legacy software actually is :-)....). Looking at the scope's captures I don't see serious fluctuations. The signal is nice and rectangular. the range of the measurement is something like this: anything above 7,2v is error, as well as below 500mv. voltage above 5,5v is high, the rest low. no problems there.

Children
No data