hartk1213 / MISC

misc stuff
GNU General Public License v3.0
533 stars 122 forks source link

E-motor pinout photo may be incorrect #34

Closed GaryBoone closed 2 years ago

GaryBoone commented 2 years ago

Thanks for adding the photo to the README specifying the modifications needed to make the Stealthburner toolhead PCB work with the Clockwork2 and LCO Breakout PCB. It appears that the wire ordering shown in the photo is incorrect. As my printer is not completed, I haven't tested the wiring described below. However, here's how I determined it should be wired:

First, let's establish the wiring for the original LDO Afterburner toolhead board so we know which motor wire colors correspond to A1, A2, B1, B2. Then we can translate these to the Stealthburner toolhead PCB.

  1. The motor wire outputs are given in the P5 connector of the LDO Afterburner toolhead schematic

    P5: [ B2 B1 A2 A1 ]    LDO Afterburner Toolhead PCB
    
    (Pin 1 is the leftmost pin when looking at the connector with the keyways down on the connector side of the PCB.)
  2. Next, the motor wire color order is given by examining the physical LDO-42STH20-1004ASH motor connector used for the Afterburner. It can also be seen in this picture.

So when the motor is connected to the LDO Afterburner toolhead PCB, we have:

 [ B2 B1 A2 A1 ]    LDO Afterburner toolhead PCB
 [ bk gn rd bu ]    LDO-42STH20-1004ASH motor

 (Pin 1 is the leftmost pin when looking at the connector with the keyways down on the connector side of the PCB.)
  1. But the Stealthburner/Clockwork2 uses a different motor. So comparing the motor datasheets for the 42STH20-1004ASH and the 36STH20-1004AHG, we can map the wire colors:

    [ B2 B1 A2 A1 ]    LDO-42STH20-1004ASH motor 
    [ bk gn rd bu ]    42STH20-1004ASH
    [ rd gn yl bu ]    36STH20-1004AHG

With that mapping, we can now look at the @hartk Toolhead PCB:

  1. The Octopus motor_6 pinouts are

    [ A1 A2 B2 B1]

    The Octopus pinouts are documented here.

  2. After installing the two-piece hartk Stealthburner PCB, I used a multimeter to check which pins at the Octpus motor_6 port (OCT_M6_x) matched which pins on the @hartk Stealthburner Toolhead PCB e-motor connector (SB_TH_PCB_x). I found:

        A1  ->  OCT_M6_1  ->  SB_TH_PCB_1
        A2  ->  OCT_M6_2  ->  SB_TH_PCB_3
        B2  ->  OCT_M6_3  ->  SB_TH_PCB_4
        B1  ->  OCT_M6_4  ->  SB_TH_PCB_2

Now we just have to translate the wire colors.

  1. Using the mapping in step 3:

        A1  ->  OCT_M6_1  ->  SB_TH_PCB_1  -> bu
        A2  ->  OCT_M6_2  ->  SB_TH_PCB_3  -> yl
        B2  ->  OCT_M6_3  ->  SB_TH_PCB_4  -> rd
        B1  ->  OCT_M6_4  ->  SB_TH_PCB_2  -> gn
  2. Sorting the table into toolhead connector order:

        A1  ->  OCT_M6_1  ->  SB_TH_PCB_1  -> bu
        B1  ->  OCT_M6_4  ->  SB_TH_PCB_2  -> gn
        A2  ->  OCT_M6_2  ->  SB_TH_PCB_3  -> yl
        B2  ->  OCT_M6_3  ->  SB_TH_PCB_4  -> rd
  3. The table shows that the e-motor connector should be ordered:

    [ bu gn yl rd ]
    
    (Pin 1 is the leftmost pin when looking at the connector with the keyways down on the connector side of the PCB.)

    But the photo in thie repository's README.md has

    [ yl gn bu rd ]
GaryBoone commented 2 years ago

