Skip to the content
2 layers143 × 97 mmPihat all, the printed circuit board in 3D

Pihat all

yope/kamaq11

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

Size
143 × 97 mm
Copper layers
2
Thickness
1.6 mm
Parts
305
Nets
192
Pads
902
Tracks, vias
2,492, 382
Pours
12
Routed
Yes
KiCad
KiCad 3
Created
17 Aug 2014
Updated
4 Apr 2019

Overview

Pihat all 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 143 × 97 mm with 305 parts on 192 nets, routed with 2,492 tracks and 382 vias.

It is built around the PAM8320RDR, TLV2464CD and 74HCT08D, with the CM6206-LX, S1M and BSS138W among its other parts. Its parts include 127 capacitors, 121 resistors, 22 connectors, 14 ICs and 10 diodes. It belongs with the robots and motor control and computers and single-board computers boards of this library.

Main components

7

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

305
QtyValueFootprintReferences
561USM0805C1002, C1003, C1005, C1006, C1007, C1008, C1009, C1102, C1103, C1105, C1106, C1107, C1108, C1109, C1202, C1203 +40
2110KSM0603R206, R207, R208, R209, R210, R307, R308, R309, R310, R317, R318, R319, R320, R407, R408, R409 +5
211KSM0603R101, R102, R1301, R1302, R1303, R1305, R1306, R1307, R1309, R1310, R1311, R1313, R1402, R1406, R1501, R1502 +5
2010NSM0603C301, C302, C304, C305, C401, C402, C404, C405, C501, C1001, C1101, C1201, C1404, C1405, C1406, C1407 +4
1922KSM0603R204, R303, R304, R305, R306, R313, R314, R315, R316, R403, R404, R405, R406, R413, R1401, R1407 +3
160.5/3WR6R504, R505, R604, R605, R704, R705, R804, R805, R904, R905, R1004, R1005, R1104, R1105, R1204, R1205
162.2KSM0603R301, R302, R311, R312, R401, R402, R411, R412, R501, R601, R701, R801, R901, R1001, R1101, R1201
16220PSM0603C510, C511, C610, C611, C710, C711, C810, C811, C910, C911, C1010, C1011, C1110, C1111, C1210, C1211
1647KSM0603R502, R503, R602, R603, R702, R703, R802, R803, R902, R903, R1002, R1003, R1102, R1103, R1202, R1203
14100NSM0603C201, C202, C204, C206, C208, C303, C403, C1302, C1403, C1502, C1503, C1504, C1506, C1507
10KC1USM0805C103, C203, C205, C207, C1301, C1401, C1402, C1408, C1501, C1505
810USM1206C504, C604, C704, C804, C904, C1004, C1104, C1204
8PAM8320SO16EU501, U601, U701, U801, U901, U1001, U1101, U1201
5LEDSM0603D101, D201, D1504, D1505, D1506
5S1MDO-214AC(SMA)D1401, D1402, D1501, D1502, D1503
31.2KSM0603R1304, R1308, R1312
347SM0603R1403, R1404, R1405
3JUMPERSIL-2JP101, JP102, JP1501
3SQM100N04TO263Q1501, Q1502, Q1503
3TLV2464SO14EU301, U401, U1301
222SM0603R211, R212
2ALU470U-25VC2V8C101, C102
2ATX_PERbornier4P101, P102
10SM0603R202
112MHZ-12PFHC-49VX201
11MSM0603R203
125AATO257F1501
1330SM0603R205
174HCT08SO14EU1501
1ADC128S022SO16EU1401
1AUXbornier2P1507
1BEDMC4P1506
1BSS-138SOT23GDSQ101
1CM6206AB2_LQFP48U201
1CODEC_ANALOGSIL-10P201
1CONN_13X2pin_array_13x2P1501
1END_LSIL-2P1508
1END_XSIL-2P1502
1END_YSIL-2P1503
1END_ZSIL-2P1504
1EXTbornier2P1505
1FANSIL-3K1401
1KC10USM0603C104
1MOLEX-39-28-1043MINIFIT-4P104
1MOTOR_EMC4P108
1MOTOR_XMC4P105
1MOTOR_YMC4P106
1MOTOR_ZMC4P107
1N.P.SM0603R201
1SERIALSIL-4P103
1SI2302DSSOT23GDSQ1401
1TEMP_ADCSIL-4P1401
1TEMP_AUXSIL-2P1303
1TEMP_BEDSIL-2P1302
1TEMP_EXTSIL-2P1301
1USB-MINI-BUSB_MINI_BCON101

More from yope/kamaq

1
  • 2 layers58.4 × 73.7 mmClassd, the printed circuit board in 3D

    Classd

    yope/kamaq

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

    92 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
  • 2 layers55 × 55 mmLeafNode v3.1, the printed circuit board in 3D

    LeafNode v3.1

    leafai-io/leaf-node-v3.x

    Modular node for sensor monitoring and device control in grow environments.

    91 parts47
  • 2 layers47.6 × 69.1 mmPico Drone, the printed circuit board in 3D

    Pico Drone

    TheNoobInventor/pi-pico-drone

    A micro drone is made using the Raspberry Pi Pico W. It is fitted with the MPU6050 IMU module and BMP280 barometric sensor. The drone will be controlled using TinyMPC and employ a Micro-ROS client on FreeRTOS.

    33 parts29Apache-2.0
  • 4 layers80 × 87.6 mmAratMicro, the printed circuit board in 3D

    AratMicro

    vorlaxen-labs/AratMicro

    High-performance, open-source micromouse robot platform built for Robosam and MEB Robot (Ministry of National Education Robotics Competition, Turkey).

    110 parts1MIT
  • 2 layers88.9 × 89.9 mmLi ion backup, the printed circuit board in 3D

    Li ion backup

    Gosmann/Li-ion-UPS-24V

    24V-input 24V-out lithium ion backup board

    101 parts
  • 2 layers388 × 444 mmPanel, the printed circuit board in 3D

    Panel

    koson/e-Power-PCBs

    This repository contains all e-Power PCB projects

    2,744 parts

Questions

How big is the Pihat all PCB?

It measures 143 × 97 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pihat all use?

305 parts, built around the PAM8320RDR, TLV2464CD, 74HCT08D and CM6206-LX. 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 Pihat all KiCad files?

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

Can I use the Pihat all 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).