Need help in choosing controller board from small honby cnc.

More
04 May 2024 00:40 #299678 by cakeslob
i guess, the 429 will be supported soon so its fine. but i have very little prepared for the ethernet. I recommend using the RPI-SPI until more stuff is ready. Unless you would like to be the first tester or can help with the coding. I have done very little testing with the ethernet firmware on 3d printer boards, but it works with the flexihal/ rrw_lab

Please Log in or Create an account to join the conversation.

More
04 May 2024 07:33 #299691 by amanker
I am ready to help in testing and coding as per your guidance.

Please Log in or Create an account to join the conversation.

More
07 May 2024 14:16 #300042 by amanker
My board has arrived and I have flashed BTT_429 Firmware from main branch.
Made connections as per your instructions at site to RPI4
Using DRV8825 drivers in step/dir.

Here is my config.txt
    "Board": "BIGTREETECH SKR OCTOPUS PRO V1.0",
    "Modules":[
    {
    "Thread": "Servo",
    "Type": "Reset Pin",
        "Comment":            "Reset pin",
        "Pin":                "PC_15"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "X - Joint 0 step generator",
        "Joint Number":        0,
        "Step Pin":         "PF_13",
        "Direction Pin":     "PF_12",
        "Enable Pin":         "PF_14"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Y - Joint 1 step generator",
        "Joint Number":        1,
        "Step Pin":         "PG_0",
        "Direction Pin":     "PG_1",
        "Enable Pin":         "PF_15"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "Z - Joint 2 step generator",
        "Joint Number":        2,
        "Step Pin":         "PF_11",
        "Direction Pin":     "PG_3",
        "Enable Pin":         "PG_5"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "E0 - Joint 3 step generator",
        "Joint Number":        3,
        "Step Pin":         "PG_4",
        "Direction Pin":     "PC_1",
        "Enable Pin":         "PA_0"
    },
    {
    "Thread": "Base",
    "Type": "Stepgen",
        "Comment":            "E1 - Joint 4 step generator",
        "Joint Number":        4,
        "Step Pin":         "PF_9",
        "Direction Pin":     "PF_10",
        "Enable Pin":         "PG_2"
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X min",
        "Pin":                "PG_6",
        "Mode":                "Input",
        "Data Bit":            0
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "X max",
        "Pin":                "PG_9",
        "Mode":                "Input",
        "Data Bit":            1
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y min",
        "Pin":                "PG_10",
        "Mode":                "Input",
        "Data Bit":            2
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Y max",
        "Pin":                "PG_11",
        "Mode":                "Input",
        "Data Bit":            3
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z min",
        "Pin":                "PG_12",
        "Mode":                "Input",
        "Data Bit":            4
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Z max",
        "Pin":                "PG_13",
        "Mode":                "Input",
        "Data Bit":            5
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "A min",
        "Pin":                "PG_14",
        "Mode":                "Input",
        "Data Bit":            6
    },
    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "A max",
        "Pin":                "PG_15",
        "Mode":                "Input",
        "Data Bit":            7
    },

    {
    "Thread": "Servo",
    "Type": "Digital Pin",
        "Comment":            "Probe",
        "Pin":                "PC_5",
        "Mode":                "Input",
        "Data Bit":            8

    },
    {
        "Thread": "Servo",
        "Type": "PWM",
                "Comment":                      "PWM0",
                "SP[i]":                        0,
                "PWM Pin":                      "PB_7",
                "PWM Max":                      256,
                "Hardware PWM":                 "True",
                "Variable Freq":                "True",
                "Period SP[i]":         1,
                "Period us":                    200
        },

    ]
}

My HAL File. 
# load the realtime components

    loadrt [KINS]KINEMATICS
    loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

    #loadrt remora 

    loadrt remora chip_type=STM SPI_clk_div=32
    #loadrt remora chip_type=LPC SPI_clk_div=64

# estop loopback, SPI comms enable and feedback
    net user-enable-out     <= iocontrol.0.user-enable-out        => remora.SPI-enable
    net user-request-enable <= iocontrol.0.user-request-enable    => remora.SPI-reset
    net remora-status     <= remora.SPI-status             => iocontrol.0.emc-enable-in
    

# add the remora and motion functions to threads

    addf remora.read servo-thread
    addf motion-command-handler servo-thread
    addf motion-controller servo-thread
    addf remora.update-freq servo-thread
    addf remora.write servo-thread


