Anyone tried to make a 3D Printer controller?
~Straw
~Straw
Wed Sep 27, 2017 3:52 pm
[ag123 – Wed Sep 27, 2017 1:09 pm] – …then we can probably run a 3d printer with 3 motors (X, Y, Z) and 2 extruders (i.e. 2 colors filaments simultaneously) on just a Blue PillBlue PillОтладочные и вычислительные платы…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…very small STM32F405 board or Maple MiniMaple MiniОтладочные и вычислительные платы…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…Underclocking STM32F103 to 48MHz
![]()
Hi there! That’s what I’m doing! ![]()
I’ve been reading this thread and thinking that maybe we can use a low cost board holding a Blue PillBlue PillОтладочные и вычислительные платы…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…very small STM32F405 board for the most common 3d printers (mendel 90, prusa i3, kossel delta, etc), so I made a little board with 4 stepper drivers, 3 mosfets and 2 thermistors, based on the SinapTec board (http://reprap.org/wiki/SinapTec). The goal for the board is to be DIY-able and very low cost. You can see it here: https://github.com/pscrespo/Morpheus-STM32 .
What are your thoughts about it?
(non-native english speaker, I apologize in advance for any writing mistakes)
Wed Sep 27, 2017 9:17 pm
Very nice board..
I am using the Blue PillBlue PillОтладочные и вычислительные платы…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…very small STM32F405 board in my PCB designed in a similar way, but not for 3d printing.
One thing I noticed about your PCB design. You do not use the top copper very much, i.e. only a few red colour tracks
AFIK, if you are using a 2 layer board, it is normal to use the bottom layer for ground, and top layer for signals and supply voltages.
( some parts of the ground layer also have to carry signals or power in some places, but the majority is often GND)
Wed Sep 27, 2017 10:14 pm
Thu Sep 28, 2017 3:42 am
I noticed you don’t have any connector for a display or an SDcard. SDCard should work already in the HAL (although I haven’t had time to test it yet).
The LCD is not tested at all.
Thermistors and bed/extruder i/o not tested yet.
Do you plan on having LCD and/or SD?
I am testing steppers at the moment, it outputs the pulses, but not sure if at the right frequency, I need to compare to a working board.
Other than what Roger suggested looks like a nice board.
Thu Sep 28, 2017 4:00 am
Re: SD Card holder.
I wonder if that should be one of those modules you can get on eBay / AliExpress
e.g something like
http://www.ebay.com/itm/SD-Reader-Modul … 2888618388
or
Thu Sep 28, 2017 4:02 am
[xebbmw – Wed Sep 27, 2017 3:15 pm] –
@victor_pv: do you think it would be possible to have a bluepill board driving TMC2130TMC2130Аналоговые, логические и силовые компоненты…lors filaments simultaneously) on just a blue pill or maple mini Laughing Why not on TMC2130 stepper driver that runs also on SPI? There is already a fork of Marlin that was adapt…Anyone tried to make a 3D Printer controller? SPI stepper drivers? Is it possible from the hardware point of view?
It should be completely possible. Is there a driver out for them for arduino spi? (without direct hw register acces like I have seen in some Trinamic drivers).
EDIT: It seems that the TMC2130TMC2130Аналоговые, логические и силовые компоненты…lors filaments simultaneously) on just a blue pill or maple mini Laughing Why not on TMC2130 stepper driver that runs also on SPI? There is already a fork of Marlin that was adapt…Anyone tried to make a 3D Printer controller? still needs step/dir pins even with using SPI though. The TMC5130TMC5130Аналоговые, логические и силовые компоненты… It seems that the TMC2130 still needs step/dir pins even with using SPI though. The TMC5130 or the L6470 seem more advanced in that they can be just sent a target position via SP…Anyone tried to make a 3D Printer controller? or the L6470 seem more advanced in that they can be just sent a target position via SPI and they will take care of moving the motor the needed steps, with the acceleration/deceleration profile programmed. So a few bytes in SPI in a row can replace hundreds of timed steps in the step pin. That seems like a major CPU offload.
About the L6470 if I remember right they do have step, dir and en pins, but can also be driven completely with SPI.
But even the STM 3d printer board uses step and dir pins to drive them.
What I believe they lack is the current adjustment Vref, and that has to be adjusted with SPI.
Check the datasheet to confirm.
I have Marlin mostly working in an RET board. Can run print jobs from start to end, but haven’t plugged to a printer. In the meanwhile I am testing different things with the debugger and logic analyzer.
I plan to connect thermistors, heater and steppers thru a RAMPs board whenever I had time.
My libmaple HAL just got merged to Marlin 2.0bugfix branch so other people can use or collaborate with the HAL development.
Thu Sep 28, 2017 4:10 am
I keep a fork, but my plan is to submit back to that branch as soon as I make changes that I confirm work fine.
For the marlin SDCard I use SPI1 (could be changed in the HAL though), so any SDCard adapter should work, even the ones without all the DAT lines.
The LCDs are a pain in the ass since some of them use software SPI, due to a LCD chip HW bug that causes them to corrupt even with CS is high for the display if the spi port is used for something else. But since the F1 has at least 2 SPI ports, should be possible to rewrite those drivers to use SPI2 instead.
There is some effort going on in Marlin to abstract all that out to the HALs, so eventually the software SPI should go out of the display driver files, but it’s there at the moment.
Thu Sep 28, 2017 5:48 am
Thanks.
Is your version for F4 or F1 (or agnostic ?) I noticed the official repo mentions F401
Thu Sep 28, 2017 10:38 am
[victor_pv – Thu Sep 28, 2017 4:02 am] –
It should be completely possible. Is there a driver out for them for arduino spi? (without direct hw register acces like I have seen in some Trinamic drivers).
EDIT: It seems that the TMC2130TMC2130Аналоговые, логические и силовые компоненты…lors filaments simultaneously) on just a blue pill or maple mini Laughing Why not on TMC2130 stepper driver that runs also on SPI? There is already a fork of Marlin that was adapt…Anyone tried to make a 3D Printer controller? still needs step/dir pins even with using SPI though. The TMC5130TMC5130Аналоговые, логические и силовые компоненты… It seems that the TMC2130 still needs step/dir pins even with using SPI though. The TMC5130 or the L6470 seem more advanced in that they can be just sent a target position via SP…Anyone tried to make a 3D Printer controller? or the L6470 seem more advanced in that they can be just sent a target position via SPI and they will take care of moving the motor the needed steps, with the acceleration/deceleration profile programmed. So a few bytes in SPI in a row can replace hundreds of timed steps in the step pin. That seems like a major CPU offload.
I mentioned already in a previous post another Marlin fork that was enhanced for TMC2130TMC2130Аналоговые, логические и силовые компоненты…lors filaments simultaneously) on just a blue pill or maple mini Laughing Why not on TMC2130 stepper driver that runs also on SPI? There is already a fork of Marlin that was adapt…Anyone tried to make a 3D Printer controller? . I repost the link https://github.com/teemuatlut/Marlin
Thu Sep 28, 2017 12:25 pm
[spon! – Wed Sep 27, 2017 3:52 pm] –
Hi there! That’s what I’m doing!
I’ve been reading this thread and thinking that maybe we can use a low cost board holding a Blue PillBlue PillОтладочные и вычислительные платы…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…very small STM32F405 board for the most common 3d printers (mendel 90, prusa i3, kossel delta, etc), so I made a little board with 4 stepper drivers, 3 mosfets and 2 thermistors, based on the SinapTec board (http://reprap.org/wiki/SinapTec). The goal for the board is to be DIY-able and very low cost. You can see it here: https://github.com/pscrespo/Morpheus-STM32 .
What are your thoughts about it?(non-native english speaker, I apologize in advance for any writing mistakes)
I would recommend you to add more fans to your design. At least one for cooling the printed part and maybe one more for cooling the stepping drivers from the electronics.
Thu Sep 28, 2017 1:08 pm
[victor_pv – Thu Sep 28, 2017 4:02 am] –
About the L6470 if I remember right they do have step, dir and en pins, but can also be driven completely with SPI.
But even the STM 3d printer board uses step and dir pins to drive them.
What I believe they lack is the current adjustment Vref, and that has to be adjusted with SPI.
Check the datasheet to confirm.
one of the disadvantages of L6470 as mentioned in this implementation is
https://github.com/hendorog/Marlin_L6470
Arc support not optimised – the L6470 forces all position moves to complete to zero velocity before the next one can be sent. The result is small blobs at each vertex.
if you discount that little disadvantage the L6470 apparently seemed easier to interface with 3.3v devices (STM probably considered or even have products interfacing with STM8STM8Микроконтроллеры и процессоры…with broken reset button and a nasty STLink clone that works with STM32 but not with STM8 . I suspected that something was wrong with wires until I got another STLink (Baite) that…DOA boards / STM32STM32Микроконтроллеры и процессоры…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…[STM32GENERIC] F429i Discovery mcu which pretty much runs at 3.3v) and it seemed pretty advanced
http://www.st.com/en/motor-drivers/l6470.html
http://www.st.com/content/ccc/resource/ … 255075.pdf
it sports commands / features such as registers for setting speeds / acceleration / deceleration etc, and the commands seemed literally ‘fire and forget’ types of commands such as GoTo_DIR (DIR, ABS_POS) and the motor controller takes care of acceleration, speed limit, deceleration and count steps.
the mcu (e.g. STM32STM32Микроконтроллеры и процессоры…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…[STM32GENERIC] F429i Discovery ) could literally go parse the next command and simply monitor if the previous command has completed before issuing a next command. for the ‘cheaper’ stepper drivers it is just dir and step pins and the mcu would be busy doing all that motion acrobatics. in addition, the price would be no ‘funky acrobatics’ etc ![]()
Thu Sep 28, 2017 1:11 pm
[RogerClark – Wed Sep 27, 2017 9:17 pm] –
You do not use the top copper very much, i.e. only a few red colour tracks
Actually, they are bridges, I wanted to make a single sided PCB but needed those. I’m still learning to use gEDA/gaf, does it have another way to draw bridges?
[victor_pv – Thu Sep 28, 2017 3:42 am] –
I just submitted the first running version of stm32duino HAL for Marlin to the official 2.0 bugfix branch.
That’s great news! Unfortunately, my cat decided to learn how chew-able electronics are and stole from the table my only bluepill (note to self: next time buy more than one) so I have to wait until the new one arrives… yeah, that’s my luck…
[victor_pv – Thu Sep 28, 2017 3:42 am] –
I noticed you don’t have any connector for a display or an SDcard.
I thought that if someone needs an el-cheapo board, maybe doesn’t want to attach a display
but I left unused a SPI (A4 to A7) so I can add a header.
[xebbmw – Thu Sep 28, 2017 12:25 pm] –
I would recommend you to add more fans to your design. At least one for cooling the printed part and maybe one more for cooling the stepping drivers from the electronics.
You are right, didn’t think of that. I’ll try to add them asap.
Thu Sep 28, 2017 1:31 pm
my little 2c thoughts are that if L6470 is used after all
https://github.com/hendorog/Marlin_L6470
the motor driving codes may well be simplified rather significantly to an extent of translating the g-code commands into the motor commands for each motor and then ‘fire and forget’ and simply monitor for whether the last command has completed executing and issuing a next command
and g-codes such as
https://www.simplify3d.com/support/arti … -tutorial/
G1 X0 Y0 F2400 ; move to the X=0 Y=0 position on the bed at a speed of 2400 mm/min
G1 Z10 F1200 ; move the Z-axis to Z=10mm at a slower speed of 1200 mm/min
G1 X30 E10 F1800 ; push 10mm of filament into the nozzle while moving to the X=30 position at the same timeThu Sep 28, 2017 2:05 pm
[ag123 – Thu Sep 28, 2017 1:31 pm] –
@spon!my little 2c thoughts are that if L6470 is used after all
https://github.com/hendorog/Marlin_L6470
the motor driving codes may well be simplified rather significantly to an extent of translating the g-code commands into the motor commands for each motor and then ‘fire and forget’ and simply monitor for whether the last command has completed executing and issuing a next command
They do have a problem, that I noticed reading the datasheet a while back, and that github accounts mentions, confirming what I suspected: the L6470 will not accept another command until the motor has completely finished the previous one and come to a stop. What that means is that the movement becomes jerky. There are comments in that repo about how arcs do not work fine because of that, since the motors complete stop at each little vertex, and cause globs. I had hoped that there was a way around it when I read the datasheet, but at least Hendorog wasn’t able to find a way around apparently.
I had thought that perhaps the busy flag would trigger at some point that would allow the next command to pipe to the L6470, so the motor would not stop as long as there is another command to execute, but doesn’t seem possible.
That may explain why STM chose to drive them with step/dir pins in their own 3d printer board.
Thu Sep 28, 2017 3:02 pm
Thu Sep 28, 2017 3:47 pm
[victor_pv – Thu Sep 28, 2017 2:05 pm] –
They do have a problem, that I noticed reading the datasheet a while back, and that github accounts mentions, confirming what I suspected: the L6470 will not accept another command until the motor has completely finished the previous one and come to a stop. What that means is that the movement becomes jerky. There are comments in that repo about how arcs do not work fine because of that, since the motors complete stop at each little vertex, and cause globs. I had hoped that there was a way around it when I read the datasheet, but at least Hendorog wasn’t able to find a way around apparently.
I had thought that perhaps the busy flag would trigger at some point that would allow the next command to pipe to the L6470, so the motor would not stop as long as there is another command to execute, but doesn’t seem possible.
That may explain why STM chose to drive them with step/dir pins in their own 3d printer board.
In order to avoid the issues the with L6470 and to use less pins from STM32F1STM32F1Микроконтроллеры и процессоры…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…Value Line Discovery Board , would it be a good solution then to use TMC5130TMC5130Аналоговые, логические и силовые компоненты… It seems that the TMC2130 still needs step/dir pins even with using SPI though. The TMC5130 or the L6470 seem more advanced in that they can be just sent a target position via SP…Anyone tried to make a 3D Printer controller? stepper driver? But in this case the changes to firmware are required as per this reported issue https://github.com/trinamic/TRAMS-Firmware/issues/2
Thu Sep 28, 2017 4:07 pm
For a minimum board like Scon is making, the F103CB has enough pins. But using an RET or an VET MCU is not much more expensive anyway, so I don’t really see any limitation on using more pins.
I’m designing a board around a VET MCU and can have 8 steppers 6 fets, 4 thermistors, 2 sdcards, LCD, and have pins to spare.
Thu Sep 28, 2017 4:32 pm
https://filebin.ca/3bxb4sEv8Oa7/main.bin
https://filebin.ca/3bxbM2u3kznT/config.default should be saved as config.txt on sd card to be read.
Thu Sep 28, 2017 6:45 pm
[victor_pv – Thu Sep 28, 2017 4:07 pm] –
I’m designing a board around a VET MCU and can have 8 steppers 6 fets, 4 thermistors, 2 sdcards, LCD, and have pins to spare.
Do you mean here STM32F1STM32F1Микроконтроллеры и процессоры…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…Value Line Discovery Board or STM32F4STM32F4Микроконтроллеры и процессоры…uild.board' preference. Auto-set to: STM32F3_DISCOVERY_F3 Board Arduino_STM32-master: STM32F4 :discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCO…Arduino IDE VET board?
Thu Sep 28, 2017 7:47 pm
[xebbmw – Thu Sep 28, 2017 6:45 pm] –[victor_pv – Thu Sep 28, 2017 4:07 pm] –
I’m designing a board around a VET MCU and can have 8 steppers 6 fets, 4 thermistors, 2 sdcards, LCD, and have pins to spare.Do you mean here STM32F1STM32F1Микроконтроллеры и процессоры…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…Value Line Discovery Board or STM32F4STM32F4Микроконтроллеры и процессоры…uild.board' preference. Auto-set to: STM32F3_DISCOVERY_F3 Board Arduino_STM32-master: STM32F4 :discovery_f407 doesn't define a 'build.board' preference. Auto-set to: STM32F4_DISCO…Arduino IDE VET board?
Should work with either.