Electronics

Did I set fire to the Servo Controller

Short answer: No

The test setup used the same cable as before, but with the V+ cable removed. Thusly it was powered from the 2xAA battery pack

The Pan / Tilt camera mount was a good test.

For this I was using the Adafruit instructions found here, but using a new file to drive the pan from one end to the middle and the other end and back. For each step it does the same with the tilt.

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

"""Simple test for a standard servo on channel 0 and a continuous rotation servo on channel 1."""
import time
from adafruit_servokit import ServoKit

# Set channels to the number of servo channels on your kit.
# 8 for FeatherWing, 16 for Shield/HAT/Bonnet.
kit = ServoKit(channels=16)
# with more time will test if this helps with the range
#kit.servo[8].set_pulse_width_range(1000, 2000)
# with more time will test if this helps with the range
#kit.servo[9].set_pulse_width_range(1000, 2000)
# if a max range is set, will use this to limit it.
#kit.servo[0].actuation_range = 160


def move_tilt():
  kit.servo[9].angle = 170
  time.sleep(0.5)
  kit.servo[9].angle = 90
  time.sleep(0.5)
  kit.servo[9].angle = 10
  time.sleep(0.5)
  kit.servo[9].angle = 90
  time.sleep(0.5)

def move_pan():
  kit.servo[8].angle = 170
  time.sleep(0.5)
  move_tilt()

  kit.servo[8].angle = 90
  time.sleep(0.5)
  move_tilt()

  kit.servo[8].angle = 10
  time.sleep(0.5)
  move_tilt()

  kit.servo[8].angle = 90
  time.sleep(0.5)
  move_tilt()


time.sleep(5)

for x in range(5):
  move_pan()

kit.servo[8].angle = 90
kit.servo[9].angle = 90

It doesn’t quite have the full range of motion I thought it would, but I’m able to control the servos sufficiently well.

Please follow and like us: