Eder Torres Lopez
Published © GPL3+

Serial Port Expander - Extra SPI and UART Ports with PIC MCU

Create a signal distribution board that can forward, parse and modify data packages from UART to SPI and/or a second UART port.

IntermediateFull instructions provided2 hours33
Serial Port Expander - Extra SPI and UART Ports with PIC MCU

Things used in this project

Hardware components

PICkit 3 In-circuit Debugger
Digilent PICkit 3 In-circuit Debugger
To program the microcontroller
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
Used to fabricated PCB
×1
Capacitor 22 pF
Capacitor 22 pF
Needed to be solder next to the crystal oscillator
×2
Capacitor 100 nF
Capacitor 100 nF
Decoupling capacitor for power rails
×4
Small Signal Diode, Switching Diode
Small Signal Diode, Switching Diode
Flyback diodes to protect IC's from the coils inside the relay
×2
LED (generic)
LED (generic)
For debugging purposes, surface mount are needed
×3
Terminal Block Connector
To connect to power and the two power LEDs
×3
JST Connector kit
×1
onsemi NPN Transistor - BC639
To turn on and off the relay
×2
Through Hole Resistor, 10 ohm
Through Hole Resistor, 10 ohm
5W Power Resistor
×2
Through Hole Resistor, 200 ohm
Through Hole Resistor, 200 ohm
for the red and yellow LED
×2
Through Hole Resistor, 150 ohm
Through Hole Resistor, 150 ohm
for the green LED
×1
Through Hole Resistor, 4.7 kohm
Through Hole Resistor, 4.7 kohm
To connect at the base of the BJT transistor
×2
Resistor 10k ohm
Resistor 10k ohm
To pull up the reset pin on the microcontroller
×1
Through Hole Resistor, 1.8 kohm
Through Hole Resistor, 1.8 kohm
R9 and R11 used for a voltage divider at the UART connectors
×2
Through Hole Resistor, 3.3 kohm
Through Hole Resistor, 3.3 kohm
R10 and R12 used for a voltage divider at the UART connector
×2
Signal Relay - Latching Dual Coil - DPDT - 5VDC
To turn on the high power LED
×1
Tactile Switch, Top Actuated
Tactile Switch, Top Actuated
To reset the Microcontroller
×1
PIC18F
Microchip PIC18F
PIC18F46K22
×1
Linear Regulator (7805)
Linear Regulator (7805)
Any pin compatible 5V regulator will work, the high power LEDs are powered by this regulator as well as the other components.
×1
Male Header 40 Position 1 Row (0.1")
Male Header 40 Position 1 Row (0.1")
×1
16 MHz Crystal
16 MHz Crystal
×1
SparkFun FTDI Basic Breakout - 3.3V
SparkFun FTDI Basic Breakout - 3.3V
To communicate the Serial Expander 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 Iron Kit, Weller XNT/THM Tips
Soldering Iron Kit, Weller XNT/THM Tips
Solder Wire, 0.022" Diameter
Solder Wire, 0.022" Diameter
Crimp Tool, Heavy-Duty
Crimp Tool, Heavy-Duty
Extraction Tool, 6 Piece Screw Extractor & Screwdriver Set
Extraction Tool, 6 Piece Screw Extractor & Screwdriver Set

Story

Read more

Custom parts and enclosures

Serial Port Expander - Gerber and Drill Files

These are the files to order the PCB to be fabricated at JLCPCB

Serial Port Expander - Bill of Materials

This file contains all the components used to build the PCB. Follow it to place and solder the components correctly

Schematics

Signal Distribution Board Schematics

This schematics shows how to connect all components together

Code

Serial Port Expander

This code was compiled with MPLABX XC8 Compiler

Credits

Eder Torres Lopez

Eder Torres Lopez

4 projects • 3 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

Add projectSign up / Login