I imagined what it would be like to have a small robot by my side something that could move around safely, avoid obstacles, and even help carry things when I needed an extra hand. I care about this project because I believe technology should feel like a friend, not just a tool, and SamaBot is my way of making that happen. I was inspired by rescue robots and smart cars, but I wanted to create something more personal something simple yet meaningful that could make everyday life a little easier and more supportive.
GRABCAD to download the electronic components that are mounted into the design.
Fusion 360: the software used for designing and preparing the file stl/dxf
I wanted my car to look like a Mercedes G-Wagon because it is the kind of car that feels powerful and dependable.
Giving SamaBot that same boxy, stylish look makes it feel more like a real little car I can be proud of, It is not just about function anymore it is about creating something that has personality and feels special to me.
Open fusion 360, started the project by making a new component
Made a component to each side
The Project's Side
Then copied the side 1 and pasted it.
First i activated the side 1, sketched the left side and did the T-slots. Then, I made rectangles for the tabs to each parts(base1, base 2, base 3, back1, back2 and the front ) and some for decoration as also some lines.
Then extruted this side 3mm according to the thickness of the wood and made sure that the T-slots parts are not being selected.
Then copied the side 1 and pasted it, named it side 2.
Next, I activated the base, sketched the side 1, then projected, after I drew a rectangle 320*150mm using sketch dimension, made holes for arduino and 2 motor driver L298N, 8 rectangles for holding the 4 dc yellow gear motors and did the T-slots using Mid-plane to make it fully-defined and tabs to attach in the 2 sides using Miror tool.
Then extruted this base 3mm according to the thickness of the wood and made sure that the T-slots parts, the holes and the rectangles are not being selected.
Then i used joint that the base assemble with the 2 sides.
Next, I activated the back1, sketched the ground then projected to the two sides, drew a rectangle 150*130mm using sketch dimension, did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time
Then extruted this back 3mm according to the thickness of the wood and made sure that the T-slots parts are not being selected.
Then assembled with the ohter parts using joint
Next, I activated the back2, sketched the ground then projected to the two sides, drew a rectangle 150*100mm using sketch dimension, did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time
Then extruted this back 3mm according to the thickness of the wood and made sure that the T-slots parts are not being selected.
Then assembled with the ohter parts using joint
Next, I activated the Top, sketched the ground then projectde to the two sides, drew a big rectangle 72*156mm using sketch dimensionand another rectangle inside 60*60mm , and did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time
Then extruted this back 3mm according to the thickness of the wood and made sure to not select the rectangle inside.
Then assembled with the ohter parts using joint
Next, I activated the face, sketched the ground, then projected to the two sides, after drew a rectangle 150*120mm using sketch dimensionand did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time.
Then extruted this back 3mm according to the thickness of the wood
Then assembled with the ohter parts using joint
Next, I activated the front, sketched the ground, then projected to the two sides, after I drew a rectangle 150*120mm using sketch dimensionand did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time.
Then extruted this back 3mm according to the thickness of the wood
Then assembled with the ohter parts using joint
Next, I activated the base3, sketched the ground then projected to the two sides, after I drew a rectangle 320*150mm using sketch dimension, made holes for arduino and 1 motor driver L298N, 4 rectangles to hold the 4 dc yellow gear motor and did the T-slots and tabs to attach in one side then miror it so that be fully-defined and gain time.
Then extruted this back 3mm according to the thickness of the wood and made sure the 4 rectangles inside and the holes are being cut.
Then assembled with the ohter parts using joint
Final Look
Exported all the faces as "dxf" format using "DXF for laser cutting"
Imported all the parts in "Laser Cad", set The machine adjustments and download it to the machine. I chose the outer parts and components to be cut and colored them black, and I chose the pattern I drew to be engraved and colored it blue and green for speed cut. I marked the pieces in black, set the power to 45 and the speed to 40, gave the engraving the color blue, set the power to 20 and the speed to 330,and set the power to 12 and the speed to 400 fro speed cut.
Load Your Design
Copy your .AI file to the machine and select it.
Place the Plywood (3mm)
Set the sheet flat.use holders if it’s warped.
Adjust Focus
Set the focal length for a clean cut.
Position & Set Origin
Move the laser to your starting point and set origin.
Preview the Area
Click “frame” to check if your design fits.
Start Cutting
Hit “Start” and let the laser do the magic!
3D printing Design/preparation process
First, I used Thingiverse to find an open-source design of the HC-SR04 Casing + Angle Adjustable Cradle and servo mount for ultrasonic sensor. After downloading the design in STL format, I opened it in Cura, selected the machine, and adjusted the size and print settings to fit my target.
Ultimaker Cura : The software used for slicing and preparing the file to be printed
the used fab-lab machine - PRUSA i3- mk2
PLA Filament: The filament that the machine use to print it
I opened cura, placed the two file stl together and set lthe ayer height 0.2 for high quality.Because the piece was small and the contact surface area was large and because of its shape I did not need any Support and made the Infill 20%
3D Printing, Simple Steps to Bring Ideas to Life
How I used it?
Load Your File
Save your G-code file to the printer’s SD card.
Prepare the Printer
Ensure the build plate is clean and ready.
Preheat the Nozzle
Heat the nozzle to the proper temperature.
Insert the Filament
Change the filament if needed, make sure it's sharp and smooth, not tangled.
Start the Print
Select your file on the screen…
And let the magic begin!
TinkerCad Project : Arduino, L293D motor driver, Ultrasonic sensor, servo motor, Bluetooth, DC yellow gear motor and LED
What the circuit does:
The circuit uses an Arduino with a motor driver L293D to drive four DC motors for SamaBot locomotion in forward, reverse, left, and right directions with speed regulation. An ultrasonic sensor mounted on a servo motor searches for obstacles, and a Bluetooth module (HC-05) receives wireless commands from a smartphone. Status LEDs provide indication, and a switch is used to power the system ON/OFF. There is also a toggle switch to toggle operating modes (between manual Bluetooth control and autonomous obstacle avoidance). The entire circuit is powered from a battery.
First, i placed aduino, breadboard, battery 9v, switch ON/OFF and L293D motor driver beacause the L293D motor driver requires two power inputs: one for the logic (5V) to communicate with arduino and another (7v) to supply enough current for the motors. The on/off switch connects the battery to the circuit allowing afe control for power
Second, I started putting L293D the motor driver(similar role to the L298N in the breadboard) to control two motors per one. Then connecting its inputs in the pins of arduino (input 1&2 from L293D to pin 2&3, input 3&4 to pin 4&5 ), its outputs (output 1&2 from L293D controlling the first 2 motors, output 3&4 controlling the 2 other motor),for speed control i connected the enable 1&2 to pin A0 and its enable 3&4 to pin A1. Finally, I connected the power supply pins of the L293D: the positive and negative terminals to the corresponding positive and negative rails on the breadboard, shared with the Arduino and battery.
After i placed the ultrasonic sensor next to the servo motor so that the servo is used to rotate the ultrasonic for scanning, and plugged the ultrasonic sensor's Echo and Trig to digital pin A4 and A5 and servo's signal into digital pin 10. And in the last i connected their negative and positive terminals to the negative and positive terminals on the board
Next, I connected the Bluetooth device's RX to TX's Arduino, TX's Bluetooth to RX's Arduino, and Bluetooth's Vcc to the positive wire and ground to ground. after i palced the leds, two leds per pin, red leds's anodhe to pin 11 and the two cathodes to the ground using resistor 220 ohm to protect from the damage.
Inputs Components :
Ultrasonic sensor (HC-SR04): detects obstacles in front/around the car.
Bluetooth module HC-05: receives movement commands from the phone.
Toggle switch: to change modes (Auto or Bluetooth)
Switch ON/OFF: to power ON/OF the circuit.
DC Motors (x4) : movement (forward, backward, left, right) via L298N driver.
Servo motor : used for ultrasonic scanning; rotates the ultasonic to left/rigth for measuring the distance
LED : alerts indicators
White led lights up when the car moves forward.
Red led lights up when the car moves backward
Tinkercad
Arduino IDE
LED
Resistor 220ohm
Servo motor :
Ultrasonic Sensor (HC-SR04)
Motor driver L298N
Jumper wires
Cable for Arduino Uno
DC power jack
Bluetooth HC-05
dc Yellow gear motor
Wheel 70mm
Adaptor 9V
Motor driver L298N
Breadboard
Arduino Uno
I used a 7V battery to provide an external power source for the motor driver L298N, as it required more current than the Arduino could supply. Because it makes the car portable and free to move without being tied to a wire. But i didn't find so i used an adaptor instead.
DC Power Jack
To connect the motor driver L298N to the battery, I incorporated a DC power jack. This allowed for a secure and stable connection, ensuring consistent power delivery to the motor.
I googled how to join obstacle avoidance using ultrasonic sensor + servo with Bluetooth control and found some website that gave me a sample code. Once I understood it, I extracted the parts I needed, modified them, and rewrote the code in my own way.
Firstly, library is included.
Secondly, ultrasonic sensor pins, servo motor pins, motor speed, servo motor starting point, toogle pin, leds pins, the inputs and its enable of the L298N motor driver are defined.
Thirdly, some variables have been created to help the program.
In the setup function, Start serial communication at 9600 baud for debugging, Ultrasonic pins are set to INPUT and OUTPUT. Also, the toogle pin set as INPUT_PULLUP, the inputs and its enable of the L298N motor driver are set as OUTPUT. And lastly Set initial speed for left motor and right motor and Attach servo to its control pin
In the loop function, the two main functions are included. we can run these functions using the toogle. if tooglestate is 1, the car runs in autonomous obstacle-avoidance mode using the ultrasonic sensor + servo, else which means if tooglestate is not 1 but 0, the car takes the command from bluetooth module
This function includes the Bluetooth control code.
void Bluetoothcontrol() { gets the serial communication values and puts them into the char variable.
if (Serial.available() > 0) { value = Serial.read(); Serial.println(value); } : Next, these values are checked using the IF condition. Then, if the char value is 'F', the car moves forward. if (value == 'F') forward(),
else if (value == 'B') { backward() : If the char value is B, the car moves backward.
else if (value == 'L') { left() : If the char value is L, the car moves left.
else if (value == 'R') { right(): If the char value is R, the car moves right.
else if (value == 'S') { Stop() : If the char value is S, the car is stopped.
void Obstacle() { distance = ultrasonic(); : gets the ultrasonic sensor reading and puts it into the variable.
if (distance <= 30) { Stop(); backward(); delay(100); Stop(); L = leftsee(); servo.write(spoint); delay(800); R = rightsee(); servo.write(spoint); :
Then, these values are checked using the IF condition. If the value is less than or equal to 30, the robot is stopped and the servo motor rotate left and right. Also, gets both side distance.
if (L < R) { right(); delay(500); Stop(); delay(200); : After, if the left side distance less than the right side distance. The robot turns right.
else if (L > R) { left(); delay(500); Stop(); delay(200); } : After, if the left side distance more than the right side distance. The robot turns left.
else { forward(); } } : Otherwise, the robot moves forward.
This function makes the Arduino send a short pulse to the ultrasonic sensor to trigger a sound wave. Then it calculates the time it takes for the wave to come back using the Echo pin. Finally, it converts the time into distance (centimeters) and returns it.
These functions control the motors through the L298N to move the car forward, backward, left, or right. At the same time, they switch on the LEDs to indicate direction: the white LED lights for forward, the red LED lights for backward, and both LEDs light up when turning. This way, the LEDs act as visual signals while the car moves.
The Stop() function stops all motors and turns off both LEDs.
The rightsee() function moves the servo to the right and uses the ultrasonic sensor to measure the distance.
The leftsee() function does the same but turns the servo left to check for obstacles.
Using Fusion 360's joint feature, measuring all the components to make sure that they'll be mounted easily, and finally mounting them after fabrication, solving the problems.
First, I mounted the four yellow DC gear motors onto the base using laser-cut brackets.
Secondly; I placed the L298N motor drivet with arduino in the base and connected to the gear motors.
After, I assembled the parts and closed it using M3 screws and nuts.
Using:
T-slots
3mm screws and nuts
Functionality of features:
The device is performing minimum, complete, and nice to have featu
Mode autonomous
Mode Bluetooth
Ali and Said supported me throughout the project by brainstorming ideas related to my design and functionality.
They assisted with the Samabot's design and helped me to use 4 wheel different to a simple rc car using 2 wheel with a castel.
Ali gave me an idea about my design rc car by making it a mercedes car G-wagon and add in my code arduino voice control to look a developped rc car avoiding obstacles as a bluetooth control and not simple rc car..
I shared useful resources with Sara, she was working on the same electronics components as me, i insisted her helping wiring the electronics components, as the code arduino also. .
I was working on the circuit, but things weren’t going as planned.
The only thing that seemed to work was the bluetooth, which kept blinking.
The 4 dc yellow gear motor motor weren’t moving at all, altough they were taking the power from the motor driver whom working and after checking, I realized it was because the wiring was incorrect according the code i writed.
To make matters worse, the servo motor wasn’t moving at all either, the ultrasonic worked.
How I Solved It:
I started by carefully rechecking the connections for the driver motor. It turned out that some wires were connected to the wrong pins. I rewired the motor correctly, ensuring each connection matched the circuit diagram.
The curve of the laser machine made the holes of the t-slot smaller than the design, and also I added new components that I wasn't mounting holes for, so I used a drill to adjust the design.
Pehaps in the future, i would like to use an ESP32-CAM module (cheap, small, has Wi-Fi, and can stream video to a phone or PC), mount it at the front of SamaBot so it has a clear view.
I can control SamaBot with Bluetooth and watch the camera feed over Wi-Fi at the same time.
And add a GPS to Samabot opens up new location like location tracking (as Uber) go there to there, controlling as a game.