Attiny13A Motor Controller Board
Introduction: Attiny13A Motor Controller Board
Hey Guys how you doing!
So here's something super interesting and useful, a motor controller board powered by an Attiny13A to control a Brushed DC Motor.
This Motor Driver uses PWM to control the gate of an N Channel IRFZ44N mosfet by the Tap of a single button.
I've added Two Modes in the code that basically controls the Duty Cycle, On First Tap the setup turns ON at 100% Duty cycle, then on the Second Tap, the Duty Cycle is half at 50%. The third Tap turns the whole setup OFF.
I made this Motor Controller board for a future project that is a Bladeless Fan Project that I will soon publish.
This Instructables is about the whole building process of this Motor Controller so let's get started!
Supplies
Following were the materials used in this project-
* Attiny13A
* Custom PCB
* Brushed DC Motor
* IRFZ44N
* AMS1117 5V
* 10K Resistor
* 1uf Capacitor
* 10uf Capacitor
Step 1: SCHEMATIC and PCB Design
This Schematic is a simple one, there's an N Channel Mosfet that is configured in "Mosfet as Switch setup". This means the gate of Mosfet can be used to power the load which is, in this case, a DC Brushed Motor.
There are two Resistors connected to the Gate of Mosfet, one is connecting the gate with GND and another one is connected to the D0 Pin of Attiny13A.
I've used an Attiny13A to control the whole setup by using a Switch that is connected to the D4 pin and GND. By connecting D4 Pin to GND, Microcontrollers read this and provide the gate of Mosfet with a PWM signal that controls the gate of mosfet and the speed of the motor.
Now, the motor that I'm using works at 12V and above but the microcontroller needs 5V Input so to step down 12V into 5V for MCU, I've added an AMS1117 5V Voltage Regulator.
As for programming pins for Attiny13, I haven't added any. 982
Because I'm using the DIP version of attiny and I'm planning to flash attiny with my Attiny programmer that has DIP Socket for flashing the MCU.
I finalise the Schematic and prepared the PCB according to the PCB Outline that is required in my BLADELESS FAN Project.
Step 2: Getting PCBs From SEEED Studio
After finalizing the PCB and generating its Gerber data, I send it to SEEED STUDIO for samples.
Ordered PCBs in Yellow Soldermask with white silkscreen.
I received PCBs in a week and their quality was super good considering the rate which was also pretty low.
Seeed Fusion PCB Service offers one-stop prototyping for PCB manufacture and PCB assembly and as a result, they produce superior quality PCBs and Fast Turnkey PCBA within 7 working days.
PCB Quality of this Motor Controller PCB WAS SUPER!
Seeed Studio Fusion PCB Assembly Service takes care of the entire fabrication process from PCB manufacturing, parts sourcing, assembly, and testing services, so you can be sure that they are getting a quality product.
After gauging market interest and verifying a working prototype, Seeed Propagate Service can help you bring the product to market with professional guidance and a strong network of connections.
Step 3: PCB ASSEMBLY
PCB Assembly of this project consists of four major steps which are
* Solder Paste Dispensing Process
* Pick & Place Process
* Hotplate Reflow
* Adding THT Components
Step 4: Solder Paste Dispensing Process
We start first by adding Solderpaste to each component pad on the bottom side of the board.
Step 5: Pick & Place Process
Then we pick and place each component in its assigned place one by one.
Step 6: Hotplate Reflow
Next, we carefully lifted the whole PCB and place it on the hotplate. I’m using my good old DIY hotplate which I made a while back.
Hotplate Heats the surface up to the solder paste melting temp and it slowly melts. after a few mins when the solder paste completely melts, we remove the PCB and let it cool down for a moment.
Step 7: Adding THT Components
Here's the final setup, we place the remaining two components which are DIP Socket and Mosfet. However, we also add an SMD LED on the Top side with a soldering Iron as well, we cannot use a hotplate for placing the LED as we already place stuff on the Bottom side and this hotplate method is applicable for one side only. 472