Skip to content

Commit

Permalink
USB plug shifted and tolerances added to IDF
Browse files Browse the repository at this point in the history
  • Loading branch information
jans committed Dec 22, 2014
1 parent 5b82de4 commit b6e9c6c
Show file tree
Hide file tree
Showing 18 changed files with 7,697 additions and 7,594 deletions.
6,480 changes: 3,240 additions & 3,240 deletions 3D/cryptostick.wrl

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2014-12-22 Jan Suhr
* USB plug centered and moved outwards of the PCB to comply to datasheet

2014-12-04 Jan Suhr
* LED moved and board extended by 0.1 mm
* 3D model added
Expand Down
18 changes: 9 additions & 9 deletions gerber/cryptostick-B_Mask.gbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -172,16 +172,16 @@ X-4303Y-27D01*
X-4303Y-27D01*
G37*
G54D12*
X2652Y2245D03*
X2652Y-2243D03*
X2755Y2237D03*
X2755Y-2250D03*
G54D13*
X1825Y-393D03*
X1825Y401D03*
X1825Y-1377D03*
X1825Y1379D03*
X1928Y-400D03*
X1928Y393D03*
X1928Y-1384D03*
X1928Y1371D03*
G54D14*
X2652Y-885D03*
X2652Y887D03*
X2755Y-892D03*
X2755Y879D03*
G54D15*
X-829Y2872D03*
X-429Y2872D03*
Expand Down
10 changes: 5 additions & 5 deletions gerber/cryptostick-B_Paste.gbp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -155,8 +155,8 @@ X-4225Y-106D01*
X-4225Y-106D01*
G37*
G54D11*
X1825Y-393D03*
X1825Y401D03*
X1825Y-1377D03*
X1825Y1379D03*
X1928Y-400D03*
X1928Y393D03*
X1928Y-1384D03*
X1928Y1371D03*
M02*
2 changes: 1 addition & 1 deletion gerber/cryptostick-B_SilkS.gbo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down
18 changes: 9 additions & 9 deletions gerber/cryptostick-Back.gbl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -177,16 +177,16 @@ X-4243Y-87D01*
X-4243Y-87D01*
G37*
G54D12*
X2652Y2245D03*
X2652Y-2243D03*
X2755Y2237D03*
X2755Y-2250D03*
G54D13*
X1825Y-393D03*
X1825Y401D03*
X1825Y-1377D03*
X1825Y1379D03*
X1928Y-400D03*
X1928Y393D03*
X1928Y-1384D03*
X1928Y1371D03*
G54D14*
X2652Y-885D03*
X2652Y887D03*
X2755Y-892D03*
X2755Y879D03*
G54D15*
X-829Y2872D03*
X-429Y2872D03*
Expand Down
2 changes: 1 addition & 1 deletion gerber/cryptostick-Edge_Cuts.gbr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down
10 changes: 5 additions & 5 deletions gerber/cryptostick-F_Mask.gts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -76,11 +76,11 @@ X-1279Y-925D03*
X-1673Y-925D03*
X-2067Y-925D03*
G54D15*
X2652Y2245D03*
X2652Y-2243D03*
X2755Y2237D03*
X2755Y-2250D03*
G54D16*
X2652Y-885D03*
X2652Y887D03*
X2755Y-892D03*
X2755Y879D03*
G54D17*
X1444Y-1575D03*
X1444Y-1201D03*
Expand Down
2 changes: 1 addition & 1 deletion gerber/cryptostick-F_Paste.gtp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down
44 changes: 22 additions & 22 deletions gerber/cryptostick-F_SilkS.gto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -144,10 +144,10 @@ X-3012Y-1870D01*
X-2618Y808D02*
X-334Y808D01*
G54D13*
X1825Y1851D02*
X1825Y2284D01*
X1825Y-1849D02*
X1825Y-2282D01*
X1928Y1843D02*
X1928Y2276D01*
X1928Y-1856D02*
X1928Y-2289D01*
G54D12*
X738Y-1792D02*
X738Y-610D01*
Expand Down Expand Up @@ -322,23 +322,23 @@ X-761Y1145D01*
X-790Y1117D01*
X-818Y1102D01*
G54D15*
X2527Y-359D02*
X2956Y-359D01*
X3042Y-387D01*
X3099Y-444D01*
X3127Y-530D01*
X3127Y-587D01*
X2585Y-101D02*
X2556Y-73D01*
X2527Y-16D01*
X2527Y126D01*
X2556Y183D01*
X2585Y212D01*
X2642Y241D01*
X2699Y241D01*
X2785Y212D01*
X3127Y-130D01*
X3127Y241D01*
X2631Y-366D02*
X3060Y-366D01*
X3145Y-394D01*
X3203Y-452D01*
X3231Y-537D01*
X3231Y-594D01*
X2688Y-109D02*
X2660Y-80D01*
X2631Y-23D01*
X2631Y119D01*
X2660Y176D01*
X2688Y205D01*
X2745Y233D01*
X2803Y233D01*
X2888Y205D01*
X3231Y-137D01*
X3231Y233D01*
G54D12*
X-251Y-1789D02*
X3Y-1789D01*
Expand Down
10 changes: 5 additions & 5 deletions gerber/cryptostick-Front.gtl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Thu 04 Dec 2014 22:27:19 CET*
G04 (created by PCBNEW (22-Jun-2014 BZR 4027)-stable) date Mon 22 Dec 2014 18:07:12 CET*
%MOIN*%
G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
%FSLAX34Y34*%
Expand Down Expand Up @@ -81,11 +81,11 @@ X-1279Y-925D03*
X-1673Y-925D03*
X-2067Y-925D03*
G54D15*
X2652Y2245D03*
X2652Y-2243D03*
X2755Y2237D03*
X2755Y-2250D03*
G54D16*
X2652Y-885D03*
X2652Y887D03*
X2755Y-892D03*
X2755Y879D03*
G54D17*
X1444Y-1575D03*
X1444Y-1201D03*
Expand Down
10 changes: 5 additions & 5 deletions gerber/cryptostick.drl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
M48
;DRILL file {Pcbnew (22-Jun-2014 BZR 4027)-stable} date Thu 04 Dec 2014 22:27:35 CET
;DRILL file {Pcbnew (22-Jun-2014 BZR 4027)-stable} date Mon 22 Dec 2014 18:07:18 CET
;FORMAT={-:-/ absolute / metric / decimal}
FMAT,2
METRIC,TZ
Expand Down Expand Up @@ -58,12 +58,12 @@ T4
X120.4Y92.
X121.9Y92.
T6
X133.736Y96.744
X133.736Y101.244
X134.Y96.762
X134.Y101.263
T5
X134.485Y93.294G85X132.987Y93.294
X134.749Y93.313G85X133.25Y93.313
G05
X134.485Y104.694G85X132.987Y104.694
X134.749Y104.712G85X133.25Y104.712
G05
T0
M30
30 changes: 30 additions & 0 deletions idf/CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Create .ELECTRICAL sections for each type of part (following the datasheets found at BOM)
It's prefered to have the point (0,0) at the center of the rectangular area of the component
Use maximum height (including any tolerance)
Also include the width of the pads (wherever applicable, see datasheets)

