STB Electronics

From RepRap
Revision as of 09:14, 14 January 2018 by STB (talk | contribs) (Contact)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Infobox info icon.svg.png Not Open Source

As stated in the RepRap Wiki Policy, a wiki page that describes a product offered for sale must provide source files for that product.

This page is missing at least these item(s)

  • Does not provide files sufficent to make a copy, and does not provide a license.

There might be more items missing.

If you want to help improve this design, please find source files for these missing items and upload them to this wiki, or link to the repository containing them.

In accordance with the Deletion policy, an admin will review this page in about three weeks to determine if it should be removed or not.

If source files are not uploaded by the proposed delete date, this page will be removed from the wiki.

Proposed delete date: {{{deletedate}}}

Questions about this tag can be addressed on this page's discussion page or on the Administration, Announcements, Policy forum.

Infobox info icon.svg.png This page is flagged as Advertising.

This page is found to exist for the sole purpose of Advertising, This page will eventually be removed. Reason: Not Open-Source Proposed removal date: March 1st 2017 Please use the discussion page for any questions or comments regarding this notice

Crystal Clear action run.png

Release status: working

STB Board 1.png
Release Version 0.9
STB Electronics
CAD Models
External Link

New Version with dual extruders is available (link below)

A new version of the electronics with dual extruder support is available (click on the link): easy electronics


Aim of this project is to make an electronics which gives the beginner a kit consisting of all electronic parts he needs to build a printer plus some spare parts which often die during the initial experiments with the printer. The board should have some comfort for easy stand alone printing. As a result ist has 4 stepper driver on board for X- Y- Z-axis & Extruder, heater outputs for the nozzle and the printing bed, USB communication, SD Card interface and a comfortable user interface with LCD & clickwheel. Important for beginners, the board runs from 12V..24V. It has a built in reverse polarity protection. Even if the user is not familiar with the new hardware it often happens that a wrong power connection can kill the whole electronics, the reverse polarity protection prevents damage.

STB Board 1.png

STB Electronics

STB Board init.png STB main or.png

  • Reverse polarity protection
  • 12V to 24V operating voltage
  • Processor ATmega1284p runs at 20MHz
  • Graphic LCD 128x64 pixel
  • Click encoder wheel
  • 4 Stepper channels (X-Axis, Y-Axis, Z-Axis(2 connectors for 2 motors), Extruder)
  • 3 Endstop inputs
  • Heatbed
  • Nozzle
  • Fan output (5V or 12V/24V depends on power supply)
  • SD-Card
  • USB-Connector

All in one Solution

The board batch consists of more than the control electronic. Also on it are 6 stepper drivers (Pololu compatible) and 4 opto endstops. So the beginner has all the electronic parts he needs plus two spare stepper drivers and one spare endstop.

STB Board batch.png

Well documented wiring on the backside of the PCB (click on the picture to enlarge)

STB Board back.png

User Interface

The user interface is the same as known from the Ultipanel (at Thingiverse). It uses a click wheel encoder to navigate through the menus. Compared to the original Ultipanel it has more flexibility because of the dot matrix display. The pictures give some impression on it.

Welcome.png Mainscr-new.png Menu-move-axis.png STB Board Menu move-Y.png File-menu.png


Some impressions of the housing.

STB Board housing top.png STB Board housing all.png

STL Files: Housing for STB Board


The Firmware for the board is fully integrated in EricZalm's Marlin.