Correcting above and resolving the discrepancy with the photo...

  1. The pinouts for the original LDO toolhead PCB and the hartk toolhead PCB, are:

    Octopus motor_6 order is   A1 A2 B2 B1
    Octopus motor_6 connector:  1  2  3  4  
          AB TH PCB connector:  4  3  2  1  <- [Confirmed by continuity check.]
          SB TH PCB connector:  1  3  4  2  <- [Confirmed by continuity check.]
  2. As a table:

    A1  ->  OCT_M6_1  ->  ABTHPCB_4  -> SBTHPCB_1
    A2  ->  OCT_M6_2  ->  ABTHPCB_3  -> SBTHPCB_3
    B2  ->  OCT_M6_3  ->  ABTHPCB_2  -> SBTHPCB_4
    B1  ->  OCT_M6_4  ->  ABTHPCB_1  -> SBTHPCB_2
    
    SBTHPCB = StealthBurner ToolHead PCB
    ABTHPCB = Afterburner ToolHead PCB
    
    From the table, the Afterburner e-motor connector is
    
    [ B1 B2 A2 A1 ]    AB TH PCB motor connector
    
    (Pin 1 is the leftmost pin when looking at the connector with the keyways down on the connector side of the PCB.)
  3. Adding the wire order/coloring for the Afterburner/CW1 motor connection:

    [ bk gn rd bu ]    LDO-42STH20-1004ASH motor wires connector
    [ B1 B2 A2 A1 ]    AB TH PCB motor connector
  4. Using the Afterburner/CW1 LDO-42STH20-1004AH datasheet:

    A BLK \_ coil 1
    C GRN /
    B RED \_ coil 2
    D BLU /
    
    So A&C are the B* motor coil. B&D are the A* motor coil.
  5. On the Stealthburner's e-motor (LCO-36STH20-1004AHG), the corresponding motor coil labels are A RED, C GRN, B YEL, D BLU. So BLK <-> RED and RED <-> YEL, others same.

    So, updating the colored motor wires:

    old      new
    bk   ->  rd
    gn   ->  gn
    rd   ->  yl
    bu   ->  bu
  6. Adding the wire colors into the table:

            Octopus       Afterburner          Stealthburner
    A1  ->  OCT_M6_1  ->  ABTHPCB_4 -> bu  =>  SBTHPCB_1 -> bu
    A2  ->  OCT_M6_2  ->  ABTHPCB_3 -> rd  =>  SBTHPCB_3 -> yl
    B2  ->  OCT_M6_3  ->  ABTHPCB_2 -> gn  =>  SBTHPCB_4 -> gn
    B1  ->  OCT_M6_4  ->  ABTHPCB_1 -> bk  =>  SBTHPCB_2 -> rd
  7. Rearranging for Stealthburner/CW2 toolhead PCB connector order:

            Octopus       Afterburner           Stealthburner
    A1  ->  OCT_M6_1  ->  ABTHPCB_4  -> bu  =>  SBTHPCB_1 -> bu
    B1  ->  OCT_M6_4  ->  ABTHPCB_1  -> bk  =>  SBTHPCB_2 -> rd
    A2  ->  OCT_M6_2  ->  ABTHPCB_3  -> rd  =>  SBTHPCB_3 -> yl
    B2  ->  OCT_M6_3  ->  ABTHPCB_2  -> gn  =>  SBTHPCB_4 -> gn
  8. So the wire color/order at the Stealthburner toolhead PCB connector should be:

    [ bu rd yl gn ]
  9. But the photo shows:

    [ yl gn bu rd ]

Resolution:

The table in step 7 above tells us that for the hartk Stealthburner/CW2 e-motor, the red and green wires connect to one motor coil and yellow and blue connect to the other.

Which means that the difference between the analytical pinout in step 8 and the one in the photo (step 9) is that the motor polarities of each coil are reversed.

However, stepper motor polarities don't matter: if one coil is reversed, the motor will rotate backwards from what is expected. If two are reversed it will turn the original way. For details, see the end of this page.

So the wiring in the above solution and the photo are functionally equivalent.

The analytical solution above should be canonical for people who do similar datasheet and continuity checks.