The JST SM Male Connector 4 Pin is a versatile and reliable connector commonly used in various electronic projects. Manufactured by Generic, this connector is designed to provide a secure and stable connection for wires, making it ideal for applications that require robust and durable connections. It is widely used in LED lighting systems, RC vehicles, and other electronic devices where a dependable connection is crucial.
Parameter | Specification |
---|---|
Manufacturer | Generic |
Part ID | 4 Pin Connector JST SM Male |
Number of Pins | 4 |
Connector Type | Male |
Contact Material | Copper Alloy |
Insulation Material | Nylon |
Current Rating | 3A |
Voltage Rating | 250V AC/DC |
Operating Temperature | -25°C to +85°C |
Wire Gauge | 22-28 AWG |
Pin Number | Description | Color Code (Typical) |
---|---|---|
1 | VCC (Power) | Red |
2 | Data Signal 1 | Green |
3 | Data Signal 2 | Yellow |
4 | Ground (GND) | Black |
If you are using the JST SM Male Connector 4 Pin with an Arduino UNO, here is an example code to read data from a sensor connected via this connector:
// Define pin connections
const int vccPin = 2; // VCC connected to pin 2
const int dataPin1 = 3; // Data Signal 1 connected to pin 3
const int dataPin2 = 4; // Data Signal 2 connected to pin 4
const int gndPin = 5; // GND connected to pin 5
void setup() {
// Initialize serial communication
Serial.begin(9600);
// Set pin modes
pinMode(vccPin, OUTPUT);
pinMode(dataPin1, INPUT);
pinMode(dataPin2, INPUT);
pinMode(gndPin, OUTPUT);
// Set initial states
digitalWrite(vccPin, HIGH); // Power on the sensor
digitalWrite(gndPin, LOW); // Connect ground
}
void loop() {
// Read data from the sensor
int sensorValue1 = digitalRead(dataPin1);
int sensorValue2 = digitalRead(dataPin2);
// Print sensor values to the serial monitor
Serial.print("Sensor Value 1: ");
Serial.println(sensorValue1);
Serial.print("Sensor Value 2: ");
Serial.println(sensorValue2);
// Add a delay for readability
delay(1000);
}
This code sets up the Arduino UNO to read data from a sensor connected via the JST SM Male Connector 4 Pin. Ensure that the connections are made according to the pin configuration table provided earlier.
By following this documentation, users can effectively utilize the JST SM Male Connector 4 Pin in their electronic projects, ensuring secure and reliable connections.