Skip to the content
2 layers58.4 × 73.7 mmClassd, the printed circuit board in 3D

Python/Cython implementation of 3D printer firmware running on Linux

Size
58.4 × 73.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
92
Nets
55
Pads
234
Tracks, vias
553, 90
Pours
8
Routed
Yes
KiCad
KiCad 3
Created
17 Aug 2014
Updated
4 Apr 2019

Overview

Classd is an open-source printed circuit board by yope, from the yope/kamaq repository on GitHub, published under the GPL-2.0 licence. It is a 2-layer board of 58.4 × 73.7 mm with 92 parts on 55 nets, routed with 553 tracks and 90 vias.

It is built around the PAM8320RDR, TLV2464CD and BSS138W. Its parts include 34 resistors, 28 capacitors, 8 connectors, 4 diodes and 4 transistors. It belongs with the robots and motor control and computers and single-board computers boards of this library.

Main components

3

README

README.md

Kamaq

  1. Introduction

Kamaq is a 3D-printer (FDM) controller software running on an embedded Linux system. It is capable of controlling a RepRap-style 3D printer, but with different electronics. Stepper motor control is done using a 8-channel (7.1) USB audio device and some class-D audio amplifiers. Endstop switches are monitored via GPIO inputs (interrupt-capable) and temperature control for extruder and heated bed via standard hwmon-compatible ADC's and GPIO-outputs for heater control. The software has a web-iterface for machine control and monitoring. Why do it like this when there are already so many different hard- and software projects dedicated to 3D printers (RepRap and all its derivatives)? Well, because as is the case with all engineers, I always know better ;-)

  1. Status of this project

This project is currently in heavy development. There are some bugs and missing features, but overall the software can be (and has been) used for many successful prints. The software can control 4 motors (X, Y, Z and Extruder), read 3 endswitches and control extruder- and heated-bed temperatures. The G-Code interpreter is still very simple, but the software is already able to succesfully print objects from a G-Code-file generated with cura or repsnapper.

  1. Platform requirements

Kamaq should be able to run on any embedded linux platform such as the beagle- board, beagle-bone or the raspberry-pi with a suitable audio device, GPIO and HWmon compatible A/D converters for temperature measurement. The sound device should have twice the number of channels as the number of motors that need to be controlled. For example a cheap 7.1 USB audio device will be enough for controlling 4 stepper-motors.

  1. Main application

Of course the main goal for this project is controlling 3D-printer hardware, such as the RepRap Prusa i3 for example, but it may also be adapted for other applications requiring control of motors from G-Codes.

  1. Required hardware

5.1. Audio device

The sound-card will work better if modified slightly, by shorting the DC- blocking capacitors at the output. On many USB audio devices this is a trivial task to do. For example the Sweex SC016 contains a C-Media CM6206 7.1 channel USB audio codec. Datasheets can easily be found via Google, and they contain reference schematics that will be very similar to most implementations of popular 7.1 USB audio devices that use this chip. Most of the time they will use cheap through-hole electrolytic capacitors, that are very easy to short out.

5.2. Audio amplifiers

