DC Motor Tachometer - Arduino

I have this DC motor which has two yellow wires coming out of the base. Along with Red, Blue, and Black. Black connects to the case; Blue is the Motor -, Red is Motor +

See attached image. The inner wheel with cogs spins inside the outer ring. There is a magnetic field present.

Can someone suggest a means to measure the frequency with the arduino? I thought it would be a hall effect sensor, but it does not seem to be the case. As a note, I can measure the frequency with my Extech multimeter. It measures about 2.9khz at full speed. If I reduce the speed of the motor, the frequency reduces likewise. However when I try to measure it with the arduino (pulseIn on pin 2) I get nothing intelligible.

motor_tach

Our Shereline lathes and mill use this exact thing, go have a look. It using IR light and counter. The Arduino counts the number for a given period of time and calculates the RPM.

We have a tachometer if you are curious. David is right about the Sherlines. They appear to use paired emitters & collectors on the DRO’s, my guess is for verification. They are notched similar to a gear.

Yeah I can easily do IR but I was attempting to interface with the existing hardware. This mechanism is inside the motor housing

The image is a mock-up of this plate that is attached to the motor shaft and spins inside the ring that has notches
The plate is magnetised. I was thinking it generates a current at first. I will add that this is inside a Technics record player made in 1979.

Does the platter have a strobe on the outside to adjust the speed?

Are there any markings on the motor? Part number? Manufacturer name?

FG Servo DC12V MHX-5F2RVA

So it’s a frequency generating servo motor. Connect one of the yellow wires to ground lead and the other to red lead of the Extech and it reads about 2.94khz full speed. I think I figured out I need a schmitt trigger to convert the wave to square wave for the arduino to see it.

http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-frequency-counter-library/

Problem is my parts bin is limited. So pretty much everything I need is an order from somewhere.

1 Like

The Arduino needs a very specific pulse amplitude to properly sense the pulses. You likely need a small conditioning circuit to adapt the pulses you saw on the scope to something appropriate for the Arduino. I’m going to take a wild guess that the pulse is either too small (e.g < 2.7v @5v vcc) or too weak to reach 2.7v when driving the input pin. If either is true then a noninverting op amp circuit can be used to add gain and increase the input impedance.

1 Like

Great tip! Thanks. I dig around for something. Might have to hit Fry’s. Yep that’s basically what the article was saying. Signal too weak.

I’d be shocked if you couldn’t find an lm324 single supply op amp in the elab parts bins.

Try a 74HC14 to square up that input.

I have a tube of 'em somewhere up here in Highland Village.

Op amp and schmitt trigger are good options.
https://www.electronics-tutorials.ws/opamp/op-amp-comparator.html
Another possibility is a mosfet w/ low Vgate-on in an open drain config.

1 Like

I’d be curious to hook it up to a scope and see exactly what it’s outputting so you can design a good circuit for it.

It looks like a variable reluctance sensor, so it would be a sineish wave that increases in both frequency and amplitude with an increase in RPM. Mostly there’s just the question of what voltage it’s outputting. On some of them it can get as high as tens of volts, but whether it’s that high or much lower will change what kind of circuit you can use.

In any case, I’m sure you could put something together using just the parts we have in the elab. Art’s mosfet solution is about as simple as it gets, and as an added bonus it should work well with any VR sensor. You just need to find a suitable mosfet and then add any pullup resistor.

A suitable mosfet should be an N (or P with a pulldown resistor) type with a VGS greater than the highest voltage the sensor outputs and the lowest VGSth you can find. The lowest speed you can read will be determined by VGSth since the voltage output by the sensor deceases with decreasing RPM.

1 Like

Well my electronics theory is weak and rusty so I had to brush up on it this weekend. I took a more careful look at the existing board and how these two wires from the motor connect to it. In one theory you could reasonably consider it to generate a frequency since literally the name of the turn table says frequency generator servo lol. But one lead is connected directly to positive input vcc. The other goes into a capacitor then into the chip.

I managed to fix the existing servo board by replacing all the caps. It has trouble at the beginning to get to a stable speed but stays stable after that.

What I’m after is how to build a better mousetrap :slight_smile: highend units use quartz locked fg servo drives. I don’t know how quartz locked helps but hey if it sells a $6k unit why not.

EDIT: Quartz lock in plain english :slight_smile:

PS. Speed control boxes run up to like $600


I don’t recognize that purple cap… looks very old.

Have you checked ESR on them?

I have changed it already :slight_smile:

I bought an oscilloscope :slight_smile: I’ve wanted one for a while and now I need to figure out how to use it.

Having the turntable set to 33 RPM and fairly stable on the pitch adjustment and strobe, it averages around 740 hz

1 Like

Building on Art’s suggestion of a comparator, I realized that the atmega has a built in comparator. See the “Alternative method with analog comparator” at this link for an example: https://arduino.stackexchange.com/questions/21157/arduino-read-frequency-of-input-from-audio-jack

That circuit will probably work as is if you change the ratio on R2/R3 to a little higher threshold.