Motor Driver Board Atmega328PU and HC01
Introduction: Motor Driver Board Atmega328PU and HC01
Hey, what's up folks here's something super cool and useful if you're making a basic Robot Setup, A MOTOR DRIVER CONTROLLER BOARD that controls the motor driver by an Onboard MCU and has an HC01 BT Module for Bluetooth connectivity.
I added four mounting Holes on the PCB so I could add PCB Standoffs to hold the motor driver on the top side of the board in the air. It's a clever method to use standoffs as we can add multiple Modules with this method just by stacking them up in a row of standoffs.
I've also added an HC-SR04 Ultrasonic Sensor Breakout Pin on one side of the board so it can be used to make an obstruction-avoiding robot.
This Instructables is gonna be about the build process of this motor driver, so let's get started.
Supplies
Following were the things I used in this Project-
* Custom PCB
* Atmega328PU
* 22PF Cap 0603 Package
* 16Mhz Crystal
* 10K Resistor 0603 Package
* 1K Resistor 0603 Package
* Indicator LED 0603 Package
* AMS1117 Voltage Regulator
* HC01 BT Module
* 10uF Cap 1206 Package
* 1uF Cap 1206 Package
* IC Socket DIP 28
* USB Micro Port
* Header Pin socket
* Arduino as ISP Setup for flashing Atmega328PU
* PCB Standoffs
* Motor
* Ultrasonic Sensor HC-SR04
* Battery Pack 12V
* Motor Driver L298N
Step 1: Schematic
Here's the schematic that I prepared, it consists of a minimal Atmega328PU setup that is connected with an HC01 module. between Atmega328PU and HC01, there's an AMS1117 3.3V Voltage regulator for stepping down 5V from VCC to 3.3V for HC01 to work.
I've added a bunch of connectors for connecting stuff with atmega that includes ISP out which breakout SPI pins of Atmega for flashing, then I also added CON4 for motor driver IN1, IN2, IN3, and IN4 with D6, D9, D10, and D11.
I also added a few LEDs with D2, D3, and D4 along with a CON4 header pin for connecting the Ultrasonic sensor with this board.
After finalizing the schematic, I converted it into a board file.
Step 2: PCB Design
As for the design, I made a rectangular board with a chamfer at the edges, also I placed four mounting holes at the center of the board so I could place the L298N Motor driver on this PCB by using Standoffs.
Step 3: PCBWAY
After completing the design, I uploaded the Gerber data on PCBWAY's quote page, selected the solder mask color which was RED, and placed the order.
After placing the order, I received the PCBs in a week and the PCB quality was pretty great.
This shape is completely random so it's pretty hard to make but they did an awesome job of making this PCB with no error whatsoever.
Do check them out for getting great PCB Sevice for a less price.
Step 4: PCB ASSEMBLY
the PCB Assembly Process will have the following steps.
* Solder Paste Dispensing
* Pick & Place Process
* Hotplate Reflow
* Adding Remaining THT Components
* Burning Bootloader
Step 5: SOLDER PASTE
The first step is to apply solder paste to each component pad.
I used a normal Sn-Pb solder paste which has a melting temp from 140 to 270 °C.
After Adding solder paste, we move on to the next process which is the "PICK & Place Process"
Step 6: PICK & PLACE
I then used an ESD Tweeaser to carefully pick and place each SMD component in their assigned place one by one which took like 30 Seconds tops but the result was a perfect PCB with all the components placed in their location.
Step 7: HOTPLATE REFLOW
After the "PICK & Place Process", I carefully lifted the whole circuit board and place it on my DIY SMT Hotplate which is also homemade just like this project.
After a Few mins when the hotplate reaches the Solderpaste melting TEMP, all the components will get soldered by this Hot Reflow process.
We then remove the PCB from the Hotplate to cool down all componenets and board surface. 485