You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.3 KiB

---
weight: 4
title: "Apuntes de impresión 3D"
date: 2022-08-20T12:04:30+0200
draft: false
hiddenFromHomePage: true
summary: "Apuntes incompletos de impresión 3D"
categories:
- notes
tags:
- 3dprinter
---
## Instalación del software en nuestro ordenador
### Instalación de octoprint en docker
___Pronterface___ se ha vuelto imposible de instalar para mi, así que vamos a probar ___Octoprint___ dockerizado, así ya lo tenemos controlado para instalarlo en una _Orangepi Zero_ en la propia impresora.
El fichero `docker-compose.yml` para el Octoprint (cortesía de Caligari):
```yml
version: '2.4'
services:
octoprint:
image: octoprint/octoprint
container_name: octoprint
restart: unless-stopped
network_mode: bridge
ports:
- "80:80"
devices:
- "/dev/bus/usb"
volumes:
- "./data:/octoprint"
- "/run/udev:/run/udev:ro"
device_cgroup_rules:
- "c 188:* rmw" # USB to serial
- "c 81:* rmw" # USB webcams
# uncomment the lines below to ensure camera streaming is enabled when
# you add a video device
#environment:
# - ENABLE_MJPG_STREAMER=true
####
# uncomment if you wish to edit the configuration files of octoprint
# refer to docs on configuration editing for more information
####
#config-editor:
# image: linuxserver/code-server
# ports:
# - 8443:8443
# depends_on:
# - octoprint
# restart: unless-stopped
# environment:
# - PUID=0
# - PGID=0
# - TZ=America/Chicago
# volumes:
# - octoprint:/octoprint
```
Tenemos que adaptar la parte del mapeo del puerto USB para usarlo en nuestro ordenador.
A continuación algunas notas de como se puede hacer el mapeo del puerto USB en nuestro ordenador.
```
DSM docker UI application does not have option to set "device".
But you still can do this by following steps:
create "octoprint" container with all settings you need (volumes, ports etc)
select "Settings" -> "Export" and export docker container configuration JSON to local computer
open exported JSON in any editor
find string
"devices" : null,
and replace it with
"devices" : [
{
"pathOnHost": "/dev/ttyUSB0",
"PathInContainer": "/dev/ttyUSB0",
"CgroupPermissions": "rwm"
}
],
Import JSON file back to DSM docker UI
P.S. Also I found that my "/dev/ttyUSB0" has "crw-------" permission, and can't be accessed inside docker by octoprint application. So I have to manually set to "crw-rw-rw-" with
chmod a+rw /dev/ttyUSB0
-----
also
Suggest adding instructions to to identify the USB port being used and then passing this device into the container.
With the pi connected to the printer via usb
ls /dev | grep tty
This should return a long list of 'tty' The one we need is found at the end of the list and is probably
ttyUSB0 if no other USB devices are plugged in.
In order to use this ttyUSB0 add this to your docker run command
docker run -device /dev/ttyUSB0:/dev/ttyUSB0 .....
Now octoprint can detect the the USB port and connect to the printer.
Hi
i installed everything and it works. unfortunately I can't enable the usb and launching the command (pi4): docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
some advice?
```
## Partes de repuesto
- [Engranaje de poleas](https://www.aliexpress.com/item/32817328238.html)
- [Pantalla de control](https://www.aliexpress.com/item/1005003952110687.html)
- [Husillos de lujo](https://www.aliexpress.com/item/1005004176770736.html)
- [Husillos normales](https://www.aliexpress.com/item/32818374370.html)
- https://www.aliexpress.com/item/1005003057778867.html
- https://www.aliexpress.com/item/1005003065012440.html
- https://www.aliexpress.com/item/1005004448072856.html
- [Porta bobinas](https://www.aliexpress.com/item/1005003873495589.html)
- [Limpiador de filamento](https://www.aliexpress.com/item/1005001431768691.html)
- [Patas antivibración](https://www.aliexpress.com/item/4000298849640.html)
- [Caja para secar el filamento](https://www.aliexpress.com/item/1005004415842339.html) (es muy mejorable)
- [Tornillos para la cama](https://www.aliexpress.com/item/4001155732510.html)
- [Conjunto de poleas sencillo](https://www.aliexpress.com/item/4001148474252.html)