GithubHelp home page GithubHelp logo

baetughmacx / contour-probe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laneboysrc/contour-probe

0.0 1.0 0.0 339 KB

Use a 3D printer to scan a vertical surface

License: MIT License

OpenSCAD 91.29% Python 6.62% HTML 2.09%

contour-probe's Introduction

Contour Probe

This program can be used in conjunction with a 3D printer to scan the vertical surface of an object. It serves as a poor-man's 3D scanner.

A small micro-switch is mounted to the hot-end, and the object to scan is secured to the build plate. Using the GUI, you define a rectangular area in X and Z direction to scan. Once defined, the 3D printer probes the object in regular intervals and creates an OpenSCAD output file.

This program was designed for the Lulzbot Mini. Other 3D printers with USB port may work, but will most likely require changes to this program.

YouTube video (click to play on YouTube): Video of the contour probe

Important

This software is incredibly simple and has not been fully tested. It may crash, and may cause damage to your 3D printer or object to scan.

Requirements

  • Lulzbot Mini
  • A computer running Linux (Ubuntu 16.04.3 tested; Raspberry Pi may work)
  • Python 3
  • Google Chrome or Chromium web browser
  • USB-to-serial adapter with accessible CTS input
  • Micro-switch
  • A 1..10 KOhm resistor

Hardware

The micro-switch is connected to the USB-Serial adapter between GND and CTS. The resistor is connected between VCC and CTS, it serves as pull-up resistor.

                            +----------+
+---------------------+     |          |
|                     |     |         +++
|              VCC (+)+-----+         | |   1..10 KOhm
|                     |               | |
|                     |               +++
| USB-to-serial       |                |
| (USB UART)      CTS +----------------+
|                     |                |
|                     |                +
|                     |                   X
|              GND (-)+-----+            X
|                     |     |           X   Micro-switch
+---------------------+     |          X
                            |          |
                            +----------+

Installation

python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install eel pyserial

Usage

source env/bin/activate
./probe.py

The Chrome browser will start and show the UI of the application. Use the Probe movement section to find the desired start and end positions and enter them in the Scanning section. The start X/Y/Z values define the bottom/left corner, the end values the upper/right corner of the area to scan; when viewed from front of the 3D printer.

Enter the name of the scan, which will also be used as filename. Do not use spaces or special characters in the name.

Click the scan to start scanning.

Development

By default the program controls the 3D printer and the USB-serial apapter that connects the probe switch directly. This causes the 3D printer to initialize and home every time the application is started, which is inconvenient for development.

The program can also run as server/client mode. The server controls the 3D printer and probe, and the client performs the actual function. Restarting the client does not require re-initialization of the 3D printer.

To start the server, run

source env/bin/activate
./probe.py -s

To start the client, run

source env/bin/activate
./probe.py -c

Furthermore, you can run the application with a dummy 3D printer and probe hardware. The probe returns a random surface of a certain depth. To use the dummy hardware, run the application as follows:

source env/bin/activate
./probe.py --mode=dummy

contour-probe's People

Contributors

laneboysrc avatar

Watchers

James Cloos avatar

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.