make a pwm motor speed controller
Home » Blog » make a pwm motor speed controller

make a pwm motor speed controller

Views: 0     Author: Site Editor     Publish Time: 2020-09-02      Origin: Site

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
kakao sharing button
snapchat sharing button
telegram sharing button
sharethis sharing button

Microcontrollers like Arduinos are a great way to control custom electronic projects.
Unfortunately, the maximum output of the digital pin is 40 mA, which is not enough to power most motors.
This is where the motor controller shield can come in handy.
But these things are expensive to buy and only allow you to control a few motors, especially when you embed them into a project.
The simplest speed controller uses a pulse width modulation signal to set the speed of the motor.
This signal can be generated by any pulse width modulation pin on the Arduino.
So we need to use an external power supply (
Like a battery pack)
Transistor switch circuit.
This is similar to the transistor circuit on the relay shield, but we have made some changes.
I included a visual indication LED on the output.
In this project I will show you how to make your own simple motor controller.
This is a mix of Jason Poel Smith\'s \"How to customize the shield for your micro-controller\" instructions, and I re-mixed the motor drive shield.
Please vote for it in Remix 2. 0 Contest!
Here are the materials and tools needed for this project.
Material: 2x type transistor (such as tip31a)
2x IN4001 diode 2x1 k sfp resistor 2x100 SFP resistor 2 x LED the color of your choice 2x1 female 1x4 female 1x Battery connector No. 30 solid
Since we do two motor speed controllers on one PCB, there are two for almost everything.
By cutting the double material in half and using the schematic, you can easily make just one circuit.
Tools: start by soldering two power transistors on the PCB, soldering iron and soldering wire cutter wire stripping pliers needle nose pli.
Leave space between the two to make room for other components.
Don\'t trim the leads yet.
After we connect to the transistor, you can cut the lead.
Note the transistor pin output above to avoid the wrong connection.
In order to better understand the circuit and how it works, it may be a good idea to make a circuit prototype on a breadboard first.
Weld on small 1x2 female head.
Alternatively, you can use the screw terminals (
I finally changed both of them.
For a simpler connection.
Again, leave space between the head and the transistor for other components.
Solder the diode on the pre-circuit board in front of the subtitle.
Connect the diode to the head as shown in figure 3rd.
This will prevent the motor from delivering high current to the circuit board and damaging the circuit board.
Trim the leads on all diodes.
Ideally, you should have the silver strip facing the top of the board so that it can be easier to cloth the board.
Weld on the LEDs on the back of the subheading.
Any color you choose should work.
You don\'t need to trim the leads or wiring yet.
Keep in mind where the anode and cathode of each battery are placed.
Weld the 1 k resistance to the end of the seat (pin 1)
Of each transistor.
Leave space between resistors and don\'t connect it to anything.
Cut off the base plate lead and resistance lead connected to it.
Weld 100 kWh resistance on the perfboard, one of the leads is connected to the anode of the LED (longer lead).
Trim a resistor lead and an anode lead.
Connect the lead of one of the LED resistors to a transistor resistor.
Trim the lead only from the LED resistor.
Repeat with the other 2 resistors to form 2 resistance pairs.
* Remember * which resistor is connected!
These pairs are always separated;
We are making 2 motor controllers!
Weld on the power cord.
You can connect it to the power supply of your choice (
Remember the voltage and current of the motor and MCU).
I connected a 9 v battery clip so it can connect to a 9 v or 12 v power supply.
Make a knot near the base to prevent pulling out.
* Optional * drill a hole and slide the wire over to make sure the wire does not come out.
Weld the large female head to the plate in the upper left corner.
Connect the positive line of the power supply to the farthest pin on the left side (
Look at the header in the upper left corner).
Connect the negative power cord to the pin next to the positive pin just welded.
I use the red line for the front connection, and the ground connection uses blue.
* Note * this can be used to power a micro controller or other accessories, and you can also use it as a power input if you don\'t want to use the connected power cord!
The resistance that will be attached to the base (pin 1)
Transistor to 1 of the available pins on the big head.
Perform this operation on the remaining resistors, connect it to the last available pin.
This big head for input/output.
Connect the PWM pin to the PWM input pin just welded and use the power pin as the output or input of the power supply.
I connect two transmitters of the transistor with white lines (pin 3)to ground.
Connect the two cathode leads of the LEDs to the ground.
Trim transmitter leads and LED leads.
I use the blue wire.
Connect the positive wire to the solder joint closest to the silver strip on the diode.
Look at the pictures for reference as this part can get tricky.
Do this for both groups of headers.
This is where you remember the resistance pair you made.
Select the motor connection head pin and find out what transistor the LED near the head pin is connected.
After completion, connect the wire from the remaining solder joints on the head pin and connect it to the collector (pin 2)
You just identified the transistor the LED is connected.
Trim the leads on the transistor and repeat this operation for other heads and transistors.
Refer to the use picture.
Now you have a simple motor controller shield.
You can set the speed of the motor by sending an analog write command to the base of the transistor.
Download and upload the Arduino sample code given below to the Arduino board of your choice to test the motor controller.
Try to play with numbers and code in order to be comfortable using the speed controller.
To use with other microcontrollers, make sure it has a PWM output and set the output to match the desired speed.
If you don\'t know how to do this, find the sample code that controls the LED and change the code to suit your needs.
Basically, you can think of this as a control LED;
It accepts PWM signals and controls the motor at a higher voltage and current.

HOPRIO group a professional manufacturer of controller and motors, was established in 2000. Group headquarters in Changzhou City, Jiangsu Province.

Quick Links

Contact Us

WhatsApp: +8618921090987 
Tel: +86-18921090987 
Add: No.19 Mahang South Road, Wujin High-tech District, Changzhou City, Jiangsu Province, China 213167
Leave a Message
CONTACT US
Copyright © 2024 ChangZhou Hoprio E-Commerce Co., Ltd. All Rights Reserved. Sitemap | Privacy Policy