Sprint 1:-
A lead screw mechanism is utilized to ensure precise and controlled movement of the brush, enabling accurate printing of the desired design with consistent quality and alignment.
Sprint 2:-
A linkage mechanism is employed to guide the upper body to smoothly and accurately land on the platform where the paper is positioned, ensuring stable and precise operation.
Sprint 3:-
An Arduino setup is used to control the mechanisms. It manages two DC motors with a speed of 3.5 RPM for the linkage mechanism and one DC motor with a speed of 300 RPM for the lead screw mechanism, ensuring precise and efficient movement.
Performance Testing:-
POSTER:-
CODE:-
// Motor control pins for the first DC motors (3.5 RPM, controlled by relay)
const int motorPin1 = 8; // Pin for Motor 1 (forward direction)
const int motorPin2 = 9; // Pin for Motor 2 (reverse direction)
const int relayPin1 = 7; // Pin to control relay for Motor 1 direction (if needed)
// Motor control pins for the second DC motor (controlled by another relay)
const int motorPin3 = 10; // Pin for Motor 3 (clockwise)
const int motorPin4 = 11; // Pin for Motor 3 (anticlockwise)
const int relayPin2 = 6; // Pin to control relay for Motor 3 direction (if needed)
// IR sensor pin
const int irSensorPin = 2; // Pin to read IR sensor (object detection)
// LED control pins
const int redLedPin = 12; // Red LED pin (first motor active)
const int greenLedPin = 13; // Green LED pin (second motor active)
// Variables to track IR sensor state and motor cycle
bool objectDetected = false;
void setup() {
// Initialize motor control pins as outputs for the first two motors
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(relayPin1, OUTPUT);
// Initialize motor control pins as outputs for the second motor
pinMode(motorPin3, OUTPUT);
pinMode(motorPin4, OUTPUT);
pinMode(relayPin2, OUTPUT);
// Initialize the IR sensor pin
pinMode(irSensorPin, INPUT);
// Initialize LED pins
pinMode(redLedPin, OUTPUT);
pinMode(greenLedPin, OUTPUT);
// Start with motors stopped and LEDs off
stopMotors();
stopMotor3();
digitalWrite(redLedPin, LOW);
digitalWrite(greenLedPin, LOW);
}
void loop() {
// Read the IR sensor state
objectDetected = digitalRead(irSensorPin);
if (objectDetected) {
// Object detected, start motors and turn on the red LED
rotateMotor1();
digitalWrite(redLedPin, HIGH); // Red LED on while 1st motor is running
delay(5000); // Motors rotate for 5 seconds
// First motor pauses for 1 minute, and second motor starts
stopMotors();
digitalWrite(redLedPin, LOW); // Red LED off
// Green LED on while 2nd motor is running for 1 minute
digitalWrite(greenLedPin, HIGH); // Green LED on while 2nd motor is running
rotateMotor2();
delay(60000); // Motor 2 runs for 1 minute
stopMotors(); // Motor 2 stops
digitalWrite(greenLedPin, LOW); // Green LED off
// Resume the first motor after 1 minute pause
rotateMotor1();
digitalWrite(redLedPin, HIGH); // Red LED on while 1st motor is running again
delay(5000); // Motors rotate for 5 seconds
} else {
// No object detected, turn off both LEDs and stop motors
stopMotors();
stopMotor3();
digitalWrite(redLedPin, LOW); // Red LED off
digitalWrite(greenLedPin, LOW); // Green LED off
}
}
void rotateMotor1() {
// Set motorPin1 high for motor 1 and motorPin2 low for motor 2 (forward rotation)
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
// Relay control for direction if needed (adjust relayPin1 if required)
digitalWrite(relayPin1, LOW); // Assuming LOW sets motor 1 to rotate forward
}
void rotateMotor2() {
// Set motorPin1 low for motor 1 and motorPin2 high for motor 2 (reverse rotation)
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
// Relay control for direction if needed (adjust relayPin1 if required)
digitalWrite(relayPin1, HIGH); // Assuming HIGH sets motor 2 to rotate forward
}
void stopMotors() {
// Stop both motors
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
}
void stopMotor3() {
// Stop motor 3 (if used in the extended case, it's unused here)
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
}