Machine Week documentation is posted on my Fabmate Devanshi's page
Learnings from this week
Planning and allocating tasks
Our mentors Jesal sir and Pranav sir were of great help here. First we divided the task into 5 main aspects: Mechanics, electronics, design and form, actuators & documentation. Then we wrote them down on chits and picked them up randomly. This added an element of surprise and made this week more exciting.
Electronics- I picked that chit :)
Once we had all our components at hand it was another task to make them work together, in experimentation with temporary components I overloaded one of our motor drivers. What happend was, the board was connected toh the Lipo battery as well as the 5V from the RP2040. We were on our last motor driver so to avoid any risks, we switched to a DC power supply to make sure we had control over the voltage being supplied to the board.
Blown up motor driver
PCB milled for the machine that connects the motor driver and the ultrasonic sensor to the RP2040
Coding
The coding spiral was pretty straightforward, we had a Dual Motor PWM Driver. The first code was a simple code to check whether the connections were right. Second we added an ultrasonic sensor and updated the code to work accordingly. We now had turning and automation. With this skeleton of the code ready all that was left was to recallibrate sensor values during the time of final installation.
First code spiral
Second Code spiral (because of the high torque the motor fell of the table. LOL)
// Motor A
#define IN1 D0
#define IN2 D1
#define ENA D2 // PWM
// Motor B
#define IN3 D4
#define IN4 D5
#define ENB D6 // PWM
// Ultrasonic Sensor
#define TRIG D7
#define ECHO D8
long duration;
int distance;
void setup() {
// Motor pins
pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(ENA, OUTPUT);
pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); pinMode(ENB, OUTPUT);
// Ultrasonic sensor pins
pinMode(TRIG, OUTPUT);
pinMode(ECHO, INPUT);
Serial.begin(9600);
}
void loop() {
distance = getDistance();
if (distance < 15) {
// If obstacle detected — go backward
motorForward();
delay(1000);
} else {
// Otherwise go forward
motorBackward();
}
delay(100); // Small delay for stability
}
void motorForward() {
digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW);
analogWrite(ENA, 255);
analogWrite(ENB, 255);
}
void motorBackward() {
digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH);
analogWrite(ENA, 255);
analogWrite(ENB, 255);
}
int getDistance() {
digitalWrite(TRIG, LOW);
delayMicroseconds(2);
digitalWrite(TRIG, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG, LOW);
duration = pulseIn(ECHO, HIGH, 30000); // Timeout after 30ms (max ~5m)
int dist = duration * 0.034 / 2; // Convert to cm
Serial.print("Distance: "); Serial.println(dist);
return dist;
}
Video/Documentation
I joined forces with Devanshi toscript and shoot the video that showed our journey from thinking about the bot to materialising. The entire video was scripted, shot & edited by us in under 3 hours.
Final assembly
By the end we realised that we needed all hands on deck and the chits we pulled were no longer valid, everyone was working to get everything sorted. It was the final stretch that we sought through till the end. Our bot was being built on one side, the video being shot parallely and documentation happening on the go.
Thoughts
This week was a culmination of team efforts, critical thinking and utilising our strengths to make sure our project materialised in time.
Future Possibilites
This robot is just a blank canvas for bring the Theo-Jensen mechnism to life with a lot of improvents to be done in the future. this organic and verstaile, mechanism has a lot of potential. Speaking with respect to the bot, we can make it remote control and /or operable over the internet. Moreover it would look amaizing with a full fairing and lights and a functioning tail module. This would be a projwct of animatronics and biomimicry. This techniology shold be explored as a medium of locomotion of not for humans, but getting or delivering supplies in difficult terrain. It could also be used for something like what Kawasaki is doing, with their new concept for offroading and trail-blazing.