Barco de ovo impresso em 3D por apenas US $ 15. Receita culinária

Olá pessoal!

imagem

A Páscoa termina e o tema da impressão de vários padrões nos ovos se torna um pouco menos relevante, mas isso não torna o barco de ovos menos necessário, o que todos precisam e estão sempre o ano todo :)

Para quem não sabe, um barquinho de ovos é uma máquina que pode desenhar objetos esféricos com uma caneta comum: ovos, bolas de tênis, enfeites de árvore de Natal. O conceito do mecanismo foi inventado pelo designer Bruce Shapiro em 1990, e há pouco tempo a famosa empresa Evil Mad Scientist Laboratories lançou sua versão sob o nome The EggBot . Devemos prestar homenagem aos Laboratórios Científicos Malucos Malignos, o projeto foi aberto e permite o uso de software para outros robôs de ovos, mesmo em projetos comerciais.

Aqui estão as obras de arte obtidas na saída:

imagem


Imagens simples podem ser desenhadas em qualquer editor de vetores e objetos geométricos complexos podem ser criados, por exemplo, em python.

Aqui está um exemplo desse programa:
# Generate a 3200 x 800 geometrical pattern for Eggbot plotting # See http://www.egg-bot.com/ for info on the Eggbot # # Dan Newman, 2 January 2011 # dan dot newman at mtbaldy dot us # Public domain (http://creativecommons.org/licenses/publicdomain/) HEIGHT = float( 800.0 ) WIDTH = float( 3200.0 ) scale = WIDTH / ( 16.0 * 3 ) # 16 horizontal repeats epsilon = float(1.0e-5) # Relative moves for drawing the vertical elements DOWN = [[0.0, scale], [scale, 2*scale], [0.0, scale], [-scale, 2*scale]] UP = [[0.0, -scale], [scale, -2*scale], [0.0, -scale], [-scale, -2*scale]] # How to switch to going up when you stop going down after DOWN[i] DU_switch = [scale, -scale, -scale, scale] # Relative moves for drawing the horizontal elements (L2R = left-to-right) L2R = [[scale, 0.0], [2*scale, scale], [scale, 0.0], [2*scale, -scale]] R2L = [[-scale, 0.0], [-2*scale, scale], [-scale, 0.0], [-2*scale, -scale]] # How to switch to R2L after stopping in L2R at index i LR_switch = [scale, -scale, -scale, scale] # Compute the intersection of two lines # See eggbot_hatch.py for complete details def intersect( P1, P2, P3, P4 ): ''' Determine if two line segments defined by the four points P1 & P2 and P3 & P4 intersect. If they do intersect, then return the fractional point of intersection "sa" along the first line at which the intersection occurs. ''' # Precompute these values -- note that we're basically shifting from # # P = P1 + s (P2 - P1) # # to # # P = P1 + s D # # where D is a direction vector. The solution remains the same of # course. We'll just be computing D once for each line rather than # computing it a couple of times. D21x = P2[0] - P1[0] D21y = P2[1] - P1[1] D43x = P4[0] - P3[0] D43y = P4[1] - P3[1] # Denominator d = D21x * D43y - D21y * D43x # Return now if the denominator is zero if d == 0: return float( -1 ) # For our purposes, the first line segment given # by P1 & P2 is the LONG hatch line running through # the entire drawing. And, P3 & P4 describe the # usually much shorter line segment from a polygon. # As such, we compute sb first as it's more likely # to indicate "no intersection". That is, sa is # more likely to indicate an intersection with a # much a long line containing P3 & P4. nb = ( P1[1] - P3[1] ) * D21x - ( P1[0] - P3[0] ) * D21y # Could first check if abs(nb) > abs(d) or if # the signs differ. sb = float( nb ) / float( d ) if ( sb < 0 ) or ( sb > 1 ): return float( -1 ) na = ( P1[1] - P3[1] ) * D43x - ( P1[0] - P3[0] ) * D43y sa = float( na ) / float( d ) if ( sa < 0 ) or ( sa > 1 ): return float( -1 ) return sa # Determine whether a line segment needs to be clipped to # fit within the drawing page def clip( x1, y1, x2, y2 ): if ( x1 >= 0.0 ) and ( x1 <= WIDTH ) and ( x2 >= 0.0 ) and ( x2 <= WIDTH ) and \ ( y1 >= 0.0 ) and ( y1 <= HEIGHT ) and ( y2 >= 0.0 ) and ( y2 <= HEIGHT ): return float( -1.0 ) if ( x1 < 0.0 ) or ( x2 < 0.0 ): s = intersect( [x1, y1], [x2, y2], [0.0, 0.0], [0.0, HEIGHT] ) if ( s > 0.0 ): return s if ( x1 > WIDTH ) or ( x2 > WIDTH ): # We allow going an extra pixel across in case there is drawing error s = intersect( [x1, y1], [x2, y2], [WIDTH+1.0, 0.0], [WIDTH+1.0, HEIGHT] ) if ( s > 0.0 ): return s if ( y1 < 0.0 ) or ( y2 < 0.0 ): s = intersect( [x1, y1], [x2, y2], [0.0, 0.0], [WIDTH, 0.0] ) if ( s > 0.0 ): return s if ( y1 > HEIGHT ) or ( y2 > HEIGHT ): s = intersect( [x1, y1], [x2, y2], [0.0, HEIGHT], [WIDTH, HEIGHT] ) if ( s > 0.0 ): return s return float( -1.0 ) # Plot a collection of line segments def plot( points, color='black' ): # First line segment s = clip( points[0][0], points[0][1], points[1][0], points[1][1] ) if ( s < 0.0 ): p = 'M %f,%f' % ( points[0][0], points[0][1] ) else: p = 'M %f,%f' % ( points[0][0] + s * ( points[1][0] - points[0][0] ), points[0][1] + s * ( points[1][1] - points[0][1] ) ) x0 = points[1][0] y0 = points[1][1] p += ' L %f,%f' % ( x0, y0 ) # Intermediate line segments for i in range(2, len( points ) - 1): x0 = points[i][0] y0 = points[i][1] p += ' L %f,%f' % ( x0, y0 ) # Final line segment x = points[-1][0] y = points[-1][1] s = clip( x0, y0, x, y ) if ( s < 0.0 ): p += ' L %f,%f' % ( x, y ) else: p += ' L %f,%f' % ( x0 + s * ( x - x0 ), y0 + s * ( y - y0 ) ) print '<path stroke="%s" stroke-width="1" fill="none" d="%s"/>' % ( color, p ) # Draw the vertical elements def vertical( x, y, color, down, up ): if ( y > ( scale + epsilon ) ): i = len( down ) - 1 while ( y > ( scale + epsilon) ): x -= down[i][0] y -= down[i][1] i -= 1 if ( i < 0 ): i = len( down ) - 1 else: i = -1 points = [[x, y]] while ( y < ( HEIGHT - epsilon ) ): i += 1 if ( i >= len( down ) ): i = 0 x += down[i][0] y += down[i][1] points.append( [x, y] ) plot( points, color ) x += DU_switch[i] points = [[x, y]] while ( y > epsilon ): x += up[i][0] y += up[i][1] points.append( [x, y] ) i -= 1 if ( i < 0 ): i = len( up ) - 1 plot( points, color ) # Draw the horizontal elements def horizontal( x, y, color, l2r, r2l ): if ( x > ( scale + epsilon ) ): i = len( l2r ) - 1 while ( x > ( scale + epsilon ) ): x -= l2r[i][0] y -= l2r[i][1] i -= 1 if ( i < 0 ): i = len( l2r ) - 1 else: i = -1 points = [[x, y]] while ( x < ( WIDTH - epsilon ) ): i += 1 if ( i >= len( l2r ) ): i = 0 x += l2r[i][0] y += l2r[i][1] points.append( [x, y] ) plot( points, color ) y += LR_switch[i] points = [[x, y]] while ( x > epsilon ): x += r2l[i][0] y += r2l[i][1] points.append( [x, y] ) i -= 1 if ( i < 0 ): i = len( r2l ) - 1 plot( points, color ) print '<svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="%d" height="%d">' % ( int( WIDTH ), int( HEIGHT ) ) print '<g inkscape:groupmode="layer" inkscape:label="1 - vertical">' Color = 'green' x1 = 0.0 y1 = 0.0 x2 = 1.5 * scale y2 = 1.5 * scale while ( x1 < ( WIDTH - epsilon ) ): vertical( x1, y1, 'green', DOWN, UP ) if ( x2 < ( WIDTH - epsilon ) ): vertical( x2, y2, 'green', DOWN, UP ) x1 += 3 * scale x2 += 3 * scale print '</g>' print '<g inkscape:groupmode="layer" inkscape:label="2 - horizontal">' x1 = 0.0 y1 = 0.0 x2 = 1.5 * scale y2 = 1.5 * scale while ( y1 < ( HEIGHT - epsilon ) ): horizontal( x1, y1, 'blue', L2R, R2L) if ( y2 < ( HEIGHT - epsilon ) ): horizontal( x2, y2, 'blue', L2R, R2L) y1 += 3 * scale y2 += 3 * scale print '</g>' print '<g inkscape:groupmode="layer" inkscape:label="3 - border">' print '<path stroke="black" stroke-width="1" fill="none" d="M 0,0 l %d,0"/>' % ( int( WIDTH ) ) print '<path stroke="black" stroke-width="1" fill="none" d="M 0,%dl %d,0"/>' % ( int( HEIGHT ), int( WIDTH ) ) print '</g>' print '</svg>' 


