From 7c9ecb1585e59a9b7f611545496dea0cdc4a9c3c Mon Sep 17 00:00:00 2001
From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com>
Date: Fri, 8 Jan 2021 15:27:59 +0200
Subject: [PATCH] Add Microchip RN4871 Bluetooth module

---
 fab.dcm                               |  6 ++
 fab.lib                               | 33 ++++++++-
 fab.pretty/Microchip_RN4871.kicad_mod | 96 +++++++++++++++++++++++++++
 3 files changed, 134 insertions(+), 1 deletion(-)
 create mode 100644 fab.pretty/Microchip_RN4871.kicad_mod

diff --git a/fab.dcm b/fab.dcm
index 031f28d..3de1cb6 100644
--- a/fab.dcm
+++ b/fab.dcm
@@ -247,6 +247,12 @@ K resistor variable trimmer
 F https://www.ttelectronics.com/TTElectronics/media/ProductFiles/Trimmers/Datasheets/23.pdf
 $ENDCMP
 #
+$CMP Radio_Microchip_RN4871
+D Bluetooth Bluetooth v5.0 Transceiver Module 2.4GHz Integrated, Chip Surface Mount
+K Bluetooth Low Energy 4.2 Module
+F http://ww1.microchip.com/downloads/en/DeviceDoc/50002489A.pdf
+$ENDCMP
+#
 $CMP Regulator_Linear_LM3480-3.3V-100mA
 D 100mA, Quasi Low Dropout Voltage Regulator, 3.3V positive fixed output, SOT-23 package
 K ldo linear fixed positive
diff --git a/fab.lib b/fab.lib
index 4b1e583..12f191d 100644
--- a/fab.lib
+++ b/fab.lib
@@ -6,7 +6,7 @@ EESchema-LIBRARY Version 2.4
 DEF 12-BIT_ADC_8CH_SOIC M 0 40 Y Y 1 L N
 F0 "M" 0 0 45 H I C CNN
 F1 "12-BIT_ADC_8CH_SOIC" 0 0 45 H I C CNN
-F2 "fab:SOIC-16W_5.3x10.2mm_P1.27mm" 30 150 20 H I C CNN
+F2 "fab:fab-SOIC-16_5.3x10.2mm_P1.27mm" 30 150 20 H I C CNN
 F3 "" 0 0 50 H I C CNN
 $FPLIST
  *SOIC16*
@@ -2900,6 +2900,37 @@ X 3 3 0 -150 50 U 50 50 1 1 P
 ENDDRAW
 ENDDEF
 #
+# Radio_Microchip_RN4871
+#
+DEF Radio_Microchip_RN4871 U 0 40 Y Y 1 F N
+F0 "U" -500 550 50 H V C CNN
+F1 "Radio_Microchip_RN4871" 450 -600 50 H V C CNN
+F2 "fab:Microchip_RN4871" 0 -700 50 H I C CNN
+F3 "" -500 550 50 H I C CNN
+$FPLIST
+ RF*Module:Microchip*RN4871*
+$ENDFPLIST
+DRAW
+S -600 500 600 -500 0 1 10 f
+X BT_RF 1 700 300 100 L 50 50 1 1 O
+X RST 10 -700 -100 100 R 50 50 1 1 I
+X P0_0 11 -700 -200 100 R 50 50 1 1 B
+X P0_2 12 700 -200 100 L 50 50 1 1 B
+X GND 13 100 -600 100 U 50 50 1 1 W
+X VBAT 14 0 600 100 D 50 50 1 1 W
+X P2_7 15 700 -300 100 L 50 50 1 1 B
+X P2_0 16 -700 -300 100 R 50 50 1 1 I
+X GND 2 -100 -600 100 U 50 50 1 1 W
+X P1_2 3 700 200 100 L 50 50 1 1 B
+X P1_3 4 700 100 100 L 50 50 1 1 B
+X P1_7 5 700 0 100 L 50 50 1 1 B
+X P1_6 6 700 -100 100 L 50 50 1 1 B
+X UART_RX 7 -700 300 100 R 50 50 1 1 I
+X UART_TX 8 -700 200 100 R 50 50 1 1 O
+X P3_6 9 -700 100 100 R 50 50 1 1 B
+ENDDRAW
+ENDDEF
+#
 # Regulator_Linear_LM3480-3.3V-100mA
 #
 DEF Regulator_Linear_LM3480-3.3V-100mA U 0 10 Y Y 1 F N
