.kicad_pcb.jpg?size=s&soon)

Uyarma devresi
Open source fluxgate sensor project.
- Size
- 100 × 100 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 77
- Nets
- 79
- Pads
- 322
- Tracks, vias
- 609, 239
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 13 May 2026
- Updated
- 19 May 2026
Overview
Uyarma devresi is an open-source printed circuit board by erdometo, from the erdometo/fluxgate-project repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 100 mm with 77 parts on 79 nets, routed with 609 tracks and 239 vias.
It is built around the MSP430AFE253IPW, TP2311-TR and LP1111SOF, with the AMS1117-3.3V, ME7660CS1G and SN74LVC1G3157DCKR among its other parts. Its parts include 26 capacitors, 18 resistors, 12 ICs, 7 diodes and 6 connectors. It belongs with the RP2040 and MSP430 boards of this library.
Main components
8MSP430AFE253IPW
TSSOP-24-40℃~+85℃ 1.8V~3.6V 11 12MHz 16 Bit 16KB 24bit 512Byte Built-in FLASH MSP430 CPU16 TSSOP-24 Microcontrollers (MCU/MPU/SOC) ROHSTexas InstrumentsMicrocontrollers (MCU/MPU/SOC)TP2311-TR
SOT-23-5-2.75V~-1.1V、1.1V~2.75V -40℃~+125℃ 0.1pA 0.3pA 1 1.4mA 106dB 10MHz 1uV/℃ 2.2V~5.5V 4uV 70mA 7V/us 8.2nV/√Hz@1kHz EMI filtering/RF suppression、ESD protection、Overvoltage protection、Reverse-phase input protection Rail-to-Rail Input, Rail-to-Rail Output SOT-23-5 Precision Op Amps ROHS3PEAKLow Noise OpAmpsLP1111SOF
SOP-8-EP-40℃~+85℃ 12ns 30ns 4.4V~13.2V Enable shutdown、Interleaved conduction protection、Dead-time control Low Side、High Side MOSFET SOP-8-EP Gate Drivers ROHSLOWPOWERGate DriversAMS1117-3.3V
SOT-223-20℃~+85℃ 1 1.2A 1.5V@(800mA) 15V 3.3V 5mA Fixed Positive Thermal shutdown SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSJSMSEMIVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsME7660CS1G
SOP-8-40℃~+85℃ 100uA 10kHz 2.5V~10V 70Ω 98% Inverted Not supported SOP-8 Charge Pumps ROHSMICRONECharge PumpsSN74LVC1G3157DCKR
SC-70-6-55℃~+125℃ 1.65V~5.5V 12Ω 15.5pF 24ns 2:1 350MHz SC-70-6 Analog Switches, Multiplexers ROHSUMWAnalog Switches, MultiplexersAP2300
SOT-23-50℃~+150℃ 1 N-channel 1.25W 1.5V 150pF 20V 35mΩ@2.5V 4A 60nC 630pF N-Channel SOT-23 MOSFETs ROHSALLPOWERMOSFETs1N4148WS
SOD-3231.25V@150mA 100V 150mA 1uA@75V 200mW 2A 4ns Independent SOD-323 Switching Diodes ROHSJiangsu Changjing Electronics Technology (CJ)Switching Diodes
README
README.md🧲 High-Precision Fluxgate Magnetic Field Sensor Design
An open-source, high-sensitivity, single-axis Fluxgate magnetometer and development platform designed for aerospace, geophysics, and navigation applications. This project implements a fully integrated system containing hardware (KiCad PCBs), firmware (MSP430 24-bit SD-ADC & RP2040 Controller), simulations (LTSpice), and software (Python PyQt real-time GUI).
Developed as a senior capstone engineering project at Karadeniz Technical University (KTU) by Erdem Metin and Mücahit Ata, under the supervision of Prof. Dr. İsmail Kaya.
📸 System Overview
The Fluxgate sensor system is designed around a dual-MCU architecture consisting of an RP2040 (master controller and driver) and an MSP430AFE253 (24-bit Sigma-Delta ADC data acquisition).
Fig 1: Full system schematic diagram detailing all MCU pinouts, power distribution, and analog filters.
graph TD
PC[Computer PyQt GUI / Matlab] <-->|USB virtual COM / UDP Wifi| Pico[Raspberry Pi Pico RP2040]
Pico -->|PWM Excitation Control f| FET[H-Bridge MOSFET Driver]
FET -->|AC Excitation staircase Wave| Core[Magnetic Core & Coils]
Core -->|Induced Sensing Signal| Demod[Analog Processing Circuit]
Demod -->|DC Level / AC Signal| MSP[MSP430AFE253 24-bit ADC]
MSP -->|1.5 MBaud UART| Pico📖 Theory of Operation
A Fluxgate Magnetometer measures weak static or low-frequency magnetic fields (in the nT to µT range) by exploiting the non-linear magnetic saturation characteristics of a ferromagnetic core.
- Excitation (Drive): An AC current at frequency $f$ drives the core deep into saturation in both positive and negative directions.
- Symmetric Core State: In the absence of an external magnetic field, the magnetic flux changes symmetrically. The voltage induced in the sensing (pick-up) coil contains only odd harmonics ($3f$, $5f$, etc.).
- Asymmetric Core State (External Field Present): When an external magnetic field (like the Earth's field $H_{ext}$) is present, it biases the core, causing it to saturate earlier in one direction and later in the other.
- Second Harmonic (2f) Detection: This asymmetry generates even harmonics (predominantly the $2f$ component) in the sensing coil. The amplitude of this second harmonic is directly proportional to the magnitude of the external magnetic field, and its phase indicates the field's direction.
🛠️ Project Structure
The repository is structured into logically separated folders to make implementation and replication straightforward:
- 📁
Hardware/[blocked]: KiCad schematic and PCB layout designs, Gerber files, and Bill of Materials (BOM). - 📁
Firmware/[blocked]:- MSP430: IAR and CCS projects for 24-bit Sigma-Delta ADC sampling at 16.5 kSps and 1.5 MBaud USART transmission.
- RP2040 (Raspberry Pi Pico): C/C++ SDK projects generating precise excitation PWM and streaming data to PC via USB Serial or UDP Wi-Fi.
- 📁
Software/[blocked]: Python-based GUI utilizingpyqtgraphfor real-time serial and UDP plotting, and Matlab analytics. - 📁
Simulations/[blocked]: LTSpice circuits simulating the H-Bridge excitation driver and the analog synchronous demodulation path.
🚀 Step-by-Step Build & Replication Guide
To replicate and build this high-precision Fluxgate sensor, follow these five steps:
1. Hardware Fabrication & Assembly
- Go to
Hardware/[blocked] and select either the Excitation Circuit V1, the Excitation Circuit Final, or the JLCPCB Version which is optimized for SMT assembly. - Export Gerbers or use the provided
.zipfiles under the directories to order PCBs from your manufacturer (e.g., JLCPCB). - Assemble the PCB using the BOM. Key components include:
- Primary Controller: Raspberry Pi Pico (RP2040)
- Precision ADC: MSP430AFE253IPW (24-bit Sigma-Delta ADC)
- H-Bridge Driver: HIP4082xB half-bridge gate driver
- Excitation MOSFETs: AP2300 or IRFZ44N
- Ultra Low-Noise Opamps: TP2311 or LT149x series (12nV/√Hz input noise)
- Voltage References: AN431 shunt regulators (2.5V, 20ppm/°C stability)
2. Fluxgate Core & Coil Preparation
- Core Selection: Use a high-permeability green iron-powder ferrite toroid core with an inner diameter of 7 mm, thickness of 2 mm, and height of 4.5 mm. (While a 6-81 Permalloy racetrack core with $100\text{ µm}$ laminations provides lower noise, a toroidal ferrite core is robust and hand-windable).
- Drive Winding: Wind the excitation (drive) coil uniformly around the toroid using 32 AWG enameled copper wire. In the experimental prototype, the completed drive winding exhibited a measured series resistance of $17.945\text{ }\Omega$ and a series inductance of $19.686\text{ mH}$.
- Sense Winding: Wind the sensing (pick-up) coil on top of the drive winding, orienting the windings to capture the fluxgate effect while canceling direct coupling from the excitation drive.
Fig 3: The custom hand-wound toroidal fluxgate core integrated onto the testing board.
3. Simulation & Validation
- Open
Simulations/LTSpice/[blocked]. - Run
fluxgate.ascto simulate the H-Bridge excitation path. Verify the staircase voltage waveform across the drive bobbin. - Run
fluxgateACAnaliz.ascorDraft7.ascto analyze the frequency response of the active integrator and synchronous demodulator. Ensure the integration region lies between 159 Hz and 1591 Hz and the low-pass filter kesim frekansı is configured near 28 Hz.
4. Firmware Deployment
- MSP430 Firmware:
- Open IAR Embedded Workbench or Code Composer Studio.
- Load the project in
Firmware/MSP430_AFE_ADC/[blocked] orFirmware/MSP430_ADC_to_UART/[blocked]. - Compile and flash the firmware using an eZ-FET debugger (or the Spy-Bi-Wire pins on an MSP430 Launchpad).
- Function: Configures the 12MHz MCLK, initializes the SD24 Module in group conversion mode, and streams 24-bit raw ADC readings via USART0 at 1.5M Baud.
- RP2040 Firmware:
- Navigate to
Firmware/Pico_Firmwares/[blocked]. - Choose either
pico-custom-firmware-usb(USB Virtual Serial) orpico-custom-firmware-udp(Wi-Fi streaming). - Build the project using the Pico SDK (
CMake) and flash the resulting.uf2file onto your Pi Pico. - Function: Emits precise complementary PWM drive signals (80µs duty, 40µs dead-time) at frequency $f$ to drive the H-Bridge. It uses a PIO state machine to reliably capture the 1.5MBaud UART stream from the MSP430 and forwards it to the PC.
- Navigate to
5. GUI & Visualization
- Install Python 3 and requirements:
bash pip install pyqtgraph PyQt5 pyserial numpy - Run the visualization app in
Software/Python_GUI_Demo/[blocked]:bash python compass.py # or python pyqtgraph_float_v2x2_yesim.py - Connect your Pi Pico to the PC via USB. You will see a real-time rolling graph of the 24-bit sampled magnetic field data representing the external field.
📡 Digital Signal Processing (DSP) & Digital Lock-In Mode
During the final experimental testing phase of this project, the analog op-amps in the physical synchronous demodulation circuit were found to be defective or counterfeit, preventing analog phase detection from working out of the box. To solve this, the project utilized a highly robust Digital Signal Processing (DSP) pipeline to bypass the analog demodulator entirely.
Bypassing the Analog Demodulator
- The analog SPDT switch (SN74LVC1G3157) was disabled (tied to a static ground state via the MCU).
- The active low-noise op-amps were configured as a simple differential preamplifier.
- The raw, high-speed AC signal (which contains the even and odd harmonics) was fed directly into the MSP430's 24-bit Sigma-Delta ADC.
- The raw, un-demodulated samples were digitized at ~16.5 kSps and streamed to the PC via the RP2040 UART/USB bridge.
Two Host-Side Digital Processing Implementations
Your software repository implements two distinct mathematical approaches on the host PC to extract the external magnetic field from this raw stream:
-
Frequency-Domain Demodulation (Real-Time FFT):
- File:
pyqtgraph_float_v2x2_yesim.py[blocked] - Method: Computes a high-performance Fast Fourier Transform (FFT) on blocks of 8192 raw samples using Scipy:
python Yf0 = fft(ch0) - Result: The GUI displays the real-time frequency spectrum. By measuring the amplitude peak of the second harmonic ($2f$ at 25 kHz) in the frequency domain, the software calculates the precise external magnetic field intensity, completely replacing the physical analog lock-in filters!
- File:
-
Time-Domain Smoothing (Moving Average Convolution):
- Files:
udp_plot_pyqt.py[blocked] andudp_plot_pyqt_2.py[blocked] - Method: Unpacks the high-speed telemetry and applies a real-time Moving Average Filter using NumPy convolution across a 1000-sample window:
python filtered_data = np.convolve(data, weights, mode='valid') - Result: Smooths out the excitation switching ripples and transient spikes, feeding a clean time-domain signal to the graphical compass needle interface to dynamically show the core's magnetic orientation.
- Files:
🛠️ Hardware Debugging & Engineering Solutions
During the assembly and testing phase, two critical engineering challenges arose and were systematically resolved:
1. The H-Bridge Bootstrap Capacitor & Duty Cycle Adaptation
- The Issue: High-side gate drivers require a bootstrap capacitor ($C_{Bst}$) to maintain the gate-to-source voltage ($V_{GS}$) when the high-side MOSFET turns on. By design guidelines, the minimum bootstrap capacitance is: $$C_{Bst} = \frac{Q_{gate}}{\Delta V_{Bst}}$$ Using the AP2300 gate charge $Q_{gate} = 11\text{ nC}$ and an acceptable voltage ripple $\Delta V_{Bst} = 0.1\text{ V}$, the minimum capacitor required is $110\text{ nF}$. Due to a design oversight, a $1\text{ nF}$ capacitor was initially populated. This capacitor discharged instantly, causing the high-side gate drivers to drop out immediately.
- The Fix: Populating a $1\text{ µF}$ capacitor resolved the gate-dropout issue. However, experimental tests under a $330\text{ }\Omega$ load revealed that the high-side gate could remain continuously open for a maximum of $1.125\text{ ms}$ before the bootstrap charge depleted.
- PWM Adaptation: To prevent the high-side gate from collapsing during lower frequencies, the RP2040 firmware was adapted to emit a highly optimized PWM excitation pattern. Instead of a basic symmetrical square wave, the drive cycle was structured as:
- $0.8\text{ ms}$ Positive Drive Phase (containing high-speed $80\text{ µs}$ pulses with $40\text{ µs}$ dead-times).
- $0.4\text{ ms}$ Neutral Phase (H-bridge disabled, allowing the bootstrap capacitors to fully recharge).
- $0.8\text{ ms}$ Negative Drive Phase (H-bridge reversed).
2. Defective Analog Op-Amps & DSP Bypass
- The Issue: During board validation, short-circuiting the sensing coil to ground resulted in the low-noise differential preamplifier and active integrator output locks stuck at a solid $2.5\text{ V}$ (the virtual ground analog reference voltage). The op-amps (TP2311 or LT1492) failed to respond to any AC or DC input signal changes, leading to the conclusion that the physical components received were defective or counterfeit.
- The Solution: The analog synchronous SPDT demodulator switch (SN74LVC1G3157) was set to ground mode via the RP2040, transforming the first stage into a simple, highly linear $1:2$ differential preamplifier (total differential gain of 20). The raw, high-speed AC pick-up signal was routed directly into the MSP430's 24-bit Sigma-Delta ADC, and the entire lock-in and filtering cascade was bypassed in hardware and reconstructed in real-time software on the host PC.
⚡ Specifications
| Parameter | Value | Description |
|---|---|---|
| Sensor Type | Parallel Fluxgate | Single Axis Magnetometer |
| Excitation Waveform | AC Staircase Wave | Minimizes transient EMF spikes |
| Excitation Frequency | 12.5 kHz | Configurable via Pico PWM registers |
| ADC Resolution | 24-Bit | Sigma-Delta Converter (MSP430AFE253) |
| Sampling Rate | ~16,500 samples/sec | High-speed oversampled stream |
| Baud Rate | 1,500,000 Baud | High-speed MSP430 to RP2040 UART link |
| Demodulator Gain | 1:10 (or 20 Differential) | Synchronous analog SPDT demodulation |
| Low-Pass Filter (LPF) | $f_c = 28.42\text{ Hz}$ | Eliminates grid noise (50Hz) and ripples |
| Integrator Bandwidth | 159 Hz to 1591 Hz | Limits noise and captures second harmonics |
⚖️ License
This project is open-source and released under the MIT License [blocked]. Feel free to use, modify, and distribute for personal, academic, or commercial purposes.
Parts
77| Qty | Value | Footprint | References |
|---|---|---|---|
| 15 | C_1u | Capacitor_SMD:C_0402_1005Metric | C4, C8, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C26 |
| 4 | 1N4007 | Diode_SMD:D_SOD-123F | D1, D2, D3, D4 |
| 4 | AP2300 | Package_TO_SOT_SMD:TSOT-23 | Q1, Q2, Q3, Q4 |
| 4 | R_1k | Resistor_SMD:R_0402_1005Metric | R2, R3, R8, R9 |
| 3 | 1N4148WS | Diode_SMD:D_SOD-323 | D5, D6, D7 |
| 3 | C_1.1nf | Capacitor_SMD:C_0402_1005Metric | C1, C3, C24 |
| 3 | C_100n | Capacitor_SMD:C_0402_1005Metric | C2, C5, C25 |
| 3 | R_100k | Resistor_SMD:R_0402_1005Metric | R1, R5, R18 |
| 3 | R_10k | Resistor_SMD:R_0402_1005Metric | R4, R14, R15 |
| 3 | SW_DIP_x01 | Button_Switch_THT:SW_DIP_SPSTx01_Slide_6.7x4.1mm_W7.62mm_P2.54mm_LowProfile | SW1, SW2, SW3 |
| 3 | TP2311 | Package_TO_SOT_SMD:SOT-23-5 | U2, U9, U12 |
| 2 | AN431 | Package_TO_SOT_SMD:SOT-23 | U10, U11 |
| 2 | C_100u | Capacitor_SMD:C_1206_3216Metric | C6, C7 |
| 2 | C_18p | Capacitor_SMD:C_0402_1005Metric | C10, C11 |
| 2 | Jack-DC | Connector_BarrelJack:BarrelJack_GCT_DCJ200-10-A_Horizontal | J2, J4 |
| 2 | LP1111SOF | Package_SO:SOP-8_3.9x4.9mm_P1.27mm | U3, U8 |
| 2 | R_0 | Resistor_SMD:R_1206_3216Metric | R16, R17 |
| 2 | R_10 | Resistor_SMD:R_1206_3216Metric | R10, R11 |
| 2 | R_200k | Resistor_SMD:R_0402_1005Metric | R6, R13 |
| 1 | AMS1117-3.3V | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U7 |
| 1 | Algılama sargısı girişi | Connector_USB:USB_Micro-B_Molex-105017-0001 | J3 |
| 1 | C_10u | Capacitor_SMD:C_0402_1005Metric | C9 |
| 1 | Conn_01x02_Female | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | Crystal_GND23_Small | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | JTAG-SBW | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J7 |
| 1 | ME7660C | Package_SO:SOP-8_3.9x4.9mm_P1.27mm | U6 |
| 1 | MSP430AFE253IPW | Package_SO:TSSOP-24_4.4x7.8mm_P0.65mm | U4 |
| 1 | Pico | MCU_RaspberryPi_and_Boards:RPi_Pico_SMD_TH | U5 |
| 1 | R_47k | Resistor_SMD:R_0402_1005Metric | R12 |
| 1 | R_56k | Resistor_SMD:R_0402_1005Metric | R7 |
| 1 | SN74LVC1G3157DCKR | Package_TO_SOT_SMD:Texas_R-PDSO-G6 | U1 |
| 1 | power | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
More from erdometo/fluxgate-project
2- 2 layers100 × 100 mm
.kicad_pcb.jpg?size=s&soon)
- 2 layers149.9 × 99.1 mm