Mas a imagem resultante já está no ovo:

imagem


Os entusiastas até criam fotos com um efeito estroboscópico durante a rotação:



Ao criar o meu eggboat, eu não tinha o objetivo de atingir US $ 15, mas aconteceu :). Para comparação, o Eggbot Pro original custa US $ 325, o que é uma ordem de magnitude mais cara. O principal custo de qualquer barco de ovos são os motores de passo. Eu usei os mais acessíveis - 28BYJ-48-12V, daí o preço final de 15 dólares.

Então, para preparar meu eggboat, você precisará:

1.110 gramas de plástico ABS ou PLA. Imprimi as partes pretas com ABS, PLA amarelo. É doloroso o PLA ser bonito ao imprimir em vidro :)
2. Eletrônica em estoque:

  • 1 x Arduino Chinês UNO c Aliexpress com cabo para computador por 250 rublos.
  • 2 x motor de passo 28BYJ-48-12V + driver de motor de passo ULN2003 por 100 rublos.
  • 1 x Micro Servo Motor SG90 100 fricções.
  • Fonte de alimentação de 1 x 12V (você não pode comprar se tiver uma).

3. O que não podemos imprimir, mas podemos comprar em praticamente qualquer loja de ferragens:

  • primavera.
  • parafusos, porcas, arruelas.
  • junta de borracha (você pode imprimir se tiver o Flex).
  • rolamento 608.

