Week 12: Mechanical & Machine Design

Table of Contents

[[[hero shot]]]

[[[summary 2 to 3 sentences]]] …

This Week’s Tasks

Mechanical Design (part 1 of 2)

  • Group assignment:
    • Design a machine that includes mechanism + actuation + automation + application.
    • Build the mechanical parts and operate it manually.
    • Document the group project.
  • Individual assignment:
    • Document your individual contribution.

Machine Design (part 2 of 2)

  • Group assignment:
    • Actuate and automate your machine
    • Document the group project
  • Individual assignment:
    • Document your individual contribution

Group Page

This assignment was done in a group. The whole documentation can be reached via the above link.

Mechanical Design

Modeling

Cable Carriers

Assembly

robustheit von referenzen in absteigender stabilität

  • koord sys

  • ebenen, punkte, achsen

  • flächen von bauteilen,

  • kanten von bauteilen

  • 6 freiheitsgrade

  • koaxial

  • aufpassen: freiheitsgrade wegnehmen

  • schrauben: koax constraint und fläche fläche contraint

revolute

  • bleibt auf einer höhe und kann sich drehen aber schränkt z richtung ein
  • zylindrische verbindung erlaubt noch axiale bewegung

ferdi: manteflächen auswählen ist auch möglich und besser.

  • wir machen ein skelettmodell

    • davon sind alle anderen abhängig
    • da kann auch nur das spreadsheet drin sein
  • fasteners workbench

    • first choose type of fastener
    • add it to your freecad project by clicking the icon
    • then adjust details (diameter, length etc.)

Actuation

machine

  • ramps kit: basic interface, needed in any case

  • ramps

    • https://reprap.org/wiki/RAMPS_1.4
    • motor driver https://www.pololu.com/product/2133
      • direction, step, enable pins
    • you could set up those and just use them
    • each of this violet board is for driving a motor
    • we need only three
    • but for now put all 5 on it just so they are not flying around
    • putting jumpers on the polulu to configure the drivers
  • put a firmware on the arduino

    • marlin
  • i now do the ramps stuff

  • the higher those are the more power thay can provide

  • how to? -> https://reprap.org/wiki/RAMPS_1.4]

    • originally for 3d printers. this is why there is heater stuff on it (mosfets, sicherungen…)
    • how to assemble stuff
  • power supply

    • connect 12 v output to 5A input. this is for driving the motors and the rest of the components. 11A is used for heatbed, we dont have one.

    • ramps powers arduino as well.

    • there is a resistor that needs to be adjusted

    • programming?

  • motor has 4 cables

  • identify which caples correspond to which coil

  • identify polarity

marlin firmware

  • out of the box support for ramps boards

  • before installing, use ramps test code (provided by ramps)

  • connect motor & endstop switch

  • find out pairs: measuring current. current is induced when turning if both are connected to one coil, current can be measured

  • pairs are:

    • blue, red
    • green, black
  • find out polarity

