Multiple turn motor position control

So how is a 10 turn pot going to help when the total travel of this motor is 70 turns???

Presumably, trying to move the capacitor beyond the limits of its travel will only damage it if you apply excessive force. Can you limit the stepper motor drive current so that the force is sufficient to move the capacitor but insufficient to damage it? If so, you can reset the system to a known state by driving it in one direction long enough so that you know it has reached the end of its travel (this is what some cheap inkjet printers to to reset the carriage to a known position). After that, you can keep track of the position by writing it to EEPROM, perhaps when you sense that power is about to go down (e.g. by monitoring the voltage on a capacitor on the input side of the voltage regulator).

If so, you can reset the system to a known state by driving it in one direction long enough so that you know it has reached the end of its travel

For 70 turns of the motor! That is a long time for the system to take mechanical abuse. You would be better off trying to monitor the current and seeing when it reaches its stalled value.

by writing it to EEPROM, perhaps when you sense that power is about to go down

Sensing the power is about to go is an entire project in itself. I have done many of these when designing set top boxes and it is not easy unless the power supply is integrated into the system. I actually hold a patent (well it is my companies IP as I was working for them at the time) for a novel way of detecting a power outage on a set top box in order to write things to flash.

Grumpy_Mike:
For 70 turns of the motor! That is a long time for the system to take mechanical abuse. You would be better off trying to monitor the current and seeing when it reaches its stalled value.

I've done that for a DC motor, but never for a stepper motor. How practical is it? Does the current draw of a stepper motor vary significantly with rotation speed and/or load? I would have though that the average current wouldn't vary much, although the shape of the current waveform in each winding should vary with rotation speed. I take your point that 70 revs is a long time - maybe an optical sensor producing one or more pulses per revolution would be an alternative way of detecting that the end stop has been reached.

Grumpy_Mike:
Sensing the power is about to go is an entire project in itself. I have done many of these when designing set top boxes and it is not easy unless the power supply is integrated into the system.

What I had in mind was monitoring the voltage at the input to the voltage regulator through a voltage divider - which means that at least the regulator is built in to the system, although the power supply could be a wall wart.

What I had in mind was monitoring the voltage at the input to the voltage regulator through a voltage divider - which means that at least the regulator is built in to the system, although the power supply could be a wall wart.

Yes you can do that and it is the basis of many designs. However, the tricky part is that the hold up times are determined by the reservoir capacitors, these tend to be bigger on the unregulated side than the regulated side. This means that when the mains is disconnected it holds up the voltage for a longer time, then when it sags it drops very quickly. What you need to do is to arrange a voltage comparator on the input side of the regulator that triggers an interrupt on the processor that then saves the parameters. In general with that sort of arrangement you had in the order of 50mS to do stuff. My patent involved detecting the actual mains and that gave a whopping 180mS warning.

Here is my idea
Take some resistor thread. In one ende connect a spring . As the motor turns the thread will be wound/unwound from the motor.
Now you can measure the resistans between the spring and the sensor placed halfway down the resitor thread.

I can see it is unpractical: if the diameter of the motorshaft is 10mm the length of the thread will be almost 2,5m with 80 turns. But that can be solved with more wheels, where the resistor thread could be zigzagging.

So how is a 10 turn pot going to help when the total travel of this motor is 70 turns???

Ooops! I missed that. :blush:

Too much "hanger flying". The OP needs to clearly restate the goals of the project and clearly describe the mechanical requirements of his gizmo.

zoomkat:
Too much "hanger flying". The OP needs to clearly restate the goals of the project and clearly describe the mechanical requirements of his gizmo.

Sorry guys for being late to the discussion. I was thinking the same thing, clearly stating requirements just as for any project.

Problem description: Capacitor shaft turns 70 times between lowest and highest capacitance. It is coupled to a copper pipe loop for use as a transmitting antenna. Voltages/current developed are as high as 4kV and 32A and antenna is extremely sensitive to ohmic losses. Cap shaft has a hard stop at one end and pushing beyond the limit at the other end may knock the shaft lose from internal plate couplings. Also, the capacitor is expensive - USD 200-300 - so tolerance to cap damage is very low. Capacitor range is from 7.5 to 350 pF - roughly 4.9pF per rotation. The antenna is sensitive to 1pF changes in capacitance.

Requirements:

  1. Remotely rotate the capacitor shaft.
  2. Stop the capacitor from hitting ends on either side to prevent capacitor damage. If #3 is accurate/reliable enough, we may rely on the operator (yours truly) to not turn the shaft beyond predetermined turn numbers.
  3. Remote visual tracking of shaft absolute position - both - the turn number and angle (0-360) to allow the operator to figure out which direction to turn the shaft in for matching to a certain frequency.
  4. Turn the shaft to allow for 1pF capacitance changes, that is, assuming ~5pF / rotation, comes to a minimum of 72 degree stepping. For safety, lets say 60 degrees.
  5. Weather-proof the components since the antenna is to be placed outdoors.
  6. No computer (as in a laptop/desktop) control since the antenna is expected to be portable.
  7. Cap shaft control mechanism should not connect to the antenna/capacitor electrically in anyway to avoid changing antenna characteristics.

