|
|
hai 3 meses | |
|---|---|---|
| .github | hai 7 meses | |
| dune-weaver-touch | hai 3 meses | |
| firmware | hai 3 meses | |
| modules | hai 3 meses | |
| patterns | hai 3 meses | |
| static | hai 3 meses | |
| steps_calibration | hai 7 meses | |
| templates | hai 3 meses | |
| .cursorrules | hai 7 meses | |
| .env.example | hai 7 meses | |
| .gitignore | hai 4 meses | |
| CLAUDE.md | hai 5 meses | |
| Dockerfile | hai 3 meses | |
| LICENSE | hai 7 meses | |
| PATTERN_CREDITS.md | hai 7 meses | |
| README.md | hai 3 meses | |
| TAILWIND_SETUP.md | hai 7 meses | |
| VERSION | hai 3 meses | |
| __init__.py | hai 7 meses | |
| docker-compose.yml | hai 3 meses | |
| main.py | hai 3 meses | |
| mirror_pattern.py | hai 7 meses | |
| requirements-nonrpi.txt | hai 3 meses | |
| requirements.txt | hai 3 meses | |
| setup-tailwind.sh | hai 7 meses | |
| setup_hyperion.sh | hai 3 meses | |
| tailwind.config.js | hai 7 meses |
Dune Weaver is a web-controlled kinetic sand table system that creates mesmerizing patterns in sand using a steel ball guided by magnets beneath the surface. This project seamlessly integrates hardware control with a modern web interface, featuring real-time pattern execution, playlist management, and synchronized lighting effects.
The Dune Weaver comes in two versions:
Small Version (Mini Dune Weaver):
Larger Version (Dune Weaver):
Each version operates similarly but differs in power, precision, and construction cost.
The sand table consists of two main bases:
Both versions of the table use two stepper motors:
The small version uses 28BYJ-48 motors driven by ULN2003 drivers, while the larger version uses NEMA 17 or NEMA 23 motors with TMC2209 or DRV8825 drivers.: Controls the in-and-out movement of the arm.
Each motor is connected to a motor driver that dictates step and direction. The motor drivers are, in turn, connected to the ESP32 board, which serves as the system's main controller. The entire table is powered by a single USB cable attached to the ESP32.
Unlike traditional CNC machines that use an X-Y coordinate system, the sand table operates on a theta-rho (θ, ρ) coordinate system:
This system allows the table to create intricate radial designs that differ significantly from traditional Cartesian-based CNC machines.
Unlike conventional CNC machines, the sand table does not have a limit switch for homing. Instead, it uses a crash-homing method:
Due to the hardware design choice, the angular axis does not move independently. This means that when the angular motor moves one full revolution, the radial axis also moves slightly—either inwards or outwards, depending on the rotation direction.
To counteract this behavior, the software:
This correction ensures that the table accurately follows the intended path without accumulating errors over time.
Each pattern file consists of lines with theta and rho values (in degrees and normalized units, respectively), separated by a space. Comments start with #.
Example:
# Example pattern
0 0.5
90 0.7
180 0.5
270 0.7
The project exposes RESTful APIs for various actions. Here are some key endpoints: • List Serial Ports: /list_serial_ports (GET) • Connect to Serial: /connect (POST) • Upload Pattern: /upload_theta_rho (POST) • Run Pattern: /run_theta_rho (POST) • Stop Execution: /stop_execution (POST)
Clone the repository:
git clone https://github.com/tuanchris/dune-weaver.git
cd dune-weaver
Install dependencies:
On Raspberry Pi (full hardware support):
pip install -r requirements.txt
npm install
On Windows/Linux/macOS (development/testing):
pip install -r requirements-nonrpi.txt
npm install
Note: The development installation excludes Raspberry Pi GPIO libraries. The application will run fully but DW LED features will be disabled. WLED integration will still work.
Build CSS:
npm run build-css
Start the application:
python main.py
Open your browser and navigate to http://localhost:8080
dune-weaver/
├── main.py # FastAPI application entry point
├── VERSION # Current software version
├── modules/
│ ├── connection/ # Serial & WebSocket connection management
│ ├── core/ # Core business logic
│ │ ├── cache_manager.py # Pattern preview caching
│ │ ├── pattern_manager.py # Pattern file handling
│ │ ├── playlist_manager.py # Playlist system
│ │ ├── state.py # Global state management
│ │ └── version_manager.py # GitHub version checking
│ ├── led/ # WLED integration
│ ├── mqtt/ # MQTT support
│ └── update/ # Software update management
├── patterns/ # Pattern files (.thr format)
├── static/ # Web assets (CSS, JS, images)
├── templates/ # HTML templates
├── firmware/ # Hardware controller firmware
└── requirements.txt # Python dependencies
The application uses several configuration methods:
LOG_LEVEL, connection settingsstate.jsonCore API endpoints for integration:
/upload_theta_rho, /list_theta_rho_files/run_theta_rho, /pause_execution, /stop_execution/connect, /send_home, /set_speed/api/version, /api/update/ws/statusWe welcome contributions! Please check out our Contributing Guide for details.
For detailed setup instructions, hardware assembly, and advanced configuration:
Happy sand drawing with Dune Weaver! ✨