this code makes steps, stops steps, makes steps stops steps etc.

  1#define X_STEP_PIN         54
  2#define X_DIR_PIN          55
  3#define X_ENABLE_PIN       38
  4#define X_MIN_PIN           3
  5#define X_MAX_PIN           2
  6
  7#define Y_STEP_PIN         60
  8#define Y_DIR_PIN          61
  9#define Y_ENABLE_PIN       56
 10#define Y_MIN_PIN          14
 11#define Y_MAX_PIN          15
 12
 13#define Z_STEP_PIN         46
 14#define Z_DIR_PIN          48
 15#define Z_ENABLE_PIN       62
 16#define Z_MIN_PIN          18
 17#define Z_MAX_PIN          19
 18
 19#define E_STEP_PIN         26
 20#define E_DIR_PIN          28
 21#define E_ENABLE_PIN       24
 22
 23#define Q_STEP_PIN         36
 24#define Q_DIR_PIN          34
 25#define Q_ENABLE_PIN       30
 26
 27#define SDPOWER            -1
 28#define SDSS               53
 29#define LED_PIN            13
 30
 31#define FAN_PIN            9
 32
 33#define PS_ON_PIN          12
 34#define KILL_PIN           -1
 35
 36#define HEATER_0_PIN       10
 37#define HEATER_1_PIN       8
 38#define TEMP_0_PIN          13   // ANALOG NUMBERING
 39#define TEMP_1_PIN          14   // ANALOG NUMBERING
 40
 41void setup() {
 42  pinMode(FAN_PIN , OUTPUT);
 43  pinMode(HEATER_0_PIN , OUTPUT);
 44  pinMode(HEATER_1_PIN , OUTPUT);
 45  pinMode(LED_PIN  , OUTPUT);
 46
 47  pinMode(X_STEP_PIN  , OUTPUT);
 48  pinMode(X_DIR_PIN    , OUTPUT);
 49  pinMode(X_ENABLE_PIN    , OUTPUT);
 50
 51  pinMode(Y_STEP_PIN  , OUTPUT);
 52  pinMode(Y_DIR_PIN    , OUTPUT);
 53  pinMode(Y_ENABLE_PIN    , OUTPUT);
 54
 55  pinMode(Z_STEP_PIN  , OUTPUT);
 56  pinMode(Z_DIR_PIN    , OUTPUT);
 57  pinMode(Z_ENABLE_PIN    , OUTPUT);
 58
 59  pinMode(E_STEP_PIN  , OUTPUT);
 60  pinMode(E_DIR_PIN    , OUTPUT);
 61  pinMode(E_ENABLE_PIN    , OUTPUT);
 62
 63  pinMode(Q_STEP_PIN  , OUTPUT);
 64  pinMode(Q_DIR_PIN    , OUTPUT);
 65  pinMode(Q_ENABLE_PIN    , OUTPUT);
 66
 67   digitalWrite(X_ENABLE_PIN    , LOW);
 68    digitalWrite(Y_ENABLE_PIN    , LOW);
 69    digitalWrite(Z_ENABLE_PIN    , LOW);
 70    digitalWrite(E_ENABLE_PIN    , LOW);
 71    digitalWrite(Q_ENABLE_PIN    , LOW);
 72}
 73
 74
 75
 76
 77
 78void loop () {
 79
 80  if (millis() %1000 <500)
 81    digitalWrite(LED_PIN, HIGH);
 82  else
 83   digitalWrite(LED_PIN, LOW);
 84
 85  if (millis() %1000 <300) {
 86    digitalWrite(HEATER_0_PIN, HIGH);
 87    digitalWrite(HEATER_1_PIN, LOW);
 88    digitalWrite(FAN_PIN, LOW);
 89  } else if (millis() %1000 <600) {
 90    digitalWrite(HEATER_0_PIN, LOW);
 91    digitalWrite(HEATER_1_PIN, HIGH);
 92    digitalWrite(FAN_PIN, LOW);
 93  } else  {
 94    digitalWrite(HEATER_0_PIN, LOW);
 95    digitalWrite(HEATER_1_PIN, LOW);
 96    digitalWrite(FAN_PIN, HIGH);
 97  }
 98
 99  if (millis() %10000 <5000) {
100    digitalWrite(X_DIR_PIN    , HIGH);
101    digitalWrite(Y_DIR_PIN    , HIGH);
102    digitalWrite(Z_DIR_PIN    , HIGH);
103    digitalWrite(E_DIR_PIN    , HIGH);
104    digitalWrite(Q_DIR_PIN    , HIGH);
105  }
106  else {
107    digitalWrite(X_DIR_PIN    , LOW);
108    digitalWrite(Y_DIR_PIN    , LOW);
109    digitalWrite(Z_DIR_PIN    , LOW);
110    digitalWrite(E_DIR_PIN    , LOW);
111    digitalWrite(Q_DIR_PIN    , LOW);
112  }
113
114
115    digitalWrite(X_STEP_PIN    , HIGH);
116    digitalWrite(Y_STEP_PIN    , HIGH);
117    digitalWrite(Z_STEP_PIN    , HIGH);
118    digitalWrite(E_STEP_PIN    , HIGH);
119    digitalWrite(Q_STEP_PIN    , HIGH);
120  delay(1);
121
122    digitalWrite(X_STEP_PIN    , LOW);
123    digitalWrite(Y_STEP_PIN    , LOW);
124    digitalWrite(Z_STEP_PIN    , LOW);
125    digitalWrite(E_STEP_PIN    , LOW);
126    digitalWrite(Q_STEP_PIN    , LOW);
127
128}
  • want to find out if it makes a difference when a readily-soldered socket is switched in direction
  • changing code, only turning in one direction (want to find out )
