Shop OBEX P1 Docs P2 Docs Learn Events
little step-u connections — Parallax Forums

little step-u connections

bnrgbnrg Posts: 14
edited 2015-01-18 14:31 in BASIC Stamp
HI,
Just started with stepper motors and I have a simple connection question-please excuse this if it is really basic. I am using the Mitsumi M42SP-5 (27964) uniploar motor. The motor has 5 leads-4 for the coils and one that is 'common'. Does this common lead go to the motor controller ground pin (Vdd, connector 1) or to the Vom (-) pin on connector 3? The users manual has some schematics but it is not clear to me where or how the common connection is represented-if it is there can you please point out what I am not seeing?

I am also assuming that the CT-AC and CT-BD notation means that these coil pins are jumpered on my homework board? Ie, a jumper goes from coil A to C and another B to D?

Thanks for your help,
Bob

Comments

  • Hal AlbachHal Albach Posts: 747
    edited 2015-01-06 18:29
    Some unipolar step motors have 6 wires instead of 5, so CT-AC just means the common wire between coils A and C (and CT-BD is the other common wire). Your motor has 5 wires so the common wire would be designated CT-ABCD, just hook up the common wire to either CT-AC or CT-BD, they are linked together on the board, see page 3 "Motor Connection". Connector 3 is for hooking up the higher voltage source to drive the motor. Vdd on connector 1 is the logic supply (+5). And no, do not jumper the coils together. The bottom of page two tells you what each connection on the Little-Step U board does.
  • bnrgbnrg Posts: 14
    edited 2015-01-06 20:50
    Thanks Hal, working fine.
  • bnrgbnrg Posts: 14
    edited 2015-01-13 21:17
    Another question. This is a nice board, but one problem is that for positioning the motor it accepts only numbers. What I was planning on doing was entering the position in as the result of a calculation, and expressions or variables don't work. Is there a way to do this, or am I using the wrong hardware?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-13 21:57
    bnrg wrote: »
    Another question. This is a nice board, but one problem is that for positioning the motor it accepts only numbers. What I was planning on doing was entering the position in as the result of a calculation, and expressions or variables don't work. Is there a way to do this, or am I using the wrong hardware?

    I'm pretty sure you'll need the PC or microcontroller to use the equations to compute the numbers. The PC or microcontroller would send the appropriate instructions to the Step-U board. From looking over the manual it doesn't look like there is a way to program the Step-U with your equations.

    What are you using to control the Step-U?
  • bnrgbnrg Posts: 14
    edited 2015-01-14 06:01
    I am using this to drive a dividing head for machining. I have tried using both an expression in the position statement as well as a variable calculated outside of the controller statement-neither worked. The manual specifies that numbers are required, so a 12 or 40 is needed, not a formula or constant name. What I am hoping to find is a way to calculate the number and get that into the positioning line.
  • bnrgbnrg Posts: 14
    edited 2015-01-14 06:02
    Using a basic stamp homework board.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-14 06:38
    bnrg wrote: »
    Using a basic stamp homework board.

    Can you give an example of a formula you want to use?

    I'd think you could use the Basic Stamp to calculate the number and send the number to the Step-u with the proper letter prefix. "D" for absolute position and "E" for relative position.

    BTW, I think there's a mistake in the manual. It seems like the example (on page 5) for the absolute position is giving an example of relative position.
  • bnrgbnrg Posts: 14
    edited 2015-01-18 14:03
    Thanks Duane, that was a great suggestion. I calculated the number of steps needed to achieve the angular rotation needed and then used a string to assemble the required format for the controller-works perfectly. Still lots to do but this aspect of the problem is solved. I am building this program off of the U&V program provided by Parallax. FYI here is where I am code wise;

    speed CON 100
    baud CON 396 'baud setting is 396 for 2400
    delay CON 500 'pause delay between movement
    motor_step CON 48 'number of motor steps per turn
    E VAR Word
    step_ctr VAR Byte
    dir_ctr VAR Nib
    ip1 VAR Bit
    ip2 VAR Bit
    pos VAR Word
    inspeed VAR Word
    inramp VAR Byte
    alpha VAR Byte
    rev_level CON 1

    increment VAR Word 'number of increments per rotation

    DEBUG "rev level ", DEC rev_level, CR
    DEBUG "enter number of steps per turn", CR
    DEBUGIN DEC increment

    DEBUG "number of steps per turn ", SDEC increment, CR

    INPUT 12 ' Busy input
    OUT13 = 1 ' Set bit high before making pin O/P
    OUTPUT 13 ' Change from being pulled high to being driven high
    OUT14 = 1 ' Same for IP1
    OUTPUT 14

    PAUSE 100
    GOSUB CheckBusy ' Check Little Step-U is ready
    SEROUT 10,baud,["{A", DEC speed, ",0,0}"] ' Set speed, no ramp, full step
    SEROUT 10,baud,["{Q}"] ' Set current position as home
    SEROUT 10,baud,["{P1}"] ' Stopped power is on

    E = motor_step / increment 'go to relative position
    alpha(0) = "E"
    alpha(1) = 0

    DEBUG SDEC increment, " positions per turn", CR
    'DEBUG "{", STR alpha, DEC E, "}", CR, CR
    DEBUG SDEC E, " steps for one position", CR, CR

    SEROUT 10,baud,[ "{", STR alpha, DEC E, "}" ] 'turns motor shaft one increment

    CheckBusy:
    PAUSE 10
    CB_loop:
    IF IN12 = 1 THEN CB_loop 'Wait till not busy
    PAUSE 1
    RETURN
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-18 14:31
    bnrg wrote: »
    the controller-works perfectly.

    Good to hear it's working.

    Thanks for the follow up reply and for posting your code.
Sign In or Register to comment.