Did I miss anything? Hope not. I suggestion I got was connect identical motors to the same driver. Couple the cap shaft to one via appropriate gear to allow for 1pF stepping and couple the other motor with the exact same gear to a mechanical counter. Identify the lowest and highest counter readings for cap shaft's 70 turns. Is it practical?

Thanks! Really appreciate all the responses to the thread.

How much force is required to turn the shaft (can you turn it with two fingers)? Might be possible to use a servo to turn the shaft so you would have simple position control. Couple of ways using gearing and such that might work.

http://www.servocity.com/html/gears___sprockets.html

zoomkat:
How much force is required to turn the shaft (can you turn it with two fingers)? Might be possible to use a servo to turn the shaft so you would have simple position control. Couple of ways using gearing and such that might work.

http://www.servocity.com/html/gears___sprockets.html

Yes, I can easily turn the shaft with two fingers or index finger and thumb. Not sure how to measure required force.

I would still suggest a stepping motor, this will give you the precision you need and as the load is light there should not be any worry about needing positional feedback, you can just use dead reckoning.

The only difficulty is in determining a reference position for this system. There have been many suggestions for this, however as you have the physical system then you can determine what would be the easiest way to do this.
It could be an optical slot switch, a micro switch or even a proximity switch sensing something about the thrust of the capacitor core.

The only thing you omitted is the speed you want to change this tuning at. However, I suspect this is slow given the application.

Grumpy_Mike:
I would still suggest a stepping motor, this will give you the precision you need and as the load is light there should not be any worry about needing positional feedback, you can just use dead reckoning.

The only difficulty is in determining a reference position for this system. There have been many suggestions for this, however as you have the physical system then you can determine what would be the easiest way to do this.
It could be an optical slot switch, a micro switch or even a proximity switch sensing something about the thrust of the capacitor core.

The only thing you omitted is the speed you want to change this tuning at. However, I suspect this is slow given the application.

After looking at quite a few options, I am leaning towards stepper motors now. As you said, it gives the right control over motion.

Here is what I am thinking, please correct me if I am wrong. A controller like this:
http://www.electronickits.com/kit/complete/motor/CANUK1130.htm

Seems to give control over stepping size with variable frequency. Along with that, any stepper motor with sufficient torque should do. Can I connect two motors in parallel to the signal from this controller? One inside the shack connected to some sort of counter and the other outside that drives the capacitor.

Also, how do I dial the number of steps I want the motor to make in one go?

The controller you linked to is for a brushed DC motor. You would need a stepper driver such as this:
EasyDriver - Stepper Motor Driver - ROB-12779 - SparkFun Electronics. It works by using step and direction signals generated by the Arduino. Check the Playground wiki for more info. This is also a good tutorial: Dan Thompson: EasyDriver v3.1 Tutorial.
The second motor is really not necessary. Most stepper motors are 200 steps per revolution so full travel on your capacitor would be 14,000 steps.
A good input device would be a rotary encoder with a display of some sort (LCD, 7-segment LED?) to indicate position. Once you had everything calibrated it may even be possible to use "presets" to move it to a predetermined frequency using a keypad.

Cap shaft has a hard stop at one end and pushing beyond the limit at the other end may knock the shaft lose from internal plate couplings.

Surely you can choose the stepper motor current so that its torque is sufficient to rotate the shaft but not enough to damage anything when it reaches the hard stop? Then you can get the reference point by moving it to that end. To speed up the process, attach a perforated disk to the shaft and use an opto sensor to detect when it is rotating, or a magnet and Hall sensor. Even simpler, have a manual calibration button, which turns the capacitor towards the hard stop (perhaps at reduced current), then when you see it isn't moving any more, you release the button.

Once you know the hard stop has been reached, you can count steps to keep track of the position, and save the current position in EEPROM when appropriate.

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

I read this as a joke :wink: But then I know what a vacuum variable capacitor is for...

Thanks @Yankee. Good info there.

@dc42 - The issue with this particular capacitor is that one end has a hard stop but the other end does not. At the other end, the cap shaft feels as if it has come lose from sort of internal coupling. Not a good feeling and since it is a Russian made capacitor, I don't have a manufacturer who can give me more info about the cap internal mechanics.

Thanks all for the responses. I think once I am done testing/tweaking the antenna, I will pursue the stepper motor + Arduino + rotary encoder with a LCD display idea. Hopefully, I will replace the current capacitor with a smaller/lighter capacitor. The current one has a glass shell and weighs almost 4.6 pounds. I can do with lower voltage rating and that should get me a capacitor that is smaller and more manageable :slight_smile:

I also meant to mention Grumpy_Mike's excellent tutorials on rotary encoders and stepper motors (and a lot of other useful stuff): Arduino Workshop.
Once you get everything working come back and show us some pics. That capacitor sounds awesome!

I will pursue the stepper motor + Arduino + rotary encoder with a LCD display idea.

I can't see what the rotary encoder brings to the party, there are just incremental devices and you have the same problem you have when just counting stepping motor pulses. That is there is no absolute point of reference.

The only way to use one would be to gear the motor down say 80 to 1, so that the whole of the capacitor movement is condensed into one revolution. Then use an absolute position rotary encoder, but be warned these are eye wateringley expensive.

I believe he is talking about using a rotary encoder as an input device not position feedback.