Back to Home Page

1. Group Assingment

The full group assignment can be found here

I started the week working on installation of the firmware in the controller thereafter, I though I could use more practice in CAD design and switch to the design of the Gondola.

Ender II Firmware installation

Initially, we attempted to re purpose the controller from an old Ender 2 for our project. I removed the controller board along with some of the motors. Our first task was to install new firmware onto the controller board.

There were several possible versions of the controller board, but we identified ours as the one based on the ATmega1284P. After that, we asked ChatGPT how to install the firmware, and it directed us to this site:

First, we attempted to install the firmware using the Arduino IDE. Unfortunately, the controller was not recognized by the IDE.

Next, we attempted to use an Arduino Uno as a bootloader by connecting its ICSP port to the ISP header on the Ender’s controller board. Unfortunately, this method was also unsuccessful, and we were still unable to install the firmware.

Finally, we decided to use specific pins on the Arduino Uno to connect directly to the ISP header on the Ender’s controller board, as shown in the picture below.

Luckily, this method worked. The issue earlier was likely due to a mismatch between the ISP pins on the Arduino and those on the Ender’s controller board.

The steps from the IDE side to install the software were:

Here the board firmawer was dowloaded from:

Sanguino firmware

Thereafter, we tried to install a software to see if we could blink a led.

This took a while as the information in regards to which pin was connected to the pin was not available. We had to install the program through arduino using Arduino as a programmer.

Gondola

The gondola is a base that is attached to the servo motors using belts or threads. It holds both a pen for drawing and a motor for lifting the pen.

For the pen-lifting mechanism, I explored various designs and found this one particularly interesting (link).

I designed the gondola in Fusion 360, focusing on three key elements:

The motor used for lifting the pen is micro servo SG90 from an Arduino kit:

To accurately position the motor within the gondola, I used a Fusion 360 model I found online as a reference (link)

Penholder

In Fusion 360, I built the components using parametric design, allowing me to easily modify the bodies as needed. Below, you can see the sketch of the pen holder along with its sleeve.

Afterward, I designed and built the pen lifter piece. To do this, I created a gear-shaped outline to cut into the pen lifter piece, allowing it to securely fit onto the motor shaft.

Next, I designed two round belt holders. The groove that holds the belt features a dented pattern, created by drawing a series of triangles to match the tooth profile of a 6 mm wide GT2 timing belt.

Here, you can find a belt fit test.

Finally, here is the finished model. I added fillets to the pen holder to make its insertion into the sleeve smoother and easier.

Then I proceeded to print the gondola in a bambulab 3d printer.


For the pen holder, I added a metal insert, allowing a bolt to securely hold the pen in place.

To determine the correct angle for the servo motor, I used the following Python script and followed its accompanying instructions (link).

# More details can be found in TechToTinker.blogspot.com 
# George Bantique | tech.to.tinker@gmail.com

from machine import Pin
from machine import PWM
from time import sleep_ms

def map(x, in_min, in_max, out_min, out_max):
    return int((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min)
    
class GORILLACELL_SERVO:
    def __init__(self, signal_pin):
        self.pwm = PWM(Pin(signal_pin), freq=50, duty=0)

    def rotate(self, angle):
        self.pwm.duty(map(angle, 0, 180, 23, 124))
        

servo = GORILLACELL_SERVO(signal_pin=25)

# The following lines of codes can be tested using the REPL:
# # To rotate the servo motor to 0 degrees
# servo.rotate(0)
# 
# # To rotate the servo motor to 90 degrees
# servo.rotate(90)
# 
# # To rotate the servo motor to 180 degrees
# servo.rotate(180)
# 
# # To rotate the servo from 0 to 180 degrees
# # by 10 degrees increment
# for angle in range(0, 181, 10):
#     servo.rotate(angle)
#     print(angle)
#     sleep_ms(500)
# # To rotate the servo from 180 to 0 degrees
# # by 10 degrees decrement
# for angle in range(180, -1, -10):
#     servo.rotate(angle)
#     print(angle)
#     sleep_ms(500)


Below you can find a test of the pen lifting mechanism

Then we went on installign the last printed version of the Gondola on to the structure that was built. For this a couple of 6mm belts were attached connecting it to the 2 stepper motors.

We used some nuts and bolts to find the right balance of the gondola on the structure system previously built.

Finally, after full implementation we could see that the pen would touch the paper.

Micropython Polargraph

prompt give me the maths for polargraph

A polargraph (or polar plotter) is a type of drawing machine that works using two stepper motors, typically mounted at the top corners of a board. A pen is suspended by strings (or belts) attached to the motors, and the pen’s position is determined by the lengths of these strings.

To control a polargraph, you need math to convert between Cartesian coordinates (x,y) and the string lengths L1 and L2 going to the motors.

Lets define

Motor 1 at (0,0) Motor 2 at (w,0) where w is the distance between the motors Pen at (x,y) measured from Motor 1.

\[L_1=x^2+y^2\]

\[L_2=\sqrt{(w-x)^2+y^2}\]

Where L1 amd L2 are the lengths we want to sove for (x,y)

This is a circle intersection problem:

circle 1: center at (0,0) radius L1 circle 2: center at (0,0) radius L2

find the distance between the motor centers

d=w

\[ a = \frac{L^2_{1}-L_{2}^2+d^2}{2d} \] \[ h = \sqrt{L_{1}^2-a^2} \]

Pen coordinates

x=a

y=h

motors w=300 apart pen is at (150,100)

L1 = sqrt(1502+1002) = 180.28 L2 = sqrt(3000-150) = 180.28



https://www.thingiverse.com/thing:913582

https://www.printables.com/model/201405-28byj-48-stepper-motor-mount/files

Files

Tittle

Go to top

```