Kategori

## Adding GitHub Libraries in KiCad (English)

KiCad has an open source library, which is one of the advantage of it. Every week, KiCad’s library is updated through GitHub from KiCad. This article is dedicated to show how to install additional libraries for KiCad, and adding third-party libraries such as Digi-Key or Sparkfun Electronics for example. Digi-Key and Sparkfun’s libraries can be accessed through the links below:

1. SparkFun Library: https://github.com/sparkfun/SparkFun-KiCad-Libraries
2. Digi-Key Library: https://github.com/digikey/digikey-kicad-library

As an example, this article will show how to add Sparkfun library on KiCad 5.0.0 for Ubuntu 18.04

# Cloning the Library via GitHub

Library can be accessed through Github, where almost everyone can share their library and contribute to the open source library in GitHub. If there are new additions in the library, the version renewal using Git will be much easier and won’t take much hard disk space, as only the additional files will be downloaded and not the entire files. to download Sparkfun library in GitHub, make sure you have the git package and execute the command below:

\$ git clone https://github.com/sparkfun/SparkFun-KiCad-Libraries.git

After you finish the download, you can see several folders which contained Library and other supplementary folders, and also additional files. The result of downloading the library is as shown in Picture 1

# Adding the Library in KiCad

After downloading the library, the next thing is to open KiCad program to add the downloaded library. But before that, make a new Project by using File > New > New Project

Access “Environment Variable Configuration” in Preferences > Configure Paths. Add new Environment Variable using the “Add” button, then give the name “KICAD_SPARKFUN_SYMBOL” and show the folder location using the “Browse” button.

After adding Environment Variable, open Eeschema (Schematic Editor) and open Preferences > Manage Symbol Libraries. Press “Browse Libraries…” and select all desired library before pressing open

Open Pcbnew (PCB Layout Editor) and open Preferences > Manage Footprint Libraries. Then, press “Browse Libraries…” and select all .pretty folders which you want to add before pressing “OK”

That’s all about adding libraries to KiCad. Next time, I’ll talk about creating a simple PCB design using KiCad. Have fun trying KiCad!

Kategori

## Spreading Factor, Bandwidth, Coding Rate and Bit Rate in LoRa (English)

In the previous article, I discussed about several basic Spread Spectrum concepts while specifically talking about LoRa modulation and touching the topic regarding several parameters in LoRa. Those parameters in question are Spreading Factor, Bandwidth, and Coding Rate. The three parameters will determine how sensitive the LoRa receiver will perform and how fast the data transmission speed will be. I will shortly discuss them in this article, hoping that the readers will be able to understand the concept and implement it in a LoRa-based system

# Symbol

As discussed before, LoRa is a chirp spread spectrum modulation. The transmitted data, which is a symbol, will be represented by a chirp signal with a frequency range from $f_{min}$ to $f_{max}$, which is shown in Figure 1. In LoRa modulation, we can configure the symbol by changing the Spreading Factor and Bandwidth parameters. According to Application Note Semtech AN1200.22, one symbol will take $T_S$ of second to transmit, which is a function of Bandwidth and Spreading Factor can be shown with the equation below:

$\displaystyle T_S = \frac{2^{SF}}{BW}$

# Bandwidth

Bandwidth is the frequency range of the chirp signal used to carry the baseband data. In Figure 1, the Bandwidth can be seen from the width of frequency used between $f_{min}$ to $f_{max}$. Aside from that, Bandwidth can also represent chip rate from LoRa signal modulation

$R_C = BW$

# Spreading Factor

The value of Spreading Factor (SF) determines how many chips used to represent a symbol. The higher the SF value is, the more chips used to represent a symbol, which means there will be more processing gain from the receiver side. This will allow receiver to accept data signals with negative SNR value

$\displaystyle R_S = \frac{BW}{2^{SF}}$

Spreading Factor shows how many chips used to represent a symbol, with an exponential factor of 2. 1 symbol may consist of N chip where $N = 2^{SF}$. A cyclic shift can be done to represent a bit and sent symbol. If there is N amount of chips, then the resulting symbol value may range from 0 to N-1, or that 1 symbol may represent SF bits

$\displaystyle R_b = SF * \frac{BW}{2^{SF}}$

# Coding Rate

LoRa modulation also adds a forward error correction (FEC) in every data transmission. This implementation is done by encoding 4-bit data with redundancies into 5-bit, 6-bit, 7-bit, or even 8-bit. Using this redundancy will allow the LoRa signal to endure short interferences. The Coding Rate (CR) value need to be adjusted according to conditions of the channel used for data transmission. If there are too many interference in the channel, then it’s recommended to increase the value of CR. However, the rise in CR value will also increase the duration for the transmission

$\displaystyle R_b = SF \frac{\big[\frac{4}{4+CR}\big]}{\big[\frac{2^{SF}}{BW}\big]}$