Stufin
Home Quick Cart Profile

CJMCU-103 Rotary Angle Sensor Potentiometer Module

Buy Now

Operating Voltage

5V

Operating Current

2mA

Angular Range

0 to 300

Linearity Error

1% or better

Output Voltage

0-5V (linearly proportional to angular displacement)

Potentiometer Resistance

10k

Interface

3-pin (VCC, GND, OUT)

Dimensions

25mm x 15mm

Weight

10g

Applications

The CJMCU-103 Rotary Angle Sensor Potentiometer Module is suitable for a wide range of applications, including

Robotics and automation systems

Industrial control and monitoring systems

Consumer electronics, such as audio equipment and gaming controllers

Medical devices and equipment

Aerospace and defense systems

Conclusion

The CJMCU-103 Rotary Angle Sensor Potentiometer Module is a high-quality and versatile IoT component designed to provide precise and reliable angular displacement measurements. Its compact design, low power consumption, and simple interface make it an ideal solution for a wide range of applications.

Pin Configuration

  • CJMCU-103 Rotary Angle Sensor Potentiometer Module Pinout Explanation
  • The CJMCU-103 Rotary Angle Sensor Potentiometer Module is a popular IoT component used to measure angular displacement or rotation. It has a total of 5 pins, which are explained below:
  • Pinout Structure:
  • | Pin # | Pin Name | Description | Connection |
  • | --- | --- | --- | --- |
  • | 1 | VCC | Power Supply | Connect to 5V power source |
  • | 2 | GND | Ground | Connect to Ground (0V) |
  • | 3 | OUT | Analog Output | Connect to Analog Input of Microcontroller or ADC |
  • | 4 | CW | Clockwise Rotation Terminal | Connect to Rotary Potentiometer's Clockwise Terminal |
  • | 5 | CCW | Counter-Clockwise Rotation Terminal | Connect to Rotary Potentiometer's Counter-Clockwise Terminal |
  • Pin-by-Pin Explanation:
  • 1. VCC (Pin 1): This pin is the power supply input for the module. It requires a 5V DC power source to operate. Connect this pin to a 5V power supply or a 5V pin on your microcontroller.
  • 2. GND (Pin 2): This pin is the Ground connection for the module. It provides a common reference point for the circuit. Connect this pin to a Ground (0V) point on your microcontroller or breadboard.
  • 3. OUT (Pin 3): This pin is the analog output of the module, which varies according to the rotation of the potentiometer. The output voltage is proportional to the angular displacement. Connect this pin to an Analog Input (AI) pin on your microcontroller or to an Analog-to-Digital Converter (ADC) for further processing.
  • 4. CW (Pin 4): This pin is one of the terminals of the rotary potentiometer and is connected to the clockwise rotation terminal of the potentiometer. This terminal is used to measure the clockwise rotation of the potentiometer.
  • 5. CCW (Pin 5): This pin is the other terminal of the rotary potentiometer and is connected to the counter-clockwise rotation terminal of the potentiometer. This terminal is used to measure the counter-clockwise rotation of the potentiometer.
  • Connection Diagram:
  • To connect the CJMCU-103 Rotary Angle Sensor Potentiometer Module to your microcontroller or breadboard, follow these steps:
  • Connect VCC (Pin 1) to a 5V power source.
  • Connect GND (Pin 2) to a Ground (0V) point.
  • Connect OUT (Pin 3) to an Analog Input (AI) pin on your microcontroller or to an Analog-to-Digital Converter (ADC).
  • Connect CW (Pin 4) and CCW (Pin 5) to the corresponding terminals of the rotary potentiometer.
  • Important Note:
  • Make sure to handle the module with care, as it is sensitive to static electricity and mechanical stress.
  • Use a suitable rotary potentiometer that matches the specifications of the module.
  • Consult the datasheet of your microcontroller or ADC to ensure compatible voltage levels and analog input ranges.

Code Examples

CJMCU-103 Rotary Angle Sensor Potentiometer Module Documentation
Overview
The CJMCU-103 Rotary Angle Sensor Potentiometer Module is a digital potentiometer module designed to measure angular displacement or rotation. It is commonly used in a wide range of applications, including robotics, automation, and IoT projects. This module features a rotary potentiometer with a 0-360 measurement range, making it suitable for detecting and tracking rotational movements.
Pinouts and Connections
The CJMCU-103 module has the following pins:
VCC: Power supply (operating voltage: 3.3V to 5V)
 GND: Ground
 OUT: Analog output signal (0-5V)
 CW: Clockwise rotation detection pin (active low)
 CCW: Counterclockwise rotation detection pin (active low)
Code Examples
### Example 1: Reading Angular Displacement with Arduino
This example demonstrates how to use the CJMCU-103 module with an Arduino board to read the angular displacement of the rotary potentiometer.
```arduino
const int potPin = A0;  // Connect OUT pin to Arduino analog input A0
void setup() {
  Serial.begin(9600);
}
void loop() {
  int reading = analogRead(potPin);
  float voltage = reading  5.0 / 1023.0;
  float angle = voltage  360.0 / 5.0;
  Serial.print("Angle: ");
  Serial.print(angle);
  Serial.println(" degrees");
  delay(50);
}
```
### Example 2: Detecting Rotation Direction with Raspberry Pi (Python)
This example shows how to use the CJMCU-103 module with a Raspberry Pi to detect the direction of rotation (clockwise or counterclockwise).
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set up CW and CCW pins as inputs
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)  # CW pin
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)  # CCW pin
while True:
    cw_state = GPIO.input(17)
    ccw_state = GPIO.input(23)
if cw_state == 0:
        print("Rotating clockwise...")
    elif ccw_state == 0:
        print("Rotating counterclockwise...")
    else:
        print("No rotation detected.")
time.sleep(0.1)
```
### Example 3: Mapping Angular Displacement to Servo Motor Position (ESP32 with C++)
This example demonstrates how to use the CJMCU-103 module with an ESP32 board to control a servo motor based on the angular displacement of the rotary potentiometer.
```cpp
#include <WiFi.h>
#include <Servo.h>
Servo myServo;  // Create a servo object
const int potPin = 32;  // Connect OUT pin to ESP32 GPIO 32
void setup() {
  Serial.begin(115200);
  myServo.attach(13);  // Attach servo to ESP32 GPIO 13
}
void loop() {
  int reading = analogRead(potPin);
  float voltage = reading  5.0 / 4095.0;
  float angle = voltage  360.0 / 5.0;
  int servoPosition = map(angle, 0, 360, 0, 180);
  myServo.write(servoPosition);
  delay(50);
}
```
Note: In this example, we use the `map()` function to convert the angular displacement (0-360) to a servo position (0-180).
Remember to adjust the pin connections and voltage levels according to your specific setup and requirements.