Friday, July 11, 2014

Footprint and 3D body for Switch | Altium Designer Tutorial

This tutorial shows how to create a switch footprint and add a 3D model to the footprint in altium layout editor so that it is ready for PCB design.

The switch for which we gonna make a footprint is the TL3301AF160QJ from E Switch and is shown by the picture below-

This is a Surface Mount type switch with 4 pins and with J termination leads.

The dimension of this provided by the datasheet by its manufacturer is shown below-

And the footprint dimension is shown below-

As you can see there are four rectangular pads required for the footprint. Now one can start with creating directly rectangular pads on the PCB component editor but this is little bit difficult or little bit more time consuming because you have to calculate the position of each pad in this way.

Another way to create these pads is using the component wizard. Now with the dimension information above the footprint will be created in using component wizard.

Start altium designer and create a new PCB library project or simply begin with a new PCB library component.

Once you are in the PCB library start with the new component wizard that is available in Tools > Component Wizard. Here the details of this steps will not be provided, to see the details of this steps see creating capacitor footprint where the details steps of using component wizard is provided.

Once you start the Component Wizard, select the Small Outline Package(SOP), select metric(mm) as your unit.

The next thing the wizard ask is the pad size. From the footprint information above, the length is 2.795mm and the width is 1.4mm. So enter these lengths-

Next the relative position of the pads are requested by the wizard. Here again from the footprint information, the center to center distance in the length direction is 4.825mm(2.03+2.795) and the center to center distance in the width direction is just 4.5mm.

The width of the outline can be left in default value.

The next thing that the wizard requires is the number of pads. Here select 4. Then the last thing to enter is the name for the component, enter some suitable name like SW for switch.

Once the wizard work is done, the initial footprint looks the one below-

The footprint has top overlay running through the middle like the one required for a real SOP component. And the pads are not all rectangular.

So we can first just delete the overlay part.

We will add it later on, just don't worry.

Now, the next thing to do is to change the shape of the pad from rounded to rectangular and also change the Pin number assignment(look the datasheet picture above).

We can start with any one of the pins, lets start with pad with pin number 2 labelled.

Just double click on it. Check the shape to rectangular and change the designator to 1 as shown below.

Ok, now thats done here is what the footprint looks like with Pad changed-

See the Pad shape and pin designator number has changed, Wow. That was not difficult,right?

So changing all the rounded pads to rectangular and changing the pads pin number too gives us the following-

So what is left to do?

Yes, the outline in yellow, the overlayyyy has to added back, but we can do it after the 3D body is placed.

So lets add the 3D body. You can download the 3D body in step format of this part from the digikey or the manufacturer website.

Once you downloaded and saved it somewhere in your PC or whatever you are using, you can import that model into and attach to the footprint.

To place the 3D model, use Place > 3D Body. This brings up a dialog window to import the model. The importing is simple, 1st select Generic STEP Model, 2nd select Embed STEP Model as shown below-

 After this click OK and then window pops up again, this time click cancel and you should see the 3D body outline placed in the 2D view or the footprint view as shown below-

Not so interesting, isn't it. Click on 3 key on your keyboard. This switches to 3D view and the parts becomes more sensible-

Shit! this looks awkward... The thing is we have to orient the body and align with the footprint pads.
Double click on the 3D body and this brings up the dialog box we closed earlier. Then in the window make a 0 degree rotation of the 3D body by entering 0 in the X Rotation field(mine was at 90 degree).
This rotation change should bring the 3D body in correct orientation-
Now we have to align the 3D body with the pads. To do this we have to grab and select some points on the 3D body pins and then with the help of the visible points move the body to the pads.

So in order to do, we need to rotate the body so that its pins are visible.

Now go to Tools > 3D Body Placement > Add snap points from vertices. 
Now to select center of each pins of the 3D body, first click on the 3D body, the hit SPACE key. After this the next two clicks are the start and end point for the center of the two points. Once you finish the center of one pin, you can continue to another pin center by selecting the 1st start pin and then the 2nd end point for the 2nd center point and so on.

Once you have the center of the 4 pins switch to the 2D view to appreciate why this process was done.

Now its easy to align the 3D body pins with the pads on footprint.

Move the body to align the 3D body and the pads as shown below-

Switch to 3D view-

Rotating the view to get the view of the body pin and the pad, we can see that the pins are not on the correct level with the pads.
To set the correct height for the body. Go to Tools > 3D Body Placement > Set Body Height. Then first click on the body to select it, and second, click on the lower pin part of the body as shown below by blue cross-

This will pop up a window and here select Board Surface.

Now remove the snap points by going to Tools > 3D Body Placement > Remove Snap Points.

Now the body is in correct height-

Finally we have to add the outline, the top overlay to the final footprint with 3D body.

Switch back to 2D view by pressing 2 key. Then select the top overlay tab at the bottom. Use the line line tool create a box surrounding the component.

Select each line by double clicking and set the width to 0.18mm to reduce the thick wideness.

The final design is shown below-

There are also other tutorials using altium designers software related to PCB design, schematic design and simulation.