Colocamos o plástico na impressora 3D e imprimimos os detalhes, cujos modelos eu coloquei cuidadosamente aqui .

Detalhes sobre o que e quanto imprimir, onde exatamente obter os eletrônicos, quantos e que tipo de parafusos você precisa procurar aqui .

Para aqueles que ainda não compraram uma impressora 3D, mas realmente querem preparar o seu barco de ovos, posso imprimir todos os detalhes e enviá-los por correio. Entre em contato no PM, tudo estará da melhor maneira possível! Eu garanto!

Após a impressão, você pode começar a montar. A montagem do dispositivo é mais ou menos assim:

imagem

Para que você tenha sucesso, passei muito tempo e preparei instruções para montar e conectar eletrônicos em imagens. Você pode baixar as instruções aqui .

Após a impressão e montagem, você deve obter um dispositivo como esse:

imagem

Após a conclusão da montagem, você precisa colocar o firmware no eggboat. Como o cérebro do dispositivo é um arduino comum, você não deve ter problemas com isso.

  1. Baixe e descompacte o firmware aqui .
  2. Faça o download do IDE do Arduino , instale e execute.
  3. Conectamos o barco do ovo ao computador, selecionamos o modelo da placa e a porta COM no IDE do Arduino.
  4. Abra o arquivo Eggduino.ino da pasta com o firmware e carregue-o no Arduino.

O conhecido Inkscape com um plug-in escrito por Evil Mad Scientist Laboratories é usado como programa de controle. O plug-in permite que você personalize o eggbot, gerencie-o manualmente e envie fotos para imprimir. Eu adicionei cuidadosamente o plugin ao Inkscape e coloquei o arquivo final aqui .

Se você já possui o Inkscape, mas não há plug-in, pode levá-lo separadamente aqui .

Baixe, instale e execute o Inkscape. Vamos ao menu de plugins, procuramos o submenu EggBot lá. Abra o plug-in, ajuste a altura da caneta e imprima qualquer coisa no ovo.

Se você tiver o Inkscape ao tentar controlar o bot, com o erro "Falha ao conectar-se ao EggBot", não se desespere. O problema pode ser facilmente resolvido. Procure na lista de equipamentos conectados, qual é o nome da sua placa. Em seguida, no arquivo ebb_serial.py do plug-in Inkscape, substitua “USB-SERIAL CH340” pelo seu nome na linha 52.

Também coletei e enviei uma pequena coleção com exemplos. Você pode vê-lo aqui .

Como resultado, o barco de ovos deve funcionar assim:


Postei meu projeto no github . Garfo, colocar estrelas, modificar e assim por diante. Também não esqueci o thingiverse.com.

Obrigado pela atenção!

Source: https://habr.com/ru/post/pt403293/


All Articles