Configuration I: Power and Motion

Its finally time to connect everything together.  I plan to fully assemble the printer and test every component on the bench to ensure there will be no surprises down the road.

To start I'm using a pair of switching power supplies which provide 24V and 72V.  This decision was driven entirely by the servo drives as they require 24V for logic and ~80V for the motors themselves.  The 72V rail will only be used to power the servos, all other components (extruder, heated bed) will run off of 24V.  I've chosen to daisy-chain the wires for testing, but this is not ideal and will be redone in the final build.


Next I powered up the servo drives just to make sure everything works.  You can see they turn on but show a red status indicator as no motor is connected.


The motor phases connect through the terminal block, order is important here.  Technically the servo drive can detect improper wiring and tell you which connections to swap but its easier to get it right the first time.


The encoder and limit switch wiring plugs into matching ports on the drive.  At this point the servos can be powered up and will report all green.


Finally we can connect them to the Smoothieboard using the cable I prepared earlier.  Everything connects together quite easily, but there are just so many cables it can look overwhelming.  Wire management in the final build will be a challenge.


Its time to start with basic Smoothieboard configuration.  Smoothie can be configured by editing a config text file, you can find more details in the documentation.  I have been careful to make sure the linear servos behave just like regular stepper drivers, so the configuration looks fairly typical.  As far as the Smoothieboard knows this setup is no different from any other printer.

Lets start with the basics and get Smoothie controlling the servos.  The first step is motion planner configuration.

    # Motion Planner Configuration
    alpha_steps_per_mm                           200
    beta_steps_per_mm                            200
    gamma_steps_per_mm                           200

    acceleration                                 5000              # mm/s2
    z_acceleration                               2000              # mm/s2
    junction_deviation                           0.05
    
    x_axis_max_speed                             60000            # mm/min
    y_axis_max_speed                             60000            # mm/min
    z_axis_max_speed                             30000            # mm/min

Alpha, beta, and gamma actuators represent motor channels, and correspond to the X, Y, and Z axes for my printer.  You can see that I've set all three axes to 200 steps/mm, which matches the 5um step size I have programmed into the drives.  The maximum speeds have been set fairly low as it isn't safe to run the linear stages at high speed without securing them to a fixed surface.

Next we have to tell Smoothie which pins are connected to the servo drives.  This might look complicated, but really just requires double checking which pins are connected by the cables I made earlier.
    # Axis Configuration
    # Servo enable has not been implemented as the pins are used for limit/fault
    # feedback.  All three enable pins are routed to 1.22 which is not connected.
    alpha_step_pin                               2.2              # Motor 3 Pins
    alpha_dir_pin                                0.20!
    alpha_en_pin                                 1.22
    alpha_max_rate                               60000

    beta_step_pin                                2.3              # Motor 4 Pins
    beta_dir_pin                                 0.22!
    beta_en_pin                                  1.22
    beta_max_rate                                60000

    gamma_step_pin                               2.8              # Motor 5 Pins
    gamma_dir_pin                                2.13!
    gamma_en_pin                                 1.22
    gamma_max_rate                               30000
 
Finally we need to make sure the differential voltage reference is set up correctly:

    # Pin 1.30 produces a differential voltage reference for the servo drives and
    # should be left in the high state.
    switch.high.enable                           true
    switch.high.output_pin                       1.30
    switch.high.output_type                      digital
    switch.high.startup_state                    true

Homing can be activated by toggling pin 1.31, which is connected to the "Home" pin of all three servo drives.

    # Switch: Servo Home
    # Toggling 1.31 high will trigger the servo home routine on all three axes. To
    # perform a complete homing routine, call G29_G4S5_G30_G92X75Y75Z180
    switch.home.enable                           true
    switch.home.output_pin                       1.31
    switch.home.output_type                      digital
    switch.home.input_on_command                 G29
    switch.home.input_off_command                G30
 
Endstops configuration follows a similar process, we just need to make sure Smoothie is watching the correct pins.

    # Endstop Configuration
    # The endstops module is used to monitor the servo fault signal which will
    # trigger both if a limit switch is hit as well as when an axis faults.
    # The G28 homing routine has also been configured, however G29 Servo Home
    # should be used instead as it is more accurate.
    endstops_enable                              true
    home_z_first                                 true

    alpha_min_endstop                            0.19^
    alpha_homing_direction                       home_to_min
    alpha_min                                    0
    alpha_max                                    150

    beta_min_endstop                             0.21^
    beta_homing_direction                        home_to_min
    beta_min                                     0
    beta_max                                     150

    gamma_max_endstop                            4.29^
    gamma_homing_direction                       home_to_max
    gamma_min                                    0
    gamma_max                                    180
 
Remember that I have combined the limit and fault outputs on the Servo drive, so any servo fault (including hitting a travel limit) will halt the print.

This completes the configuration and testing of the linear servos.

No comments:

Contact

Name

Email *

Message *