

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 is designed to meet the needs of compact and reliable wire-to-board or wire-to-wire connections. Below are its key technical details:
The JST XH 4P Female connector has four pins, each corresponding to a specific connection. 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 control signal |
| 4 | Signal/Data Line 2 | Data or control signal |
Note: The pin assignments may vary depending on the application. Always refer to the specific circuit diagram or datasheet for your project.
The JST XH 4P Female connector is straightforward to use, but proper handling is essential to ensure reliable connections and avoid damage.
Wire Preparation:
Crimping the Contacts:
Inserting the Contacts:
Connecting to a PCB or Male Connector:
Testing the Connection:
The JST XH 4P Female connector can be used to connect sensors or modules to an Arduino UNO. Below is an example of how to use it with a temperature sensor:
// Example code for reading a temperature sensor connected via JST XH 4P Female
const int sensorPin = A0; // Pin connected to Signal/Data Line 1
float voltage, temperature;
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value
voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
temperature = (voltage - 0.5) * 100.0; // Convert voltage to temperature (Celsius)
// Print the temperature to the Serial Monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
delay(1000); // Wait 1 second before the next reading
}
Note: The above code assumes the use of a temperature sensor with a linear voltage output (e.g., LM35). Adjust the calculations as needed for your specific sensor.
Loose or Intermittent Connections:
Connector Does Not Lock Properly:
Incorrect Pin Assignments:
Overheating or Melting:
By following these guidelines and best practices, the JST XH 4P Female connector can provide reliable and durable connections for your electronic projects.