Skip to content

WEEK 12 Mechanical Design, Machine Design

FINAL OUTCOME:

idea.jpg

penholder.jpg

Initial Concept:

At first, I planned to participate in Flamingalo, the Portuguese version of Burning Man. My goal was to showcase an art installation: a cable robot that would travel between trees, carrying a light that projected dynamic shadows onto my sculpture. This setup was intended to create an immersive and poetic experience, blending robotics with natural surroundings.

sculpture1.jpg cablerobot.jpg

Unfortunately, I got sick and had to abandon those ambitious plans. So instead, we shifted direction and aligned our machine design project with my final project: the Cat’s Gym.

New Idea:

The Cat Communication Robot

Our revised concept was to build a drawing robot inspired by the Polargraph Plotter, but with a unique twist. The idea was to reimagine it as a medium for cat-to-human communication.

Concept

Cats communicate in subtle and complex ways. What if we could build a machine that could "translate" a cat’s meows into written messages for their human companions?

We imagined a robot that could recognize different cat vocalizations—like meows asking for food, attention, or a clean litter box—and interpret them. Then, it would draw or write a message on a piece of paper or wall, effectively becoming a "feline secretary."

While the actual voice recognition part was too advanced for this week’s scope, we focused on the mechanical design that would allow for such expressive drawing.


Mechanical Design:

Polargraph Plotter

The inspiration comes from this website https://www.instructables.com/Polargraph-Plotter/

The original Polargraph works by using two motors mounted at the top corners of a surface. These motors control the length of two cords or belts, which suspend a pen in between them. By precisely changing the lengths of these cords, the pen moves smoothly across a 2D surface, plotting images or text.

We adopted this basic idea, but adapted the design to match the aesthetics and thematic goals of the Cat Gym.

concept.jpg

catcut.jpg

paperholder.jpg

In the back there’s a space for paper roll.

Custom Mechanical Features

  1. Pen Holder with Rack and Pinion System

    I designed a custom pen holder featuring a rack and pinion system. This setup is controlled by a servo motor, allowing the pen to be lifted and lowered precisely. This is essential for drawing clean lines and separating strokes.

    penholdermodel.jpg

  2. Whisker-Inspired Sliding Mechanism

    To reinforce the "cat" theme, we added sliding counterweights that mimic the shape and movement of cat whiskers. These are attached to a timing belt system, which adds visual charm and helps balance the pen holder's motion.

  3. Frame & Mounting

    The motors are mounted on a vertical frame, similar to a traditional Polargraph. We used light plywood and 3D-printed parts to keep the structure simple and easy to assemble.


Polargraph Plotter Control

This part focuses on the hardware setup and software configuration for a polargraph plotter using an Arduino Uno R3, 28BYJ-48 stepper motors with ULN2003 driver boards, and a small servo motor.

catelectonics.jpg

Hardware Components

Required Components

  • Arduino Uno R3
  • 2× 28BYJ-48 Stepper Motors
  • 2× ULN2003 Driver Boards
  • 1× Small Servo Motor (SG90 or similar)
  • Power Supply (5-12V DC, at least 1A)
  • Jump Wires
  • Drawing Surface
  • Gondola (pen holder)
  • Dented Belts (for transmission)
  • Counterweights
  • Rack and Pinion System (for pen up/down movement)

Hardware Components All the required components for the polargraph plotter

Hardware Setup

electronics1.jpg

electronics2.jpg

Arduino and Motor Setup

  1. Gather the Arduino Uno R3, two 28BYJ-48 stepper motors with ULN2003 driver boards, and a small servo motor.
  2. Prepare a breadboard for connecting components during testing phase.
  3. Connect the external lab power supply to provide consistent power to the motors.

Transmission System

  1. Install dented belts for transmitting movement from the stepper motors to the gondola.
  2. Add counterweights on one side to balance with the gondola weight, ensuring smooth movement.
  3. The servo motor connects to a rack and pinion system that precisely controls the pen's up/down movement.

Hardware Components Arduino Uno R3, 28BYJ-48 steppers with driver boards, and servo motor

String Setupg Strings attached from gondola to stepper motors

Wiring Diagram

Arduino to Stepper Motor Connections

  • Left Stepper (ULN2003 Driver Board)
  • IN1 → Arduino Pin 8
  • IN2 → Arduino Pin 9
  • IN3 → Arduino Pin 10
  • IN4 → Arduino Pin 11
  • VCC → 5V (external power supply)
  • GND → GND (common ground with Arduino)

  • Right Stepper (ULN2003 Driver Board)

  • IN1 → Arduino Pin 4
  • IN2 → Arduino Pin 5
  • IN3 → Arduino Pin 6
  • IN4 → Arduino Pin 7
  • VCC → 5V (external power supply)
  • GND → GND (common ground with Arduino)