The only thing to do is to download it from the GitHub repository ( and select the STB Hardware in the Configuration.h

Firmware Installation

Install Arduino Environment V023

Copy Marlin -> arduino-0023\Marlin

Copy Marlin\ArduinoAddons\Arduino_0.xx\Sanguino -> arduino-0023\hardware\Sanguino

Copy Marlin\ArduinoAddons\Arduino_0.xx\libraries\u8glib -> arduino-0023\libraries\u8glib

Copy Marlin\ArduinoAddons\Arduino_0.xx\hardware\tools\avr\etc -> arduino-0023\hardware\tools\avr\etc

If you use 1.05 then use this to copy in C:\Program Files\Arduino\hardware New Sanguino Software (works on Arduino IDE 1.0.4 or above) Now added support for ATMEGA644P, ATMEGA1284P, ATMEGA16A, ATMEGA32A

Run arduino environment

Open Marlin.pde


Select Board: Tools/Board -> Sanguino W/ ATmega1284p 20mhz

Change the following lines in Configuration.h (Line numbers may vary a bit)

Change line 50 to

#define MOTHERBOARD 64

uncomment line 311, 312, 315 to

#define ULTRA_LCD
#define DOGLCD

The AVR CPU is running at 20% higher speed compared to standard 16MHz Sanguino boards, we have to reduce the SPI speed from FULL to HALF otherwise we get communication errors from the SD-card.

Change line 146 in cardreader.cpp (Line numbers may vary a bit)

 if (!card.init(SPI_HALF_SPEED,SDSS))

Change line 178 in Sd2Card.h (Line numbers may vary a bit)

 bool init(uint8_t sckRateID = SPI_HALF_SPEED,

Upload the firmware to the board

Connect the USB cable to the board, select the corresponding COM-port in the arduino environment

Tools/Serial Port

then select

File/Upload to IO-Board

When the message "Binary sketch size: ..." appears, press within 1 second the RESET button on the Board.

After the upload has finished the board is ready for use.

Hardware Setup / Cabling

Board pinout (see also bottom side of the PCB)

 1 - Hotend
 2 - Heatbed
 3 - 12..24V permanent output (12..24V, GND) direct connected to power supply voltage
 4 - Hotend Thermistor
 5 - Heatbed Thermistor
 6 - Stepper Motor X-Axis (2B 2A 1A 1B)
 7 - 5V permanent output (5V, GND)max. 100mA
 8 - Stepper Motor Y-Axis (2B 2A 1A 1B)
 9 - Switchable fan output (+, GND)
10 - Stepper Motor Z-Axis (2B 2A 1A 1B)
11 - Stepper Motor Z-Axis (2B 2A 1A 1B)
12 - Stepper Motor Extruder (2B 2A 1A 1B)
13 - Endstop X (out, +5V, GND)
14 - Endstop Y (out, +5V, GND)
15 - Endstop Z (out, +5V, GND)

STB pinout.png

Endstop Cabling

STB endstop pinout.png

These Endstops are NON IVERTING this means the output will be >4.5V when the Endstop is hit and <0.3V when it is open. To test the Endstops put something between the black lightbarrier. The LED will light up, when the Endstop was triggered.

Setting the fan voltage for the hotend cooling fan

The hotend fan can be operated with 2 different voltages. A solder jumper selects between the regulated 5V voltage and the board supply voltage (12 or 24V) coming from the screw terminals.

STB fan voltage sel.png

On the picture the selector selects 12..24V.

Tips and Tricks

How to test the Extruder motor

To check the extruder motor with cold hotend send M302, this allows cold extrudes. Make sure that no Filament is in the Extruder.

Calibrate Hotend & Heatbed

Hotend calibration at 230°C : M303 S230

Heatbed calibration at 90°C: M303 E-1 C8 S90

Write down Kp Ki and Kd values. Put them into the sourcecode Configuration.h at line 130.. (Hotend) and 170.. (Heatbed). Make sure, that #define PIDTEMPBED in line 157 and #define PIDTEMP in line 119 is uncommented.


Set up a new electronics
Task OK not yet OK possible problems & solutions
Temperature readout
Hotend Hotend/Bed temperature differs more than 5°C from the desired value e.g. room temperature
Bed Check if the thermistor type selected in the firmware fits to your hardware. Check wiring & connectors.
Set temperature
Hotend Check wiring & connectors.
Hotend fan control Fan can be started with M106 S255 (fan operating at max. speed)
Control steppers
X-Axis In case they move to the wrong direction, change "#define INVERT_X_DIR" in the firmware
Extruder Use M302 (allow cold extrudes) to enable the stepper even with cold hotend. Do this only without filament inside the extruder
X-Axis Push switch to check the endstop. While pushing use M119 to output the status to the serial port.
Y-Axis Check optoelectronic endstops by sticking a pice of (black) paper between the lightbarrier.
Z-Axis you might need to change the "..._ENDSTOPS_INVERTING = false" to true ore vice versa
Movement (calibrate lenght)
X-Axis Use the following formula to calibrate the movement of axis. First start with the firmware defaults.
Y-Axis Desired value (LENGTH) 10.0cm, steps per unit in firmware (STEPS) 40.00, actual movement (ACTM) 9.5cm
Z-Axis new value = STEPS/(LENGHT*ACTM). In this example the steps per unit must be reduced to 38


  • PCB Eagle data

  • Partlist