Coder Social home page Coder Social logo

dubnom / sandtable Goto Github PK

View Code? Open in Web Editor NEW
131.0 11.0 25.0 3.05 MB

Create beautiful dynamic art in sand

License: GNU General Public License v3.0

C++ 1.06% Shell 0.83% CSS 1.07% Python 95.21% Smarty 1.84%
sand lighting cnc-machine magnet ball raspberry-pi draw sisyphus art zen

sandtable's Introduction

SandTable

SandTable provides a web-based user interface to control artistic mechanisms built on CNC platforms, particularly machines that use an x/y motion stage to move a magnet and move a steel ball through sand.

alt-text alt-text alt-text alt-text alt-text alt-text alt-text alt-text

Getting Started

Software:

Everything you need to control a SandTable is included in this project. You only need a Raspberry Pi, a CNC controller, an actual table, and some optional LED lights. The software is easy to install and use. A web-based interface allows you to draw a huge number of mathematically created paterns, write text, draw clipart, and even automatically find and draw images from Google.

The SandTable system is designed to make it easy to add new drawing methods and lighting schemes.

The software also has some neat additional features:

  • A scheduler that can wake up and draw a random image.
  • A movie mode that runs through a script of keyframe drawings, automatically interpolates intermediate frames, and triggers a camera to take pictures. The pictures are then assembled into an animated movie.
  • A filer for managing clipart, movies, and pictures.

Hardware:

While you can use SandTable to generate interesting pictures on a screen, the real benefit comes by driving a CNC machine. Machines need to have a smooth (and preferably quiet) x/y motion stage with a magnet in the center. It takes a bit of effort to tune the power/distance of the magnet, the size of the ball, and the amount and type of sand. If the magnet isn't powerful enough the ball will bury and stop in the sand while the magnet continues. If the magnet is too strong then the friction of the magnet, ball, and sand can lead to stepper motors stalling, missing steps, and making grinding noise.

The hardware should include a homing switche for each axis. Each machines dimensions, motor speeds, accelerations, ports, etc. can be configured.

Modifications:

Many people want to add some fun bells and whistles like:

  • Ball changers (electromagnets, barriers, different size balls, etc.)
  • Multiple balls moving simultaneously
  • Clearing mechanisms (wipers, vibration, etc.)
  • Magnetic sand
  • Ferrofluid
  • Ball levitation

After years of playing with SandTables, I think you'll find most of these modifications to be disappointing. However, if you do come up with something that you feel is compelling, we should definitely add it to the code.

Lighting

I highly recommend adding controllable LED lighting and support already exists for:

Supported CNC Controllers:

  • TinyG Full-featured controller.
  • Smoothieboard Inexpensive machine controller.
  • Marlin Simple CNC controller.
  • EMC Linux CNC Enhanced Machine Controller.

Examples:

Built With:

  • numpy - Python N-dimensional array package
  • pypotrace - Python bindings to potrace
  • potrace - Bitmap image to vector conversion
  • scipy - Python science/math package
  • pillow - Python image package
  • bottle - Lightweight Python web framework
  • shapely - Python interface to GEOS to operate on planar geometry
  • apscheduler - Advanced Python scheduler
  • sqlalchemy - Python SQL toolkit and object relational manager
  • fontTools - Python library for manipulating fonts
  • gphoto2 - Python control of cameras
  • blinka - Adafruit Circuitpython device control

Deployment:

The system is happy running on Linux (prefered), Macs, and PCs. Raspberry Pi running Raspbian is the prefered (and most tested) platform. Other platforms require hand-tweaking the installation.

Raspberry Pi Installation (tested on 2,3,3b+,and 4):

Set the hostname of your machine cd sandtable bin/install.sh

Configure your controller:

  • Copy an existing configuration and modify it to fit your machine.
  • Edit src/config/hostmap.py and add your host name and config file name.

Restart the machine.

You should be able to use a browser -

  • on the machine you can use: http:localhost
  • off the machine you can use: http:hostname (if your DNS/DHCP server is setup correctly

Logs are written to:

  • Server logs - /var/logs/sandtable.log
  • CNC Machine logs - /var/logs/machd.log
  • LED Lighting logs - /var/logs/ledaemon.log
  • Scheduler logs - /var/logs/scheduler.log

To Do:

  • Add test code
  • Improve scheduler interface
  • Improve lighting scenes
  • Make the web interface more interactive
  • Move common items from machines Leds into ledaemon
  • Rename code for more consistency (ledstuff, ledaemon, etc.)
  • Condense Polylines and Chains
  • Add export gcode, thr, svg and perhaps dxf. Make export return files.
  • Add playlists
  • Fix units display (and estimation) in Chains and cgidraw

Authors:

  • Michael Dubno

License

This project is licensed under the GNU GPL License - see the LICENSE file for details

Acknowledgments

  • A big thanks to the entire open-source community who provided a wonderful OS (Linux), a great language (Python), and hundreds of useful libraries which made this project substantially easier to develop.
  • This project came about because of a trip to Dean Kamen's house over Christmas. His house is filled with wonderful machines that combine art and science that have been custom built for him. Around New Years I caught Fifth's disease which took over a month to be diagnosed, so I designed my own art and science machine, the sandtable, which I immediately constructed after recovery.

sandtable's People

Contributors

dubnom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sandtable's Issues

Website Error

Hi,
Thanks for the awesome piece of software.
I finally got it working.
The issue being in file install.sh ln -s $PWD /var/www fails to assign working directory, i changed it to ln -s /home/pi/sandtable /var/www and everything compiled and worked fine.
Upon reboot i ran into an issue wherein sandtable.log says os error: address already in use.
I changed port to 3000 in config and restarted after which i was greeted with the webserver.
In the webserver i am facing couple of troubles:

  1. In the lights section if i click on any image i get the error below:
    Screenshot (258)

  2. In the draw section if i click on the image that displays G i get the error below:
    Screenshot (257)

Have i done something wrong?
Also some the images in the draw section do not generate a preview when clicked.

Hope you guys will help me out with the same.
Thanks.

Support to use GCODE files from sandify.org or other sources

Thanks for the comprehensive package. It works perfectly.
I made a coffee table using the corexy based mechanism. Everything seems to work well.

I was wondering if there is an easy way to use the gcode files downloaded from sandify or other sources.
I see it supports .thr files, but when i try to use one from sandify, it doesnt load in the UI.

coffeetable

Can't run app

It's a bit unclear how to proceed after running install.sh, can you please give clearer steps as your program would be super beneficial to me

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.