Thanks Thanks:  0
Likes Likes:  0
Needs Pictures Needs Pictures:  0
Picture(s) thanks Picture(s) thanks:  0
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default Arduino uno R3 etc

    Looks like I'm getting nowhere with my camera slider project, so I'll try another approach.

    I wish to utilise an Ardinuo uno R3 board in conjunction with an Adafruit stepper motor shield.

    Any members have experience in this field?

    Ken

  2. # ADS
    Google Adsense Advertisement
    Join Date
    Always
    Location
    Advertising world
    Age
    2010
    Posts
    Many





     
  3. #2
    Join Date
    Oct 2004
    Location
    Glen Forrest, Western Australia
    Age
    62
    Posts
    531

    Default

    I would suggest searching Google and You tube, I am doing a similar project for mounting my camera to do focus stacking macro shots. There was heaps of info out there. You need to be looking in the Arduino forums for the answers as most cnc machines use a full size PC.

    https://www.google.com.au/?gws_rd=ss...+camera+slider


    here is one of them that I just found and like
    https://www.inventables.com/projects...r#instructions


    Regards

    Warrick

  4. #3
    Join Date
    Nov 2008
    Location
    somewhere
    Posts
    152

    Default

    have you looked at:
    https://learn.adafruit.com/adafruit-...stepper-motors

    personally I'd just plug it together and try and get the stepper turning. once you've it turning in the directions you want, it should be pretty simple from there.

  5. #4
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default Limit switch problem

    To reiterate, I'm attempting to make a camera slider (one axis of a cnc machine) so to speak.

    Basically a linear track with a carriage, belt driven with a stepper motor. At each end of the track will be a limit switch.

    I have all the Arduino code sorted except for a problem with the limit switches.

    Basically when the carriage hits the limit switch, the motor stops and I can't think how to code the motor to go in reverse whilst the limit switch is depressed.

    How do you fellas overcome this problem?

    I'm thinking along the lines of when the limit switch is depressed, have the Arduino stop the motor, then back off a tad off the limit switch, then stop until the reverse button is pressed.

    I'm scratching my head over this and would appreciate some Arduino code help.

    Ken

  6. #5
    Join Date
    Jul 2003
    Location
    geelong
    Age
    88
    Posts
    774

    Default

    Hi Ken,

    Without seeing your code it's a little difficult to exactly help but here goes anyway.

    You will have a few inputs to the Arduino (limit switch left, limit switch right, reversing switch) and a control output (motor).

    The Arduino typically continuously polls, so a pseudo code suggestion is:

    void loop(void) {

    int switch = /* read switch state - 1 = move right; -1= move left; 0 = stop */*/
    int limit_right = /* read limit switch right */
    int limit_left = /* read limit switch left */

    If (( switch == 1 )&&( ! limit_right )) {
    /* motor move to right */
    } else if (( switch == -1 )&&( ! limit_left )) {
    /* motor move to left */
    } else {
    /* stop motor */
    }

    }

    -son of nine fingers

  7. #6
    Join Date
    Dec 2007
    Location
    Melbourne
    Posts
    105

    Default

    Ken,

    Generally the Stepper Shields have a direction pin that selects whether the stepper rotates CW or CCW. If it is the Adafruit Motor Shield that uses the TB6612FNG chip then this will be the case. It is then just a matter of using the Adafruit library to drive the stepper in a particular direction. The limit switch input could then be used to toggle the direction. I don't live too far away - happy to drop over and take a look if you wish.

    Grant

  8. #7
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default Using Easy Driver Board

    Hi Grant,

    I'm almost there with this project, but sometimes I wonder whether it would have been easier to just wire it up the old fashioned way, not as cool though.

    Brief description of operation

    Using an Arduino board, control a stepper motor to belt drive a carriage along a linear track until it hits the end stop limit switch. Motor stops and awaits reverse push button.
    Reverse the motor until it hits the other end. Speed is controllable.

    I'm going to use the Easy Driver Board, designed by Brian Schmalz, and use his excellent code, example 5. I have the Adafruit stepper motor board as well just to cover all bases. Can't help buying stuff.
    http://www.schmalzhaus.com/EasyDrive...rExamples.html

    I've read many examples of code for stepper motors and find Brian's very easy to follow. In addition to his example, I'm adding two limit switches, one at each end of the track.

    I think the nicest track is supplied by OpenBuilds http://openbuildspartstore.com/ They seem to have everything and not far away.

    I've yet to mock this up, maybe this arvo.

    Thanks for your offer to drop in, if I get stuck, I'll give you a yell.

    Ken

    ps, thanks NineFingers, wonder how you came up with that name? Don't ask?

Similar Threads

  1. Remote control by Arduino
    By pmcgee in forum WOODWORK - GENERAL
    Replies: 2
    Last Post: 10th October 2014, 09:29 AM

Tags for this Thread

Posting Permissions

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