Personally, the 'otto Robot' concept was new to me, and it was the first time I had ever built something like it. But I felt really excited when it was proposed, and I loved the idea of adding a visual component with a screen to show a fun story for kids.
source :- https://www.ottodiy.com/
I used Fusion 360 to design the robot's body and utilized the grabcad to place the electronic components so I could create cutouts for them.
I started by sketching the front face(with dimention 15cm*9cm) and created holes for 3mm screws, as well as a space for buttons. After extruding the sketch and placing the electronics in their positions, I used the Project function on them. I then created a new sketch on top(with 15*11cm) of that projection to define the locations of the cutouts.
I copied the main body itself and modified it to create the back panel, applying the same process. I did the same thing for the sides(with11*9cm), additionally creating a space for a T-slot. I repeated the entire procedure for the base and the top panel.
And here is the second part of the design.
For the legs:
I created a rectangle of 39.95 x 18.20 cm, with another rectangle inside it. Then I performed an extrusion.
After that, I started creating a cavity/housing for the servo motor and also made a cutout for it. On the back side, I made a space for a wire opening and also a circle with a diameter of 8mm. I extruded this circle outward by 3mm.
Then, I designed the top plate (roof) to be wider in order to support the robot's body, incorporating four screw holes.
I created a 46x53 cm rectangle, then extruded it by 3 mm. After that, I created a circle with a 20 mm diameter on one of the sides, with a smaller 8 mm diameter circle inside it. I then extruded this by 3 mm. Finally, I used the 'Mirror' tool for it, and this was the final part of the design.
vedio of the process
The final outcome after adding appearance
PLA
Plywood
RDworks software
Cura software
I used RDWorks to create files for the robot's body so I could prepare them for laser cutting. I used Cura to prepare the robot's lower part for 3D printing, so I could run them on the 3D printer.
All Parts of body
speed and power
As for the 3D printing, I created the design in .stl extension to import it into Cura for slicing. I checked which print orientation would be the fastest in terms of time. I adjusted the temperature to 120°C, the layer height to 0.2mm, and the infill to 20%. Finally, I exported the file in .gcode format to load it onto the 3D printer.
Fritzing is a software I used to simulate the wiring for my circuit.
Then, I started connecting the servos: the GND wire to the breadboard's GND, the VCC (positive) wire to the 5V rail, and the signal wire of each servo to Arduino pins 2 and 3, respectively.
After that, I connected the ultrasonic sensor: VCC to 5V, GND to GND, and the Trig and Echo pins to Arduino pins 7 and 8, in that order.
Furthermore, I connected the 2 LED matrix modules together. I used an external 5V adapter for them and placed the modules on the breadboard. I made a common ground (GND) connection for them and connected the VCC and GND of the matrices to the positive and negative terminals of this external power source. I connected the CS (Chip Select), CLK (Clock), and DIN (Data In) pins of the matrix to Arduino pins 10, 13, and 11, respectively.
The logic is that the LED matrix will display the story it is programmed with, and the two servos will start moving. As soon as the ultrasonic sensor detects an object at a specific distance, the servos will stop.
My outputs are 2 servos and 2 LED matrix modules. My input is an ultrasonic sensor.
I connected the step-down converter to the Arduino: its V-in to the Arduino's Vin pin, and its G-out to the Arduino's GND. I will supply 9V to the Arduino, and I've adjusted this converter to output 5V. I distributed these power lines (5V and GND) commonly on the breadboard.
After much deliberation, I decided to use a 5V adapter to power the led matrix and a 9V adapter to power the Arduino. The Arduino will then power the rest of the components.
I used Arduino IDE to code my circuit
MAX_DEVICES = 2: The number of MAX7219 units connected in series → each unit is 8 pixels wide × 8 pixels high ⇒ combined they form a 16×8 display (16 wide × 8 high).
CS_PIN 10: The Chip-Select / Load pin used for SPI communication (may vary depending on your wiring).
parola is used for displaying text and pre-built effects.
mx is the object for direct pixel control using functions
The code displays four static sprites on a 16x8 LED matrix array (a chain of 2 modules, each 8x8) using the MD_MAX72XX library to control the MAX7219 and the MD_Parola library specialized in text effects and display. Each image is stored as an array of 8 uint16_t values — each value represents one row with a width of 16 bits.
HARDWARE_TYPE: Defines the type of LED panel (connection configuration and driver layout). FC16_HW is a common type for pre-made modules.
Bit Order Handling in the Drawing Function:
The code reads the bit at position 15 - col. This means:
The Most Significant Bit (MSB = bit 15) represents the leftmost column (col=0).
The Least Significant Bit (LSB = bit 0) represents the rightmost column (col=15).
mx.clear(); → Clears the screen before drawing to prevent remnants of previous images.
for (int row = 0; row < 8; row++) → Iterates through each row (0 = top row).
for (int col = 0; col < 16; col++) → Iterates through each column from left to right.
bitRead(sprite[row], 15 - col) → Reads the required bit value from the uint16_t value for the current row:
Because bit 15 is the MSB, using 15 - col makes column 0 correspond to bit 15 (left side).
The result of bitRead is 0 or 1 → converted to a bool variable pix.
mx.setPoint(row, col, pix); → Sets a pixel (ON/OFF) at the coordinates (row, col) on the display.
parola.begin(); Initializes the MD_Parola library and its underlying hardware.
parola.displayClear(); Clears any text/state within the Parola library.
mx.begin(); Initializes the MD_MAX72XX library (SPI communication and internal variables).
mx.control(MD_MAX72XX::INTENSITY, 5); Sets the brightness intensity for the MAX7219.
mx.clear(); Physically clears the LED matrix.
Display Sequence:
Each image is displayed for a specific duration (delay) before moving to the next.
After the last image, the program enters an infinite loop while(true); to stop execution completely.
1. Including the Servo.h library to control the servo motor.
2. Pin definitions:
2 pins for the sensor (Trig/Echo)
2 pins for the servos (Right/Left)
3. Creating two Servo objects representing the legs.
4. Variable definitions:
centerAngle: The default/standing position for the foot (upright).
stepAmplitude: The deviation amount (left/right) from 90° during walking.
stepDelayMs: The speed of movement (delay between each degree change).
stepHoldMs: The hold time after each leg movement.
stopThresholdCm: If an obstacle is detected closer than 30 cm → stop.
5. Obstacle Avoidance Logic:
Reads the distance from the Ultrasonic sensor.
If an obstacle is < 30 cm: Stops both servos at 90° and returns to the initial standing position.
6. Left Leg Movement:
Makes the left leg lean forward (from 90° to approximately 65°).
Simultaneously makes the right leg lean in the opposite direction (from 90° to approximately 115°).
Then returns both legs to the center position.
7. Right Leg Movement:
Same concept as the left leg movement, but in reverse.
It measures the time the Echo pin was HIGH (the return time of the ultrasonic wave).
It converts this time into distance in centimeters (duration / 58).
If no signal is reflected/returns → it returns -1.
The speed of sound is approximately 340 m/s, or 0.034 cm/μs.
The distance traveled is time * speed.
Since the sound wave travels to the object and back, the distance to the object is (time * speed) / 2.
This simplifies to time / 58 to get the distance in cm (time / 29 for the one-way distance, but the common formula for the round trip using pulseIn is time / 58).
-Screw the horns of the servo motors to the leg bodies.
-Screw the legs to the servo motors.
-Screw the horns of the servo motors to the feet.
-Screw the feet to the servo motors.
and then :-
-Mount the side of the head with the top to match the holes for the Arduino USB and power ports.
-Mount the breadboard to the base.
-Mount the side of the head with the plug to the base.
-Mount the ultrasonic sensor and LED matrix to the front face.
-Mount the front face to the base.
Yeah, I got feedback from Menna my instructor. give me a lot of useful notes, especially regarding the robot's leg. She suggested that I increase its base area so it can support the body's weight better. Also, regarding the LED matrix programming.
-When I face a problem—and this has indeed happened—I first try to search for a solution online. If I can't figure it out, I then ask my instructor and also my friends. Everyone was genuinely willing to help.
- challenges that others can avoid :-
They could allocate more internal space for the electronics during the design phase, and also research more about the LED matrix to understand how the specific type they are using operates.
the challenge:-
the beginning, I designed the robot's leg exactly as shown in the first picture. After printing it, I discovered that it wouldn't be able to support the weight of the robot's body.
the solution:-
My instructor menna then suggested that I increase the surface area of the upper part of the leg, as shown in the second picture, and create hole for 4 screws to ensure it is firmly attached
If I had more time, I would have added Bluetooth functionality, and I would have added more stories to the LED matrix. Lastly, I would have added 2 more servo motors so it wouldn't just move in a linear direction but could also dance