Close
0%
0%

Pico Motor Driver

Motor Driver powered by a Raspberry Pi Pico, uses a Mosfet as switch setup to run motor.

Similar projects worth following
96 views
0 followers
Greetings everyone and welcome back, Here's something useful: the PICO DRIVER, a motor driver driven by a Raspberry Pi Pico and constructed from scratch.

The objective of this project was to build a Simple Motor Driver that would allow us to continually run a 12V DC Gear motor for a future project. Here, we wanted to run the motor constantly and incorporate a few timed delays, which would turn the motor on for 20 seconds, switch it off, and then turn it on and off again in a repeating loop.

The IRFZ44N mosfet, a well-known mosfet utilized for high current and voltage switching, is the N channel mosfet that we are pairing with another n channel mosfet. We are using a smaller AO3400 mosfet that is coupled to the IRFZ44N gate in order to control the Mosfet. Here, the Gate of AO3400 is connected to Pico's GPIO.

This motor driver is capable of operating both indictive and resistive loads.

DESIGN

We first prepared the design in Fusion 360, which included a board for the Raspberry Pi Pico and additional parts like a barrel jack and CON2 for attaching the load.

Here, we use PCB standoffs which connects to the main board and we then place another board on top of main PCB which will act as a cover.

We then built a third customized layer, or board, that will be 3D printed, and on top of it we extruded the PICO DRIVER initials.

After completing the design, we exported the third layer file into a mesh file and 3D Printed it using dual color PLA, black for base layer and White for Top initials layer.

PCB DESIGN



Following the model's completion, we created the project's schematic, which was divided into three main sections: the input section, the Pico Setup, and the Mosfet switch setup.

The input section comprised of an AMS1117 3.3V Voltage Resulator input connected in series with two diodes and a DC barrel jack whose positive was connected. We have added a 10uF 50V 1206 capacitor to the AMS1117's input side and a 1uF 50V 1206 capacitor to its output side.

There's also an LED connected with a resistor in series linked to the positive of DC jack before diode; this LED will act as a power indicator.

Next comes the Pico Section, where the AMS1117's output terminal is linked to 3V, and GND is connected to GND. The AO3400 Mosfet's gate is wired to Pico's GPIO0.

Two mosfets are utilized in the mosfet switch arrangement because the IRFZ44N is a high current, high voltage mosfet with a gate-source voltage of 12V to 20V. Because our pico GPIO can only output voltages lower than 3V, this is insufficient to completely turn on the mosfet.

In order to address this issue, we added an additional mosfet, the AO3400, and wired its source to the IRFZ44N Mosfet's gate and drain to 12V. In this case, the gate-source voltage of the AO3400 is less than 4.5V, which is ideal for The PICO.

Once the schematic is finished, we create the board shape and mounting holes using the dimensions from the Cad file.

HQ NextPCB Service

After completing the PCB design, we export the Gerber data and send it to HQ NextPCB for samples.

We placed an order for a white silkscreen LED board.

After placing the order, the PCBs were received within a week, and the PCB quality was pretty great.

HQ NextPCB and HQ Online are the overseas trading brands of Shenzhen Huaqiu Electronics Co. Ltd.. Huaqiu has served national engineers for over 15 years, becoming a household name in providing full-feature multilayer PCBs engineers can trust.

NextPCB brings these capabilities, speed, affordability and more, to international customers, skipping the middleman and providing the same intelligent online quotation system from the industry’s experts.

Huaqiu Electronics believe innovation is key to maintaining excellence, which has motivated them to transform the electronics manufacturing industry. Huaqiu’s in-house engineers developed the free Design for Manufacturing software, HQDFM, revolutionizing how PCB designers visualize and verify their designs.

HQDFM: Free Online Gerber Viewer and DFM Analysis Tool

Also, NextPCB has its own Gerber Viewer and DFM analysis software.

Your designs are improved by their HQDFM software (DFM) services. Since I find it annoying to have to wait around for DFM reports from manufacturers, HQDFM is the most efficient method for performing a pre-event self-check.

https://www.nextpcb.com/free-online-gerber-viewer.html

With comprehensive Design for Manufacture (DFM) analysis features, HQDFM Gerber Viewer is a free, sophisticated online PCB Gerber file viewer.

Along with supporting the top 5 web browsers, it is compatible with RS-274x and Extended (X2) Gerber files as well as OBD++ files from popular PCB CAD programs including Autodesk Eagle, DipTrace, DesignSpark, Altium Designer, and KiCad. HQDFM is a product of HQ Electronics, which also developed...

Read more »

mot.pdf

Adobe Portable Document Format - 156.99 kB - 07/29/2024 at 08:02

Preview

Pico Driver v2.f3d

fusion - 366.82 kB - 07/29/2024 at 08:02

Download

TOP.stl

Standard Tesselated Geometry - 160.24 kB - 07/29/2024 at 08:02

Download

  • 1
    PCB ASSEMBLY PROCESS
    • Using a solder paste dispensing needle, we first add solder paste to each component pad, one by one. We're using standard 37/63 solder paste here.
    • Next, we pick and place all the SMD components in their places on the PCB using an ESD tweezer.
    • With extreme caution, we lifted the complete circuit board and placed it on the SMT hotplate, which increases the PCB's temperature to the point at which the solder paste melts and all of the components are connected to their pads.
    • Next, we added the THT components that included the female header pins, The DC Barrel jack and the CON2 Screw connector and the solder their pads using a soldering iron.
    • The IRFZ44N Mosfet is then installed in its designated spot and soldered there.
    • We utilize an M2.5 nut and bolt to secure the mosfet with PCB in order to mount the IRFZ44N in its proper location.
    • Finally, using the female header pin connectors, we installed the Pico in its place.
  • 2
    Final Assembly
    • We began the primary assembly process by first attaching the PCB standoffs to the main board, then covering it with the second PCB and fastening it with M2.5 bolts.
    • We secured the main board and cover board together by doing the same for each of the four PCB standoffs.
    • Next, we take the third layer part and place it on top of the cover layer, we remove the bolts from the cover layer and use those bolts to secure the 3D-printed third layer in place.

    Motor Driver is now complete.

  • 3
    CODE
    int Motor = 0;        
    int Speed = 0;  
    int fadeAmount = 5;  
    
    void setup() {
    
    pinMode(Motor, OUTPUT);
    }
    
    void loop() {
    analogWrite(Motor , Speed);
    Speed = Speed + fadeAmount;
    
    if (Speed <= 0 || Speed >= 255) {
    fadeAmount = -fadeAmount;
    }
    delay(30);
    }

    Here's the code used in this project and its a simple one, its basically a fade sketch changed for driving a motor, here the speed increases from 0 to 255 and then it decreases from 255 to 0 and this goes in a loop.

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates