Ikea Craft Room Table. Food Storage Jars. Cmp Tube Color Top. Shift Trial. Fashion Famous Roblox. Marina City Parking. Splatoon Deep Sea. Standard Deviation Anova Table. Precast Concrete Roof Slabs. Mark Vi Patrol Boat Blueprints. Purple Leotards For Little Girls. Scientific Lab. Jah Seh Onfroy Dead. Kino Film. The onboard LED indicates when the board has power, I do not recommend connecting ground and VCC to your Arduino as this can overload the power supply depending on the power required to drive the motors.
The two pins on the right are for controlling motor A and the two pins on the left are for controlling motor B. The pins are either labeled 1a or 1b we will discuss that more in a minute these are the pins that need to be connected to the Arduino. Now if you are only concerned about motor direction you can use regular digital high-low output pins. If you want to control speed and direction you will need to use pulse width modulation PWM pins a potential of atleast 2.
So keep that in mind when selecting your microcontrollers both Arduino and Raspberry Pi will work fine for with this board. For this example, I will use a gear motor so that we can easily see the motor direction.
It will be very easy to fix, if your motor spins opposite of what you wanted for this demonstration then the change the wire connection. I will be using 10 volts from my power supply, first I will connect the positive to VCC and the negative to ground.
If I were using say a 12 volt battery for the motor control board and a 9-volt battery for the Arduino I would want to make sure the ground pin on the motor control board and the ground pin on the Arduino are both connected to a common reference for Direction control only I can select any two digital output pins on the Arduino I will connect Arduino pin 3 to a1a on the control board and Arduino pin 2 to a1 B.
If we give a high command to pin a1a and a low command to pin a1b the motor will spin counterclockwise. When looking at the end of the shaft if we give a low command to pin a1a and a high command to pin a1b the motor will spin clockwise. If we give a high command to both channels or low command to both channels the motor will not spin. First we needed to find what pins on the Arduino correspond with the pins on the motor control board.
We will create a constant integer for A1A as pin 3 and A1B as pin There are a lot of different motor drivers available. One of the most popular and affordable ones for very small motors are the LS Motor Drivers. Please be aware that this driver board can drive only small motors , with max working current up to 0.
If you need more power and bigger motors, you will need a more expensive and powerful motor driver board. In the future I also plan to make Instructables on using more powerful driver boards, so stay tuned. To make is easier to see the rotation of the motor, I have taped a piece of black insulation tape on the motor shaft. Since the board can control 2 motors - channel A and B, and we use only one motor for simplicity, here we will connect only channel A. Channel B can be connected and used the same way.
Make sure that you install 1. Since we will control only one motor we will connect only one of the channels. If you position the potentiometer in the middle, the motor will stop. If rotate the Potentiometer in one direction the motor will start rotating, and you can use the potentiometer to adjust the speed. If you rotate the potentiometer past the middle point in the other direction, the motor will start rotating in opposite direction.
0コメント