Arduino to Servo Connections

  • Signal → Arduino Pin 12
  • VCC → 5V (external power supply)
  • GND → GND (common ground with Arduino)

Power Supply Connections

  • Connect the external lab power supply to provide 5V to the stepper motor driver boards and servo
  • Ensure common ground between the power supply and Arduino
  • The 28BYJ-48 motors typically draw 150-200mA each at 5V
  • The servo may draw up to 500mA during operation

Wiring Diagram Complete wiring diagram showing all connections

Connection Notes

  • Make sure the stepper motor wires are connected in the correct order to the ULN2003 driver boards
  • The common ground connection between Arduino and power supply is essential
  • If using a higher voltage power supply (e.g., 12V), make sure to use a voltage regulator to provide 5V to the components
  • When testing, secure all wires properly to prevent accidental disconnection

Test Software

Before implementing the full IPAD solution, it's essential to test the hardware components individually. The following Arduino test sketch allows you to verify the connections and proper functioning of both stepper motors and the servo.

// Polargraph Components Test Sketch
// Tests 28BYJ-48 stepper motors and servo on specified pins

#include <Stepper.h>
#include <Servo.h>

// Define stepper parameters
const int stepsPerRevolution = 2048;  // 28BYJ-48 steps per revolution with gear reduction
Servo penServo;

// Initialize left stepper on pins 8, 10, 9, 11 (this order is important for proper rotation)
Stepper leftStepper(stepsPerRevolution, 8, 10, 9, 11);

// Initialize right stepper on pins 4, 6, 5, 7 (this order is important for proper rotation)
Stepper rightStepper(stepsPerRevolution, 4, 6, 5, 7);

// Servo setup on pin 12
int servoPin = 12;
int penUp = 90;   // Adjust these angles based on your setup
int penDown = 140;

void setup() {
  // Set stepper motor speed (RPM)
  leftStepper.setSpeed(10);  // 10 RPM is a good starting speed for testing
  rightStepper.setSpeed(10);

  // Initialize servo
  penServo.attach(servoPin);
  penServo.write(penUp);  // Start with pen up

  // Initialize serial for debugging
  Serial.begin(9600);
  Serial.println("Polargraph Components Test");
  Serial.println("Commands: 'L' - Left stepper, 'R' - Right stepper, 'U' - Pen up, 'D' - Pen down, 'B' - Both steppers");
}

void loop() {
  // Check if there's any incoming serial data
  if (Serial.available() > 0) {
    char command = Serial.read();

    switch (command) {
      case 'L':
      case 'l':
        // Test the left stepper motor with 1/4 rotation in each direction
        Serial.println("Testing left stepper - 1/4 rotation clockwise");
        leftStepper.step(stepsPerRevolution / 4);  // 512 steps = 1/4 rotation
        delay(500);
        Serial.println("Testing left stepper - 1/4 rotation counter-clockwise");
        leftStepper.step(-stepsPerRevolution / 4);
        break;

      case 'R':
      case 'r':
        // Test the right stepper motor with 1/4 rotation in each direction
        Serial.println("Testing right stepper - 1/4 rotation clockwise");
        rightStepper.step(stepsPerRevolution / 4);
        delay(500);
        Serial.println("Testing right stepper - 1/4 rotation counter-clockwise");
        rightStepper.step(-stepsPerRevolution / 4);
        break;

      case 'U':
      case 'u':
        // Move the servo to pen-up position
        Serial.println("Pen up");
        penServo.write(penUp);  // 90 degrees by default
        break;

      case 'D':
      case 'd':
        // Move the servo to pen-down position
        Serial.println("Pen down");
        penServo.write(penDown);  // 140 degrees by default
        break;

      case 'B':
      case 'b':
        // Test both steppers simultaneously for coordinated movement
        Serial.println("Testing both steppers simultaneously");
        // Move both steppers forward simultaneously
        for (int i = 0; i < (stepsPerRevolution / 8); i++) {
          leftStepper.step(1);
          rightStepper.step(1);
        }
        delay(500);
        // Move both steppers backward simultaneously
        for (int i = 0; i < (stepsPerRevolution / 8); i++) {
          leftStepper.step(-1);
          rightStepper.step(-1);
        }
        break;
    }
  }
}

How to Use the Test Software

  1. Connect the Arduino to your computer via USB.
  2. Make sure all hardware connections match the wiring diagram.
  3. Open the Arduino IDE and upload the sketch.
  4. Open the Serial Monitor (Tools → Serial Monitor, set to 9600 baud).
  5. Send the following single-character commands to test each component:
  6. L to test the left stepper motor (connected to pins 8,9,10,11)
  7. R to test the right stepper motor (connected to pins 4,5,6,7)
  8. U to move the servo to pen-up position
  9. D to move the servo to pen-down position
  10. B to test both stepper motors simultaneously

