Pages: [1] 2 3   Go Down
Author Topic: Multiple turn motor position control  (Read 3583 times)
0 Members and 1 Guest are viewing this topic.
San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

At the outset, I am posting in this forum because members here seem to have the best grasp on stepper motor control drivers. I need to drive a vacuum variable capacitor with a motor. From it's lowest to highest capacitance, the capacitor goes through several turns. Trying to rotate the rotor of the capacitor beyond those limits can damage it. So my first requirement is to limit the number of turns on either side given the motor is calibrated to start at the middle. For the same constraint, another question is if the driver circuit "knows" how many turns and degrees, can the information be retained when the circuit is powered off?

Thanks.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a difference between a motor "driver" and a "controller". The driver is usually un-intelligent, converting logic signals to high voltage/current necessary for the motor. The controller is where the brains are. In the Arduino world the controller is usually the Arduino itself, which has non-volatile storage in the form of EEPROM. Drivers generally do not keep track of absolute position.

So it is possible that an Arduino + stepper motor driver (like ours or others) can meet your need. You will have to write a sketch for the Arduino that keeps track of the position and occasionally updates the EEPROM so that when the power is lost, the position is retained. You should not update on every step as that could burn out the EEPROM (it's only rated for ~1million erasures and you can easily reach that if you write it on every step). But writing once every 10 seconds or so should be fine.

Alternatively, you can keep track of absolute position using an absolute encoder but that is starting to run into some big money. Avago has some that output SPI-type data, but they are >$20.

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected
Logged

San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. I think you answered my fundamental query that such control/logic is possible. Sorry, for getting the technical terms wrong. I will research the Arduino option further.
Logged

San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A quick look at the encoder option seems to suggest that since the encoder records only 0 to 360 position information, the absolute position of the capacitor would still need to be recorded on some sort of EEPROM. Right?
Logged

San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Found an interesting way to keep track of number of turns/position.
http://www.migamotors.com/Media/MigaOne-Arduino-v2c.pdf

From what I understand, a pot shaft is coupled to the motor. Voltage drop across pot is fed back to arduino through a ADC that translates to a value between 1 to 1023 and that gives the motor position. Am I understanding is correctly? Sorry, not really an electronics person, though can write C/perl smiley

Does this look like a practical solution? Only hitch is my capacitor shaft turns 73 times between it's lowest and highest capacitance smiley
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You should not update on every step as that could burn out the EEPROM (it's only rated for ~1million erasures and you can easily reach that if you write it on every step). But writing once every 10 seconds or so should be fine.

While in practice you shouldn't constantly update the EEPROM as it -does- have limited write cycles, people have done destructive tests of this nature, and it turns out that it really isn't as terrible as most would think. Not that, if you did do this, that you could really trust it in the long term to work - but it isn't "poof-dead" after 1 million writes...

smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Found an interesting way to keep track of number of turns/position.
http://www.migamotors.com/Media/MigaOne-Arduino-v2c.pdf

From what I understand, a pot shaft is coupled to the motor. Voltage drop across pot is fed back to arduino through a ADC that translates to a value between 1 to 1023 and that gives the motor position. Am I understanding is correctly? Sorry, not really an electronics person, though can write C/perl smiley

Does this look like a practical solution? Only hitch is my capacitor shaft turns 73 times between it's lowest and highest capacitance smiley


Have you thought about using the changing value of the capacitor as the means to measure its position?

There are various methods, but a common one involves measuring the time it takes to charge via a resistor (RC time constant, IIRC):

http://www.picotech.com/experiments/capacitor/capacitor.html
http://www.nxp.com/documents/application_note/AN449.pdf

smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Regarding my last post - check out this thread: http://arduino.cc/forum/index.php/topic,71921.0.html

It may be helpful...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

cr0sh, I appreciate your responses. The idea of measuring capacitance to determine capacitor position is simple and straight-forward but in my application, it may not apply or be difficult. I think explaining the application will help. The vacuum variable capacitor is in parallel with a 4' diameter copper pipe loop that behaves as a HF transmitting antenna. The antenna is to be placed outdoors and it is desirable that it be portable and not require a computer to control.

The capacitor, say at 100W RF power, can develop ~4kV of voltage and ~30A of current. The loop antenna is very sensitive to ohmic losses such that even as much as ten milliohms of loss can cause 5-6% drop in antenna efficiency. Introducing a capacitance measuring circuit across the capacitor would mean using some sort of relays to disconnect the capacitor from the loop and connect to measuring circuit. At these currents and voltages, relays will add losses and increase costs.  Also, if the measuring circuitry is exposed to such high voltages, say when discharging the capacitor, it can destroy the measuring circuitry.

So I think a mechanism that mechanically couples with the capacitor, IMHO, is better suited to track rotations. This is what I understand from researching various options so far. Since I am not an electronics person, I could be way off the mark here so would appreciate corrections  smiley

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33938
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Only hitch is my capacitor shaft turns 73 times between it's lowest and highest capacitance
That is your main snag with using any sort of pot or rotary shaft encoder.
What I would do is to set up another motor (or a mechanical connection to your shaft) that consists of a threaded rod with a captive nut on the end. Every time you pulse your capacitor's stepping motor you step this slave motor.
Then arrange limit switches on this to detect the both ends of the travel.
It's like having a mechanical memory.
Logged

Austin, TX
Offline Offline
Full Member
***
Karma: 2
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use gears!
Use a couple of gears between the capacitor knob and the potentiometer to reduce the number of turns.  Then you can use a 10-turn potentiometer (which are fairly easy to find) and read it via analogRead().
Logged

Chris J. Kiick
Robot builder and all around geek.

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
From it's lowest to highest capacitance, the capacitor goes through several turns.

what level of resolution is needed. Servos might be an answer. There are winch servos that make several turns, and gearing up of a standard servo might be an option.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

San Francisco CA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use gears!
Use a couple of gears between the capacitor knob and the potentiometer to reduce the number of turns.  Then you can use a 10-turn potentiometer (which are fairly easy to find) and read it via analogRead().

I have seen 10-turn pot based rotation sensors. The cap has 73 turns but let's just say 70. The capacitance range is 7.5-350pF so if the change is linear, we have ~4.9pF / turn. On lower broadcast frequencies, at around 7 Mhz, the required stepping is 1pF so we want the capacitor shaft to be turned in 1/5th or 72 degree turns. Cap to pot, that is 70 to 10 turns, let's say we use a 7:1 reduction gear. Now, pulse the motor to turn the cap 72 degrees. That should turn the pot about 10 degrees. Is that sufficient change in resistance to cause a measurable voltage change for the ADC?

@Grumpy_Mike - With the limit switch arrangement, how do I remotely read the capacitor position?

Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike-
Are you proposing using the second motor as an encoder?

I would think if you used a stepper motor there would be no need for an encoder. With such a light load there should be no problem with missed steps. It would be necessary to have a homing routine to establish the initial position at startup, though. Limit switches would be a good idea to prevent damage to the capacitor in case of an overtravel event.
« Last Edit: October 13, 2011, 12:19:10 am by Yankee » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33938
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You read the capatance by knowing how many steps you have given the motor. The only problem is having a reference point for your motor as once you loose the power you loose the knowledge of the absolute position. A simple mechanical stop won't work as you have multiple turns, therefore you need to translate something into a reference point that you can detect.
You could do this with gears, or a mechanical analog like I suggested before.
Logged

Pages: [1] 2 3   Go Up
Jump to: