Welcome! Log In Create A New Profile

Advanced

Marlin firmware program structure

Posted by JUKKAS 
Marlin firmware program structure
May 23, 2019 06:23AM
Hello everyone.
I am new in this forum, but I have used Marlin in my 3d printers for several years.
I have changes configurations and I have made some other changes to program,,, But now I am starting so serious project that I need your help.

I need to change firmware so that I could run stepper motors constantly to both directions and using different speed using only small LCD display and rotary knob like RepRapDiscount Full Graphic Smart Controller.

I know how to program and use computers, I have programmed for 30 years using many many languages BUT NOT C++.

Now I would like to ask you if some one could guide me how to find more information about Marlin Firmware inside structure to which sub-routines I should try to make changes to add feature like endless stepper run, to change motor speed ( this I probably know all ready), to add control of these features to LCD and how to program rotary knob in these features.
The target of my current project is to make proper machine for filament recycling so that I could make usable 1.75 filament from scrap 3d things which I have quite much.

Please if you have any ideas and hints for my project be kind and help mesmoking smileysmoking smiley

Regards

Jukka
Re: Marlin firmware program structure
May 23, 2019 01:47PM
I'm not sure using the Marlin firmware for this is the best way of going about this.

It is fairly easy to drive stepper drivers directly from an Arduino (or whatever you like to use) and there are plenty of examples of how to use LCDs and rotary encoders. I think writing the software you need from scratch might be a lot easier tbh.

You might also want to look into Nextion HMIs - they are awesome for creating UIs that allows you to directly interact with your embedded projects.
Re: Marlin firmware program structure
May 24, 2019 02:01AM
Thank you agehall for your answer.
You are right Marlin is not the easiest way to do what I'm going to do. I have extra reprap 1.4 board and arduino MEGA board and Marlin is very good software for this board.
But I will study more from internet, lets see what I can find. Still . . . I would like to know more about Marlin inside structure.

Regards

JukkaS
Re: Marlin firmware program structure
May 24, 2019 04:26AM
You can still use the boards you have - just check the schematics to figure out what pins on the Arduino board connects to where on the controller and write your own firmware. While this takes a bit of tinkering, I'm fairly certain it will result in an overall easier project. Your needs seems a lot simpler than what Marlin (and other firmwares like it) has to deal with, so I think you will cut 95% of the complexity by writing your own code.

That said, I'm sure you can also learn a ton of stuff by reading the Marlin source code but I know from personal experience that it does take a lot to understand it if you are not familiar with C++...
Re: Marlin firmware program structure
May 24, 2019 05:39AM
Hello.
I have started this morning to study boards schematics. . . seems to be quite clear which pin in the board goes to arduino pin so no problem.
I have done several small apps for steering stepper motors it was simple but now I have to try to program heating procedure and add proper regulation procedure to it for usage of different type of filament.

The reason of trying to study Marlin firmware is that that program include all necessary pieces of program which I need. Of course from Internet I could find all those examples too but it takes more time than just concentrate to one, and good. thumbs upthumbs up.

Regards

JukkaS

Edited 1 time(s). Last edit at 05/24/2019 05:39AM by JUKKAS.
Re: Marlin firmware program structure
January 08, 2020 07:50AM
In my fork I added diagrams for code structure overview. the document does not follow any documentation standard, is partially wrong, focusses on the motion part only and is outdated. Still better than nothing: [github.com]
Sorry, only registered users may post in this forum.

Click here to login