1// ...
2if (true) {
3    digitalWrite(X_DIR_PIN    , HIGH);
4    digitalWrite(Y_DIR_PIN    , HIGH);
5    digitalWrite(Z_DIR_PIN    , HIGH);
6    digitalWrite(E_DIR_PIN    , HIGH);
7    digitalWrite(Q_DIR_PIN    , HIGH);
8}
9// ...
  • built a cover for power supply, inspired by this. https://www.thingiverse.com/thing:40024

  • jakob checked:

  • notation: pij (pair i, cable j)

  • find out pairs: measuring current. current is induced when turning if both are connected to one coil, current can be measured

  • pairs are:

    • blue, red (p1)
    • green, black (p2)
  • in the end we want to have order

    • p11 p12 p21 p22
  • stepper motors behave in the following way:

    • if you change the order one of the cable pairs p11 p12 p22 p21, the direction of the motor changes
    • if you change the order of both of the pairs: p12 p11 p22 p21, this is invariant to the direction of the motor direction
    • if you change both cable directions and you switch the pairs p22 p21 p12 p11, this changes the direction of the motor
  • procedure: align pairs next to each other, check if the motor turns right way. if not: change one of the pairs

TODO: grab from wiki what is yours

TODO

  • docs embedded
    • finish
      • arduino ide
      • esp idf
      • different programming protocols
      • gcc
      • vector magnetometer
        • programmer
        • use quentorres as debug with ftdi adapter
      • eigenen programmer erwähnen, auf electronic production verlinken

Saturday

  • docs cnc
    • group assignment

Tuesday

  • produce video
  • document drawbac

after midterm

  • docs drawback
  • attach bn085 sensor
  • build pressure & bend sensors:
    • velostat
  • start versicherungsprojekt
  • cnc
    • lackieren
    • aufbauen (fully)

not pressing

  • add docs
    • to cad
      • how to add logo to freecad
  • move existing documentation
    • to electronics design
      • from vector magnetometer:
        • do not block pins that are useful later
      • from led
        • add ground plane
        • design footprint
        • assign existing footprint to schematic
        • do not make pads too thin. they might tear off
    • to electronics production
      • milling flat pcb stock
      • vector magnetometer production
        • what can go wrong
        • how to older smd
  • refine orthography
    • fix typos & grammar mistakes
    • check that names are spelled correctly (Adriàn)
    • write e.g. and i.e. in italics
    • words
      • tool paths
      • pin-out
    • check tense

Reflections

What I Learned

  • you can use openbuilds for searching for pre-made cad parts
  • how to structure large freecad projects
  • fasteners freecad
  • distance joints are good in freecad if you want to put something onto something else.
  • assembly for the dreieck i should have done with combination of slide and distance joints
  • here, i mostly used rotation joints and distance joints.
  • when designing a machine, it is better to first have crappy cardboard prototype or a blender prototype where everything is in there! but you know you will never use it.
    • it is for checking if all dimensions fit.

What Went Wrong

What Went Well

What I Would Do Differently

  • maybe have a crappy blender or cardboard prototype first. our version of crappy prototyping was a drawing

Digitial Files

Due to file size limitations the following file types are not included.

  • Prusa Slicer project files (.3mf) and output files (.bgcode). They can be retrieved in a reasonable amount of time from given .stl files.
  • Blender project files (.blend). They do not contain much more information than the pure stl files. Blender files are provided only if they contain more information then the already provided files, such as keyframes, shaders, etc.

Use of Language Models

During writing this report, I used the following prompts asking ChatGPT 4o mini to …