Hi, im trying my skills and will try to make G-code interpreter and G-code sender from scratch.
G-code sender : PC
|
UART
|
G-Code interpreter and controller: STM32H7
|
SPI
|
TMC5160
Hi, im trying my skills and will try to make G-code interpreter and G-code sender from scratch.
G-code sender : PC
|
UART
|
G-Code interpreter and controller: STM32H7
|
SPI
|
TMC5160
Last edited by do-man; 01-18-2024 at 03:19 PM.
Can't edit first post.
What are my goals with this project:
-RESPONSIVENESS of the multiplatform GUI g-code sender, writed in python - and using only native modules, with low CPU usage
-SPEED of interpreter and controller that uses hardware accelerations and with real time kernel
-ACCURACY while calculating things on the fly with hardware accelerators and using dsp
-SAFETY last, but sure will have to consider it at some middle point of project
Wish me luck
Last edited by do-man; 01-19-2024 at 09:48 AM.
Rather than starting from scratch, why not just fork bcnc? It's already a great sender, and would be alot easier to modify rather than having to write everything from scratch.
Hi do-man - Starting something from scratch is admirable but I don't think you know what your up for! There are many many open projects that need help and that are 10,000's of hours plus into development. Contribute something to those and your skills will be tested and appreciated. Peter
Hi ! I'm using and contributing to open source projects. And they all are mostly software based. This makes them more portable to different hardware bases. But ... It makes them so slooow. My goal is software mostly hardware based (made only for one MCU family using as many hardware futures as possible). This makes it not so portable but FAST. These projects wouldn't accept this kind of approach. And contributions would not be merged at all (waste of time).
And also there is no FULL SPI control software for this driver as well. This also would not be accepted in these projects. Because whole motion control parts had to be changed etc. Whole projects had to change to follow this approach (waste of time).
So its even at this point kind of unique.
Thanks for taking interest in my project and for commenting this thread.
I'm sorry, but from my personal experience bcnc was terrible to use (tried it not so long ago). And also it has many issues on arch based distros (and other too).
Sender is simple software, its like a weekend project. Harder part is managing control over machine.
Thanks for interest and commenting this thread also.
Hi D-M - you say Gcode interpreter and gcode sender. Could you expand what you mean by these? Are you talking about a machine controller? ie the device accepts gcode from a cam system and this is then velocity and motion planned and sent to the motors? Peter
If you think you can make a better sender than bCNC, I think the community would be excited to see it. In my opinion bCNC is the best sender out there right now, and its certainly far from perfect.
On the interpreter/machine control, there are a bunch of mature projects for a bunch of different micro controllers. I don't think you'd find much enthusiasm for yet another one, on yet another platform without having some pretty enticing features. It sounds like you may be overestimating the need for speed in a machine controller. Keep in mind that professional CNCs for the 90s worked better than most current hobby level machines on ridiculously slow controllers. I've been running GRBL on piddly ATmega328P for awhile now and it is plenty fast enough.
Hi ! PC runs g-code sender - this programs monitors and established USB connection with microcontroller, and sends sends strings of g-code to it. It isnt computing g-code just sending. When microcontroller does it it will be easy to implement other input of g-code like USB stick or SD card. It sends data in no real time fashion.
Microcontroller will to this job in real time fashion, then it will send with only SPI commands (no step/dir) to motor controllers (in this case tmc5160). Standard in other solutions is to configure them by spi but then use step/dir to controll motors.
I think I won't find much enthusiasm in this project by majority also !
But I don't think I overestimate speed (and when I mean speed I don't talk about just motor speed) it is important in many reasons.
This is a must when it comes to overall "responsiveness" of complete system.
I agree that there are many exciting projects out there like LinuxCNC (that I'm currently using), fluidNC, Marlin etc. And I won't discourage anyone from using it.
But still they don't provide this "great" experience that I'm looking for.
-they don't use full spi control over trinamic motor drivers (MODE 1), they use (MODE 2) instead, that only allow to control current and chopper of this motor driver.
-this approach would force them to rethink and rewrite motion calculations and control (most likely they won't do this).
Have a nice day !
First run in FULL SPI MODE 1, with standard setrings, not matched Rsens (0.022 R), 17SH4401 (1.5 A). Ideal Rsens for this engine : 0.15 R.
https://youtube.com/watch?v=QWSh9MGNZPo
Second try. Full SPI MODE 1.
-power supply 1A 24V C.V.
-tmc5160 spread cycle, stealt chop, 0,5A max
-Rsens 0.022 R
https://youtube.com/watch?feature=shared&v=JR1u7YA7CyE
Update:
https://youtu.be/qnoO85NHg7Q
https://www.youtube.com/watch?v=zk7zDUOad8M
Feedrate test. mm/min. For screw 5mm pitch. Exact stop mode, spread cycle.
I follow Your works here and in cncinfo. It's quite interesting to have other option to control motors than only step-dir pulses, which are indeed very simple in aplication, but also quite slow and not fully noise resistant.