Sensor Wiring
This page covers the electrical interface of the FG-3+, FG-3C, and FG-4 sensors — including output types, supply requirements, and wiring recommendations.
Sensor Comparison
| Sensor | Axes | Output Type | Supply Voltage | Typical Integration |
|---|---|---|---|---|
| FG-3+ | 1 | 5 V rectangular pulse (frequency) | 5 V regulated | Frequency counting on MCU or Converter Board → ADC |
| FG-3C | 1 | UART / Analog / PWM (selectable) | 5 V regulated | UART RX on MCU, analog input, or DAQ |
| FG-4 | 3 | 5 V rectangular pulse (frequency) per axis | 5 V regulated | Frequency counting (3 channels) on MCU |
FG-3+
The FG-3+ outputs a 5 V rectangular pulse whose period is proportional to the magnetic field strength along the sensor axis. Higher field strength along the sensitive axis results in a shorter pulse period.
Wiring
The FG-3+ connects via a 3-wire interface:
| Connection | Description |
|---|---|
| VCC | 5 V regulated power supply |
| GND | Signal and power ground |
| OUT | 5 V pulse output — connect to MCU timer/counter input |
Exact connector pin numbering is not documented publicly. Refer to the label or silkscreen on your specific sensor unit for VCC / GND / OUT identification.
Practical Notes
- Frequency counting: The MCU must measure the period of the incoming pulse using a timer in input-capture mode, or by counting transitions. Do not use simple
digitalRead()polling for accurate results. - Level shifting: The output is 5 V logic. If your MCU operates at 3.3 V (e.g., ESP32, Arduino Due), use a resistive voltage divider or a dedicated level shifter on the OUT line.
- Cable length: For longer cable runs, use shielded cable to reduce picked-up interference. Connect the shield to GND at one end only.
- Power decoupling: Place a 100 nF ceramic capacitor close to the sensor VCC pin to suppress supply noise.
FG-3C
The FG-3C is a 1-axis fluxgate magnetometer with a configurable output mode. The output mode is selected by the pin configuration at startup.
Output Modes
| Mode | Output | Notes |
|---|---|---|
| UART | Digital serial text at 115200 baud | Field value in nT as ASCII text |
| Analog | Voltage proportional to field | Suitable for ADC or oscilloscope |
| PWM | PWM duty cycle proportional to field | Suitable for simple MCU capture |
Documented Pinout
| Pin | Function |
|---|---|
| 1 | VCC (5 V regulated) |
| 2 | GND |
| 3 | Mode select / Analog output |
| 4 | UART TX (in UART mode) / PWM output |
| 5 | Mode select |
Pin functions for non-UART modes are not fully documented publicly. Refer to the FG-3C datasheet or contact FG Sensors for the complete configuration table.
UART Mode Wiring
Connect Pin 4 (UART TX) of the FG-3C to the RX pin of your MCU or USB-UART bridge.
FG-3C Pin 4 (TX) ──────► MCU RX
FG-3C Pin 1 (VCC) ─────► 5 V
FG-3C Pin 2 (GND) ─────► GND
- Baud rate: 115200
- Data: 8N1
- Output: ASCII text, field value in nT
Pin 4 is a 5 V UART signal. Connect to a 3.3 V MCU only through a level shifter or voltage divider.
FG-4
The FG-4 is a 3-axis fluxgate magnetometer that provides three independent frequency-output channels — one per axis (X, Y, Z).
Pin Functions
| Pin | Function |
|---|---|
| VCC | 5 V regulated power supply |
| GND | Ground |
| OUT_X | Frequency pulse output, X axis |
| OUT_Y | Frequency pulse output, Y axis |
| OUT_Z | Frequency pulse output, Z axis |
Exact connector numbering and additional pin details are not documented publicly. Refer to the label on your sensor unit or the FG-4 datasheet.
Practical Notes
- Three independent timer/counter channels are required on the MCU — one per axis
- All three outputs are 5 V logic; apply level shifting for 3.3 V systems
- The three axes are orthogonal and factory-aligned — do not rotate the sensor body relative to the measurement frame
- Power supply must be clean and regulated; all three axes share a common supply
General Wiring Best Practices
- Always use a regulated 5 V supply — sensor accuracy is affected by supply noise
- Keep sensor wiring away from high-current traces or switching regulators
- For multi-sensor systems (gradiometers), use separate shielded cables for each sensor and ensure a common GND reference
- Label all sensor cables at both ends to avoid axis confusion in multi-axis or multi-sensor setups