# Mechanical Design, Machine Design#

• Group assignment:

• Design a machine that includes mechanism + actuation + automation

• Build the mechanical parts and operate it manually.
• Document the group project
• Actuate and automate your machine.
• Document the group project

## Presentation Video#

1:00min, 10.4MB, H.264, Average Bitrate 1200 kbits/sec

## Concept#

We created an simple, entertaining, and - we hope funny - machine. The Fruity Secret Messenger.

The machine is the implementation of a simple, silly idea we had on the first weekend session. Let’s create (another!) drawing machine, but with a twist! Can we use lemon (lime, orange, grapefruit, etc) juice as a drawing liquid? And can we use a heat-bed to make the invisible drawing visible?

## Design and Prototyping#

We dismantled the extruder. The stepping motor rotates, and the combination of gears and hobs feeds the filament to the heat end.

For squeezing fruits, we decided to use stepping motor and gear rotation. A stepping motor can be rotated by G-Code, E numbers. We made rapid prototypes by paper, cardboard, and 4mm MDF board.

## End Effector Improvement#

The prototype stage was not strong enough, so it was redesigned several times and formed as a single piece using a 3D printer. Also designed end effector in openSCAD.

## G-Code Function#

Command Function
G0 Move Fast
G1 Move
G2, G3 Circular Move
G28 Home all axes
M302 S0 allow cold extrusion
M82 Set extruder to absolute mode
G92 Set current position as origin

Inkscape has a G-Code output extension, but it’s not suitable for 3D printing. We have to correct some codes on it.

• To move end effector’s motor, we need to enable cold extrusion by M302 S0

• If you set more than 6 parameters in G02,G03 commands , the machine will stop working ( I don’t know why…).

• It was not possible to get a negative value in the Z axis. I solved the problem by using a place floating only (num) from the bed as the Z origin with G92 Z(num) and making it a number less than or equal to (num).

## Cleaning and Modifying G-code in Python#

• Problem : The G-code exported from Inkscape is not suitable for driving our machine.
• Solution:Write a Python script that removes the Z codes and adds E codes.
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 #!/usr/bin/env python3 inputFile = open("kamakura_0001.ngc", "r") outputFile = open("kamakura_e.ngc", "w") # add E values a = list(range(10)) b = list(range(9)) b.reverse() l = a + b lineNr = 0 for line in inputFile: values = line.split() i = 0 for v in values: firstLetter = v[0].upper() # remove Z values at 3 if (i == 3 and firstLetter == 'Z'): values[i] = '' # remove F values at 6 if (i == 6 and firstLetter == 'F'): values[i] = '' # increment i = i + 1 # add E to end if len(values) > 0: if (values[0][:3] == 'G02'): e = l[lineNr % len(l)] values.append('E' + str(e)) lineNr = lineNr + 1 # filter empty list entries newValues = list(filter(None, values)) # join list to string newValues = ' '.join(newValues) + "\n" # print to console #print(newValues) #write to output file outputFile.writelines(newValues) 

## Possible Future Plan#

• The initial plan was to use a heat bed to heat the paper, but the temperature was not high enough. If we had changed to a more capable heat bed, we could have seared the letters without using a hot plate.
• If we use multi head and different fruits, we can control time difference between multi messages.
• (We have to restore machine to original 3D printer … lol)