585,582 active members*
4,462 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Control camera movement with stepper motors
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010
    Posts
    5

    Wink Control camera movement with stepper motors

    Is there anyone out there who can offer some help to a total beginner in this field?

    I have built an apparatus to move a digital camera to any position on a 1.5m x 1.0 m plane. The mechanics work beautifully. I am using an old laptop (Windows 98, which has DOS QBASIC built in) to control two stepper motors to provide x and y movement via the parallel port. A relatively simple BASIC program can calculate the various x and y coordinates from the optical parameters ( I understand optics better than cybernetics!) and send out the appropriate pulses. I have built a simple 3 channel CNC driver from a kit but this leads to frequent missed steps, even at slow pulse rates and under zero load, whether single or half stepping, and anything faster than about 20 pulses per second increases the frequency of missed steps or just causes the motors to chatter.

    I guess I have two questions:

    Can anyone recommend a simple 3 channel driver (ready assembled or in kit form) that I can use for this application?

    Am I being unduly simplitic or is it ok to control motors from appropriate bit sequences generated from a BASIC program and sent via the parrallel port? Is there some essential fact I'm missing?

    Many thanks to any kind soul who can advise.

    Merv M
    Tasmania, Australia

  2. #2
    Join Date
    Mar 2008
    Posts
    24
    Hi Mervin
    Control via the parrallel port is perfectly possible, thousands of people are doing just that on this forum either via dos/windows or via linux.
    For instance I run a machine using drivers made from the L297/L298 combination (stacks of info on google for these).
    You may have to supply some more details of what exactly you are trying to do for people to comment on. Like what motors do you have, what is the driver you build based on, how does your software control this etc...
    Writing your own software could be part of the problem. If your driver is controller in the standard step and direction way it may be possible to use an existing software package. (EMC2 for instance, for linux, is completely free if you want something to try)

  3. #3
    Join Date
    Apr 2010
    Posts
    5

    Further Info on my CNC Woes .......

    Thanks, Alex, for your reply. I am using a HobbyCNC 3-Axis Pro stepper motor driver kit, intending to drive two stepper motors (to control x and y camera movement) and a solenoid (to take the photos).

    The motors are KH42 series 900 two phase unipolar, rated 3.72 V, 1.2 A/phase, 3.1 ohms/phase and 3.1 mH/phase. I have been powering these at 12V which appears to be rather low - could this explain my missed steps? The controller can accept 42 VDC, so I'm upgrading the power supply. I live in a remote part of the world so things take time.

    The motors are controlled by sequences of OUT commands from programs in QBASIC. Typically, I reset with OUT 880, 0, then OUT the appropriate byte to indicate direction and axis step, then have a FOR-NEXT delay loop, and repeat the sequence to move the camera to the required position.

    The gantry carrying the camera moves very smoothly and weighs about 2 lb fully loaded. Motor speeds of greater than 100 rpm are not desirable. A complete single revolution moves the gantry about 1 inch, so the gearing is quite low.

    The problems I am having are as follows:

    1. Missed steps, even when in single stepping mode. This appears to worsen after the driver and motor are warmed up.

    2. The motor simply chatters (vibrates) in 1/4 step or lower modes.

    3. The motors seem incapable of accepting pulse rates greater than about 20 pps, whether single or half stepping.

    4. In single or half stepping modes the motion is very jerky, even when not mis-stepping. I had hoped that fractional stepping would reduce this.

    It has been suggested that a higher voltage will reduce these problems. Is this reasonable? Do you have any other suggestions?

    Mechanically the apparatus works beautifully and the motors appear (when functionning) more than adequate to drive the components. Incidentally, power is transmitted via timing belts to the gantry ends and the camera trolley, which run on V-grooved wheels.

  4. #4
    Join Date
    Nov 2009
    Posts
    4415
    I run the Hobby cnc pro 4 axis with no problems on a variety of steppers from 270 oz to 425 oz. I do run the board with a 24 volt power supply. I run Mach 3 and have no idea of the ability to manipulate the stepper besides on my mill or lathe. But it does seem very possible.

  5. #5
    Join Date
    Mar 2008
    Posts
    24
    Hi Mervin

    Looks like your driver board is more than capable of doing what you want. A bit more drive voltage will help as it will allow higher speeds.
    Apart from the obvious concerns about all your connections being solid and no grounding problems, there is a potential pitfall with your home brewed software: most drivers have some limitations on the timing of step and dir pulses. It is not immediately obvious on the supplier website what they are for your board but the documentation should help. What you are looking for is things like:
    -what is the mimimum step pulse time needed for your driver
    -how long does the dir change have to be applied for before you can make the next step pulse

    From your brief description of your qbasic program I was left with the impression you are changing dir and applying a step at the same time. Most drivers are not too happy about that!
    They usually want the direction pin to be set and kept there for a minimum period after every change before you can then start pulsing the step pin.

    Hope this helps.

    Regards

    Alex

  6. #6
    Join Date
    Jan 2006
    Posts
    2985
    You would probably have better luck with a higher quality driver (a Gecko G540 for example) but I think the biggest problem is your software. Its really important to have an acceleration and deceleration ramp on your step pulse frequency. The motor cannot instantaneously go from zero to 100 rpm. Similar to revving your engine up to the redline and then dumping the clutch, you don't instantly go to 100mph. So I think you need to revisit your software to provide for some acceleration and deceleration.

    Matt

  7. #7
    Join Date
    Jul 2006
    Posts
    1062
    Have a look at Electrozoneuk.com for a programmable stepper driver....I found a damper necessary to smooth the steps...I'm waiting for the more powerful driver to arrive for another project.
    Keith

  8. #8
    Join Date
    Apr 2010
    Posts
    486
    Mervyn,

    Remember that at this point you're doing research and development. For R&D purposes, you don't need a finished, permanent power supply. You can very easily put a 6 volt or 12 volt battery in series with your existing power supply to explore different voltages. You might look at a car battery(s) or lantern batteries, depending on what you happen to have available.

    Don't think you're going to be able to get a reliable, stable, well timed pulse train from BASIC. The US Government spent millions over several years getting EMC and EMC2 to work. Then it took some volunteer labor to make it work well.

    Give EMC2 a try.


    Tom

  9. #9
    Join Date
    May 2010
    Posts
    0

    Hi
    Send a picture of your panorama head maybe I can help
    Victor

Similar Threads

  1. Designing Motion Control Camera Rig
    By Madjak in forum Mechanical Calculations/Engineering Design
    Replies: 11
    Last Post: 06-08-2009, 07:02 AM
  2. Audio amp & sig gen to control stepper motors?
    By HuntMike79 in forum Stepper Motors / Drives
    Replies: 6
    Last Post: 03-31-2009, 02:54 PM
  3. STEPPER MOTORS AND CONTROL
    By WWWOODMAN in forum CNC Wood Router Project Log
    Replies: 12
    Last Post: 02-23-2009, 03:07 PM
  4. Control four stepper motors in unison?
    By Wes LeMarr in forum Stepper Motors / Drives
    Replies: 1
    Last Post: 03-01-2006, 04:11 AM
  5. Basic Stamp to control stepper motors?
    By phantomcow2 in forum Stepper Motors / Drives
    Replies: 3
    Last Post: 12-04-2005, 10:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •