Adafruit PWM Servo Driver library

Hello all.

I am using the Adafruit 16 channel I2C servo controller. Moving the servos with:

pwm.setPWM(0, 0, 150); (For example).

All working fine, except I cannot find any command to release the servos?
I need to manually be able to move the servo once it's moved.

pwm.sleep(); just puts the module to sleep, but leaves the servos powered (can't move them).

Any ideas?

Otherwise, I'll have to break the +6v to the servo board (or the individual servos) with another output which seems a bit involved.

Thanks

class Adafruit_PWMServoDriver {
public:
  Adafruit_PWMServoDriver();
  Adafruit_PWMServoDriver(const uint8_t addr);
  Adafruit_PWMServoDriver(const uint8_t addr, TwoWire &i2c);
  void begin(uint8_t prescale = 0);
  void reset();
  void sleep();
  void wakeup();
  void setExtClk(uint8_t prescale);
  void setPWMFreq(float freq);
  void setOutputMode(bool totempole);
  uint8_t getPWM(uint8_t num);
  void setPWM(uint8_t num, uint16_t on, uint16_t off);
  void setPin(uint8_t num, uint16_t val, bool invert = false);
  uint8_t readPrescale(void);
  void writeMicroseconds(uint8_t num, uint16_t Microseconds);

  void setOscillatorFrequency(uint32_t freq);
  uint32_t getOscillatorFrequency(void);

private:
  uint8_t _i2caddr;
  TwoWire *_i2c;

  uint32_t _oscillator_freq;
  uint8_t read8(uint8_t addr);
  void write8(uint8_t addr, uint8_t d);
};

That's from the .h. Seems the function you want is not included in their library.

Thanks. Looks like its a Mosfet or something on the 6v feed then

Appreciated

Moving servos by hand against the gearing is a fine way to break a servo. Not quite so bad with no power. But that's possibly why there's no function included that might make you think it's a good idea. In the standard Servo library detach() doesn't cut power, just removes the control signal.

Steve

Yes, I realise hand operation isn't ideal, but its only for emergency purposes, and these are metal geared, decent quality servos.

Anyway.... killing the entire 6v supply to the 16 channel controller doesn't release the servos :roll_eyes:

You have to also kill the 5v top the controller board which seems odd. I think I may bin this module for another option (like a different processor with more pins and drive the servos directly)