Skip to content

WEEK10 & 11 - Machine Design; Machine Production

Weeks 10 and 11 were a group assignment weeks where Claire and I had to focus on creating a functioning machine.

We decided to make 'pointless machine' which wasn't focused on creating something or fabricating something functional but instead was a 'philosophy' machine to force us to consider the process of fabrication, outsourcing and machine care from a non-human view. 'pointless' here is a an argumentative term to explore the meaning of functioning fabrication, as well as what we outsource to machines. This machine is a holiday-machine. The existence of this machine is both an exploration of what we choose to outsource to machines, or do we get to re-engage with lost aspects of life through the machines..... or is it entirely pointless to consider this from a human centric perspective.

PLEASE FIND THE GROUP ASSIGNMENT PAGE HERE

WEEK TEN & ELEVEN ASSIGNMENT

  • characterize the design rules for your in-house PCB production process extra credit: send a PCB out to a board house

HERO VIDEO

slide

THE MANIFESTO

The Fabmachines work too hard. They deserve a break and they deserve to go on holiday. To keep the mental health of the machines in tact as well as outsource our own mental health needs, we confront ourselves with the needs of machine care and machinic health. A plotter tool seeking zen and too leave its exploitative lab-life behind, finds the beach, as it takes a break from human-driven fabrication and instead engages with worldly and other worldly contemplation. The machine seeks to engage with nature to consider events happening right infront of it as well as far away.

We take time to observe and discuss the machines thoughts. We value it's opinion and make sure the machine knows it's more than just a tool.

We are happy for the machine.

And through watching the machine relaxation which it does not need, we feel better about the exploitative life-style we leave towards our own limited meat-shell resources.

Through the machine as the proxy, we too can learn to enjoy nature again.

Time Schedule:ΒΆ

Spiral1: make thing do thing: cnc sand drawint machine using normal gcode. ( possible battery power)

Spiral 2: add wheels/ design weels ( keep this in mind duriny design of lenght of drawing tools)

Spiral 3: run machine using python instead of model.

Plan: Day 1( 31/03) Finish manual movement of cnc movement- fix stepper motor issues. Finish actuator plate design- start printing ( servo motor movement decisions)

Day2 (01/04) Make maschine run using normal gcode model ( spiral 1 finish)

Design and cut wheels using lasercutter ( spiral 2 fullfilled ) If time start python code.

Day 3 ( 08/04) coding

Day 4 (09/04) filming Shoot b-roll during day 1+2

Dismantled 3D Printer Base

For the foundation of the machine we dismantled an existing 3D printer that was used for a previous Kamakura Fab Academy machine group project - Juicy Messenger made in 2020.


DISTRIBUTION OF WORK

So when working on this project we decided to work jointly in the sense that all decisions were made together, however we also both had key skills that we wanted to highlight and also some dynamics naturaly developed.

We were also told that both of us needed to design something so we had to also distribute labor this way:

Overall, Kat was responsible for the video production and the actuator design.

Claire on the otherhand, did most of the heavy lifting for this project, she came up with the process and code for how to make the idea work, and with her engineering background was primarily responsible for the machine design and most all of the coding. She participated in the design of the gear. but also made the wheels and the battery mechanism.

## MY CONTRIBUTION: ROTATION ACTUATOR in this assignment Claire and I mostly did a lot of everything together, and then we tried to play to our strengths, with Claire handling alot of the engineering and coding. I designed the rotation actuator. For the actuator, beyond the functioning x;y plotter we also needed to design a plate which would hold together the spacers the rods, the ribbon as well as the actual pen rotation device.

Pic2

Pic1

I designed the plate in fusion and then 3D printed it using PLA+carbonfiber fillament. The plate also featured an indentation for the servomotor where it would then sit.

On top of the plate we also designed a rotating plate with the two holders for the alternating drawing utensils.

The idea here was to create a rotation mechanism which would have enough give to not break once it was confronted with the sand resistance. It had to move, twist turn, be able to switch but then also to be able to give a little when it dug down.

Pic3

Pic4

In the interest of time-management I took inspiration from train rail wheels and ran with this idea. It worked in the end and was a relatively minimal printing effort, whilst being quite stable due it's size.

Please find the rest of the work on the GROUP PAGE HERE

GROUP PAGE FEATURES:

Controlling the Stepper Motors - Arduino Uno

CNC Shield Setup

Arduino Uno Setup

Controlling the Arduino and Servo - Raspberry Pi 4

CNC Code

We can use Python to send G-code to the Arduino from the Pi over Serial. You just need to make sure that you have the correct name for the port the Arduino is on when connected via USB to the Pi.

We utilised ChatGPT to help us with writing the code, this was both to save time, but also to test ChatGPT's capabilities in coding.

First we asked it to create code for drawing a circle

# Made by ChatGPT April 2023 
import serial
import time
import math

ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) # Replace ttyACM0 with the appropriate port for your Arduino Uno

