-
Notifications
You must be signed in to change notification settings - Fork 52
Trinamic 2130 drivers on the BDRING 6-pack CNC controller v1p5 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/* Driver code for ESP32 Part of grblHAL Copyright (c) 2020-2024 Terje Io grblHAL is free software: you can redistribute it and/or modify grblHAL is distributed in the hope that it will be useful, You should have received a copy of the GNU General Public License #define BOARD_NAME "Sam's 6Pack CNC V1p5" #if KEYPAD_ENABLE == 1 #include "use_i2s_out.h" #if SDCARD_ENABLE || TRINAMIC_SPI_ENABLE // Pin mapping when using SPI mode. #define I2S_OUT_BCK GPIO_NUM_22 #if TRINAMIC_SPI_ENABLE #define X_STEP_PIN I2SO(2) #define Y_STEP_PIN I2SO(5) #define Z_STEP_PIN I2SO(10) // Define ganged axis or A axis step pulse and step direction output pins. // Define ganged axis or B axis step pulse and step direction output pins. // Define ganged axis or B axis step pulse and step direction output pins. #define AUXOUTPUT0_PIN GPIO_NUM_26 // Module 3-1 - Spindle PWM // Define driver spindle pins // Define flood and mist coolant enable output pins. // Define user-control CONTROLs (cycle start, reset, feed hold) input pins. #define AUXINPUT0_PIN GPIO_NUM_39 //Module 2-3 #if PROBE_ENABLE #ifdef ADD_SERIAL1 // Module 1-1 - GPIO_NUM_33 // Module 2-1 - GPIO_NUM_2 // Module 3-1 - GPIO_NUM_26 // Module 4-1 - GPIO_NUM_14 // Module 5-1 - I2SO(24) |
/* Copyright (c) 2020-2024 Terje Io grblHAL is free software: you can redistribute it and/or modify grblHAL is distributed in the hope that it will be useful, You should have received a copy of the GNU General Public License // NOTE: Only one board may be enabled! // Configuration #if CONFIG_IDF_TARGET_ESP32S3 // Spindle selection: // Optional control signals: // If the selected board map supports more than three motors ganging and/or auto-squaring #if WIFI_ENABLE || ETHERNET_ENABLE || WEBUI_ENABLE |
Building for BDring new 6x board[platformio] [wifi_networking] [env:esp32dev] board_build.embed_files = build_flags = monitor_speed=115200 lib_compat_mode = off |
[VER:1.1f.20250107:] |
…ndividual chip select signals. Ref. issue #133.
Individual CS lines for Trinamic drivers was not supported earlier, added now. Note that since the CS lines are routed via I2S a longer delay or some mechanism (I2S passthru mode?) to ensure the lines are actually set properly before transferring data has to be added. I do not have a board available for testing so I am not able to do it. |
Hi, thanks for the response. I'm still having trouble getting it going. I'm not sure how to how to accomplish the delay you mentioned. It sounds like this particular board might be more trouble than I know how to deal with. Here is what I get now: M122i Thanks for trying to help. |
Try this, it works for me when testing the X-axis - in a breadboarded setup with wires all over so less than ideal... |
Still getting: I'm able to save a new value to $140 now though. |
Set $338=1 to test with only X enabled, still not working? |
Hi @terjeio That's why I'm making a shield to insert an esp32 v1 devkit and use the TMC2130 or TMC2160-OC drivers (or something similar)!! Since the ESP32 doesn't have many pins, I would have to mount a couple of shift registers (74HC595) on board to be able to drive all the outputs! Question: Thank you in advance for your support! |
You would have been better off with a RP2350 (Pi Pico2), the ESP32 is far from the best when it comes to high step rates with low jitter... And using shift registers for stepping is suboptimal for the ESP32, the RP2340/RP2350 is way better due to utilizing PIO state machines for outputting data. And the ESP32 FPU is rather slow and it cannot be used in an interrupt context which means that PPI mode for lasers cannot be implemented. If you want to go for the ESP32 family then ESP32 S3 might be a better choice - it has more pins so you should be able to avoid the shift registers.
It seems to work, I do not have a proper board to test with so I have only tested with a single driver (or was it two?) wired up on a breadboard
I do not think so - use the TMC5160 driver with the correct TRINAMIC_R_SENSE value.
Yes.
There are pre-estatblished names.
Not sure what you mean by this. |
Thanks for your reply.
Nothing is decided yet....I'm in the process of collecting data and ideas for the project, I will certainly evaluate your advice!
Maybe I could use the shift registers just to control the drivers, there should be some free pins for Spi data command for the tmc2130..
I meant these... the first ones are depending on the type of drivers, but is it necessary to enable the rest too? #define TRINAMIC_ENABLE 2130 //#define TRINAMIC_I2C 1 // Trinamic I2C - SPI bridge interface. As always, thank you for your support! |
Hi, I'm trying to compile for my 6-pack v1p5. There are several board files for the 6pack boards, but using the web compiler, I wasn't able to initialize my drivers. The map files that are there don't have separate CS pins, which I believe this board does need. So I've compiled it myself with my own board map. However, I am still not able to initialize the drivers.
There is a good chance that I'm just doing something wrong, but do you have any idea what?
M122I
[MSG:Warning: Could not communicate with stepper driver!]
When I try to change the current value at $140, I get:
error:2 - Missing the expected G-code word value or numeric value format is not valid.
I'll add: My console output from IO Sender, platformio.ini, my_machine.h, my_machine_map.h
The text was updated successfully, but these errors were encountered: