Board logo

electronics help - 12v motor control
locoboy - 14/7/12 at 08:59 AM

Hi folks,

Given the depth and breath of experience on here I figured its worth a go at picking your collective brains!

I have a small project that I would like to undertake that will involve the use of a small 12V motors - the motor I have in mind is a motor from an electrically adjustable car wing mirror.

I am trying to build an auto zoom controller for my DSLR

I need to control the motor so that the spindle will rotate a given number or rotations then stop and then do the same number of rotations in reverese and stop, I need to be able to stop it in between the max clockwise and max ainticlockwise stops. I need it to stop at given points so it does not try to move the focus ring past the max/min zoom stops and damage anything.

Initial thoughts would be to run a rubber band round the motor spindle and the lens and have some form of tensioning device.

I am pretty sure that the lenses are robust enough to resist the turning forces of the small motors and not be damaged but given that the camera may well be operated remotely I would not be in earshot to hear the motor straining and know when to shut the power off - in addition I would like to make it idiot proof as I wouldnt want someone else to use it and knacker the motor or their/my lens!

The sketch below is what I am trying to achieve.

Im pretty sure that putting a sensor on the setup to confirm the end points will not be a practical option.

Lastly, is it possible to teach the motor different end points (number or rotations) so it can be set up for different lenses?
Thanks
Col



zoom drive
zoom drive


BenB - 14/7/12 at 09:06 AM

I think the issue will be accuracy if you're using a standard motor. This really screams out for a stepper motor- you can get them really small and you can be super accurate with them. Either that or you could use a potetiometer and essentially make a servo control.


designer - 14/7/12 at 09:10 AM

Yep, you need a stepper motor.


locoboy - 14/7/12 at 09:19 AM

Seeing as stepper motors dont have a 2 wire set up Im presuming that you need a control'box' that makes the magic happen?


BenB - 14/7/12 at 09:35 AM

Yup. But there are stepper motor ICs out there. Though personally I'd use a PIC and DIY the software because then I could get it to do everything I wanted...


locoboy - 14/7/12 at 09:43 AM

Ben.....Speak English!

What is an IC and PIC?

This is already sounding like it is out of my league


theprisioner - 14/7/12 at 09:53 AM

This has the PIC and software written for you inside all you need is a PC with RS-232 or adapter from USB and of course a stepper motor.

PARKER COMPUMOTOR STEPPER DRIVE OEM 350RC-10150 | eBay

Used them before. You would have to have something that sends out the very simple RS-232 commands like a terminal application.

If the ebay link above does not work then try item No: 180554700660


vanepico - 14/7/12 at 10:54 AM

I would be more concerned about how it is going to know it is in focus.

Depending on the quality of the lens, applying side loads may wear it out quicker. For the sensors, you could use a little tippex mark on the rubber band with light sensors to detect where is the end point. This would probably take quite a lot of time to set up if the device were to be always removed.

The other option is to make some kind of large gear to loosely grip into the knurling (raised bits that help you to grip it) on the lens, then have the motor mounted to the side.

I don't know if you've seen most youtubers these days, they use hi spec DSLRs as video cameras, and they have mounts they use to rest the camera on their shoulders, with a handle each side, they also have a focusing knob on one side and a zoom knob on the other, I always wondered how these worked and I suppose it is probably the same thought as you are having.

As for the post earlier on, IC is integrated circuit and a PIC is a programmable integrated circuit

Pete


BenB - 14/7/12 at 11:06 AM

Have a look here....

http://www.flickr.com/photos/30942753@N02/7240638360


bi22le - 14/7/12 at 11:19 AM

I would consider looking at RC toy servos and controllers they are strong, accurate and it solves a lot of your other problems like power supply and remote control.


MikeRJ - 14/7/12 at 11:42 AM

This is not a trivial control problem. You need positional feedback; a potentiometer will give you absolute position control but a stepper motor will only allow you to move forward and back a number of steps. To get absolute positional control from a stepper you need to have a sensor (opto switch, microswitch etc) to determine a 'home' position, just like the print head on a printer has.

The majority of RC servos typical only rotate somewhere around 180 degrees. You can get multi-turn servos which are used for e.g. sail winches on model yachts, but even these are limited to about 3-4 turns. If you are prepared to modify a servo to use an external multi-turn pot you could get up to nearly 10 turns.

If you go with a stepper motor, you can get an intelligent stepper controller board quite cheap (e.g. Stepper Motor Speed Pulse Controller and Driver Board | eBay ) so you only have two control line, one for direction and the other one you pulse to make the motor take a single step.


locoboy - 15/7/12 at 07:16 PM

Thanks for your replies guys, although I am still lost!

Am I correct in thinking that I am going to need a laptop hooked up to this lot to run it or can the PIC be programmed, then retain that information and work as a stand alone bit of kit with its own battery power supply making the kit more portable?

I used to have an RC car and I was thinking about using servos.....

As for the focus issue I will be downloading the android app for my phone called DSLR controller which gives remote (tethered) control over exposure, focusing, white balance, aperture, shutter speed and has live view, so all I need to do is take care of the zoom side of things. see DSLR controller vid on youtube

For those who mentioned potentiometers....

In my limited capacity I 'think' a potentiometer is a device that gives a differing resistance depending upon the location of the terminals... Often used in fuel level senders, electronic throttle pedals thus translating physical motion into electronic readings........Therefor I am guessing that some electronic wizardry would be required to only allow the motor to operate whist the readings from the potentiometer are within certain parameters (which locate to the physical positions of the zoom ring on the lens)

Am I correct?

If I am correct then how could this be incorporated into the set up I have?

Thanks
Col


locoboy - 17/7/12 at 06:25 AM

Bumpy bump.
Can you confirm my thinking?


MikeRJ - 17/7/12 at 07:16 AM

A PIC is a microcontroller, it can be programmed and will then run as a tiny stand alone computer.

A potentiometer is a three terminal variable resistor, like you'd find in the volume control of your hifi, or in a dimmer switch etc. Since you get a different resistance according to the angle of the shaft you can use this device for positional feedback (these are within Radio Control servo motors). Most common potentiometers are limited to somewhat less than one full turn, though you can buy "multi-turn" devices of up to 10 turns.

Do you want to control the zoom from the Android app? Interfacing your homebrew servo motor to this is likely to be the most complex issue.

[Edited on 17/7/12 by MikeRJ]


sickbag - 17/7/12 at 11:13 AM

Would it be easier to buy a lens that already has autofocus then tether the camera to a computer using free software via USB? The software will then allow you to control the camera as if you were looking through the lens.

I've used DIYPhotoBits (Nikon only, but there's lots available for other brands) which has many features such as time-lapse, autofocus and exposure, etc, etc.


locoboy - 17/7/12 at 12:29 PM

Thanks for the replies, Mike, I am not trying to hash the zoom function into the android app, I am happy to have a seperate control for this.

Sickbag, i think you may have missed the point, I have everything else remotely operated except the zoom which with a DSLR needs manual intervention of some sort.