Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Get exact position of motor

Status
Not open for further replies.

Electonics_knowledge

Newbie level 5
Joined
Aug 8, 2018
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
94
Hello,

In a system motor is connected to gear and its interconnected to other gear. Gear ratio is 7.5. To complete 360 degrees motor need 7.5 rotations. I need to detect exact position of motor even when power fails. Motor is continuously rotating in clockwise/anticlockwise direction.

I have used incremental encoder to detect the position its working fine but in case of power failure I am storing encoder value to EEPROM of controller which results in slow processing of controller and encoder is missing count.

Is there any other way.
 

Hi,

What about a multiturn absolute encoder?

Klaus
 

Hi Klaus,

Absolute encoder increasing the cost of encoder & hardware requirement for fitting encoder on main gear. And also controller cost as it uses more pins of controller.
 

There are surely more intelligent solutions than storing the motor position continuously in EEPROM. For reliably operation, it needs power fail circuit with a few ms capacitor power backup that can be also used to copy the position to EEPROM on power fail and intentional shutdown only.

Nevertheless you'll need a means to recover the absolute position during initial setup and possible service action.
 

Hi,

Absolute encoder increasing the cost of encoder & hardware requirement for fitting encoder on main gear. And also controller cost as it uses more pins of controller.
I just answered your question.

If you have additional requirements, then you should give them to us.
Maybe what "exact position" means as value. Or if there is a limit for "continously rotating" revolutions...
or WHY do you need the motor position (and not the shaft position)...

Klaus
 

Hi FvM,

Power failure detection circuit is added in system to store encoder data but there is one more condition as controller is communicating with PC every time when serial connection reinitialized controller resets and and I have to save controller data. So in my code data is retrieved from EEPROM in setup and written to EEPROM before serial reset but still encoder count is missing.
 

Seems to refer to unsuitable programming details rather than concept, thus I can't say much about it. Obviously you need to stop the drive before issuing a reset, otherwise you'll miss counts as well.
 

Hey Klaus,

motor is mounted on secondary shaft, and primary to secondary gear ratio is 7.5. Motor is continuously moving in clockwise/anticlockwise direction. I am sending motor position continuously to PC. every time PC gives reset instruction encoder data is backed up in EEPROM and retrieved at start of code.

In this case I am dividing motor position with factor 7.5 to get position of shaft. If I will use encoder to detect position of main shaft I will need extra assembly to fit encoder on shaft. Currently encoder is directly fitted on motor. Cost is limitation in this case.
 

Hi,

I´ll try once again:
* What angualr resolution do you need?
* Is it sufficient to store the position of a single motor revolution(0...360°), or do you additionally need to count how many revolutions you ran in one direction? (give a limit)

Klaus
 

Hi,

I´ll try once again:
* What angualr resolution do you need?
* Is it sufficient to store the position of a single motor revolution(0...360°), or do you additionally need to count how many revolutions you ran in one direction? (give a limit)

Klaus


Storing only motor revolution is not sufficient as main shaft's 1 revolution is 7.5 times revolution of motor. So need to track main shafts one revolution. Don't need number of rotations of main shaft but it is needed to track position of main shaft (0 to 360).

Encoder resolution is set to 1000 (quadrature) so to complete one rotation of main motor encoder count is 30000 is required. So 360 degree = 30000 encoder count.
 

Hi,

hard to get useful informations.

Storing only motor revolution is not sufficient as main shaft's 1 revolution is 7.5 times revolution of motor. So need to track main shafts one revolution. Don't need number of rotations of main shaft but it is needed to track position of main shaft (0 to 360).
So what exactly do you need to know:
* 0..360° position of motor, or
* 0..360° position of main shaft?

(Note: I didn´t ask what you want to measure, because
* if you measure the [motor position + some count of total revolutions] you can calculate (know) shaft position...
* and if you measure the [shaft position + some count of total revolutions] you can calculate (know) motor position.)


Encoder resolution is set to 1000 (quadrature) so to complete one rotation of main motor encoder count is 30000 is required. So 360 degree = 30000 encoder count.
I don´t know what this means, nor do I understand your calcualtions..

--> draw a sketch of the complete setup and give informations what you want to do...

Klaus
 

Hi Klaus

I need to know 0- 360° position of main shaft irrespective of number of rotations.
 

Hi,

Ok, this is a clear specification.

Now please specify how "exact" (= resolution, precision...) you really need.

****
Currently you just need a single turn absolute encoder.
There are optical solutions and there are magnetical solutions.
The simplest is a magnet mounted on the shaft and a (two dimensional) hall sensor. There are ready to buy ICs as well as ready to buy encoders.

Klaus
 

Hi,

Ok, this is a clear specification.

Now please specify how "exact" (= resolution, precision...) you really need.

****
Currently you just need a single turn absolute encoder.
There are optical solutions and there are magnetical solutions.
The simplest is a magnet mounted on the shaft and a (two dimensional) hall sensor. There are ready to buy ICs as well as ready to buy encoders.

Klaus

Hello,

I have done some experiments on my project.

I am storing main shaft position to EEPROM when power failure is detected for that I have a circuit which keeps arduino alive for 2-3 seconds to store values to memory after power loss.

And I have added power sequencing so when power ON is detected arduino turns ON after 10 seconds and when arduino turns ON ground is supplied to motor driver after 10 seconds. So in this case encoder count is not missed by arduino.

But there is one more case as I have given backup to arduino and it is ON for certain time but before arduino turns OFF completely it reads changes in encoder values. I have observed that this count is of 10 every time arduino turns OFF. I have randomly stored values for 2 seconds to avoid this. But I really want to know reason for that. Is arduino giving garbage values or encoder giving garbage values when supply voltage reduces.
 

Um, seems to me that OP is over-thinking this.

Wouldn't a Gray-coded absolute positioner eliminate the need to hastily store the 'last' shaft position ?

And render control system immune to a bunch of Murphic failure modes ??
 

I agree with you Nik.
With the scant and piecemeal information provided, it appears that the OP has painted itself into a corner.

The motor apparently does have an encoder.
But then the motor rotation is geared down by a NON-INTEGER ratio. And the OP requires to know the gear shaft’s absolute position, even after a power loss, from the reading obtained from the motor’s shaft encoder.

Which in theory is possible, but in practice has all sorts of problems, like the EEPROM’s relatively slow writing speed, in addition to eventually exceeding the EEPROM’s maximum write cycles.
And mechanical backlash.

He recognizes that an additional encoder would solve the problem, but most likely his budget has already been exhausted, and his project is already late.
 
Though I didn't have much to do with feedback loops and control systems beyond 'FYI', this situation looks like a two-sensor task.

A simple, optional one on the motor for RPM-sensing hence load feedback, a 'Gray' one on the output shaft for absolute position sensing...

But, given the implacable constraints, looks like the best fix is to ZIF-socket the EEPROM and replace it at maintenance intervals.

Wanted a Dromedary, gets a llama...
 

Hi,

Instead of EEPROM one could use NVRAM.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top