Split USB plug in two parts. One placed on TOP and the other on the BOTTOM of the PCB.
There will be a gap between the two of them at the same z-coord with the PCB.
This is ok, but take care to substract this height from the two USB parts such that
the final "emulated" USB component is exact both in total height and in z positioning.



Smartcard slot shorted by the amount of it's pads length (the LED overlaps with them)

Added PCB slots (1x1 mm) (.BOARD_OUTLINE section)

Removed some drills. They were appearing as components at the casing-engineer tools

Centering USB to PCB:
First calculate the center of the pcb: (y1+y2)/2 and the set that to the USB placement

Moving mounting placement of USB, following the datasheet suggestion

Added tolerances to:
PCB: The slots where moved away of pcb (following the width tolerance). No resizing of them
USB: length with general tolerance
LED: both dims with general tolerance
Smartcard slot: both dims with general tolerance
assuming that tolerances are halfed at each side
Be carefull about the signs of the coords!
58 changes: 58 additions & 0 deletions idf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Creating IDF libraries
======================

Two files are needed to create an IDF library. An .emn and an .emp.

* .emn: Holds information about the PCB board, the drilled holes and the placement of the parts.
* .emp: Holds information about each class of a component that is used at .emn placement.

To create a 3D model of the IDF library, you can open the .emn file using FreeCAD. Then you can save the 3D models as a .FCStd file.

The procedure of creating and manipulating an IDF library is explained below (per project).


Creating the .emp
-----------------
The .emp file consists of a header section at the beginning. This sections is followed by electrical sections. Each electrical section has the outline info as a series of points in a 2D plane, and a height value. The outline must be a closed curve, thus you need to place twice the point that you started, once at the beginning and once at the end of the section (returning to starting point).
If it is a rectangular outline, use point (0,0) as the center of it.


