I used Tinker CAD For fast prototyping and code testing.
this is an advanced electrical version of the same basic circuit
this is a basic circuit I used for testing and to get to know the L293D
(controls the flow of power and how is it connected)
module we are using an ATTINY as the microcontroller
(device that controls the L293D and also the device we program) in this.
this is an advanced electrical version of the same Arduino circuit
updated schematic for Arduino Uno instead of ATTINY we had to change the code and the format of the code due to Arduino Uno using a different format
a test of possible chemical battery configurations in this circuit
he we see the number of rotations a minute 16530 (rpm) a hypothetical dc motor would achieve provided the 9v volts from the chemical battery
a test of possible chemical battery configurations that could be chained together to achieve a higher voltage in this circuit in this config we use 3 of the 9 volt batteries to create a 23.8v flow of power
23.8v volts from the chemical battery = ~47469 rpm
because we are using the Arduino Uno we use the Arduino IDE
Step 1: Setup and definition
The #define preprocessor directives create symbolic names for the four motor control pins: motor1back (pin 2), motor2back (pin 3), motor1forward (pin 4), and motor2forward (pin 5).
In the setup() function, the four motor control pins are set as OUTPUT, indicating that these pins will be used to control the motors.
In the loop() function, the motors are controlled in the following pattern:
Step 2: Moving the motors forward
Pins 4 and 5 (motor1forward and motor2forward) are set HIGH to move the motors forward.
Pins 2 and 3 (motor1back and motor2back) are set LOW to ensure they are not active in this direction.
A delay of 2000 milliseconds (2 seconds) occurs using delay(2000);.
Step 3: Stopping the motors (moving backward)
Pins 4 and 5 (motor1forward and motor2forward) are set LOW to stop the motors from moving forward.
Pins 2 and 3 (motor1back and motor2back) are set HIGH to move the motors backward.
A delay of 1000 milliseconds (1 second) occurs using delay(1000);.
The loop then repeats, going back to Step 1 and moving the motors forward again, creating a continuous forward-backward motion pattern for the motors.
zoomed in shot of dc motor
Using an old shell of a robot cat toy that used 2 dc motors and 1 rotating plastic wheel for movement. added a small breadboard, then soldered connections to the 2 dc motors of the toy.
(note: none of the electronics other then the 2 dc motors of the toy were used)
after that I configured the dc motors as show in the schematic above using the code as described in the previous section
GIF example of program moving forward for 2 seconds and back for 1
here we see one of the motors with the current code we broke down above
ATTINY Test
Uno Test
more interesting and exciting projects coming very soon!
AI Website Generator