कला
सौंदर्य और कल्याण
हस्तशिल्प
संस्कृति और इतिहास
मनोरंजन
पर्यावरण
खाद्य और पेय
हरित भविष्य
रिवर्स इंजीनियरिंग
विज्ञान
खेल
प्रौद्योगिकी
पहनने योग्य
Driving a Servo Motor — SIK Circuit 8
Ed

द्वारा बनाया गया

Ed

17. मार्च 2026FI
40
0
0
0
0

Driving a Servo Motor — SIK Circuit 8

Control a servo motor to sweep through positions. Learn about the Servo library, include directives, and how to precisely control motor position from 0 to 180 degrees.

निर्देश

1

Parts & Introduction

A servo motor can be precisely positioned between 0 and 180 degrees. Unlike a regular motor that just spins, servos hold their position — making them perfect for robotics, pan/tilt mechanisms, and control surfaces. This experiment introduces the Servo library.

Parts Needed

  • 1x Arduino Uno + USB cable
  • 1x Breadboard
  • 1x Servo Motor (with 3-pin header)
  • 8x Jumper Wires

The servo has three wires: Red (power), Black (ground), White (signal).

इस चरण के लिए सामग्री:

SparkFun Inventors Kit - V3.2SparkFun Inventors Kit - V3.21 किट
Arduino Uno R3Arduino Uno R31 टुकड़ा
BreadboardBreadboard1 टुकड़ा
Servo MotorServo Motor1 टुकड़ा
Jumper WiresJumper Wires3 टुकड़े

आवश्यक उपकरण:

Computer with Arduino IDE
2

Hardware Hookup

Wiring Instructions

  1. Connect 3 jumper wires to the servo's female 3-pin header for breadboarding.
  2. Connect the Red wire to 5V.
  3. Connect the Black wire to GND.
  4. Connect the White wire (signal) to Digital Pin 9.

Power Note: Servos draw significant current. If the servo twitches and the Arduino resets, use a wall adapter instead of USB power, or power the servo from a separate 5V supply.

इस चरण के लिए सामग्री:

Servo MotorServo Motor1 टुकड़ा
Jumper WiresJumper Wires3 टुकड़े
3

Arduino Code

Open the Arduino IDE and upload the following sketch to your Arduino board.

servo_motor.inoarduino
/*
SparkFun Inventor's Kit
Example sketch 08 — SINGLE SERVO

Sweep a servo back and forth through its full range of motion.

Hardware connections:
  Servo RED wire (power) to 5V
  Servo WHITE wire (signal) to digital pin 9
  Servo BLACK wire (ground) to GND

This code is completely free for any use.
*/

#include <Servo.h>

Servo servo1;

void setup()
{
  servo1.attach(9);
}

void loop()
{
  int position;

  // Quick moves to specific positions
  servo1.write(90);    // Go to 90 degrees
  delay(1000);
  servo1.write(180);   // Go to 180 degrees
  delay(1000);
  servo1.write(0);     // Go to 0 degrees
  delay(1000);

  // Slow sweep to 180 degrees (2-degree steps)
  for(position = 0; position < 180; position += 2)
  {
    servo1.write(position);
    delay(20);
  }

  // Slow sweep back to 0 degrees (1-degree steps)
  for(position = 180; position >= 0; position -= 1)
  {
    servo1.write(position);
    delay(20);
  }
}

इस चरण के लिए सामग्री:

Arduino Uno R3Arduino Uno R31 टुकड़ा

आवश्यक उपकरण:

Computer with Arduino IDE
4

Test & Experiment

What You Should See

The servo quickly moves to 90°, 180°, and 0° (1 second each), then slowly sweeps from 0° to 180° and back.

Troubleshooting

  • Servo not moving: Even with colored wires, it's easy to plug a servo in backwards. Check connections.
  • Twitching/resetting: The servo draws too much power from USB. Use a wall adapter or separate power supply.

Experiments to Try

  • Add a potentiometer (from Circuit 2) to control servo position with a knob.
  • Change the step size and delay to experiment with speed and smoothness.
  • Build a simple pan/tilt mechanism with two servos.

सामग्री

5

आवश्यक उपकरण

1
  • Computer with Arduino IDE
अनुमानित कुल
₹12,568.00

CC0 पब्लिक डोमेन

यह ब्लूप्रिंट CC0 के तहत जारी किया गया है। आप बिना अनुमति माँगे इस कार्य को किसी भी उद्देश्य के लिए कॉपी, संशोधित, वितरित और उपयोग करने के लिए स्वतंत्र हैं।

उनके ब्लूप्रिंट के माध्यम से उत्पाद खरीदकर मेकर का समर्थन करें जहाँ वे मेकर कमीशन कमाते हैं जो विक्रेताओं द्वारा निर्धारित होता है, या इस ब्लूप्रिंट का नया संस्करण बनाएँ और राजस्व साझा करने के लिए इसे अपने ब्लूप्रिंट में कनेक्शन के रूप में शामिल करें।

चर्चा

(0)

लॉग इन करें चर्चा में शामिल होने के लिए

टिप्पणियाँ लोड हो रही हैं...