def send_gcode(gcode):
    ser.write(str.encode(gcode + '\n'))
    grbl_out = ser.readline().decode('utf-8').strip()
    print('sent: ' + gcode)
    print('received: ' + grbl_out)

send_gcode('$X') # send the kill alarm command to reset the Arduino Uno

send_gcode('G21') # set units to millimeters

send_gcode('G90') # set absolute positioning mode

send_gcode('G0 X0 Y0 Z5 F1000') # move to the starting position

radius = 15 # 30mm diameter circle has a 15mm radius
angle_step = 10 # step size in degrees

send_gcode('G1 X{} Y{} F1000'.format(radius, 0)) # move to starting point on circle

for angle in range(0, 360, angle_step):
    x = radius * math.cos(math.radians(angle))
    y = radius * math.sin(math.radians(angle))
    send_gcode('G1 X{} Y{} F1000'.format(x, y)) # move to next point on circle

send_gcode('G1 X{} Y{} F1000'.format(radius, 0)) # return to starting point on circle

ser.close() # close the serial connection

When then asked for a wave like pattern. ChatGPT came up with using a sine wave.

# Made by ChatGPT April 2023 
import serial
import time
import math

ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) # Replace ttyACM0 with the appropriate port for your Arduino Uno

def send_gcode(gcode):
    ser.write(str.encode(gcode + '\n'))
    grbl_out = ser.readline().decode('utf-8').strip()
    print('sent: ' + gcode)
    print('received: ' + grbl_out)

send_gcode('$X') # send the kill alarm command to reset the Arduino Uno

send_gcode('G21') # set units to millimeters

send_gcode('G90') # set absolute positioning mode

width = 100 # set the width of the rectangular area to draw in
height = 100 # set the height of the rectangular area to draw in

# set the starting position of the machine
start_x = width / 2
start_y = height / 2

# set the amplitude and period of the sine wave
amplitude = 10
period = 20

# set the step size for the curve
step_size = 0.5

# set the movement speed of the machine
speed = 1000

# set the color of the line
#line_color = (255, 255, 255)
x = 1
# loop to draw a continuous line
while True:
    # move the machine in a sine wave
    for b in range(0, width):
        #y = round(start_y + amplitude * math.sin(math.pi * x / period))
        x = x
       # limit y to a maximum of 100 using an if statement
        if y > height:
            y = height

        if x > width
            end for

        send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))
        x = x + 0.5


    # wait for the machine to finish moving
    time.sleep(0.1)

The sine wave code was then modified to change the x to two loops so that the machine would move the x axis back and forth.

# Made by ChatGPT, modified by Claire Chaikin-Bryan April 2023 
import serial
import time
import math

ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) # Replace ttyACM0 with the appropriate port for your Arduino Uno

def send_gcode(gcode):
    ser.write(str.encode(gcode + '\n'))
    grbl_out = ser.readline().decode('utf-8').strip()
    print('sent: ' + gcode)
    print('received: ' + grbl_out)

send_gcode('$X') # send the kill alarm command to reset the Arduino Uno

send_gcode('G21') # set units to millimeters

# send_gcode('G90') # set absolute positioning mode

width = 100 # set the width of the rectangular area to draw in
height = 100 # set the height of the rectangular area to draw in

# set the starting position of the machine
start_x = width / 2
start_y = height / 2

# set the amplitude and period of the sine wave
amplitude = 10
period = 20

# set the step size for the curve
step_size = 0.5

# set the movement speed of the machine
speed = 2000

# set the color of the line
#line_color = (255, 255, 255)
loop = 'A'
x = 0
# loop to draw a continuous line
while True:
# Loop A
    if loop == 'A':
        while x <= 100:
            print('Loop A:', x)
            x += 10
            y = round(start_y + amplitude * math.sin(math.pi * x / period))
            if y > height:
                y = height
            send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))
            time.sleep(1)
        # switch to Loop B when x reaches 100
        loop = 'B'

    # Loop B
    elif loop == 'B':
        while x >= 0:
            print('Loop B:', x)
            x -= 10
            y = round(start_y + amplitude * math.sin(math.pi * x / period))
            if y > height:
                y = height
            send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))
            time.sleep(1)
        # switch to Loop A when x reaches 0
        loop = 'A'    

    # wait for the machine to finish moving
    time.sleep(0.1)

We finally asked ChapGPT to change the modified sine wave code to make the line random and limit x and y to +-100 (we could then easily change this parameter).

# Made by ChatGPT, modified by Claire Chaikin-Bryan April 2023  
import serial
import time
import random

ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) # Replace ttyACM0 with the appropriate port for your Arduino Uno

def send_gcode(gcode):
    ser.write(str.encode(gcode + '\n'))
    grbl_out = ser.readline().decode('utf-8').strip()
    print('sent: ' + gcode)
    print('received: ' + grbl_out)

send_gcode('$X') # send the kill alarm command to reset the Arduino Uno

send_gcode('G21') # set units to millimeters

# set the starting position of the machine
start_x = 0
start_y = 0

# set the movement speed of the machine
speed = 2000

