STEVAL-3DP001 User Manual
STEVAL-3DP001 User Manual
User manual
Getting started with the 3D printer board
Introduction
The STEVAL-3DP001V1 is a complete and integrated solution for driving all 3D printers on the market,
including Delta models requiring more complex computation. The solution is ideal for both beginners
and experienced users. It is autonomous and can be used with a software interface or with custom
firmware thanks to the embedded STM32 microcontroller based on the ARM 32-bit Cortex M4 core. The
STEVAL-3DP001V1 is designed to drive 3D printers providing several axes (6 motors), several
extruders (1 to 3), and multi-zone heating bed (1 to 3).
The STEVAL-3DP001V1 features integrated Wi-Fi connectivity, enabling the user to drive a 3D printer
using a smartphone or tablet. The solution is also designed to work with 3D printer tools, such as
Pronterface. USB connectivity is available through Virtual COM port, mini USB OTG and Dongle USB A.
Moreover, the board includes a complete debug solution (STLINK-V2), a tool that is appreciated by
developers.
The STEVAL-3DP001V1 allows connection to another board (e.g. Raspberry board or user board), with
a connector that provides drive power (5 V - 3.3 V) and digital interface (SPI-I²C-ADC-GPIOS-SD-USB).
Figure 1: STEVAL-3DP001V1 3D printer board
Contents
1 Acronyms and abbreviations ......................................................... 6
2 Hardware .......................................................................................... 7
2.1 Power supply board (not included) .................................................... 7
2.2 Hardware description ........................................................................ 8
2.3 Power supplies .................................................................................. 8
2.3.1 5 V supply ........................................................................................... 9
2.3.2 3.3 V supply ........................................................................................ 9
2.4 Heated beds ...................................................................................... 9
2.5 Extruders ......................................................................................... 10
2.6 Axes ................................................................................................ 11
2.7 Connectivity..................................................................................... 13
2.7.1 SPWF01SA Wi-Fi ............................................................................. 13
2.7.2 MicroSD ............................................................................................ 13
2.7.3 USB OTG ......................................................................................... 13
2.7.4 USB Dongle ...................................................................................... 14
2.7.5 Switches ........................................................................................... 14
2.7.6 Expansion connector ........................................................................ 14
2.8 Debug ............................................................................................. 15
3 Firmware ........................................................................................ 16
3.1 Firmware architecture ..................................................................... 16
3.1.1 STM32Cube architecture.................................................................. 16
3.1.2 Marlin overview................................................................................. 17
3.1.3 Marlin4ST architecture ..................................................................... 18
3.2 Firmware folder structure ................................................................ 18
3.2.1 BSP folders ....................................................................................... 19
3.2.2 Middleware folder ............................................................................. 20
3.2.3 Project folder .................................................................................... 20
3.3 Building and loading the firmware ................................................... 20
3.3.1 Building the firmware with the OpenSTM32 IDE .............................. 20
3.3.2 Building the firmware with IAR IDE .................................................. 24
3.3.3 Compilation flags .............................................................................. 25
3.3.4 Loading firmware .............................................................................. 25
3.4 Hardware resource mapping ........................................................... 26
3.5 Wi-Fi and web server ...................................................................... 27
3.5.1 Loading the Wi-Fi firmware .............................................................. 27
4 References ..................................................................................... 36
5 Revision history ............................................................................ 37
Appendix A OpenSTM32 installation ........................................... 38
List of tables
Table 1: List of acronyms ............................................................................................................................ 6
Table 2: Power connector ........................................................................................................................... 9
Table 3: Heated bed connectors ................................................................................................................. 9
Table 4: Extruders - head connectors....................................................................................................... 10
Table 5: Extruders - stepper motor connectors (U-V-W axes) ................................................................. 11
Table 6: End stop levels............................................................................................................................ 11
Table 7: X-Y-Z steppers motors connections ........................................................................................... 12
Table 8: U-V-W steppers motor connections (extruders) ......................................................................... 12
Table 9: End stop connections ................................................................................................................. 13
Table 10: Expansion connector ................................................................................................................ 14
Table 11: Document revision history ........................................................................................................ 37
List of figures
Figure 1: STEVAL-3DP001V1 3D printer board ......................................................................................... 1
Figure 2: EVL400W-APD/ATX board.......................................................................................................... 7
Figure 3: Jumpers and connectors ............................................................................................................. 8
Figure 4: LED arrangement ........................................................................................................................ 8
Figure 5: Firmware architecture ................................................................................................................ 16
Figure 6: Marlin4ST firmware architecture................................................................................................ 18
Figure 7: OpenSTM32 – Eclipse IDE main window .................................................................................. 21
Figure 8: OpenSTM32 – selecting import option ...................................................................................... 21
Figure 9: OpenSTM32 – selecting project to import ................................................................................. 22
Figure 10: OpenSTM32 – generated binary files ...................................................................................... 23
Figure 11: OpenSTM32 – open Debug Configurations ............................................................................ 23
Figure 12: OpenSTM32 – Debugger configuration ................................................................................... 24
Figure 13: IAR IDE main window .............................................................................................................. 25
Figure 14: axisctrl.shtml web page ........................................................................................................... 29
Figure 15: command.shtml web page ....................................................................................................... 30
Figure 16: heatctrl.shtml web page ........................................................................................................... 30
Figure 17: extructrl.shtml web page .......................................................................................................... 31
Figure 18: filemgt.shtml web page ............................................................................................................ 32
Figure 19: wifictrl.html web page .............................................................................................................. 33
Figure 20: Main window of Pronterface .................................................................................................... 35
Figure 21: Network configuration in Eclipse ............................................................................................. 38
Figure 22: Eclipse – available software selection ..................................................................................... 39
Figure 23: Eclipse – OpenSTM32 site information ................................................................................... 39
Figure 24: OpenSTM32 AC6 tools installation ......................................................................................... 40
2 Hardware
The STEVAL-3DP001V1 integrates all the functions needed to drive most 3D printers on
the market; it features:
Ready for the next generation of 3D printers
Multiple extruders support (up to 3) with temperature and fan control, LED display
status, 12 V supply voltage and current capability up to 8 A
Multiple peripheral support and easy interfacing
Hot chamber and multi-zone heating bed with temperature control, LED display
status, 12 V or 24 V supply voltage and current capability up to 20 A
High efficiency and small footprint thanks to low RDS(on) MOSFETs
Open source firmware available
Main peripherals supported:
USB and microSD modules embedded
Wi-Fi module embedded with web server available
External LCD/keypad
Based on STSPIN L6474 stepper motor driver with unique features in terms of current
control and protection (able to drive up to 6 axes; phase current up to 3 A rms; micro-
stepping and digital end stop)
Integrated debug solution (STLINKV2 embedded)
RoHS compliant
2.3.1 5 V supply
The board generates a regulated 5 V supply for on-board circuitry, and user boards via the
J23-37 pin.
5 V can be supplied through the ST-LINK USB instead of the external 12 V power supply,
in which case the current is limited to 500 mA.
If LED D7 signals an overcurrent condition, disconnect the USB connector from J11.
2.5 Extruders
The board can drive up to three fully independent extruders, with:
a hot-end
a 12 V fan
a thermistor (NTC, 100 kΩ at 25 °C recommended)
a stepper motor
The hot-end wires must be connected to the J12 connector (max. 8 A current each line)
and the NTC temperature control feedback and fan driver for each extruder to J13, J14 and
J15 connectors as per Table 4: "Extruders - head connectors".
The status of each hot-end is signaled thus:
D15 (green): hot-end 1 ON
D16 (green): hot-end 2 ON
D17 (green): hot-end 3 ON
The printing material feeders (stepper motors) are connected to J5, J6 and J7 connectors
as per Table 5: "Extruders - stepper motor connectors (U-V-W axes)".
If one of the extruders is not used, the corresponding connector line can be left floating or
used for other purposes.
Table 4: Extruders - head connectors
Connector Pin Signal Notes
1 Extruder 1 hot-end+
12 V permanent
2 Extruder 2 hot-end+
(8 A max. each)
3 Extruder 3 hot-end+
J12
4 Extruder 1- Open drain power switch
5 Extruder 2- Open drain power switch
6 Extruder 3- Open drain power switch
1 FAN+ Extruder 1 12 V permanent
2 FAN- Extruder 1 Open drain power switch
J13
3 NTC- Extruder 1 GND
4 NTC+ Extruder 1
J14 1 FAN+ Extruder 2 12 V permanent
4 Phase A+
1 Phase B+
2 Phase B- Stepper motor of Extruder 2 - V axis
J6
3 Phase A- (2 A / phase max.)
4 Phase A+
1 Phase B+
2 Phase B- Stepper motor of Extruder 3 - W axis
J7
3 Phase A- (2 A / phase max.)
4 Phase A+
2.6 Axes
The reference board can drive 3D printers with 3-axis positioning and up to 3 extruders or
other devices, providing up to 6-axis positioning using the extruder stepper motors as extra
axes.
For each axis, a digital end stop input can be set to active level high or low (see Table 6:
"End stop levels"). The end stops are connected to J16 and J18 as per Table 9: "End stop
connections".
The stepper motors driving each axis must be connected to the respective connector, as
per Table 7: "X-Y-Z steppers motors connections" and Table 8: "U-V-W steppers motor
connections (extruders)".
Table 6: End stop levels
End stop Level of end stop Resistor set up
High (default) R49 = 0 / R52 = not populated
X end stop level
Low R49 = NP / R52 = 0
Y end stop level High (default) R48 = 0 / R53 = not populated
4 Phase A+
1 Phase B+
2 Phase B- Stepper motor of axis Y
J3
3 Phase A- (2 A / phase max.)
4 Phase A+
1 Phase B+
2 Phase B- Stepper motor of axis Z
J4
3 Phase A- (2 A / phase max.)
4 Phase A+
4 Phase A+
1 Phase B+
2 Phase B- Stepper motor of Extruder 2 - V axis)
J6
3 Phase A- (2 A / phase max.)
4 Phase A+
1 Phase B+ Stepper motor of Extruder 3 - W axis
J7
2 Phase B- (2 A / phase max.)
2.7 Connectivity
2.7.1 SPWF01SA Wi-Fi
Further information regarding the embedded SPWF01SA 802.11 b/g/n-compliant Wi-Fi
module is available at www.st.com, including the datasheet.
The SPWF01SA Wi-Fi status is signaled thus:
LED D24 (green): power ON
LED D25 (green): Link up
LED D26 (green): Wi-Fi running
2.7.2 MicroSD
The board includes a microSD connector, compliant with SD Memory card specification
V2.0, supporting 1- and 4-bit databus modes.
The signals for SD communication are also available on user connector J23, making it
possible to add another SD card.
USB OTG Mini-B (J20) and USB dongle (J19) cannot be used simultaneously as
they share the same USB interface.
USB OTG Mini-B (J20) and USB dongle (J19) cannot be used simultaneously as
they share the same USB interface.
2.7.5 Switches
Reset switch SW1 resets all board CPUs and peripherals.
User switch SW2 is for user interaction; it can be configured in the firmware to trigger
start/stop routines or other functions.
2.8 Debug
The board embeds an ST-LINK/V2-1 debbuger/programmer. The features supported on
ST-LINK are:
USB software re-enumeration
Virtual com port interface on USB
Mass storage interface on USB
USB power management request for more than 500 mA power on USB
The power supply for ST-LINK is provided either by the host PC through the USB cable
connected to J11 or from the 12 V power supply (VDD_power). Both supplies must be
present for ST-LINK debugging functions.
LEDs D29 (green) and D30 (red) provide ST-LINK communication status information:
Red LED flashing slowly: at power-on before USB initialization
Red LED flashing quickly: following first correct communication between the PC and
ST-LINK/V2-1 (enumeration)
Red LED ON: initialization between the PC and ST-LINK/V2-1 is complete
Green LED ON: successful target communication initialization
Red/Green LED flashing: during communication with target
Green ON: communication finished and successful.
3 Firmware
3.1 Firmware architecture
The Marlin4ST firmware is the default firmware for the STEVAL-3DP001V1 3D printer
board. It runs on the STM32F401 and is fully capable of handling 3D prints from G-Codes
(Marlin format). The prints can be performed via the UART, SD or Wi-Fi interfaces.
It can be interfaced with 3D printer host software like Pronterface, Repetier Host and
OctoPrint via UART.
The firmware comes with the complete source code for the OpenSTM32 (free) and IAR
development environments.
By default, it is configured to run on a Prusa I3 rework 5, but it can easily be set up to run
on any FDM 3D printer.
The firmware is organized into a drivers section with STM32Cube microcontroller and
peripheral drivers, a middleware section with STM32Cube FatFs and Marlin algorithms for
motion control, G-Codes, etc., and an application section with user command entry points.
In accordance with STM32Cube, the Marlin4ST firmware has three main layers:
Drivers: all the microcontroller and peripherals drivers directly from the STM32Cube
environment.
Middleware: integrates the FatFS from STM32Cube and the Marlin firmware with the
3D printer algorithm (motion control, G-Code parsing, temperature monitoring, etc.)
Application: this layer is the main entry point of the firmware. The setup component
initializes the system, while the infinite loop reacts to the commands that the user sent
from the different interfaces (UART, SD, Wi-Fi).
STEP 2: a window appears; select General followed by Existing Projects into Workspace.
This opens a new window where you can browse to select the Marlin4ST project in
STEP 2: In the Script section of the Debugger tab, select Manual spec and ensure that:
Debug device is set to ST-LinkV2-1
Debug interface is set to SWD
STEP 3: Start the debugging session by clicking the Debug button. Make sure that the
board is connected to your computer via the ST-LINK V2-1 USB connector.
STEP 2: build the project via the menu: Project > Rebuild All.
STEP 3: ensure the board is correctly supplied and a USB cable connects the printer board
ST-LINK USB port and the PC and select “Download and Debug” from the menu to start
debugging.
After the build command, you can also directly download STM32F4xx-
3dPrinter\Demonstrations\EWARM\3DPrinter\Exe\Project.bin from directory
stm32_cube\Projects through the procedure described in Section 5.3.4: "Loading
firmware".
SPI pins
The SPI pins used for communication between the microcontroller and the motor driver
circuits are defined in stm32f4xx_3dprinter_motor.h.
A second SPI is available to the user, with the corresponding pins defined in
stm32f4xx_3dprinter_misc.h.
SD card pins
The SD detection pin is defined in stm32f4xx_3dprinter_sd.h. Only one SDIO set of pins is
available on the STM32F401VE.
Wi-Fi pins
The Wi-Fi pin definitions are in stm32f4xx_3dprinter_wifi.h; they are only used directly by
the BSP Wi-Fi driver.
3.7 SD card
3.7.1 Configuration file
The default firmware requires an SD card with a configuration file which is sys/m_cfg.g by
default, but can be changed by editing the configuration.h source file.
4 References
1. UM1695Command set reference guide for "AT full stack" for SPWF01Sx series of Wi-
Fi modules: available on www.st.com at
http://www.st.com/web/en/catalog/sense_power/FM1968/CL1976/SC1930/PF258591
2. STSW-IDW002Wi-Fi Training - Hands On: available on www.st.com at
http://www.st.com/web/en/catalog/tools/PF261605
5 Revision history
Table 11: Document revision history
Date Version Changes
04-May-2016 1 Initial release.
02-May-2017 2 Updated Figure 1: "STEVAL-3DP001V1 3D printer board".
STEP 4: To install the OpenSTM32 System Workbench plugin by ac6 in your version of
Eclipse, select the Help > Install New Software menu item
STEP 5: Click on the “Available Software Sites” link and enter the following information:
Name: OpenSTM32
Location: http://www.ac6-tools.com/Eclipse-updates/org.openstm32.system-
workbench.site
Figure 23: Eclipse – OpenSTM32 site information
STEP 6: Select OpenSTM32 from the “Work with” list, check the “External Tools” and
“OpenSTM32 Tools” option boxes and click on the Next button.
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST
products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the
design of Purchasers’ products.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.