Custom Footprint for TP4056 Module in Altium Designer

by taste_the_code in Circuits > Software

1890 Views, 2 Favorites, 0 Comments

Custom Footprint for TP4056 Module in Altium Designer

thumb instructables.jpg
How to make a footprint for a TP4056 module in Altium Designer
main edit.00_00_07_20.Still001.jpg
main edit.00_00_21_14.Still002.jpg

Working with custom modules on a project requires that we account for the dimensions and properties of those modules.

This was the case with my previous project where I build a custom power bank for electronics projects and it will be with one of my next ones, so, while preparing the PCB for this upcoming project I had to create a custom footprint for one such module, the famous TP4056.

For those of you that don’t know, the TP4056 is a lithium battery charging and protection circuit that is specifically useful and handy when making projects that are powered by 18650 battery cells.

Since I want to make a project PCB that will be battery powered, having the protection circuit on board is a must and for that, we need to have the right symbol and footprint for the module inside Altium Designer.

Supplies

main edit.00_00_27_11.Still003.jpg

You can get your free Altium Designer trial and 25% discount on any license on the link below:

https://www.altium.com/yt/taste_the_code


Useful modules and tools for making electronics projects:

Creating the Schematic Symbol

main edit.00_00_54_12.Still004.jpg
main edit.00_01_07_03.Still005.jpg
main edit.00_01_16_21.Still006.jpg
main edit.00_01_51_01.Still007.jpg
main edit.00_03_04_27.Still008.jpg
main edit.00_03_52_00.Still009.jpg
main edit.00_04_41_16.Still010.jpg

To start, we first need to create a new project inside Altium, by selecting File → New → Project from the top menu. Inside the Create Project window, we specify the name and the location of our project and we click on the Create button in the bottom right corner of the window.

Next, since the basis of all projects is the schematic, we need to create the schematic symbol for the component, and for that, we use a schematic library.

We can add a schematic library to the project by right clicking on the project name in the left Project panel, and we select Add New to Project → Schematic Library.

This opens up the schematic library editor in Altium, where on the left we have the list components inside, and in the middle, it is the symbol editor.

To start creating the symbol, we first need to add a rectangle for the module outline, and we do that with the Place Rectangle tool from the top toolbar.

To edit the name and the properties of the module, we can click on the Edit button in the left panel with the component selected and that will bring the Properties window to the right of the editing area.

Here we specify the name and the designator for the module, as well as its description so we can be better organized when using this symbol.

The size of the component display rectangle can be adjusted at any time by dragging the handles on the sides or in the corners and we should always make sure that the component is centered in the editor for better handling later on.

To start working on the electrical connections, we need to start adding pins to the component.

A pin can be added by selecting the Place Pin option from the top toolbar, and that will attach a pin to the cursor for placement. We can rotate this pin with the Space key on the keyboard and before placing it, we need to make sure that the name label is inside the rectangle we created before and its electrical connection point is on the outside.

To modify the properties of this pin before we have it placed in the symbol, we can press the Tab button to jump into its properties window, where we can adjust the pin designator, name, and other properties depending on the pin type.

I’ve set this first pin designator and name to VCC but I only later realized that I should have set the designator to a simple number for better matching of the pins with the footprint that we will add.

After the first pin, I repeated the same procedure for all of the pins of the module, making sure to place them in the same orientation as they are on the physical board. This is not required but I wanted the module to resemble its real-world appearance and connection.

The final piece for the schematic symbol of the component was to add a text label to it in the middle, by using the Place Text String tool from the toolbar. Before placing anything on the editor, we can again press the Tab button to edit the properties of whatever we have selected so I did just that in order to edit the text I was placing.

After adding the text close to the center of the rectangle, I used its Properties window once again so I can fine-tune its position.

After making sure to save everything, I wanted to see how the symbol looked inside a schematic so from the Projects window, I right-clicked on the project name and selected Add New To Project → Schematic in order to create a new schematic in the project.

Then, to place the component in the schematic, I pressed the Place Part tool on the top toolbar and that brought the Components window where you can select the component to add.

Our component can be found in the custom library that we previously created so once selected, the TP4056 Module component appeared in the list so I selected it and pressed the Place button in the top right.

Here I accidentally double-pressed in the schematic so I placed two modules instead of one but selecting the one that was excess and pressing the Delete key on the keyboard solved that issue.

