15. Mechanical design¶
Here is a link to our video on Youtube in 4K
Here you can download the video:
Machine: The Fab 2024 Saucemaster Ultimate Pro Max 3000 Assistive Condimental Saucing Technology¶
See also documentation on Fab Lab Reykjavík site
Fab Academy Iceland Students 2024:¶
- María Fönn Frostadóttir, Fab Lab Vestmannaeyjar, Iceland
- Gabríella Kamí Árnadóttir, Fab Lab Reykjavík
- Róbert H Pálsson,Fab Lab Reykjavík
3D printing¶
We 3D printed these files
Assembly¶
Peristaltic pump¶
A few different examples of peristaltic pumps were downloaded, 3d printed and tested. The designs were evaluated and new peristaltic pump was modeled in Onshape with parametric design. The pump was printed and tested. The pump was actuated by a stepper motor and a driver board.
Electronics¶
We first made this board and followed the documentation.
- https://academany.fabcloud.io/fabacademy/2024/bootcamp-instructors/workshops/modular-things-coreXY/
- https://gitlab.fabcloud.org/pub/project/fab23/machine_workshop
This did not work so we had to do other arrangements. Using XIAO RP2040 with stepperboard drivers.
DRV8825 Stepper Motor Driver Carrier, High Current
Code¶
// define direction pin and step pin
#define dirPinAxis 26
#define stepPinAxis 27
#define sleepPin 28
#define resetPin 29
#define dirPinPump 1
#define stepPinPump 2
// define microstepping signal pins
#define m0 0
#define m1 7
#define m2 6
#define stepsPerRevolution 200
//define button pins
#define endStopBtn 4
#define sauceBtn 3
//define helper variables
bool isAtEndstop = false;
bool isSaucing = false;
int sauceBtnState = 0;
void setup(){
pinMode(endStopBtn, INPUT_PULLUP);
pinMode(sauceBtn, INPUT_PULLUP);
// Declare stepper driver pins as output:
pinMode(stepPinPump, OUTPUT);
pinMode(dirPinPump, OUTPUT);
pinMode(stepPinAxis, OUTPUT);
pinMode(dirPinAxis, OUTPUT);
pinMode(sleepPin, OUTPUT);
pinMode(resetPin, OUTPUT);
pinMode(m0, OUTPUT);
pinMode(m1, OUTPUT);
pinMode(m2, OUTPUT);
//Stepper setup
digitalWrite(sleepPin, HIGH);
digitalWrite(resetPin, HIGH);
// Set 1/16 microstepping
digitalWrite(m0, LOW);
digitalWrite(m1, LOW);
digitalWrite(m2, HIGH);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
int endstopBtnState = digitalRead(endStopBtn);
while(isAtEndstop == false){
endstopBtnState = digitalRead(endStopBtn);
if(endstopBtnState == 1){
Serial.println("Starting to move to endstop");
delay(15);
// Set the spinning direction clockwise:
digitalWrite(dirPinAxis, LOW);
// Go -10 steps slowly:
for (int i = 0; i < 16*10; i++) {
// These four lines result in 1 step:
digitalWrite(stepPinAxis, HIGH);
delayMicroseconds(1000);
digitalWrite(stepPinAxis, LOW);
delayMicroseconds(1000);
}
}
else{
Serial.println("Reached endstop");
digitalWrite(dirPinAxis, HIGH);
Serial.println("Moving away from endstop");
// Go 10 steps slowly:
for (int i = 0; i < 16*10; i++) {
// These four lines result in 1 step:
digitalWrite(stepPinAxis, HIGH);
delayMicroseconds(1000);
digitalWrite(stepPinAxis, LOW);
delayMicroseconds(1000);
}
isAtEndstop = true;
}
}
while(isSaucing == false){
Serial.println("Press button for Ketchup");
sauceBtnState = digitalRead(sauceBtn);
//Serial.println(sauceBtnState);
if(sauceBtnState == 0){
Serial.println("Putting ketchup on your hotdog");
digitalWrite(dirPinPump, LOW);
//Set the direction of the axis
digitalWrite(dirPinAxis, HIGH);
// Go 140 steps slowly:
for (int i = 0; i < 16*440; i++) {
// These four lines result in 1 step:
digitalWrite(stepPinAxis, HIGH);
digitalWrite(stepPinPump, HIGH);
delayMicroseconds(1000);
digitalWrite(stepPinAxis, LOW);
digitalWrite(stepPinPump, LOW);
delayMicroseconds(1000);
}
digitalWrite(dirPinPump, HIGH);
//pumpKatchup backwards:
for (int i = 0; i < 2*100; i++) {
digitalWrite(stepPinPump, HIGH);
delayMicroseconds(1000);
digitalWrite(stepPinPump, LOW);
delayMicroseconds(1000);
}
delay(2000);
isSaucing = true;
}
}
isAtEndstop = false;
isSaucing = false;
//now the loop goes back to the top and starts by moving the axis back to endstop
}
Group assignment¶
- [x] design a machine that includes mechanism+actuation+automation+application
- [x] build the mechanical parts and operate it manually
- [x] document the group project and your individual contribution
https://academy.cba.mit.edu/classes/mechanical_design/index.html