Anyone tried to make a 3D Printer controller?
strawberrymaker
~Straw
strawberrymaker
~Straw
ag123 Tue Jun 27, 2017 8:28 pm
victor_pv Tue Jun 27, 2017 10:04 pm
Any volunteer for that?
ag123 Wed Jun 28, 2017 5:21 am
victor_pv Wed Jun 28, 2017 8:59 pm
[ag123 – Wed Jun 28, 2017 5:21 am] –
there is RAMPS-FD for arduino Due
http://www.reprap.org/wiki/RAMPS-FD
https://www.ebay.com/sch/i.html?_from=R … D&_sacat=0
which it seems provides 3.3v interfaces, however, the board cost quite a bit more on ebay
if it turns out the interfacing requirements are too involved i may get that instead
actually ST’s board is pretty good and if one wants to simply get started, it’s probably the goto board currently out there for stm32.
the thing i dislike about ST’s board though is that the stepper driver ICs seemed apparently soldered on board this may lead to troublesome maintenance issues should the stepper ICs say become damaged for some reason. while for RAMPS they are socketed which makes it easier to replace
RAMPS-FD is expensive, and is made exactly to fit a DUE, so it has all the headers for it (sides and bottom one). I dont think is a good option to use with STM32 boards, but the schematic could be to use as a base.
Anyway at the moment I found a port of Marlin for a nucleo 446. I think I will try to get that running in an F407 and see what happens, and just use one of the cnc v3 shields to test the steppers. That’s what some people has apparently done before.
If the code works, then if someone is willing to design a board we will have something to test with.
I went doing a search of a simple stm32 board with the bare minimum and small footprint, and if possible on 2 different series, and found these:
https://world.taobao.com/item/419425520 … =19#detail
https://world.taobao.com/item/523361737 … =19#detail
They seem about right for what’s needed. Small, all the pins out, no unneeded components on board, and on 2 series, F1 and F4. If Marlin can work with Daniel’s core, shouldn’t be difficult to design a board that those plug in, and avoid soldering a 100pin mcu in a custom board. I recently replaced an F1 with an F3 is a blue pill, and although doable, is a pain in the ass. I would rather pay $10 to get the MCU soldered and just solder a simple 2.54 header.
Anyway all that is speculation, first let’s see if the code runs.
bianchifan Thu Jun 29, 2017 7:33 am
[ag123 – Wed Jun 28, 2017 5:21 am] –
there is RAMPS-FD for arduino Due
which it seems provides 3.3v interfaces
You can use any normal RAMPS, you have to change the FETs only, they do cost a few cents ![]()
And you may change some capacitors so you can drive 24V motors for more fun…
How to modify a standard RAMPS 1.4 to work with Arduino Due?
ag123 Thu Jun 29, 2017 10:30 am
alce Thu Aug 03, 2017 6:43 pm
victor_pv Thu Aug 03, 2017 7:41 pm
That code that you tested, is it fully functional? I had seen some fork of smoothieware before for the STM32 but wasn’t completely funciontional.
alce Fri Aug 04, 2017 1:44 pm
victor_pv Fri Aug 04, 2017 8:16 pm
ChrisMicro Tue Aug 22, 2017 2:04 pm
victor_pv Tue Aug 22, 2017 2:16 pm
[ChrisMicro – Tue Aug 22, 2017 2:04 pm] –
This 3D-printer has a STM32F070.
There is a few boards now with STM32, but all closed source. I think monoprice has another one with an F103, and then there is the MKS ROBIN. But they won’t even release the schematic ![]()
I’m starting to design my own with to plug to one of the mini F4 boards.
ag123 Tue Aug 22, 2017 4:05 pm
however, firmware like marlin is evolving and is getting pretty sophisticated
https://github.com/ErikZalm/Marlin
Look-ahead:
Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner, lookahead will only decelerate and accelerate to a velocity, so that the change in vectorial velocity magnitude is less than the xy_jerk_velocity. This is only possible, if some future moves are already processed, hence the name. It leads to less over-deposition at corners, especially at flat angles.
Arc support:
Slic3r can find curves that, although broken into segments, were ment to describe an arc. Marlin is able to print those arcs. The advantage is the firmware can choose the resolution, and can perform the arc with nearly constant velocity, resulting in a nice finish. Also, less serial communication is needed.
Temperature Oversampling:
To reduce noise and make the PID-differential term more useful, 16 ADC conversion results are averaged.
AutoTemp:
If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly. Usually, higher speed requires higher temperature. This can now be performed by the AutoTemp function By calling M109 S B F you enter the autotemp mode.
You can leave it by calling M109 without any F. If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named “maxerate” [steps/sec]. The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax. If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change. Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.
https://github.com/MarlinFirmware/Marlin
http://www.stm32duino.com/viewtopic.php?f=19&t=2262
some of the sophistication may involve more elaborate features and algorithms such as look ahead, ‘auto temp’ (i.e. varies with feedrate) pid temp control etc. my guess is for the more ‘sram constrained’ and possibly ‘slower’ mcus, it may be necessary to ‘give up’ on some of the elaborate algorithms, e.g. look ahead + auto temp may consume precious sram and for what is worth for some of the calcs floating point maths may actually help with ‘smoother’ prints, not to mention popular feature creep such as an LCD gui , printing direct from SD card files and maybe even ethernet + web server status / control page) could possibly consume a lot of *ram*.
thoughts then are that given the rather ‘high’ demands (in particular on memory), using a ‘larger’ and faster mcus e.g. stm32f407 with 196k srram and runs at 168mhz with 2x single precision fpu would perhaps allow room to build marlin firmware with more of those memory and cpu hungry sophisticated algorithms to be enabled for the build, this could potentially result in a much better 3d printer control vs one that is ‘dumb’ due to memory constraints or speed limitations such as no fpu
just 2 cents
on a side note, it also seemed that some of commercial stm32 based controllers are basically ported or derived from marlin and as it seemed they did not release the source despite deriving it from marlin firmware
https://www.geeetech.com/forum/viewtopi … 02fd036f73
http://www.geeetech.com/forum/viewtopic.php?t=17173
ag123 Wed Aug 23, 2017 12:57 pm
[victor_pv – Tue Aug 22, 2017 2:16 pm] –[ChrisMicro – Tue Aug 22, 2017 2:04 pm] –
This 3D-printer has a STM32F070.There is a few boards now with STM32, but all closed source. I think monoprice has another one with an F103, and then there is the MKS ROBIN. But they won’t even release the schematic
I’m starting to design my own with to plug to one of the mini F4 boards.
on the other hand i’d think using things like RAMPS
https://www.ebay.com/sch/i.html?_from=R … nt&_sop=12
http://www.ebay.com/itm/3D-Printer-Cont … 0699832639
http://reprap.org/wiki/RAMPS_1.4
is still pretty feasible, just that for the 5v RAMPS some hacks may be needed e.g. additional transistors to drive the MOSFETs etc
then there is the rather expensive RAMPS-FD which uses 3.3v FETS but is perhaps easier to interface with stm32
https://www.ebay.com/sch/i.html?_odkw=r … t&_sacat=0
the good thing about the RAMPS approach is those RAMPS boards are somewhat cost effective and that you could mix and match different stm32 boards, the interfacing connectors can always be hooked up via ‘dupont’ wires
alce Fri Aug 25, 2017 8:20 pm
Now unfortunately my nucleo board started acting weird(rebooting when transferring files via sftp) yesterday and today it stopped working altogether so I did not get to print tests quite yet. Suspecting ESD damage…
Fortunately arrow.com sells NUCLEO-F446RE for about 15 usd w/ free DHL shipping so I should get to it next week.
ag123 Sat Aug 26, 2017 2:05 am
i’d think one of the fastest way to get into 3d printing is to get one of those ‘cheap’ 3d printer kits on ebay, aliexpress, from china etc which are basically clones of prusa i3 or some delta 3d printers. they seem to run in the range of usd $200-300 for the ‘basic’ ones (there are even some that goes for below usd $200). that’d allow one to first have a 3d printer use them with the original controller and later swap that controller for a stm32 based controller
in principle it is possible for one to build a 3d printer from scratch, as after all reprap is intended to be a 3d printer that ‘prints itself’, it seemed these days, you could buy just about every part for those prusa i3 clones & delta 3d printers on ebay/aliexpress, some of them can be sourced locally if you have local manufacturers who stock hardware like rods, aluminium rails, linear bearings, belts, pulleys etc. however, i actually found that the ‘sum of the parts’ by buying them on ebay actually cost more than if you simply buy a kit. in addition, to make all parts to those exact precision of lengths etc is no simple task. hence the point of starting with a cost effective kit and later swap the controller
but for those who are determined enough to build a 3d printer from scratch, in addition to the conventional ‘prusa i3’ or delta 3d designs, you could build one from the core-xy design.
http://corexy.com/theory.html
http://corexy.com/implementation.html < look at that very good pcb milling video
https://www.youtube.com/watch?v=FP2ciUBT6nY
you could use nylon fishing lines to run the core xy, the only thing u’d need to build or get in addition is the z-axis if you simply have just a planer core xy
xebbmw Thu Aug 31, 2017 4:02 pm
[alce – Fri Aug 25, 2017 8:20 pm] –
Ok, short update on my stm32f446re plan.
I got the ramps 1.4 board and it turned out the arduino connector on nucleo board does not populate all the necessary pins so I ended up having to add about 20 dupont cables.
The wiring I did turned out pretty neat so not much of a deal breaker for me. I got all motors working, 3 endstops, fet. I ended up grouping all the motor en pins together just to make my life little bit easier.
I switched SD card to 1 bit SDIO mode which boosted write speed to ~1mb/s from 200kb/s SPI. Smoothieware uses some uip lib to do tcp/ip in software and since W5500 does it in hw it occurred to me
that it would be faster for me just to boot the whole network module and do a very simple telnet and sftp myself. Which I did and it takes about 80 seconds to transfer 4MB gcode file which I suppose is not bad but I think switching W5500 to SPI DMA should at least triple transfer speed.
I dont think I’ll bother with any kind of web ui since it seems like a quite a bit of work. The way I would probably go about it though would be to export gcode interface to javascript(something like ajax) and then do all the interactive stuff in js.
BTW, if marlin folks need a basis for network code you could use this one. It is about 1K of code for both sftp and telnet using the wiznet libs. I think the telnet could also be used as an display replacement. Think github.com/hanzi/telnetrisNow unfortunately my nucleo board started acting weird(rebooting when transferring files via sftp) yesterday and today it stopped working altogether so I did not get to print tests quite yet. Suspecting ESD damage…
Fortunately arrow.com sells NUCLEO-F446RE for about 15 usd w/ free DHL shipping so I should get to it next week.
Did you publish somewhere your changes? It becomes interesting …
On Smoothieware forum it seems the developers are working more on new Smothieware 2 (at least this is my conclusion from http://forum.smoothieware.org/forum/t-2 … 32-support)
xebbmw Fri Sep 08, 2017 4:27 pm
And according to the author there is no benefit on having a MCU with FPU for Smoothieware: https://plus.google.com/+StephanieS3D/posts/8WXjn82rq2X
Scientist Sat Sep 09, 2017 11:35 pm
victor_pv Sun Sep 10, 2017 4:32 am
Normally you need at least this many pins:
Min 4 steppers, 3 pins each (DIR, STEP, EN): 12 pins
Min 2 thermistors: 2 pins
Min 2 PWM outputs for heated bed and extruder
End stops: 3 pins
USB 2 pins
If you use sdcard 4 pins
If you use an LCD, 4-6 pins, depending which.
If you use a rotary encoder for navigatins menus, 3 pins.
Beeper 1 pin
That gets you a basic printer, but not much special about it, other than should run smooth at fairly fast speeds. As you start adding up pins for all those things, you may not have enough in a C8 MCUs.
If you want to use eeprom emulation for the settings, that uses some extra flash, or if you want to use an actual eeprom, you need 2 pins for i2c
If you want to use bed levelling, or more steppers, or any other input or output, you can see how the c8 mcus won’t have enough pins.
I found a nice excel table with all the pins for each version of the MCUs (48/64/100).
With 100 pins you can drive 8 steppers, plug pretty much anything you want, or run less steppers and a few other input outputs, including pins for i2c eeprom, pins for sdio sdcard, 2 SPI ports free for other things (the 12864 grapihc displays controllers have a hardware defect and can’t share the SPI port).