

The JST XH 4P Female connector is a 4-pin female connector widely used in electronic circuits for connecting wires. It features a compact design and a reliable locking mechanism, ensuring secure and stable connections. This connector is part of the JST XH series, known for its durability and ease of use. It is commonly used in applications such as battery connections, PCB interfaces, and small electronic devices.








The JST XH 4P Female connector has four pins arranged in a single row with a 2.5 mm pitch. Below is the pin configuration:
| Pin Number | Description | Typical Use |
|---|---|---|
| 1 | VCC (Power Supply) | Positive voltage input |
| 2 | GND (Ground) | Ground connection |
| 3 | Signal/Data Line 1 | Data or signal transmission line |
| 4 | Signal/Data Line 2 | Data or signal transmission line |
Note: The pin assignments may vary depending on the specific application. Always refer to the circuit design or datasheet for proper wiring.
Wire Preparation:
Inserting Wires:
Connecting to a Male Header:
Mounting on a PCB:
The JST XH 4P Female connector can be used to connect sensors or modules to an Arduino UNO. Below is an example of wiring and code for reading data from a sensor connected via the JST XH 4P Female connector.
// Example code for reading data from a sensor connected via JST XH 4P Female
const int sensorPin1 = A0; // Pin connected to Signal/Data Line 1
const int sensorPin2 = A1; // Pin connected to Signal/Data Line 2 (optional)
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(sensorPin1, INPUT); // Set Signal/Data Line 1 as input
pinMode(sensorPin2, INPUT); // Set Signal/Data Line 2 as input (if used)
}
void loop() {
int sensorValue1 = analogRead(sensorPin1); // Read value from Signal/Data Line 1
int sensorValue2 = analogRead(sensorPin2); // Read value from Signal/Data Line 2
// Print the sensor values to the Serial Monitor
Serial.print("Sensor 1 Value: ");
Serial.println(sensorValue1);
Serial.print("Sensor 2 Value: ");
Serial.println(sensorValue2);
delay(1000); // Wait for 1 second before reading again
}
Note: Modify the code as needed based on the specific sensor or module being used.
Loose Connections:
Overheating:
Reversed Polarity:
Intermittent Signal Loss:
Q1: Can the JST XH 4P Female connector handle high-frequency signals?
A1: Yes, the connector can handle high-frequency signals, but ensure proper shielding and grounding in your circuit to minimize interference.
Q2: Is the JST XH 4P Female connector compatible with other JST series connectors?
A2: No, the JST XH 4P Female connector is specifically designed for the XH series and may not be compatible with other JST series due to differences in pitch and design.
Q3: Can I use this connector for power delivery?
A3: Yes, the connector can handle up to 3A of current, making it suitable for low-power applications.
Q4: How do I remove a wire from the connector housing?
A4: Use a small flathead screwdriver or a pin to gently release the locking tab on the terminal, then pull the wire out carefully.
By following this documentation, you can effectively use the JST XH 4P Female connector in your electronic projects.