# Joint 0 setup

    setp remora.joint.0.scale         [JOINT_0]SCALE
    setp remora.joint.0.maxaccel     [JOINT_0]STEPGEN_MAXACCEL

    net xpos-cmd         <= joint.0.motor-pos-cmd     => remora.joint.0.pos-cmd  
    net j0pos-fb         <= remora.joint.0.pos-fb     => joint.0.motor-pos-fb
    net j0enable         <= joint.0.amp-enable-out     => remora.joint.0.enable


# Joint 1 setup

    setp remora.joint.1.scale         [JOINT_1]SCALE
    setp remora.joint.1.maxaccel     [JOINT_1]STEPGEN_MAXACCEL

    net j1pos-cmd         <= joint.1.motor-pos-cmd     => remora.joint.1.pos-cmd
    net j1pos-fb         <= remora.joint.1.pos-fb     => joint.1.motor-pos-fb 
    net j1enable         <= joint.1.amp-enable-out     => remora.joint.1.enable

# Joint 2 setup

    setp remora.joint.2.scale         [JOINT_2]SCALE
    setp remora.joint.2.maxaccel     [JOINT_2]STEPGEN_MAXACCEL

    net j2pos-cmd         <= joint.2.motor-pos-cmd     => remora.joint.2.pos-cmd
    net j2pos-fb         <= remora.joint.2.pos-fb     => joint.2.motor-pos-fb
    net j2enable         <= joint.2.amp-enable-out     => remora.joint.2.enable

# Joint 3 setup

    setp remora.joint.3.scale         [JOINT_3]SCALE
    setp remora.joint.3.maxaccel     [JOINT_3]STEPGEN_MAXACCEL

    net j3pos-cmd         <= joint.3.motor-pos-cmd     => remora.joint.3.pos-cmd
    net j3pos-fb         <= remora.joint.3.pos-fb     => joint.3.motor-pos-fb
    net j3enable         <= joint.3.amp-enable-out     => remora.joint.3.enable

# Joint 4 setup

    setp remora.joint.4.scale         [JOINT_4]SCALE
    setp remora.joint.4.maxaccel     [JOINT_4]STEPGEN_MAXACCEL

    net j4pos-cmd         <= joint.4.motor-pos-cmd     => remora.joint.4.pos-cmd
    net j4pos-fb         <= remora.joint.4.pos-fb     => joint.4.motor-pos-fb
    net j4enable         <= joint.4.amp-enable-out     => remora.joint.4.enable


# end-stops

    net X-min    remora.input.0     => joint.0.neg-lim-sw-in  

    net X-max     remora.input.1     => joint.0.home-sw-in joint.0.pos-lim-sw-in

    net Y-min    remora.input.2     => joint.1.neg-lim-sw-in  

    net Y-max     remora.input.3     => joint.1.home-sw-in joint.1.pos-lim-sw-in

    net Z-min    remora.input.4     => joint.2.neg-lim-sw-in  

    net Z-max     remora.input.5     => joint.2.home-sw-in joint.2.pos-lim-sw-in

#spindle PWM control
  #      loadrt pwmgen output_type=0
    #addf pwmgen.update servo-thread
    #addf pwmgen.make-pulses servo-thread
    #net spindle-speed-cmd spindle.0.speed-out => pwmgen.0.value
    #net spindle-on spindle.0.on => pwmgen.0.enable
    #net spindle-pwm pwmgen.0.pwm => remora.SP.0
    # Set the spindle's top speed in RPM
    #setp pwmgen.0.scale 1000

#probe
net probe remora.input.8 => motion.probe-input

My INI File.
# Basic LinuxCNC config for testing of Remora firmware

[EMC]
MACHINE = Remora-XYZAB
DEBUG = 5
VERSION = 1.1

[DISPLAY]
DISPLAY = axis

USER_COMMAND_FILE = usercommand_regularmac_800.py


EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm
MAX_FEED_OVERRIDE = 1.2
#MIN_SPINDLE_OVERRIDE = 0.5
#MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 5.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 10.00
DEFAULT_ANGULAR_VELOCITY = 36.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 45.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm

[KINS]
JOINTS = 5
#KINEMATICS =trivkins coordinates=XYZAB kinstype=BOTH
KINEMATICS =trivkins coordinates=XYZAB kinstype=BOTH

