I started to check the IR by using an arduino
Using Fusion, I started to design the outer cover of the robotic cleaner. I designed the outer shape of a roller coaster because I could not find it on fusion, and I wanted to include it to make the design accurate.
I changed my mind because I had only 80 grams to print, so I decided to make the base wood and not 3D printed. I started to make the design on fusion. A simple rectangle and I fillet it, then I added small rectangles for the motors with wheels, then I opened two slots for fixing the motors to the design.
When I wanted to print the body of the vacuum cleaner, I found it too big for printing, it didn't fit the machine. So, I had to change the chasis for the third time and to make it smaller. I made it circular because it looked cuter, and I decreased the diameter from 200 mm to 180 mm. I made two slots at its ends to fit the 3D body. Then I made the body by making two circles 2 mm aparts and extruding them
I attached the components to the base. I attached the fan from its back to suck dirts, I put a cup over it to keep dirts from falling, I attached the arduino to the motors, and I attached the H bridge to the cup, finally I attached to IR sensors to the base.
First, I coded for the wheels, then I Changed their speed to 40 for each motor because they were very fast. then I coded for the right and left IR. And the fan was connected to a 12 v source and it was cleaning the dirt even though its quality is low. I finished the design, and it works fine, but I just wait for the body to be printed.
1. Connect a 12V source adapter to the H bridge and the fan to power them ( red wires in the first openeing and the black(GND) to the second openeing). Don't forget to connect the ground of the Arduino to the ground on the H bridge.
2. connect the 3rd opening on the H bridge to the 5V of the arduino, and connect the vcc of the 2 IR sensors to the same opening on the H bridge.
3. connect the wires of the 2 motors to each sides of the H bridge, and connect 4 pins from the Arduino to the 4 pins of the H bridge ( two for each motor).
4. connect each IR sensor output to a pin on the Arduino.
5. Finally, connect the two enables on the H bridge to analog pins on the Arduino to control motors speed, and upload the code.
The printed cover was good but the clips were weak and they broke once I used them. I had to change few things in the code to work properly.