Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Eder Torres Lopez
Published © GPL3+

Precision Motor Controller with LM629 and PIC MCU

Control up to 4 DC motors with high precision using quadrature encoders, can be added to robots or create CNC machines.

AdvancedFull instructions provided4 hours925
Precision Motor Controller with LM629 and PIC MCU

Things used in this project

Hardware components

PIC18F
Microchip PIC18F
For the digital board: PIC18F46K22
×1
PICkit 3 In-circuit Debugger
Digilent PICkit 3 In-circuit Debugger
For the digital board: Used to program the microcontroller
×1
PICkit 3 Programming Cable Kit
Digilent PICkit 3 Programming Cable Kit
For the digital board: Used to connect the microcontroller to the
×1
Resistor 10k ohm
Resistor 10k ohm
For the digital board: Pull up resistor for the reset pin of the microcontroller
×1
16 MHz Crystal
16 MHz Crystal
For the digital board: Crystal oscillator for the microcontroller
×1
Capacitor 22 pF
Capacitor 22 pF
For the digital board: Load capacitor for the crystal. 0805 SMD on the bottom layer of the PCB
×2
Capacitor 100 nF
Capacitor 100 nF
For the digital board: C3, C4, C5, C6, C7, C8 decoupling capacitors. 0805 SMD on the bottom layer of the PCB digital board. For the analog board: C1 and C2 capacitor for the voltage regulator on the Analog Power board.
×6
Straight Box Header Connector 2x10
1 per board: Connector to link the digital board to the analog/power board.
×2
Texas Instruments LM629N - Precision Motor Controller
For the digital board: Precision Motor controllers, you need one per motor
×4
IC & Component Socket, 28 Contacts
IC & Component Socket, 28 Contacts
For the digital board: Sockets to install the LM629N
×4
4 MHz Oscillator - ECS-2100AX-040
For the digital board: 4 Pin Oscillator for all the LM639N
×1
Screw Terminal Block Connector
1 per board. Terminal to connect the power on "Power >7v" on the digital board. And one for the analog/power board on " 12V Motors"
×2
Male Header 40 Position 1 Row (0.1")
Male Header 40 Position 1 Row (0.1")
The header pins are to connect the programmer to the microcontroller. But can also be used in place of the 2x10 row header box. Some header pins will be needed to connect the motors to the analog/power board.
×2
Through Hole Resistor, 1 kohm
Through Hole Resistor, 1 kohm
For the digital board: R1, R2, R3, R4 0805 SMD resistors used to pull up the index pin the the LM629N
×1
Tactile Switch, Top Actuated
Tactile Switch, Top Actuated
For the digital board: Used to reset the MCU. Surface mount.
×1
Linear Regulator (7805)
Linear Regulator (7805)
For the digital board: To regulate the power on for the MCU and the LM629Ns For the analog/power board to power the digital isolators.
×2
IC & Component Socket, 40 Contacts
IC & Component Socket, 40 Contacts
For the digital board: Used to hold the MCU
×1
Texas Instruments LMD18200t 55V H-Bridge
For the analog/power board. These are the motors H-Bridges, you need one per motors.
×4
Capacitor 100 µF
Capacitor 100 µF
For the analog/power board. C3, C4, C5, C6 are bulk capacitor to help the H-Bridges, 1 per motor needed.
×4
Capacitor 10 nF
Capacitor 10 nF
For the analog/power board. C7, C8, C9, C10, C11, C12, C13, C14 0805 surface mount capacitors, two per H-Bridge. These are bootstrap capacitors that assist for higher PWM frequencies.
×1
Texas Instruments Digital isolator ISO7220AD
For the analog/power board. These are digital isolators, they are surface mount 8 pin IC.
×1
SparkFun FTDI Basic Breakout - 3.3V
SparkFun FTDI Basic Breakout - 3.3V
To communicate the Signal Distribution board to the PC
×1

Software apps and online services

MPLAB X IDE
Microchip MPLAB X IDE
Circuit Maker
CircuitMaker by Altium Circuit Maker

Hand tools and fabrication machines

Soldering Station, 110 V
Soldering Station, 110 V
Solder Wire, 0.022" Diameter
Solder Wire, 0.022" Diameter

Story

Read more

Custom parts and enclosures

Motor Controller Board (Digital board) - Gerber and Drill files

This zip file contains the necessary files needed to send the digital board to get manufactured at JLCPCB

Motor Controller Board (Digital board) - Bill of Materials

This excel file contains the Bill of materials and the label that corresponds to the PCB. Use it to solder the parts

Motor Controller Board (Power board) - Gerber and drill files

This zip file contains the necessary files to send this board to get manufactured. Use it to get it fabricated at JLCPCB

Motor Controller Board (Power board) - Bill of Materials

This excel file contains the bill of materials. It label the components so it can be used to solder the components in the correct place.

Schematics

Motor Controller Board (Power board) - Schematics

This schematics show the how the analog/power board are interconnected.
Follow this diagram, and the BOM to put the board together.

Motor Controller Board (Digital board) - Schematics

This schematic file shows how the components in the digital board are interconnected. Use this file along the the BOM to put the board together.

Code

Precision Motor Controller

This code is used to program the microcontroller on the digital controller. This code will allow the MCU to receive commands through SPI, analyze the data packets received and control the LM629 motor controllers.

Credits

Eder Torres Lopez

Eder Torres Lopez

8 projects • 9 followers
I've been working on embedded systems since 2012 to create workshops for our IEEE student branch at the University where I obtained a BSEE.

Comments