Bipolar 2-phase stepper-motors are best driven by a controlled current. Although in theory, having a good model of the motor that takes into account inductance and back-EMF at different speeds, one could calculate the correct voltage-waveform to be applied to the motor windings and just use a voltage- amplifier wich might be a little easier to build (specially when using class-D amplifier IC's). For my first hardware implementation, I built very simple class-B amplifiers with current-feedback based on a bunch of TDA2030A I had laying around. This version didn't require any motor modeling. The second version which I am currently using is based on class-D audio amplifier IC's, which save a lot of space and simplify the power supply enormously. The class-D amplifiers lack current-feedback though, so I have added rudimentary software support for voltage control also.

5.3. Heater control

To control heater elements (such as for the extruder or the heated-bed of a 3D-printer), simple low-side switches with power-MOSFETS with very low-Rdson will be perfect. Temperature feedback is best implemented via simple A/D converters that support HW-mon drivers, such as the ADS1015 from TI, which has mainline-linux support.

5.4. Hardware implementation

I have implemented all the needed hardware to control a 3D printer using this software in very little time and effort. If there is enough interest I might open-source the hardware (Kicad schematics and layout) too, but it is really simple and straight-forward stuff right now hacked together in very little time.

  1. Tools

  • kamaq.py: Main application, starts the web-server.

  • grunner.py: This command-line tool can execude whole G-Code files or single movements by specifying relative distance on each axis (including extruder) on the command-line. It supports homing on endswitches and extruder temperature control. Currently not functional. Use the web-server instead.

  • set_current.py: Very simple tool that sets constant motor currents for all motors specified on the command-line. Can be used for adjusting motor current via the audio mixer. For each motor, two values are specified from -30000 to 30000, corresponding to the currents through each of the two coils. If less than 8 values (for 4 motors) are specified, the rest is assumed to be 0.

  • adjust_bed.sh: A script that aids in adjusting the for corners of the print- bed.

  • clean_extruder.sh: Move to a suitable position (high enough Z), heat extruder and start extruding a few cm. Deprecated. Will be removed soon probably.

  1. TODO:

Features that may or may not be implemented in the near or far future:

  • Implement pause and resume-from-layer-X.
  • Implemet G-code control via SSH or Serial port (to be able to use traditional printer control software).
  1. Building Kamaq:

Install build dependencies (debian jessie or ubuntu):

$ sudo apt-get install python3 cython3 libasound2-dev

Building (in-place, installation not supported yet):

$ make

Parts

92
QtyValueFootprintReferences
8100NSM0603C101, C104, C204, C205, C207, C304, C305, C307
81USM0805C202, C206, C208, C209, C302, C306, C308, C309
722KSM0603R108, R109, R110, R111, R126, R127, R401
61KSM0603R101, R102, R106, R116, R117, R403
6FILTERSM1206FB201, FB202, FB203, FB301, FB302, FB303
4100KSM0603R112, R113, R114, R115
41KSM0805R125, R129, R130, R404
4220PSM0603C210, C211, C310, C311
44K7SM0603R201, R202, R301, R302
3BSS-138SOT23Q101, Q401, Q402
3P***1pin1PIN, 1PIN, 1PIN
21R7R122, R123
210NSM0603C102, C103
210USM1206C203, C303
2220UC2V8C201, C301
222NSM0603C105, C106
22K2SM0603R104, R105
2LED_GREENSM0603D101, D102
2LED_REDSM0603D103, D401
2PAM8320SO16EU201, U301
110KSM0603R402
11K2SM0603R103
11MSM0603R124
1220SM0603R107
1330SM0603R128
1CONN_3SIL-3K101
1CONN_4MC4P104
1HEATERMC4P106
1HEAT_INSIL-2P105
1INSIL-3K102
1POWERbornier4P101
1SDN1SIL-2J105
1SDN2SIL-2J106
1SQM100N04TO263Q403
1TEMPSIL-2P102
1TEMP_OUTSIL-2P103
1TLV2464SO14EU101

More from yope/kamaq

1
  • 2 layers143 × 97 mmPihat all, the printed circuit board in 3D

    Pihat all

    yope/kamaq

    Python/Cython implementation of 3D printer firmware running on Linux

    305 parts11GPL-2.0

Similar boards

  • 2 layers39 × 57 mmMb a, the printed circuit board in 3D

    Mb a

    burgrp/retradio

    Orange Pi Zero based web radio

    35 parts2
  • 2 layers100 × 80 mmDeltaSDR, the printed circuit board in 3D

    DeltaSDR

    cernohorsky/DeltaSDR

    HF Software Defined Radio Transceiver that includes ADC and DAC circuits. No soundcard is needed. Board communicates only trough one USB cable.

    180 parts9
  • 2 layers76.2 × 76.2 mmRF proj, the printed circuit board in 3D

    RF proj

    mgw93/RF-proj

    KiCad files for a university project

    117 parts
  • 4 layers86 × 34 mmBsl drv v1, the printed circuit board in 3D

    Bsl drv v1

    jackw01/scanlight

    A better light source for scanning color negative film

    157 parts397CERN-OHL-W-2.0
  • 2 layers100 × 50 mmXiamocon, the printed circuit board in 3D

    Xiamocon

    shapoco/xiamocon

    Game Console-Shaped Motherboard for XIAO RP2350/ESP32S3

    111 parts39
  • 4 layers190 × 100 mmRioctrl controller, the printed circuit board in 3D

    Rioctrl controller

    festlv/rioctrl-hw

    Hardware design for modular CNC controller

    281 parts16CERN-OHL-S-2.0
  • 6 layers180 × 120 mmDCJ11CoreBoard v1.3, the printed circuit board in 3D

    DCJ11CoreBoard v1.3

    CYP4502D6/DCJ11CoreBoard

    PDP-11 replica project based on the DEC DCJ-11 chipset, utilizing FPGA as bus controller and peripheral emulator, using external SRAM to provide system memory

    234 parts13GPL-3.0
  • 2 layers90 × 100 mmHost shell, the printed circuit board in 3D

    Host shell

    shapoco/wildcardboy

    Handheld Game Console with Replaceable MCU

    241 parts5

Questions

How big is the Classd PCB?

It measures 58.4 × 73.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Classd use?

92 parts, built around the PAM8320RDR, TLV2464CD and BSS138W. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Classd KiCad files?

From the yope/kamaq repository on GitHub, at the commit this page was made from: the board is schematics/classD/classd.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Classd design in my own project?

Its repository publishes it under the GPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).