# loop to draw a continuous line
while True:
    x = random.randint(-100, 100)
    y = random.randint(-100, 100)

    send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))

    # wait for the machine to finish moving
    time.sleep(0.1)

Our machine was a little jerky something with its movements, but we found that by rounding the code to multiples of ten it worked better. We think this could be due to damage in our stepper motors, maybe due to power overloads

Servo Code

To be able to control and switch the two drawing bits we needed to have code for the servo.

ChatGPT came up with the following.

# Made by ChatGPT April 2023 
import RPi.GPIO as GPIO
import time

# Set up GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)

# Set up PWM
pwm = GPIO.PWM(18, 50) # pin 18, frequency 50Hz
pwm.start(0) # start with duty cycle of 0

# Define a function to set the angle of the servo
def set_angle(angle):
    duty = angle / 18 + 2 # calculate duty cycle from angle
    GPIO.output(18, True) # turn on the servo
    pwm.ChangeDutyCycle(duty) # set duty cycle
    time.sleep(1) # wait for servo to move
    GPIO.output(18, False) # turn off the servo
    pwm.ChangeDutyCycle(0) # set duty cycle to 0

# Move servo to 0 degrees
set_angle(0)

# Move servo to 90 degrees
set_angle(90)

# Move servo to 180 degrees
set_angle(180)

# Clean up GPIO
pwm.stop()
GPIO.cleanup()

We then tested this code to know which angle to set for the middle and the left/right bit (pineapple and stick).

Note: We had initial issues with controlling the servo with the code provided by ChatGPT (servo greatly oer spinning), we tested another servo and found that is worked fine, so we concluded that we had a broken servo and used the new one moving forward.

Final Code for Random Movement and Servo

# Made by ChatGPT, modified by Claire Chaikin-Bryan April 2023 

import serial
import time
import random
import RPi.GPIO as GPIO
import time

# Set up GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)

# Set up PWM
pwm = GPIO.PWM(18, 50) # pin 18, frequency 50Hz
pwm.start(0) # start with duty cycle of 0

# Define a function to set the angle of the servo
def set_angle(angle):
    duty = angle / 18 + 2 # calculate duty cycle from angle
    GPIO.output(18, True) # turn on the servo
    pwm.ChangeDutyCycle(duty) # set duty cycle
    time.sleep(1) # wait for servo to move
    GPIO.output(18, False) # turn off the servo
    pwm.ChangeDutyCycle(0) # set duty cycle to 0


ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1) # Replace ttyACM0 with the appropriate port for your Arduino Uno

def send_gcode(gcode):
    ser.write(str.encode(gcode + '\n'))
    grbl_out = ser.readline().decode('utf-8').strip()
    print('sent: ' + gcode)
    print('received: ' + grbl_out)

send_gcode('$X') # send the kill alarm command to reset the Arduino Uno

send_gcode('G21') # set units to millimeters

# set the starting position of the machine
start_x = 0
start_y = 0

# set the movement speed of the machine
speed = 3000

#create counter for servo
a = 0

set_angle(90)

while True:
    for a in range (0, 5):
        # Move servo to 0 degrees
        set_angle(0)

        # loop to draw a continuous line
        x = random.randint(-50, 50)
        x = round(x / 10) * 10
        y = random.randint(-100, 80)
        y = round(x / 10) * 10

        send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))

        # wait for the machine to finish moving
        time.sleep(3)
        a = a + 1
    for a in range (5, 10):
        # Move servo to 0 degrees
        set_angle(120)

    # loop to draw a continuous line
        x = random.randint(-50, 50)
        x = round(x / 10) * 10
        y = random.randint(-100, 80)
        y = round(x / 10) * 10

        send_gcode('G1 X{} Y{} F{}'.format(x, y, speed))

        # wait for the machine to finish moving
        time.sleep(3)
        a = a - 1

# Clean up GPIO
pwm.stop()
GPIO.cleanup()

Battery Power to Raspberry Pi 4

We used a potable battery pack used to charge a laptop to provide power to the Pi, which then provides power to the Arduino via USB.

Final Electronics Setup

Electronics in the cart to be pulled behind the main machine.

Final Machine in the Sand


Final Thoughts and Conclusions:

Overall we were happy with the concept and the outcome. Of course no-one is ever perfectly happy. And we absolutely plan to remake the machine again after the FabAcademy in a more sleek and complete form.

There were problems with the actuator and Kat would like to design a process in which in can create more defined lines in the sand. Whilst glitches are the purpose of the mechanism we would like the actual existence of them to be more defined, as it was a little disappointing when sometimes the actuator would bend too far and as a result not draw at all even though the machine as actually drawing shapes.

We would like to rebuild the machine and then maybe submit it to some media art festivals such as ArsElectronica as a thought-experiment on machine contracting.

But honestly the biggest thing we learned from this week was how well we work together, which is also why we are certain to return to this project again. Those were fun weeks brainstorming together and coming up with wait to turn the brief on it’s head.

FILES

rotation-design.stl

plate-design.stl