sandhuatard

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.

RuggedCircuits

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.

sandhuatard

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?

sandhuatard

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

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

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...

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

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

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

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):

sandhuatard

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

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.

ckiick

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().

sandhuatard

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?

marzetti

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.

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.