Skip to main content
Mert
Associate
August 8, 2018
Question

Resolver for STM32F4

  • August 8, 2018
  • 7 replies
  • 2180 views

Hello everyone.

I'm working on a project. I must use a resolver for our servo motor. But I could not find any sample code for resolver.

Can anyone help me?

Thank you.

This topic has been closed for replies.

7 replies

Tesla DeLorean
Guru
August 8, 2018

Sorry do you have a different word for "resolver"

You want to drive a servo with a 50Hz (20ms) PWM?

OR you want to read a pulse width, PWM Input?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Mert
MertAuthor
Associate
August 8, 2018

Hello Clive

Thank your for your answer.

First, I explain the resolver; A resolver is a type of rotary electrical transformer used for measuring degrees of rotation.

It's like an encoder.

I want to measure the position with using a Resolver in STM32F4 Discovery. But I could not find any example for this.

Any sample codes or another, I want.

Thank you.

Tesla DeLorean
Guru
August 8, 2018

I'd imagine you'd need to drive it with a sine-wave (opamp via DAC), and then use two ADC to pull the signal wave forms, and then make a determination about the phase or whatever.

Sorry, I'd probably use an encoder. Perhaps there are simple IC available for interfacing with a resolver and providing an reading.

Analog Devices, TI and Freescale seem to have chip level solutions, perhaps review datasheets and block diagrams to see if you could implement equivalent functionality using STM32 resources.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate III
August 8, 2018

You are unlikely to find a ready-made code sample. But its principle very simple. 90 degree resolver represent amplitudes as sin and cos of the rotation angle. You can read more detail in Wikipedia:

https://en.wikipedia.org/wiki/Resolver_(electrical)

henry.dick
Associate II
August 8, 2018

has the resolver been resolved yet?

henry.dick
Associate II
August 9, 2018

"But its principle very simple. "

yes, but only in principle.

if the two signals are orthogonal, the math is simple.

otherwise (due to parasitic capacitance or resistance for example), it becomes tricky, particularly if you want to calculation to iterative, to minimize memory footprint.

Associate III
August 9, 2018

Yes, at frequencies near the resonance frequencies of coils, their parasitic capacitances and resistances must be taken into account, in order to obtain the best results. However, it seems to me that the shafts of motors do not rotate so fast.