This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.
English
Deutsch
Hello There, Guest! Login Register


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Title: Tachometer signal generation


#1
Hello,

Preface:
I'm planning an Electronic Leadscrew (ELS) conversion for my lathe, it involves an incremental rotary encoder driven by the spindle, and a stepper motor driving the leadscrew. An MCU decodes the spindle encoder's output and outputs appropriate steps signal to the stepper motor driver, depending on the thread pitch or a feed ratio selected by the user.

By reading the spindle encoder, the ELS MCU has very accurate knowledge of spindle RPM. It would be nice if this RPM can also be displayed on the laptop, to which Caliper2PC is connected. I would like to connect the ELS MCU to Caliper2PC in a way that Caliper2PC will "think" it's connected to an opto interrupter sensor.

My guess is:
Stereo Jack 2.5 mm
VCC - not connected
Signal - MCU pin configured as an output pin
GND - MCU ground

Every X counts of the spindle encoder, toggle the MCU pin value. X should be chosen based on spindle encoder counts per revolution, and max possible spindle RPM. In my case the spindle encoder is 1800 pulses per revolution, and I will process the quadrature output in either 2x or 4x mode (undecided yet), let's assume 2x mode, then it's 3600 counts per revolution. Let's say that the max spindle speed is 2000 RPM. According to Caliper2PC website, "The measurable spindle speed ranges from 3000 – 300 000 rpm (50 – 5000Hz)". 2000 * 3600 = 7 200 000 max impulses per second, we have to scale it down to 300 000. X = 7 200 000 / 300 000 = 24. This should make the MCU output a square wave similar to what would be produced by an opto interrupter with a 150 (3600 / 24) slot disk. Unless I made a mistake somewhere in my calculations Smile

Am I on the right track with regards to the connections and the calculations? Would I need any pull-up or pull-down resistors? My guess is that there's a pull-up resistor on the Caliper2PC's side of the Signal pin, and no resistors would be needed on the ELS MCU side?

Thanks
--Gene
 
Reply
  


Messages In This Thread
Tachometer signal generation - by gene-pavlovsky - 10-07-2020, 04:35 PM
RE: Tachometer signal generation - by Tomer - 10-17-2020, 07:42 PM

Forum Jump:


Browsing: 1 Guest(s)