目录
背景
笔者最近在设计一块具有NFC功能的PCB,因此板上需搭载NFC芯片。CUID是NFC芯片中的一种,具有可多次读写、可绕开UID卡无法破解的防火墙的功能[1]。因此,笔者将选用淘宝上的COB封装的CUID芯片作为本项目中的NFC芯片,如图1。

图1
NFC芯片的信号传输载波频率为13.56MHz的高频信号,所以必须配置一个经阻抗匹配的天线[2]。经笔者调研,市面上CUID卡的阻抗匹配一般只需连接方形或环形的线圈,而不需要外加电容电路,示例图见图2。

图2
那么,在PCB中只需将导线作为线圈,并做到电感值的匹配,就可以实现NFC近场通信了。这款CUID芯片所需线圈电感值约6.5uH,如图3。

图3
使用电感的阻抗匹配
意法半导体提供了NFC电感工具,只需输入天线尺寸和PCB基板的参数,就可以得到天线的等效电感[3]。该工具的网页链接为:https://eds.st.com/antenna/#/,界面见图4。

图4[4]
对于本项目用到的CUID芯片,参数如图5所设置。

图5
立创EDA专业版天线布线
由图5知天线长=30mm,天线宽=30mm,线宽=2.54mm,线间距=0.3mm,圈数=13。
图6中的绿点是立创eda中设置导线端点的坐标点,可以看出它是在导线端点的中心的。
从天线的左上角按上方线-右方线-下方线-左方线-上方线-……-左方线的顺时针顺序进行布线。可以看出,从刚开始布线到已经转换3次方向的时候,后续线长均需此时减去线宽和线间距。继续布下去,则每转换2次方向,线长减去线宽和线间距。

图6
笔者写了一个在天线长宽(Antenna Length/Antenna Width)相等或不等时,计算线宽的C++程序,其输出结果可供布线时查阅:
#include<iostream>
#include <algorithm> //std::for_each
using namespace std;
struct AntennaParameters {
int turns;
float spacing;
float wire_width;
float antenna_length;
float antenna_width;
};
struct WireLengthInfo {
std::string length_info;
float length;
};
WireLengthInfo Wires[] = {
{"Top Wire Length: ", 0},
{"Right Wire Length: ", 0},
{"Bottom Wire Length: ", 0},
{"Left Wire Length: ", 0}
};
void CalWireLength(AntennaParameters params)
{
if(params.turns > 15)
{
cout << "Error: Turns should not greater than 15.";
return;
}
int wire_id = 0;
int cut_off_count = 0;
float delta_dis = params.spacing + params.wire_width;
Wires[0].length = params.antenna_length;
Wires[1].length = params.antenna_width;
Wires[2].length = params.antenna_length;
Wires[3].length = params.antenna_width;
// In the first turn
cout << "1st turns(Four elements) starts: " << endl;
for(int i = 0; i <= 3; i++)
{
if(cut_off_count == 3) // In 1st turn, per three direction change cut once
{
for_each(begin(Wires), end(Wires), [delta_dis](WireLengthInfo& wire){
wire.length -= delta_dis;
});
cut_off_count = 0;
}
cut_off_count ++;
cout << Wires[wire_id].length_info << Wires[wire_id].length << endl;
wire_id = (wire_id + 1) % 4;
}
// In the rest turns
for(int i = 2; i <= params.turns; i++)
{
// which turn
char last_digit = to_string(i).back();
if(last_digit == '1')
cout << i << "st turns(Four elements) starts: " << endl;
else if(last_digit == '2')
cout << i << "nd turns(Four elements) starts: " << endl;
else if(last_digit == '3')
cout << i << "rd turns(Four elements) starts: " << endl;
else
cout << i << "th turns(Four elements) starts: " << endl;
for(int j = 0; j <= 3; j++)
{
if(cut_off_count == 2) // In the rest turn, per two direction change cut once
{
for_each(begin(Wires), end(Wires), [delta_dis](WireLengthInfo& wire){
wire.length -= delta_dis;
});
cut_off_count = 0;
}
cut_off_count ++;
cout << Wires[wire_id].length_info << Wires[wire_id].length << endl;
wire_id = (wire_id + 1) % 4;
}
}
return;
}
int main()
{
AntennaParameters parameters;
parameters.turns = 13;
parameters.spacing = 0.3;
parameters.wire_width = 0.254;
parameters.antenna_length = 30;
parameters.antenna_width = 30;
CalWireLength(parameters);
return 0;
}
在立创eda专业版中可绘制天线如图7。

图7
参考资料
【1】https://zhuanlan.zhihu.com/p/351266514
【2】https://www.zhihu.com/question/481557206
浙公网安备 33010602011771号