Go Down

Topic: Multiple turn motor position control (Read 4041 times) previous topic - next topic

Yankee

The controller you linked to is for a brushed DC motor. You would need a stepper driver such as this:
http://www.sparkfun.com/products/10267. 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: http://danthompsonsblog.blogspot.com/2008/09/easydriver-v31-tutorial.html.
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.

dc42

Quote
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.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MarkT

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


I read this as a joke ;)   But then I know what a vacuum variable capacitor is for...
[ I won't respond to messages, use the forum please ]

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


Yankee

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

Grumpy_Mike

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

Yankee

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

dc42


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


I was proposing that you drive the motor to the end with the hard stop to establish an end point, then count stepper pulses from there to track the position after that. This will allow you to avoid turning the shaft too far the other way, provided that your mechanism for counting stepper pulses is reliable, and that the stepper always moves when pulsed if it is not at the end stop.

I suppose there is nothing you can see through the glass envelope when the cap is near the other end of its travel, that would allow you to provide optical detection of appropaching the other end point?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Flywheel

To find out the exact number of turns you could use a Hall type of magnetic sensor. A small magnet is attached to the shaft and the sensor detects everytime it passes.

The challenge is to somehow permanently save it's position, I'd prefer some way of initialising the position to a 'start' setting at reboot/power loss instead of using the memory. I'd prefer some mechanical way to initialise it's start position. My guess is the hard stop on one end is the way to go, you can turn always towards the hard stop, then start counting from there.



Go Up