Coder Social home page Coder Social logo

yope / kamaq Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 0.0 519 KB

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

License: GNU General Public License v2.0

Makefile 0.04% Shell 1.41% C 9.17% Python 68.17% HTML 9.38% JavaScript 11.83%

kamaq's Introduction

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

kamaq's People

Contributors

yope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kamaq's Issues

project dead or alive

i just came accross this project via the reprap wiki .. it is very interesting to see a different way of doing things. Is this project still under development or is it abandoned?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.