diff --git a/fab.pretty/Microchip_RN4871.kicad_mod b/fab.pretty/Microchip_RN4871.kicad_mod
new file mode 100644
index 0000000..ef021bd
--- /dev/null
+++ b/fab.pretty/Microchip_RN4871.kicad_mod
@@ -0,0 +1,96 @@
+(module Microchip_RN4871 (layer F.Cu) (tedit 5A0FEF3D)
+  (descr "Microchip RN4871 footprint")
+  (tags "RN4871 BLE")
+  (attr smd)
+  (fp_text reference REF** (at 0 -9.3) (layer F.SilkS)
+    (effects (font (size 1 1) (thickness 0.15)))
+  )
+  (fp_text value Microchip_RN4871 (at 0 4.8) (layer F.Fab)
+    (effects (font (size 1 1) (thickness 0.15)))
+  )
+  (fp_line (start -4.5 -8.25) (end -4.5 3.25) (layer F.Fab) (width 0.1))
+  (fp_line (start 4.5 -8.25) (end -4.5 -8.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start 4.5 3.25) (end 4.5 -8.25) (layer F.Fab) (width 0.1))
+  (fp_line (start -4.5 3.25) (end 4.5 3.25) (layer F.Fab) (width 0.1))
+  (fp_line (start -4.5 -4.25) (end 4.5 -4.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -1.6 -0.75) (end -1.6 -4.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -3.5 -0.75) (end -1.6 -0.75) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -3.5 -4.25) (end -3.5 -0.75) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -0.2 -3.75) (end -0.2 1.7) (layer Dwgs.User) (width 0.1))
+  (fp_line (start 3.5 -3.75) (end -0.2 -3.75) (layer Dwgs.User) (width 0.1))
+  (fp_line (start 3.5 1.7) (end 3.5 -3.75) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -0.2 1.7) (end 3.5 1.7) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -5.38 4.08) (end 5.36 4.08) (layer F.CrtYd) (width 0.05))
+  (fp_line (start 5.38 -8.61) (end -5.38 -8.61) (layer F.CrtYd) (width 0.05))
+  (fp_line (start -5.38 4.08) (end -5.38 -8.61) (layer F.CrtYd) (width 0.05))
+  (fp_line (start -4.7 -4.1) (end -4.7 -4.4) (layer F.SilkS) (width 0.1))
+  (fp_line (start -5.1 -4.1) (end -4.7 -4.1) (layer F.SilkS) (width 0.1))
+  (fp_line (start -3.5 -4.25) (end -1.6 -4.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -4.5 -4.25) (end -4.5 -8.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start 4.5 -4.25) (end 4.5 -8.25) (layer Dwgs.User) (width 0.1))
+  (fp_line (start -4.5 -7.5) (end -3.75 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -4.5 -6.5) (end -2.75 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -4.5 -5.5) (end -1.75 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -4.5 -4.5) (end -0.75 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 0.25 -8.25) (end -3.75 -4.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -2.75 -4.25) (end 1.25 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -1.75 -4.25) (end 2.25 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -0.75 -4.25) (end 3.25 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 0.25 -4.25) (end 4.25 -8.25) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 1.25 -4.25) (end 4.5 -7.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 2.25 -4.25) (end 4.5 -6.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 3.25 -4.25) (end 4.5 -5.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -2.75 -4.25) (end -3.5 -3.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -1.75 -4.25) (end -3.5 -2.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -3.5 -1.5) (end -1.6 -3.375) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -3.25 -0.75) (end -1.6 -2.375) (layer Dwgs.User) (width 0.05))
+  (fp_line (start -2.25 -0.75) (end -1.6 -1.375) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 0.75 -3.75) (end -0.2 -2.8) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 1.75 -3.75) (end -0.2 -1.8) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 2.75 -3.75) (end -0.2 -0.8) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 3.5 -3.5) (end -0.2 0.2) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 3.5 -2.5) (end -0.2 1.2) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 0.3 1.7) (end 3.5 -1.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 1.3 1.7) (end 3.5 -0.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 2.3 1.7) (end 3.5 0.5) (layer Dwgs.User) (width 0.05))
+  (fp_line (start 5.36 4.08) (end 5.36 -8.61) (layer F.CrtYd) (width 0.05))
+  (fp_text user "On any layer" (at 0 -5.7) (layer Cmts.User)
+    (effects (font (size 0.25 0.25) (thickness 0.05)))
+  )
+  (fp_text user "No Metal, No Traces, Components" (at 0 -6.2) (layer Cmts.User)
+    (effects (font (size 0.25 0.25) (thickness 0.05)))
+  )
+  (fp_text user "KEEP-OUT ZONE" (at 1.825 -0.825 90) (layer Cmts.User)
+    (effects (font (size 0.25 0.25) (thickness 0.05)))
+  )
+  (fp_text user "KEEP-OUT ZONE" (at -2.575 -2.5 90) (layer Cmts.User)
+    (effects (font (size 0.25 0.25) (thickness 0.05)))
+  )
+  (fp_text user "KEEP-OUT ZONE" (at 0 -7.3) (layer Cmts.User)
+    (effects (font (size 0.5 0.5) (thickness 0.1)))
+  )
+  (fp_text user %R (at 0 -2.5) (layer F.Fab)
+    (effects (font (size 1 1) (thickness 0.1)))
+  )
+  (pad 6 smd rect (at -3 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 7 smd rect (at -1.8 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 8 smd rect (at -0.6 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 9 smd rect (at 0.6 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 10 smd rect (at 1.8 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 11 smd rect (at 3 3.05) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 5 smd rect (at -4.35 1.35 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 4 smd rect (at -4.35 0.15 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 3 smd rect (at -4.35 -1.05 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 2 smd rect (at -4.35 -2.25 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 1 smd rect (at -4.35 -3.45 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 12 smd rect (at 4.35 1.35 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 13 smd rect (at 4.35 0.15 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 14 smd rect (at 4.35 -1.05 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 15 smd rect (at 4.35 -2.3 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (pad 16 smd rect (at 4.35 -3.45 90) (size 0.7 1.5) (layers F.Cu F.Paste F.Mask))
+  (model ${KISYS3DMOD}/RF_Module.3dshapes/Microchip_RN4871.wrl
+    (at (xyz 0 0 0))
+    (scale (xyz 1 1 1))
+    (rotate (xyz 0 0 0))
+  )
+)
-- 
GitLab