

Terminal 1 pin will be connected to the 5v power rail while the terminal 2 pin will be connected to the GND pin on either side of the board. Since the potentiometer just has three pins, wiring it is simple. This enables the user to lower the speed for a more thorough clean or raise the speed for a quicker clean. We'll use the potentiometer to receive a value between, but we'll map it to 100 to 255 to regulate the hobby gear motors' speed. Now that your 2 Hobby Gearmotors and the L293D IC Chip are wired up, it should look like the TinkerCad diagram. Output 4 -> Hobby Gearmotor(2) Negative Terminal Output 3 -> Hobby Gearmotor(2) Positive Terminal (Right Side of the Chip - Starting from Bottom) Output 2 -> Hobby Gearmotor Negative Terminal Output 1 -> Hobby Gearmotor Positive Terminal (Left Side of the Chip - Starting from Top) Wiring the H-Bridge may appear difficult at first, but I'll guide you through it pin by pin. As it can flip the polarity of the voltage given to the two gear motors, the L293D IC, also known as the H-Bridge, will assist us. The L293D IC's job is to regulate the gear motors, which includes reversing their rotational direction to allow the vacuum to go backwards to avoid obstacles. Building the Robot Vacuum Circuit: Part 1(L293D, Hobby Gearmotors, and Potentiometer) Remember to ground both sides you may achieve this with the battery's negative terminal and the Arduino's GND pin.Ģ. As a result, the 9v battery will be linked to the left side of the breadboard, while the components will be attached to the Arduino's 5v pin on the right side. The Arduino's 5v will be used to power the remainder of the components. Since the Hobby Gearmotor requires more current than the Arduino's 5v(VCC) pin can deliver, we'll also be utilizing a 9v battery to power the two gear motors.

I've also attached a schematic view of the circuit to help you further while your wiring it up! Use the TinkerCad image above to help you throughout this process.