Creating the .emn
-----------------
The .emn file consists of a header section, a board section, a drilled_holes section and a placement section. The board section describes the boad outline and height. The placement section is a series of placement declarations, each one declaring the type of the component (from .emp file), a placeholder name, the positioning at the 3D plane, a rotation factor and the side of the board that is to be placed (top/bottom)


Nitrokey Pro
------------
For Nitrokey Pro, you have to open the .kicad_pcb file. There is a section that lists all the modules. Each module has the component type (BOM file), the placeholder name (emp placement). the positioning and rotation (emp placement).

You have to manually create/edit the .emp file consulting the BOM and manuals.
You have to manually create/edit the .emn file consulting the .kicad_pcb file for the placement coordinates.

*Note 1: Depending on the orientation of each component at it's electrical section, you may need to use rotation to match the real design.*

*Note 2: Depending on the side that the component is placed, you may have to calculate some offsets because the coords seems to be mirrored on the other side (and you have to mirror them again so that it aligns).*


Nitrokey Storage
----------------
For Nitrokey Storage, you have to use DesignSpark. First you export the pcb design as a set of .idl and .idf files [3](without the height adjusting, see next par.) . Rename .idl to .emp and .idf to .emn (they are essentially the same format).
You will have to manually edit the .emp file to include all the electrical sections (consulting the BOM, manualls and naming of the components from the .emn file). The .emn file doen't need any changes.

Notes (on Storage):
1) Right now the height of the short capacitors and resistors is not accurate. An approximation is used instead (worst case found from the family of each component).
2) For some components the length does not include the extra soldering area.
3) Electrical sections for the R0603, C0603, C0603K and C1206 need to be rewritten with (0,0) as their center. Also their orientation at the placement section need to be changed appropriatelly.


For both devices
----------------
Create a second module to model USB.


Useful Links
------------
[1] https://www.simplifiedsolutionsinc.com/images/idf_v30_spec.pdf
[2] https://sourceforge.net/projects/kicad-3d/
[3] http://www.rs-online.com/designspark/electronics/eng/tutorial/exporting-designs-from-designspark-pcb-to-mechanical-cad

38 changes: 22 additions & 16 deletions idf/cryptostick-pro.emn
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,31 @@ BOARD_FILE 3.0 "Created by Created by KiCad (2014-11-30 BZR 5308)-product" 2014/
"_autosave-cryptostick.brd" MM
.END_HEADER


# PCB tolerances
# width -> 2 * 0.2mm (0.2 per size)
# height -> 2 * 0.1mm (0.1 per side)
# Slots move away from the pcb by the tolerance
.BOARD_OUTLINE UNOWNED
1.00000
0 -10.63703 189.87822 0

0 4.63703 189.87822 0
0 4.63703 190.87822 0
0 5.63703 190.87822 0
0 5.63703 189.87822 0
0 -10.83703 189.77822 0

0 4.63703 189.77822 0
0 4.63703 190.77822 0
0 5.63703 190.77822 0
0 5.63703 189.77822 0

0 10.63703 189.87822 0
0 10.63703 206.15878 0
0 10.83703 189.77822 0
0 10.83703 206.25878 0

0 5.63703 206.15878 0
0 5.63703 205.15878 0
0 4.63703 205.15878 0
0 4.63703 206.15878 0
0 5.63703 206.25878 0
0 5.63703 205.25878 0
0 4.63703 205.25878 0
0 4.63703 206.25878 0

0 -10.63703 206.15878 0
0 -10.63703 189.87822 0
0 -10.83703 206.25878 0
0 -10.83703 189.77822 0


1 7.11085 6.19470 0
Expand All @@ -43,13 +49,13 @@ BOARD_FILE 3.0 "Created by Created by KiCad (2014-11-30 BZR 5308)-product" 2014/
# positioning of the usb does not follow datasheet
# 3.77mm measured from kicad
# Previous: 15.66203 198.0185 0.0 0 TOP PLACED
# Previous: 16.24203 198.0185 0.0 0 TOP PLACED
.PLACEMENT
"USB-A-PLUG" "WM3983TR-ND" J2
16.24203 198.0185 0.0 0 TOP PLACED

16.63703 198.0185 0.0 0 TOP PLACED

"USB-A-PLUG-the-rest" "the-rest" NOREFDEFS
20.24203 198.0185 0.0 0 BOTTOM PLACED
20.63703 198.0185 0.0 0 BOTTOM PLACED

"KPHBM-2012SURKCGKC" "element14.com 1686079RL" D1
-10.0 197.29437 0.0 0 TOP PLACED
Expand Down
Loading

0 comments on commit b6e9c6c

Please sign in to comment.