Project Progress¶
In week 6 instead of witting for another DC motor to First Option design we try another design. We choose to try another design with Stepper motor because it is more accurate and we can control the speed and steps.
Fourth Design¶
We fide the fourth design from Autodesk Intructables website and the name of the design is Precise Peristaltic Pump. We just take from design the case and the front part. So we end up with this pieces
The Installation¶
To connect this two pieces we cut a screw to 6 part and each part has same length.
Then I designed bearing to fit in the width of screw and fit in the project design without hitting the frame. I find the width of the screw is 4.15mm and the distance we have to not hit the frame is 12mm. We cut the bearing using the lazier machine (CO2).
If the diameter 12 mm will hit the frame as this image show. And it well not moving.
Then to install them together we use vise to make it fit tight. We use glaives to avoid hearting the 3D printed design.
We install the bearing and the we put the second piece and aging we use vise to make it fit tight.
Then we install the rest using screws.
The Code¶
#include <Stepper.h>
const int stepsPerRevolution = 200;
const int motorSpeed = 60; // Motor speed in RPM
const int duration = 5; // Duration in seconds
int potPin = A1; // potentiometer is connected to analog 0 pin
int potValue; // variable used to store the value coming from the sensor
int percent; // variable used to store the percentage value
Stepper myStepper(stepsPerRevolution, 4, 5, 6, 7);
int stepCount = 0; // number of steps the motor has taken
void setup() {
// initialize the serial port:
myStepper.setSpeed(motorSpeed);
Serial.begin(9600);
}
void loop() {
unsigned long totalSteps = (motorSpeed * stepsPerRevolution) * duration / 60;
potValue = analogRead(potPin); // read the value from the potentiometer and assign the name potValue
percent = map(potValue, 0, 1023, 0, 100); // convert potentiometer reading to a percentage
Serial.print(percent);
if(percent > 80 && percent <=100){
unsigned long startTime = millis();
while (millis() - startTime < 100) {
myStepper.step(-stepsPerRevolution);
}
}
if(percent > 40 && percent <= 70){
unsigned long startTime = millis();
while (millis() - startTime < 100) {
myStepper.step(1);
}
// Stop the motor and wait for a few seconds before repeating the process
myStepper.step(0);
}
Serial.print(percent);
}
The Problem¶
After we install the design and the code we face some of Problem. One of the Problem was the motor strong vibration. And the solve of this Problem was to fix the connections from motor to driver motor and make the screw more tight. The another Problem was the motor driver pull more than 2A carnet and the motor drive became hot. And half of the bearing was not moving. So we remove them and we end up with three bearings. and now we still searching about way the motor drive still heating.
The Result¶
For the finale try we make the bearing diameter 11.5mm and the pipe diameter 6mm.
By using 3 bearings 11.5 mm.
By using 6 bearings 11.5 mm.