Similar boards
- 4 layers91 × 30.1 mm

Strelka Flight Computer
LulaUAV/Strelka-Flight-Computer
Strelka exists in the family of rocket dog flight computers. This flight computer is fully capable of deploying recovery events.
170 parts2 - 4 layers110 × 160 mm

- 2 layers50 × 50 mm

- 2 layers191.5 × 76 mm

Pcb project
CrashOverride85/zc95
4 channel EStim box inspired by the mk312bt, with Lua scripting support
337 parts117GPL-3.0 - 4 layers180 × 103.5 mm

- 4 layers68 × 68 mm

Backbone
andreapiccini/spaghettilab-community
SpaghettiLab is an open modular hardware and software ecosystem for rapid prototyping, embedded systems development, and product innovation.
212 parts10 - 2 layers310 × 100 mm

AOML AB 3.0 reorganized v2
cxs1529/XBT_Autolauncher_PCB
KiCAD repository for the XBT Autolauncher board
247 parts - 4 layers104 × 64 mm

Questions
How big is the Uyarma devresi PCB?
It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Uyarma devresi use?
77 parts, built around the MSP430AFE253IPW, TP2311-TR, LP1111SOF and AMS1117-3.3V. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Uyarma devresi KiCad files?
From the erdometo/fluxgate-project repository on GitHub, at the commit this page was made from: the board is Hardware/KiCad_Development_Board_JLCPCB/uyarma devresi.kicad_pcb and its schematic Hardware/Excitation_Circuit_V1/uyarma devresi.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Uyarma devresi design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).