Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use JST XH Socket 4pin: Examples, Pinouts, and Specs

Image of JST XH Socket 4pin
Cirkit Designer LogoDesign with JST XH Socket 4pin in Cirkit Designer

Introduction

The JST XH Socket 4pin (Manufacturer Part ID: B4B-XH-AM) is a compact and reliable connector socket designed for secure electrical connections in a variety of electronic applications. Manufactured by JST, this 4-pin connector is widely used in consumer electronics, industrial equipment, and hobbyist projects due to its robust locking mechanism and ease of use. Its compact design makes it ideal for applications where space is limited, while its secure connection ensures stable performance.

Explore Projects Built with JST XH Socket 4pin

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Pushbutton-Controlled Interface with 40-Pin Connector and UBS Power Supply
Image of connect 4: A project utilizing JST XH Socket 4pin in a practical application
This circuit consists of a 40-pin connector interfacing with four pushbuttons and a UBS power supply. The pushbuttons are used as inputs to the connector, which then relays the signals to other components or systems. The UBS power supply provides the necessary 24V power to the pushbuttons and the common ground for the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled AC Lighting System with Power Monitoring
Image of Smart Energy Meter: A project utilizing JST XH Socket 4pin in a practical application
This circuit features an ESP32 microcontroller interfaced with a PZEM004T power monitoring module and a 4-channel relay module controlling multiple AC LED bulbs. The ESP32 uses GPIO pins to control the relays, which in turn switch the LED bulbs on and off. The PZEM004T is connected to the ESP32 for communication and to a current sensor for monitoring power consumption of the connected load through the relay contacts.
Cirkit Designer LogoOpen Project in Cirkit Designer
FTDI to UART Adapter with J26 Connector
Image of J26 CLOSEUP: A project utilizing JST XH Socket 4pin in a practical application
This circuit connects an FTDI USB-to-serial converter to a standard serial interface via a J26 connector. It facilitates serial communication by linking the ground, transmit, receive, data terminal ready, and request to send signals between the FTDI chip and the J26 connector.
Cirkit Designer LogoOpen Project in Cirkit Designer
4-Pin Connector Circuit for Edge Detection
Image of 4pin: A project utilizing JST XH Socket 4pin in a practical application
This circuit appears to be a simple interconnection of pins and points, with a 4-pin component serving as a central hub. The red and black pins of the 4-pin component are connected to various other pins and edge components, forming a basic network of connections without any active components or microcontroller logic.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with JST XH Socket 4pin

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of connect 4: A project utilizing JST XH Socket 4pin in a practical application
Pushbutton-Controlled Interface with 40-Pin Connector and UBS Power Supply
This circuit consists of a 40-pin connector interfacing with four pushbuttons and a UBS power supply. The pushbuttons are used as inputs to the connector, which then relays the signals to other components or systems. The UBS power supply provides the necessary 24V power to the pushbuttons and the common ground for the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Energy Meter: A project utilizing JST XH Socket 4pin in a practical application
ESP32-Controlled AC Lighting System with Power Monitoring
This circuit features an ESP32 microcontroller interfaced with a PZEM004T power monitoring module and a 4-channel relay module controlling multiple AC LED bulbs. The ESP32 uses GPIO pins to control the relays, which in turn switch the LED bulbs on and off. The PZEM004T is connected to the ESP32 for communication and to a current sensor for monitoring power consumption of the connected load through the relay contacts.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of J26 CLOSEUP: A project utilizing JST XH Socket 4pin in a practical application
FTDI to UART Adapter with J26 Connector
This circuit connects an FTDI USB-to-serial converter to a standard serial interface via a J26 connector. It facilitates serial communication by linking the ground, transmit, receive, data terminal ready, and request to send signals between the FTDI chip and the J26 connector.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 4pin: A project utilizing JST XH Socket 4pin in a practical application
4-Pin Connector Circuit for Edge Detection
This circuit appears to be a simple interconnection of pins and points, with a 4-pin component serving as a central hub. The red and black pins of the 4-pin component are connected to various other pins and edge components, forming a basic network of connections without any active components or microcontroller logic.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Battery connections in RC vehicles and drones
  • Power and signal connections in small electronic devices
  • Interfacing sensors and modules in embedded systems
  • Wiring harnesses in industrial equipment
  • Prototyping and DIY electronics projects