[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = remora-xyz.hal
POSTGUI_HALFILE = postgui_call_list.hal

[TRAJ]
COORDINATES =  X Y Z A B
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 50.00
MAX_LINEAR_VELOCITY = 200.00
NO_FORCE_HOMING = 1 

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 250
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0.0
MAX_LIMIT = 25.0

[JOINT_0]
TYPE = LINEAR
HOME = 27.5
MIN_LIMIT = 0.0
MAX_LIMIT = 28.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 800
FERROR = 2
MIN_FERROR = 2.0
HOME_OFFSET = 27.5
HOME_SEARCH_VEL = 2.0
HOME_LATCH_VEL = 2.0
HOME_SEQUENCE = 0

[AXIS_Y]
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0.0
MAX_LIMIT = 26.0

[JOINT_1]
TYPE = LINEAR
HOME = 25.5
MIN_LIMIT = 0.0
MAX_LIMIT = 26.0
MAX_VELOCITY = 250.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 800.0
FERROR = 9.0
MIN_FERROR = 5.0
HOME_OFFSET = 25.5
HOME_SEARCH_VEL = 2.0
HOME_LATCH_VEL = 2.0
HOME_SEQUENCE = 1




[AXIS_Z]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 28

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 28
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 400.0
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_A]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 28

[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 28
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 400.0
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

[AXIS_B]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 28

[JOINT_4]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 28
MAX_VELOCITY = 5.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 400.0
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0

But machine is not moving. What mistake I have done?
 

Please Log in or Create an account to join the conversation.

More
07 May 2024 23:26 #300079 by cakeslob
Ok, there is an error in the config.txt, missing a bracket at the top, but there is a comma at the end of the file here

run your config file through a json validator if you need to check in the future
jsonlint.com/
    },
    {
        "Thread": "Servo",
        "Type": "PWM",
                "Comment":                      "PWM0",
                "SP[i]":                        0,
                "PWM Pin":                      "PB_7",
                "PWM Max":                      256,
                "Hardware PWM":                 "True",
                "Variable Freq":                "True",
                "Period SP[i]":         1,
                "Period us":                    200
        }, <<<<<< this comma needs to be removed 

    ]
}



try out this new one and let me know

{
    "Board": "BIGTREETECH SKR OCTOPUS PRO V1.0",
    "Modules": [
        {
            "Thread": "Servo",
            "Type": "Reset Pin",
            "Comment": "Reset pin",
            "Pin": "PC_15"
        },
        {
            "Thread": "Base",
            "Type": "Stepgen",
            "Comment": "X - Joint 0 step generator",
            "Joint Number": 0,
            "Step Pin": "PF_13",
            "Direction Pin": "PF_12",
            "Enable Pin": "PF_14"
        },
        {
            "Thread": "Base",
            "Type": "Stepgen",
            "Comment": "Y - Joint 1 step generator",
            "Joint Number": 1,
            "Step Pin": "PG_0",
            "Direction Pin": "PG_1",
            "Enable Pin": "PF_15"
        },
        {
            "Thread": "Base",
            "Type": "Stepgen",
            "Comment": "Z - Joint 2 step generator",
            "Joint Number": 2,
            "Step Pin": "PF_11",
            "Direction Pin": "PG_3",
            "Enable Pin": "PG_5"
        },
        {
            "Thread": "Base",
            "Type": "Stepgen",
            "Comment": "E0 - Joint 3 step generator",
            "Joint Number": 3,
            "Step Pin": "PG_4",
            "Direction Pin": "PC_1",
            "Enable Pin": "PA_0"
        },
        {
            "Thread": "Base",
            "Type": "Stepgen",
            "Comment": "E1 - Joint 4 step generator",
            "Joint Number": 4,
            "Step Pin": "PF_9",
            "Direction Pin": "PF_10",
            "Enable Pin": "PG_2"
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "X min",
            "Pin": "PG_6",
            "Mode": "Input",
            "Data Bit": 0
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "X max",
            "Pin": "PG_9",
            "Mode": "Input",
            "Data Bit": 1
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "Y min",
            "Pin": "PG_10",
            "Mode": "Input",
            "Data Bit": 2
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "Y max",
            "Pin": "PG_11",
            "Mode": "Input",
            "Data Bit": 3
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "Z min",
            "Pin": "PG_12",
            "Mode": "Input",
            "Data Bit": 4
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "Z max",
            "Pin": "PG_13",
            "Mode": "Input",
            "Data Bit": 5
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "A min",
            "Pin": "PG_14",
            "Mode": "Input",
            "Data Bit": 6
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "A max",
            "Pin": "PG_15",
            "Mode": "Input",
            "Data Bit": 7
        },
        {
            "Thread": "Servo",
            "Type": "Digital Pin",
            "Comment": "Probe",
            "Pin": "PC_5",
            "Mode": "Input",
            "Data Bit": 8
        },
        {
            "Thread": "Servo",
            "Type": "PWM",
            "Comment": "PWM0",
            "SP[i]": 0,
            "PWM Pin": "PB_7",
            "PWM Max": 256,
            "Hardware PWM": "True",
            "Variable Freq": "True",
            "Period SP[i]": 1,
            "Period us": 200
        }
    ]
}

