0

I'm trying to read pulses from an encoder to measure belt speed. My encoder is 500 ppr. I have approx 2400 pulses per meter and I need to measure speeds upto 450 meters per minute.

Can anyone help with python code. I'm using callback and can only read upto 150 meters per minute am i missing something or is this not possible?.

  • So you need to count 450 * 2400 or 1080000 pulses per minute = 18000 pulses per second? You would need a Pi2 or Pi3 to get those sort of figures from Python. Perhaps you need to be using C. – joan Jan 25 '17 at 21:22
0

Yes just transferred to a raspberrypi 3 and it seems to be working tried with pigpio and it doesn't make any difference?. I thought pigpio was faster. Im acheiving over 1000 meters / per / minute now based on 3000 pulses per meter.

Andy

0

Or tho im using a variable called meters. Im checking it every 5 seconds using time.time () in main part of program i reset after 5 seconds have reached but every now and again it doesn't reset. So for example if im running at 12 meters min it sometimes shows 24 ?.

Us this something to do with call back and missing the reset?.

Andy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.