Creating the PCB Footrpint

main edit.00_05_28_29.Still011.jpg
main edit.00_07_10_07.Still012.jpg
main edit.00_08_03_06.Still013.jpg

I was happy with how the symbol looked so I then went ahead to create the footprint for it by first creating a new PCB Library. A PCB Library can be created by right-clicking on the project name and selecting Add New to Project → PCB Library.

When the library is created we get one blank component inside and a view that is almost identical to the PCB editing screen.

By right-clicking on the component name and selecting Footprint Properties, we get a window where we can update the footprint name and description so I did just that.

To make sure that the footprint matches the module, I was able to find a drawing of it indicating the right dimensions of the module and the placement of the holes for soldering the wires or pin headers.

Since this drawing had dimensions in millimeters, while the default dimensions in Altium are in inches, I had to switch the dimensions and for that, I selected View → Toggle Dimensions from the top menu.

To draw the outline of the module, I selected the Place Rectangle tool from the toolbar and I clicked on the 0 coordinate to start drawing the rectangle from there. The rectangle can be dimensioned with free hand but it is much more precise and faster to first create a rectangle of any size, and then fine tune the dimensions from the Properties window on the right.

The TP4056 module is not directly intended to be soldered to another PCB so to make the electrical connection, I will place pads to the footprint that will align with the existing ones on the module. With that, we can then use pin headers or just a simple copper wire to first solder it to the module and then solder that header or wire to the receiving PCB.

To add pads to the footprint, I choose the Place Pad tool from the toolbar and added the first pad in the bottom left corner of the board, not worrying too much about its placement.

To make sure that I make the pad the exact same size as the pads on the module, I first measured the pad size on the actual module, and then using the properties window, I set the shape to be a rectangle and I set the width and height to the measured 2x2mm.

To fine-tune the placement of the pad, we can directly write to the X and Y coordinates of its center, in the Properties window. Here since I knew the distance between the holes and the total length and width of the board, I was able to calculate the distance from the edge as half of the subtracted value from the total length and the distance.

Depending on the part that you are creating a footprint for, a lot of these dimensions can be found in the datasheet.

Since I now had the first hole, I proceeded by copying it for the rest of the pads and I here realized that I have made the outline definition for the module on the wrong layer.

When drawing the board outline, I had it placed on the Mechanical 1 layer, which is usually reserved for the final PCB outline, instead of the Top Overlay layer.

To fix this mistake, I’ve selected the outline, and in the Properties window, I updated the layer to the Top Overlay.

I then continued to place the rest of the pads by first making a copy, and then manually adjusting the position by entering the required coordinates for both the X and Y axis.

To add a final touch to the footprint, I’ve selected the Place String tool from the toolbar and placed a new string to the Top Overlay layer and I’ve updated that text to TP4056 which is the module name that we create a footprint for.

Connecting the Footprint to the Symbol

main edit.00_09_00_24.Still014.jpg
main edit.00_09_43_29.Still015.jpg

With both the schematic symbol and the footprint ready, it was now time to connect the two so we can then easily transition from editing the schematic to making the final PCB.

To assign the footprint to the symbol, I went into the symbol editor, where, in the Properties window, under Parameters → Footprints I choose to add a new footprint. Here I selected to browse for footprint and selected the one that we just created from the library.

With that, the footprint and the symbol were now tied together but I realized that because I had different names on the symbol and numerical names on the footprint, there was no direct pin mapping between the schematic symbol and the footprint.

To fix this, I went into the symbol editor and I now updated the pin names to be numerical, from 1 to 6, and I then followed the same procedure as before to replace the footprint again with the same one.

This fixed the mapping because the pins now had the same names in the symbol and in the editor so Altium knew what connects where.

To make sure that all of these changes to the component are reflected in the schematic window, I’ve selected Tools → Update from Libraries from the top menu and that showed that the module needs to be updated.

After validating the changes and getting a green checkmark, I chose to execute the changes and now when I selected the symbol in the schematic, I could see the footprint attached to it so I knew that it is ready and I can now continue with the rest of the project.

The entire process can be seen in the video below.

https://youtu.be/T3KHAOKMJfU


If you are interested to see more about the final project and how it will progress, then be sure to subscribe to my YouTube channel and follow me on Instructables where you can also check a lot of other projects.

Cheers and thanks for reading.