Technical Specifications

Key Technical Details

Parameter Specification
Manufacturer JST
Part Number B4B-XH-AM
Number of Pins 4
Pitch (Pin Spacing) 2.5 mm
Rated Voltage 250 V AC/DC
Rated Current 3 A
Operating Temperature -25°C to +85°C
Contact Resistance ≤ 20 mΩ
Insulation Resistance ≥ 1000 MΩ at 500 V DC
Material (Housing) Polyamide (UL94V-0 flame-retardant)
Material (Contacts) Tin-plated copper alloy

Pin Configuration and Descriptions

The JST XH Socket 4pin has four pins arranged in a single row with a 2.5 mm pitch. Below is the pin configuration:

Pin Number Description Typical Use Case
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

Usage Instructions

How to Use the JST XH Socket 4pin in a Circuit

  1. Connector Assembly:
    • Use the corresponding JST XH 4-pin header or plug to mate with the socket.
    • Ensure proper crimping of wires to the connector terminals using a crimping tool.
  2. Wiring:
    • Connect the wires to the appropriate pins based on the pin configuration table.
    • Double-check the polarity and signal connections to avoid damage to the circuit.
  3. Mounting:
    • Secure the socket on a PCB or chassis using its through-hole or surface-mount design.
    • Ensure the connector is firmly locked to prevent accidental disconnection.
  4. Testing:
    • Verify the connections using a multimeter before powering the circuit.
    • Check for continuity and proper voltage levels at each pin.

Important Considerations and Best Practices

  • Avoid Overcurrent: Do not exceed the rated current of 3 A to prevent overheating or damage.
  • Proper Crimping: Use the recommended crimping tool for JST XH terminals to ensure a secure and reliable connection.
  • Secure Locking: Ensure the connector is fully inserted and locked to avoid intermittent connections.
  • Environmental Conditions: Operate the socket within the specified temperature range (-25°C to +85°C) for optimal performance.
  • Polarity Check: Always verify the polarity of the power and ground connections to prevent damage to connected devices.

Example: Connecting to an Arduino UNO

The JST XH Socket 4pin can be used to connect sensors or modules to an Arduino UNO. Below is an example of connecting a sensor with a JST XH 4-pin connector to the Arduino:

// Example: Reading data from a sensor connected via JST XH 4-pin socket
// Pin 1: VCC (5V), Pin 2: GND, Pin 3: Data Line 1 (Sensor Output),
// Pin 4: Data Line 2 (Optional or unused in this example)

const int sensorPin = A0; // Connect Data Line 1 to Arduino analog pin A0
int sensorValue = 0;      // Variable to store sensor reading

void setup() {
  Serial.begin(9600); // Initialize serial communication
  pinMode(sensorPin, INPUT); // Set sensor pin as input
}

void loop() {
  sensorValue = analogRead(sensorPin); // Read sensor value
  Serial.print("Sensor Value: ");
  Serial.println(sensorValue); // Print sensor value to Serial Monitor
  delay(500); // Wait for 500ms before next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

Issue Possible Cause Solution
Loose connection Connector not fully inserted Ensure the connector is securely locked.
No power or signal transmission Incorrect wiring or polarity Verify wiring and polarity using a multimeter.
Overheating of connector Exceeding current rating Reduce the load to within the 3 A limit.
Intermittent connection Poor crimping of wires Re-crimp the wires using the correct tool.

FAQs

Q: Can the JST XH Socket 4pin handle high-frequency signals?
A: Yes, the socket can handle high-frequency signals, but ensure proper shielding and grounding in your circuit to minimize noise.

Q: Is the JST XH Socket 4pin compatible with other JST series connectors?
A: No, the JST XH series has a specific pitch (2.5 mm) and design. It is not directly compatible with other JST series like PH or SH.

Q: Can I use this connector for power delivery in a high-power application?
A: The connector is rated for a maximum current of 3 A. For higher power applications, consider using connectors with higher current ratings.

Q: How do I remove the connector without damaging it?
A: Press the locking tab gently while pulling the connector straight out to avoid bending the pins or damaging the housing.