Reading a motor speed with a resolver

hello , i am working on a project that consists on controlling a universal motor with a triac circuit . i managed to control the speed but i have problems with reading the speed with the resolver that came with the motor . i rectified the signal from the resolver and devided the vlotage to a safe range for the arduino with the maximum output being 2.8V . i then used an analog input to measure the DC voltage.
the problem is in the multimeter the output is constant but in the arduino's serial monitor it isn't , it continues to flactuate and not give a constant value .
any ideas why that happens ? and how can i rectify that ?
any help would be great .

No :frowning:

Please give a link to the "resolver" datasheet and a circuit diagram how you have it wired to your Arduino (which one?).

Try using an analog meter! Any digital multimeter will ALWAYS average pulsing signals.

does that mean i wont be able to get a voltage reading with the arduino ?

That means you need to average the readings, just like your digital meter averages the readings.

Hi, @aboubaker_ouchaib

I think you will find a Resolver is not a tacho generator.
It is a device you supply with an AC signal and read the output of the other two windings.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

1 Like

Please post a link to the product page or data sheet for the "resolver" or the combination.

Resolvers read the angular position of the motor shaft, the angular velocity (RPM or radians per second) can be derived from that.

2 Likes

My guess is that you won't be able to use analogRead() fast enough to read the outputs of the resolver.

1 Like

In order to demonstrate how difficult it will be to read the output of the resolver, I have performed the following tests:

Using a function generator, I have been able to create a simulated resolver output.

The following oscilloscope trace is of a 500Hz sinewave, 100% amplitude modulated at a frequency of 40Hz.

The modulation frequency of 40Hz represents a motor revolving at 40 revolutions per second, or 40 x 60 = 2400rpm.

Using the following code:

  • I have taken 500 samples, as quickly as possible.
  • Stored the samples in an array.
  • displayed the contents of the array on the serial plotter.

int inputPin = A0;
unsigned int sample[500];
unsigned int output = 0;

void setup() {
  Serial.begin(115200);
}

void loop() {

  // take 500 samples as quickly as possible.
  for (int i = 0; i <= 500; i++) {
    sample[i] = analogRead(A0);
  }

  // display the waveform at a leisurely pace.
  for (int i = 0; i <= 500; i++) {
    output = (sample[i]);
    Serial.println(output);
    delay(10);
  }
  delay(1000);
}

Here are the results on the serial plotter:

The problem is analysing that trace from the serial plotter, and coming up with the result of 2400rpm.

I don't know how to do it successfully.

1 Like

Step 1: Are you sure that it's a resolver?
Step 2: How are you exciting it?
Step 3: This would be far easier with a resolver to digital converter. I guess that you could reduce the resolver excitation frequency to the point where you could sample it fast enough with Arduino, but that sounds... painful.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.