What to Look For During Testing

  • Stepper Motors: Should rotate smoothly without stuttering or skipping steps
  • Servo: Should move reliably between up and down positions
  • Power Supply: Should provide stable voltage and current during operation
  • Temperature: Components should not overheat during testing

Testing Setupg Testing the hardware components before full assembly

IPAD Software Installation

This polargraph setup uses the IPAD (Improved Polargraph Art Device) firmware from https://github.com/zanedrys/IPAD. Follow these steps to install and configure the software:

Step 1: Install Required Software

  1. Download and install the Arduino IDE from arduino.cc
  2. Download and install Processing from processing.org
  3. Clone or download the IPAD repository from GitHub

Step 2: Install Required Arduino Libraries

  1. Open the Arduino IDE
  2. Go to Sketch → Include Library → Manage Libraries
  3. Search for and install the following libraries:
  4. AccelStepper (for improved stepper motor control)
  5. Servo (for pen control)

Step 3: Upload the IPAD Firmware

  1. Open the IPAD_Firmware.ino file from the downloaded repository
  2. Modify the pin assignments in the code to match your specific setup:
    // Modify these lines to match your pin connections
    // Left stepper on pins 8,9,10,11
    #define LEFT_STEP_PIN1 8
    #define LEFT_STEP_PIN2 9
    #define LEFT_STEP_PIN3 10
    #define LEFT_STEP_PIN4 11
    
    // Right stepper on pins 4,5,6,7
    #define RIGHT_STEP_PIN1 4
    #define RIGHT_STEP_PIN2 5
    #define RIGHT_STEP_PIN3 6
    #define RIGHT_STEP_PIN4 7
    
    // Servo on pin 12
    #define SERVO_PIN 12
    
  3. Make sure the Arduino is connected to your computer via USB
  4. Select the correct board (Arduino Uno) and port in the Arduino IDE
  5. Upload the firmware to your Arduino

Step 4: Configure and Run the IPAD Processing Controller

  1. Open Processing
  2. Open the IPAD_Controller.pde file from the downloaded repository
  3. In the IPAD_Controller.pde file, find the configuration section and make sure:
  4. The COM port matches your Arduino's connection
  5. The machine dimensions match your physical setup
  6. The motor specifications match the 28BYJ-48 steppers
  7. Run the Processing sketch to open the IPAD control interface

IPAD Software Interface IPAD software control interface showing drawing controls

IPAD Software Implementation

Using IPAD with Your Hardware

  1. The IPAD software provides a much more advanced control system than the test sketch
  2. Key features of IPAD when used with your hardware:
  3. Vector drawing support
  4. Advanced path planning
  5. Better motor control and acceleration handling
  6. GUI interface for easy control

Important IPAD Configuration Options

When working with the IPAD software, pay special attention to:

  1. Machine Settings in Processing Controller
  2. Set the correct COM port for your Arduino
  3. Configure the machine width and height
  4. Set the motor steps per revolution (2048 for 28BYJ-48)
  5. Adjust the microstepping settings if you modified the firmware

  6. Motor Settings

  7. Set the correct motor speed (start with 500-800 steps/min for the 28BYJ-48)
  8. Set acceleration values (typically 100-200 steps/sec² for 28BYJ-48)
  9. If motors skip steps, reduce speed and increase power supply current

  10. Pen Settings

  11. Configure servo up/down positions (typically between 70-150 degrees)
  12. Set pen lift and lower delay (200-500ms recommended)

IPAD Settings Panel IPAD software settings panel showing configuration options

References and Resources

CHECKLIST:

Group assignment:

PART 1/2

  • Design a machine that includes mechanism + actuation + automation + application
  • Build the mechanical parts and operate it manually
  • Document the group project

PART 2/2

  • Actuate and automate your machine
  • Document the group project

Individual assignment:

  • Document your individual contribution

Learning outcomes:

  • Work and communicate effectively as a team
  • Design, plan and build a machine
  • Analyse and solve technical problems
  • Recognise opportunities for improvements in the design

Have you answered these questions?

  • Documented the machine building process to the group page
  • Documented your individual contribution to this project on your own website
  • Linked to the group page from your individual page as well as from group page to your individual pages
  • Shown how your team planned, allocated tasks and executed the project (Group page)
  • Described problems and how the team solved them (Group page)
  • Listed possible improvements for this project (Group page)
  • Included your design files (Group page)
  • You need to present your machine globally and/or include a 1 min video (1920x1080 HTML5 MP4) + slide (1920x1080 PNG) (Group page)