Please Log in or Create an account to join the conversation.

More
08 May 2024 13:44 #300123 by amanker
Thanks a lot. initial bracket was copy-paste mistake. but that comma was problem.

At last stepper is spinning. Had problem with limit switches so added invert = true in config.txt.

But still to be used on machine I had to make many changes.

1. How to add probe? PC_5 pin.
2. Estop to PF_3
3 Spindle to PB_7 (I want PWM output on PB_7)
(Cheap chinese spindle, No Spindle Start or direction only PWM)
PWM 0 is Stop PWM 255 is Full RPM)
4. Last but not least, nice GUI
strugling with qtdragon.
5. user_command file xxxxxx_800.py is giving errors. so I commented out in ini file.

Please Log in or Create an account to join the conversation.

More
08 May 2024 15:55 #300134 by cakeslob
1. how probe?
personally, not sure. please refer to flexihal config. I made a remora version that you can reference also. , but it is also a standard linuxcnc thing
github.com/cakeslob/remora-flexi-hal/blo...emora-flexi.hal#L191


2. same as probe, not 100% sure, i will test out these things in the future to test a mworking config, but in the mean time please refer to the flexihal config again, probably somewhere this line

github.com/cakeslob/remora-flexi-hal/blo...remora-flexi.hal#L76

3.
for spindle, check out this config part

github.com/cakeslob/remora-flexi-hal/blo...remora-flexi.hal#L60

4. What Linuxcnc image are you using? depending on the debian version, qtvcp can be challenging. what error are you getting?

5. What version of linuxcnc are you using? I think that is left over by accident, but its the axis GUI mod i made to use with the RPI because QT based ones cause issues for me.

I think going forward, I will try to adopt that flexihal config as a default , as it is robust and refined with all the features included. I will have to test it out a bit

Please Log in or Create an account to join the conversation.

More
08 May 2024 16:35 #300135 by amanker
Tried many things.
1. Recommended flexihal image. Can't update, errors while updating. Most of the GUI gave errors. Only axis you were testing was working, that too after commenting out user_command in ini file.
2. Official raspberry pi os12 with LinuxCNC 9.2
Every gui worked. But too much latency.
3. Tried official LinuxCNC 9.2 image for rpi4. Works good. But no raspi-config or vnc. Not able to activate ssh. Only able to work on connected display and key/mouse.

Please Log in or Create an account to join the conversation.

More
09 May 2024 23:51 #300258 by cakeslob
The following user(s) said Thank You: elovalvo

Please Log in or Create an account to join the conversation.

More
12 May 2024 09:12 #300428 by amanker
Thanks bro,
I am using official LinuxCNC image for RPI4, its working good. Axis, gscreen, pyvcp gtdragon skins working properly. I liked gtdragon gui but I have 7" 1024x600 resolution screen which is not suitable for this, it needs 1280x720 at least. Trying to resize the screen.
But first I should have fully working machine with remora.

For PWM spindle configuration. The link you provided were for 0-10v spindle. Not for only PWM based cheap chinese spindle. So I took axample from LinuxCNC documents, then pins assignment as per your configuration was type mismatch. Assigned pwm pin as regular output pin. That worked and tested pin output with multimeter not on actual spindle.

Please Log in or Create an account to join the conversation.

More
13 May 2024 23:31 #300541 by cakeslob
i think the only difference is the math on the scale gain, as far as i can tell, so instead of 10/rpm , it would be 100/rpm

"So I took axample from LinuxCNC documents, then pins assignment as per your configuration was type mismatch. Assigned pwm pin as regular output pin."

not sure what you mean by this

here are some rough examples of my spindle setups using pwm

github.com/cakeslob/RRW_LAB/blob/main/Li.../remora-xyz.hal#L122

github.com/cakeslob/RRW_LAB/blob/main/RR...0355/config.txt#L100

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.114 seconds
Powered by Kunena Forum