Guide to making TINY Brushed Motor Drivers with MOSFETs for RC Projects
Build your own brushed Micro Motor Drivers from scratch with MOSFETs and learn how they work - customizable for unidirectional drone/plane motor control or bidirectional RC car/robot motor control.
Motor drivers are crucial components in electromechanical devices, controlling the speed, direction, and torque of motors in everything from home appliances to your dream Mini Arduino FPV Drone project.
Since microcontroller output pins can't provide the necessary current to drive motors directly, motor drivers step in. They handle power delivery, provide protection, and offer control features to ensure motors run safely and efficiently. However, finding the right motor driver for smaller RC projects can be a challenge. But don't worry - there’s a simple solution: making your own custom motor driver modules.
Hey! My name is Max, and in this blog I’ll walk you through building motor drivers from scratch using discrete components like MOSFETs. Along the way, we’ll explore how these drivers work, troubleshoot common issues, and share extra tips to help you get your custom motor drivers up and running.
Depending on your needs, you can configure these motor drivers for unidirectional control, perfect for drones and planes where motors spin propellers in one direction, or bidirectional control, ideal for RC cars and wheeled robots that need to reverse and steer.
You’ll also have the option to build these drivers using perf boards or design a custom PCB for a more polished, durable result.
Let’s jump in to explore the materials you'll need to create these micro motor drivers!
Bill of Materials and Resources
Unidirectional (1CH) Motor Driver Parts List:
- (x1) SI2300 N-Channel MOSFET SMD - https://amzn.to/41WTy3i
- (x1) 1N4148 Switching (Flyback) Diode SMD - https://amzn.to/3PhsmoD
- (x1) 10K Ω (Pull-down) Resistor 0805 SMD - https://amzn.to/4jaYLuO
- (x1) Perf Board (2x2-Pad Space) - https://amzn.to/4gUFbAX
- (x3) Wires (30AWG) - https://amzn.to/3W0Lta0
Unidirectional (4CH) Motor Driver Parts List:
- (x4) SI2300 N-Channel MOSFET SMD - https://amzn.to/41WTy3i
- (x4) 1N4148 Switching (Flyback) Diode SMD - https://amzn.to/3PhsmoD
- (x4) 10K Ω (Pull-down) Resistor 0805 SMD - https://amzn.to/4jaYLuO
- (x1) Perf Board (2x8-Pad Space) - https://amzn.to/4gUFbAX
- (x6) Wires (30AWG) - https://amzn.to/3W0Lta0
- 0.31mm Enameled Copper Wire - https://amzn.to/40hbnsD
Bidirectional 1CH H-bridge Motor Driver Parts List:
- (x2) SI2300 N-Channel MOSFET SMD - https://amzn.to/41WTy3i
- (x2) SI2301 P-Channel MOSFET SMD - https://amzn.to/4fFIICa
- (x2) BC847B NPN Transistor SMD - https://amzn.to/4h0hbwa
- (x4) 1N4148 Switching (Flyback) Diode SMD - https://amzn.to/3PhsmoD
- (x1) Red LED 0805 SMD - https://amzn.to/4fIDyFm
- (x1) Capacitor 10 Microfarad (10uF) 0805 SMD - https://amzn.to/3BQiuiy
- (x4) 10K Ω Resistor 0805 SMD (Resistor Kit) - https://amzn.to/4gCneaE
- (x2) 1K Ω Resistor 0805 SMD - In Kit
- (x2) 100 Ω Resistor 0805 SMD - In Kit
- (x1) 270 Ω Resistor 0805 SMD - In Kit
- (x1) Perf Board (5x6-Pad Space) - https://amzn.to/4gUFbAX
- (x4) Wires (30AWG) - https://amzn.to/3W0Lta0
- 0.31mm Enameled Copper Wire - https://amzn.to/40hbnsD
Bidirectional 2CH H-Bridge Motor Driver Parts List:
The same components as in the 1CH H-Bridge, but doubled (2x the following parts):
- (x4) SI2300
- (x4) SI2301
- (x4) BC847B
- (x8) 1N4148
- (x8) 10K Ω
- (x4) 1K Ω
- (x4) 100 Ω Resistors
Soldering Equipment:
- Soldering Iron - https://amzn.to/3PiOUoL
- Best Soldering Tin - https://amzn.to/3DDWWGp
- SMD Soldering Hot Plate - https://amzn.to/3DBxpgZ
- Solder Paste - https://amzn.to/4j27z5S
- Electronic Tweezers Set - https://amzn.to/41SI3tT
- Solder Fume Extractor - https://amzn.to/3DOXc5f
- ESD Wrist Strap - https://amzn.to/4fYqhcd
As an Amazon Associate, I earn from qualifying purchases at no extra cost to you. Your support helps me continue making the content you enjoy—thank you!
Project Files (Schematics, Drawings, PCB Gerbers & more): https://drive.google.com/drive/folders/1i2ZHVr778S_qOqZJBML-BYk4TM_STBaO?usp=sharing
1. Making Unidirectional MOSFET Motor Driver (Perf board version)
We’ll start by assembling the Unidirectional MOSFET Motor Driver, which is the same driver used in my ESP32 RC FPV Paper Airplane project to power its micro coreless motors. This simple design works for a wide variety of small motors and can be easily constructed using a perf board and a few basic components.
Parts Needed:
- (x1) SI2300 N-Channel MOSFET (SOT-23 package)
- (x1) 10K Ω Pull-Down Resistor (0805 SMD)
- (x1) 1N4148 Switching Diode (SMD)
- (x3) Wires (30AWG)
- (x1) Perf Board (with four grouped pads for components)
Alternative Parts:
- Instead of the SI2300, you can use SI2302 or SI2304 N-channel MOSFETs, which are also suitable for this application.
1. Prepare the Perf Board:
- Secure your perf board using helping hands or similar tools to hold it steady while you work.
- Choose 4 grouped pads on the board, making sure you have enough space to fit all components.
2. Solder the MOSFET:
- Use tweezers to place the SI2300 MOSFET in the chosen location on the board.
- The SI2300 MOSFET has three pins: Gate (G), Drain (D), and Source (S).
- Solder the MOSFET into place using a soldering iron and some soldering tin.
3. Add the Diode (Flyback Protection):
- The 1N4148 diode is used to protect against voltage spikes (flyback) when the motor is turned off.
- Solder the anode (marked end) of the diode to the MOSFET’s Drain pin.
- The cathode (unmarked end) will later connect to the power supply.
4. Place the Pull-Down Resistor:
- The 10KΩ pull-down resistor is important for ensuring that the MOSFET gate is correctly controlled.
- Place the SMD resistor between the Gate and Source pins of the MOSFET.
- Use tweezers to hold the resistor in place and apply heat to one side at a time to ensure it’s securely soldered.
5. Connect the Wires:
- Black wire: Solder to the Source pin for the ground (GND).
- Red wire: Solder to the cathode of the diode to connect to the power supply.
- Other color wire (e.g. Yellow): Solder to the Gate of the MOSFET for the control signal.
6. Final Assembly:
- Once all components are soldered in place, double-check the layout against the reference sketch to ensure everything is connected correctly.
- After confirmation, cut out the tiny circuit from the perf board, leaving you with a compact 5x5mm motor driver.
This unidirectional MOSFET motor driver is now ready for use with your small motors. Whether you're controlling micro coreless motors or any other small DC motors under 3 amps, this driver offers a simple and effective solution.
For those who prefer a more professional approach, later on, we will also cover creating a PCB version of this driver for more robust projects.
This process helps ensure the components are securely placed and gives you a compact, efficient motor driver that can be integrated into your projects.
2. Schematic of Unidirectional MOSFET Motor Driver
To ensure your motor driver works as expected, it's important to follow the schematic diagram closely. This will help you through each step to make all the right connections for the Unidirectional MOSFET Motor Driver.
Having a clear schematic in hand when making any of the drivers will help you avoid many mistakes and achieve functional custom modules.
3. Quick Test and Specs - Unidirectional MOSFET Motor Driver
Now that your motor driver is complete, it’s time for a quick test. Start by soldering and connecting a tiny coreless motor, ensuring the correct polarity (-+) across the diode.
In this test, we’ll send an all-or-nothing (HIGH/LOW) signal to see if the driver works as expected. To do this, attach a propeller to the motor to visibly monitor the shaft’s rotation. Power the driver with a voltage between 2V and 12V from your power supply through the power wires. Then, run the motor by sending a 3.3V or 5V signal through the driver’s signal wire.
We’ll do further tests of the motor driver later in the blog, but here’s a quick overview of its specifications so you know what to expect and how to handle it properly:
- Supply Voltage: 2-12V
- Max Current: 3A
- Signal Voltage: 3.3-5V
- Dimensions: 5x5mm
- Weight: 0.2g
- Direction: Unidirectional (1 direction only)
- Usage: Best suited for small RC vehicles like drones or planes that use micro coreless motors.
This driver is perfect for low-current applications (Under 3A continuous), like powering small motors in drones or planes. However, it’s limited to driving motors in one direction. If you need a driver for motors that require higher current, consider scaling up by using through-hole components like a 1/4W 10K-ohm resistor, 1N4148 fast switching diode, and an IRF3205 N-channel MOSFET. The connections would remain similar, but with the larger MOSFET, you can drive motors drawing 20+ amps.
For more details and to view the alternative components, check the image and project files linked in the resources section above.
4. Making Unidirectional Quad-MOSFET Motor Driver (Perf board version)
Let’s take things up a notch! If you want to drive 4 motors for a DIY mini drone, you can create a compact 4-channel version of the motor driver we built earlier. This helps save space and minimize weight when having to drive more motors.
To make the quad motor driver, you’ll need:
- Four of the same components we used for the single motor driver
- A perf board with a 2x8 grid of pads
- The same wires, but with three additional wires for the extra signal pins
- Thin solid copper wire
Steps:
- Place the MOSFETs: Start by placing all four MOSFETs on the perf board, then solder them one at a time. Make sure the Drain pins are positioned to touch the right side pads.
- Diodes: After the MOSFETs are in place, it’s time to add the diodes. Use a multimeter in diode-testing mode to check the polarity before soldering. The diodes in this quad motor driver will face the opposite direction compared to the single-channel version.
- Pull-down Resistors: Solder the 10K-ohm pull-down resistors across the MOSFET gates to pull them low by default.
- Wiring: Use 0.3mm enameled copper wire (stripped of enamel) and tin it with solder. Start by connecting all the diode cathode pins together to form the power rail. Make sure the wire doesn’t touch the wrong pads.
- Connect the Ground: Next, connect all the MOSFET source pins with a separate piece of wire to create the ground rail, again using the lower pads for soldering. Extend both the power and ground rails with separate wires.
- Signal Wires: Attach one signal wire to each MOSFET gate, using different colored wires for clarity.
Important Note:
When handling the MOSFETs, always wear an antistatic wrist strap to prevent damage from static electricity. I’ve damaged a few sensitive components in the past from static discharge, so it’s always safer to take this precaution. You can find one of these wrist straps online, and there are dozens of tutorials on how to use them on YouTube.
Final Touches To The Driver:
Once everything is soldered in place, trim the excess perf board, and sand it down to reduce weight. And with that, you’ve got yourself a complete 4-channel motor driver!
Now, you’re ready to power your mini drone with a lightweight, efficient driver.
5. Schematic of Unidirectional Quad-MOSFET Motor Driver
6. Quick Test and Specs - Unidirectional Quad-MOSFET Motor Driver
Now that we’ve built the driver, let’s connect four motors and perform a quick test.
Connecting the Motors:
The process is quite similar to the tiny driver board. The motors’ positive wires connect to a common power rail, while the negative wires go to the Drain pins of each MOSFET.
Testing the Motors:
Once everything is connected, hook the driver up to a power supply. To test each motor, simply apply a voltage to each individual signal wire. This will activate each motor one by one, and you’ll be able to see them running based on the signals you supply.
Specs:
- Supply Voltage: 2-12V
- Max Current: 3A
- Signal Voltage: 3.3-5V
- Dimensions: 6x20mm
- Weight: 1g
- Channels: 4
- Direction: Unidirectional (1 direction only)
- Usage: Best suited for small RC vehicles like drones or planes that use four micro coreless motors.
With its four channels, this driver is a perfect fit for powering quadcopter-style vehicles, allowing you to control each motor individually for precise movement.
For driving a motor in both directions, we need a bidirectional H-bridge motor driver. This driver is perfect for applications like controlling motors in RC cars (such as a micro RC Hot Wheels car) or wheeled robots, including ones like my RC Battlebot.
Step-by-Step Build:
- Component Layout: The layout will consist of capacitors, diodes, resistors, and transistors. To make sure everything fits, refer to the component layout sketch that shows where to place each part on the perf board.
- Soldering the MOSFETs:
- N-channel MOSFETs: Begin by placing and soldering the two N-channel MOSFETs. Attach the flyback diodes across their Drain-to-Source pins, making sure the diodes' cathodes face toward the N-MOSFETs’ Drain.
- P-channel MOSFETs: Now, place and solder the P-channel MOSFETs. These should be positioned 180° reversed from the N-channel MOSFETs, with their diodes facing forward - cathodes to the P-MOSFETs’ Source pins.
- Resistors and Transistors:
Add a 10K pull-down resistor to each MOSFET.- Solder 100-ohm gate resistors to each of the P-MOSFETs, connecting them to NPN transistors to control them. Add 1K-ohm current-limiting resistors to each transistor's base for limiting current.
- Additional Components:
In the top left corner, solder a power-indicating LED with a 270-ohm current-limiting resistor.- Add a 10-microfarad capacitor to help stabilize power fluctuations.
- Jumpers and Connections:
- Use 0.3mm enameled copper wire to create jumper wires for bridging any unconnected power, ground, and crossed connections.
- Connect corresponding signal lines with the crossed wires leaving you with just two signal lines to toggle—one for each direction.
After everything is soldered, check the connections against the schematic found in the project files to ensure everything is wired correctly.
To finish the board:
- Add wires for power, ground, and two signals. These signals will control the direction the motor turns when toggled.
- Score along the perimeter of the circuit on the perf board and snap it out to finish the H-bridge motor driver.
With the H-bridge driver assembled, you'll now have full control over your motor, able to switch the direction with ease.
8. Schematic of Unidirectional Quad-MOSFET Motor Driver
9. Quick Test and Specs - Bidirectional H-bridge Motor Driver
Let's connect the motor wires to the two central areas between the P and N-channel MOSFETs, completing the H-bridge circuit.
Once you power the driver, you should notice the LED turning on. When you apply a signal to one of the input wires, the motor will spin in one direction. Applying a signal to the other wire will cause the motor to reverse its rotation.
Note: You must never apply a signal to both wires at once, or else you will short the MOSFETs and destroy the circuit.
Specs:
The key differences for the H-bridge driver are:
- Minimum Voltage: 3V
- Max Current: 2A in both directions
- Size: 13x8mm
- Weight: 1 gram
- Idle Power Consumption: 9mA (due to the LED)
- Function: Bidirectional motor control, making it ideal for RC vehicles that need to move forward, backward, and turn - as well as in robotic actuators.
Components:
If you have trouble sourcing the specific SMD transistors needed for the build, here are some suitable alternatives:
- N-MOSFET (SI2300):
- SI2302 (A2SHB marking)
- SI2304 (A4SHB marking)
- P-MOSFET (SI2301):
- SI2303 (A3SHB marking)
- SI2305 (A5SHB marking)
- RM3401 (A19T marking)
- NPN Transistor (BC847B):
- MMBT3904 (1AM marking)
- MMBT2222A (1P marking)
High-Current Option:
If you want to increase the current capacity, the project files folder contains a layout of labeled components for building an H-bridge according to the same schematic that can handle 20+ Amps of current, perfect for heavy-duty brushed motors.
10. Making PCB Motor Drivers
Creating PCB versions of your motor drivers is a game-changer for saving time and making sure you are left with a cleaner, more professional build. Instead of manually soldering components onto perf-boards, you can speed up the process and raise the overall quality with PCB manufacturing. Here's how it works:
- Order Your PCBs: Send your design files to a PCB manufacturer like JLCPCB, who provide quality PCBs starting at just $2: https://jlcpcb.com/?from=MaxImagination
- Assembling Components: Once you receive your PCBs:
- Apply solder paste to the pads.
- Place the components in their respective positions.
- Use a hotplate or reflow oven to solder everything in place.
This process makes production faster, easier, and more consistent.
In the image above, you can see all four PCB motor driver designs alongside the corresponding components required for assembly. These drivers are perfect for various RC and robotics applications, providing reliable performance and a clean finish.
Curious about the PCB design software I use? I use Flux. An online ECAD software that uses AI to assist you in building your circuit boards faster - sign up to try Flux for free up to 5 projects: https://www.flux.ai/signup?utm_source=influencer&utm_medium=organic_social&utm_campaign=MaxImagination2
11. Motor Driver PCB Ordering Process
Ordering PCBs for your motor driver project is straightforward and efficient. Here’s a quick walkthrough:
- Upload Gerber Files:
- Find the Gerber files included in the project resources.
- Upload these files to the PCB manufacturer's website to get an instant quote.
- Select Board Parameters:
- Choose 2 layers for the board.
- Decide on the board quantity (e.g., 10 of each design).
- Set the board thickness (1.0–1.6mm depending on your durability needs).
- Optional: Pick your favorite PCB color for a custom look.
For my boards, the only thing that differs is the thickness (1.0 and 1.2mm).
- Place Your Order:
- Add all your PCB designs to the cart (I ordered all four designs).
- Confirm the details, then proceed to checkout.
- Track and Wait:
- After placing the order, track its progress in real time while the manufacturer processes your PCBs.
I’ve been impressed with JLCPCB’s reliability and the quality of their finished boards. They make the process smooth, from uploading files to receiving professional-grade PCBs, all at an affordable price.
If you’re planning to replicate my project or create your own PCB motor drivers, you can order your boards with JLCPCB here: https://jlcpcb.com/?from=MaxImagination
BONUS - Use this $10 PCB Service Coupon: https://bit.ly/4fxVW3L
12. Assembling PCB Motor Drivers
To assemble your PCB motor drivers, follow these steps:
1. Secure the Boards
- Prevent movement by surrounding each PCB with larger PCBs or perf boards taped down on your workspace.
- This ensures the boards stay in place while you work.
2. Apply Solder Paste
- Using a fine tip dispenser, apply a small amount of solder paste to all the pads where components will attach.
3. Pick and Place Components
- With tweezers, carefully place each corresponding component onto its designated pad.
- This step is simpler than working with SMD components on perf boards but still requires steady hands to avoid misalignment or creating a mess.
4. Heat the Components on the Hotplate
- Heat your hotplate to around 200°C (above the solder paste's melting point of 138°C).
- Bring in a solder fume extractor to avoid inhaling toxic fumes.
5. Solder and Align Components
- Place the PCB onto the hotplate and observe as the solder paste melts beneath the components.
- While the solder is molten, carefully adjust the components with tweezers to make sure you get proper alignment and avoid poor solder joints.
6. Cool Down the Boards
- Once the components are correctly positioned, remove the board from the hotplate and let it cool.
- Repeat this process for the remaining boards.
After assembling and cooling, you’ll have 4 complete PCB motor drivers, ready for use!
To test the dual H-bridge motor driver, I integrated it into my RC combat robot, Death Roll. After soldering wires for ground, power, and four signal inputs (two per motor), I replaced the stock driver (DRV8833 module) with the custom PCB driver and connected it to the Arduino UNO R4 WiFi and the power source.
The motors worked perfectly, responding to forward, backward, and turning commands, with smooth bidirectional movement. PWM signals were also handled quite well, enabling precise speed control. The custom PCB proved to be a compact and reliable DIY driver alternative for the robot.
To successfully create these motor drivers and your custom types in the future, it’s crucial to understand how MOSFETs work, as they’re the foundation of these circuits.
Basic MOSFET Functionality
A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is an electronic switch that controls current flow. Think of it as a water tap:
- Gate: Like the tap’s knob, it controls the flow when voltage is applied.
- Drain: The inlet, connected to the power supply.
- Source: The outlet, connected to ground, enabling current to flow through a load (e.g., a motor).
When voltage is applied to the Gate, the MOSFET allows current to flow from the Drain to the Source, powering the motor. The motor connects to the Drain and power supply, while the Source goes to ground. This setup enables the motor to spin when the Gate receives a signal from a microcontroller.
Protective Components
Driving motors with a MOSFET alone isn’t ideal due to potential damage from motor behavior. Key protective components include:
- Flyback Diode:
- Motors, being inductive loads, generate voltage spikes when power is cut off.
- A flyback diode across the motor terminals provides a safe path for reverse currents, protecting the MOSFET. Ensure the diode’s stripe points toward the power supply.
- Pulldown Resistor:
- The Gate can float in an undefined state without a signal, leading to unpredictable behavior.
- A 10k-ohm pulldown resistor pulls the Gate to ground, ensuring the MOSFET stays off when no signal is present.
By understanding these basics and incorporating these components, your motor drivers will be more reliable and robust.
Building on the Unidirectional Motor Driver, the H-bridge motor driver adds bidirectional control, perfect for RC vehicles and robots. It’s called an "H-bridge" because its circuit layout resembles the letter "H," with the motor forming the horizontal bridge and four MOSFETs (two P-channel and two N-channel) creating the legs.
How It Works
The H-bridge uses MOSFETs as electronic switches to control current flow:
- Forward Motion: One P-channel and the opposite N-channel MOSFET turn on, creating a path from the power supply through the motor to ground.
- Reverse Motion: The other pair of MOSFETs turn on, reversing the current through the motor.
- Crossed Switching: Both transistors on the same side of the “H” must never turn on simultaneously to avoid a short circuit. Control logic or a microcontroller manages this and often includes a small delay between switching directions to prevent current jams.
Key Components
- NPN Transistors for P-Channel Control
- P-channel MOSFETs require a low voltage at the Gate to turn on (inverse of N-channel).
- NPN transistors act as intermediaries, pulling the Gate low when triggered, making it easier for the microcontroller to control the MOSFETs with high signals.
- This setup reduces the inputs from 4 to 2, simplifying control: one input drives the motor forward, and the other drives it backward.
- Flyback Diodes for Protection
- External diodes across the MOSFETs prevent voltage spikes from damaging the transistors.
- These complement the internal body diodes of the MOSFETs by handling higher-frequency reverse currents.
H-bridge drivers have several advantages, with one of the most notable being bidirectional control. By toggling specific pairs of MOSFETs, you can easily reverse the direction of the motor. Additionally, H-bridge drivers are highly versatile, making them ideal for a wide range of applications, including RC vehicles, robots, and other projects that demand precise motor control.
Practical Example: RC Vehicles
For an RC car or robot:
- Driving Forward: The H-bridge directs current one way through the motor.
- Reversing: It flips the current direction.
- Turning: Dual H-bridges allow independent control of two motors, enabling precise steering or pivoting.
This makes the H-bridge useful for driving wheels, tracks, or steering mechanisms in all sorts of motorized projects.
16. Pairing The Right Motor With Your Driver
When selecting motors for your RC projects, it's important to ensure the motor’s power specs and stall current match the capabilities of your custom driver. Don’t rely solely on datasheets—it's best to test the stall current yourself using a multimeter or a power supply that shows current measurements.
First, measure the motor's no-load current by powering it up, and then gently stop the motor shaft with pliers to determine the stall current.
Larger motors typically have higher stall currents, and if these exceed 2-3 amps, it can overheat or damage the MOSFETs in your small drivers. As shown in the image above, smaller brushed motors can be safely handled by both driver types at full capacity, while larger brushed motors may push the limits of these drivers under load.
Always test your motor to ensure it's a good match for your driver to avoid potential issues.
If you’re curious about what motors I tested to work well with each of the drivers - check them out here:
Coreless Micro Motors - https://www.dfrobot.com/product-2308.html?tracking=Tk1eY5yj9JsEnf6YqK2D63VcgemW5CyMyE46vHVpHGIu1cN4PPALqEFIUfVSDA5J
Micro Metal DC Geared Motor - https://www.dfrobot.com/product-1736.html?tracking=Tk1eY5yj9JsEnf6YqK2D63VcgemW5CyMyE46vHVpHGIu1cN4PPALqEFIUfVSDA5J
TT Geared Motor - https://www.dfrobot.com/product-1457.html?tracking=Tk1eY5yj9JsEnf6YqK2D63VcgemW5CyMyE46vHVpHGIu1cN4PPALqEFIUfVSDA5J
17. Motor Driver Demo With ESP32 and WiFi RC App
In this demo, we'll use DFRobot’s FireBeetle 2 Board, an ESP32-S3 microcontroller, to showcase how it works with our DIY motor drivers for a complete RC system.
DFRobot has proudly sponsored this project and they’ve provided me with their new FireBeetle 2 ESP32-S3-U board which you may find here: https://www.dfrobot.com/product-2677.html?tracking=Tk1eY5yj9JsEnf6YqK2D63VcgemW5CyMyE46vHVpHGIu1cN4PPALqEFIUfVSDA5J
The microcontroller works seamlessly with my favorite WiFi-based camera stream motion-capture and remote-control app by s60sc for ESP32 boards, available on GitHub: https://github.com/s60sc/ESP32-CAM_MJPEG2SD
This app has been used in a handful of my remote-controlled projects, and it now includes thumb-slider controls for driving motors in RC vehicles, making it perfect to use with motors like the ones from DFRobot and our custom H-bridge motor driver.
To hook things up, simply connect the motor driver’s inputs to any two of the 26 I/O pins on the ESP32-S3. We’ll also wire up power and ground, ensuring both the driver and ESP32 share a common ground. After powering the board via USB-C and supplying power to the motor driver, you can load the app on your phone and use the slider to drive the motor forward and backward at adjustable speeds. The FireBeetle 2’s WiFi connection has impressively low latency, offering nearly instant feedback from the motor. Plus, with its optional external antenna, this board is great for long-range control.
This demo demonstrates how to integrate motor drivers with WiFi remote control for your next RC project.
Beyond motors and boards like the FireBeetle 2, DFRobot offers a wide range of modular tech from robotics parts to AI hardware - that can help makers like us bring our ideas to life. Feel free to shop for your project parts at DFRobot.com: https://www.dfrobot.com
For those of you facing issues getting your drivers to work, here's a troubleshooting cheat sheet to help you get unstuck:
Three Common Issues with Solutions:
- Overheating Driver:
- If your driver board overheats, it could be because you're using a motor with a stall current that exceeds the driver’s limit. Ensure you’re using a motor within the driver’s current range.
- If the MOSFET is damaged causing it to fail SHORT (short-circuit) as a result - overheat, it might be due to a reversed protective diode. Always double-check the diode polarity using a multimeter.
- Motor Not Responding:
- If the motor isn’t responding to input, a faulty signal might be the issue. Check your signal source to ensure it's working correctly.
- A resistor that's too strong could prevent proper MOSFET operation. Ensure your gate resistor is between 5 and 20 kiloohms. 10 kiloohms has worked best for me.
- Improper handling could damage the MOSFET. If it's fried, replace it, add better protection, and proceed with your project.
- Motor Running Continuously:
- If your motor runs continuously without any input signal, the MOSFET’s drain-to-source region might have short-circuited. Replace the MOSFET and troubleshoot further.
- A floating gate could also cause issues. Ensure your pull-down resistor is properly pulling the gate to GND without loose connections.
Points for Improvement:
To enhance the performance of your custom motor drivers, here are a few advanced improvements to consider:
- Heatsinks: Attach heatsinks to the back of your drivers to keep them cool, especially under heavy use.
- Increase Current Capacity: If you need more current, you can add extra MOSFETs in parallel to double or even triple the current handling without increasing the design size by much.
- Flyback Diodes: If you're dealing with harsher motor reverse currents, upgrade to higher-rated flyback diodes to better protect your driver.
- Decoupling Capacitors: Adding decoupling capacitors to the power terminals will filter out electrical noise from the motors, preventing interference with other nearby electronics.
- Protective Circuitry: Consider adding protective circuitry to safeguard your drivers from excessive current draw caused by the motors.
These improvements aren't mandatory but can provide extra protection and performance, especially in demanding applications.
To wrap things up, here's the cost for making each motor driver we built, based on components purchased from Amazon (excluding board material costs):
- The unidirectional single-channel driver costs just $0.15.
- The unidirectional quad-channel driver totals $0.45.
- The single-channel H-bridge driver comes to $1.72.
If you're looking to save even more, consider repurposing components from old electronics like TVs, mobile devices, or computer boards. These often contain most of the components you need to build your custom motor drivers.
For your convenience, all the resources needed to build these drivers are linked at the top of this blog. I’m excited to see how you bring your next RC project to life with these boards! And for inspiration, check out my mini Arduino FPV drone project that uses the Quad-MOSFET Unidirectional Motor Driver.
Projects featuring each type of motor driver:
- FPV RC Paper Airplane - https://youtu.be/hDjBi0ErDdw
- Mini Arduino FPV Drone - https://youtu.be/Sa6EslOHsI0
- FPV RC Hot Wheels Car - https://youtu.be/nx7Ih79KevE
- RC Arduino Battle Bot ‘Death Roll’ - https://youtu.be/yGK8LqaogvU
Building custom motor drivers not only saves you money but also provides the flexibility to customize size and functionality to suit your needs. Plus, it helps you gain a deeper understanding of motor driver mechanics, making troubleshooting and future projects much easier.
When should you consider buying a motor driver instead?
- If you're short on time.
- If you're working with high-power motors.
- If you need advanced features like overcurrent protection.
Commercial motor drivers are still a solid choice for specific needs, especially when you need more advanced features. But for small-scale RC projects, custom micro motor drivers are a win in my book - you can tailor them to your needs and pick up valuable electronics skills along the way!
Readers! If you want the video version of this motor drivers guide, watch it on YouTube here:
Discussion (0 comments)