๐Ÿ“ฃ๐Ÿ“ช ๐Ÿšš Adafruit will not be shipping USPS orders Monday October 14, 2019 ๐Ÿ—“. Expedited USPS orders placed after 11am ET ๐Ÿ•š Friday October 11 will go out Tuesday October 15 ๐Ÿ“ฃ๐Ÿ“ช๐Ÿšš
0

HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ led i
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ led i

by e_mergency on Mon May 13, 2019 9:09 am

I bought 'Adafruit 16-Channel 12-bit PWM/Servo Shield(https://learn.adafruit.com/adafruit-16- ... d/overview)' in this site(http://www.devicemart.co.kr/goods/view?no=1171141).

I carried out all the steps as described in the above site for the operation of the servo motor.

I used the example code provided by the library to operate the servo motor.

Below is the example code I used.


Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

// called this way, it uses the default address 0x40
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
// you can also call it with a different address you want
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(0x41);
// you can also call it with a different address and I2C interface
//Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(&Wire, 0x40);

// Depending on your servo make, the pulse width min and max may vary, you
// want these to be as small/large as possible without hitting the hard stop
// for max range. You'll have to tweak them as necessary to match the servos you
// have!
#define SERVOMIN  150 // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX  600 // this is the 'maximum' pulse length count (out of 4096)

// our servo # counter
uint8_t servonum = 0;

void setup() {
  Serial.begin(9600);
  Serial.println("8 channel Servo test!");

  pwm.begin();
 
  pwm.setPWMFreq(60);  // Analog servos run at ~60 Hz updates

  delay(10);
}

// you can use this function if you'd like to set the pulse length in seconds
// e.g. setServoPulse(0, 0.001) is a ~1 millisecond pulse width. its not precise!
void setServoPulse(uint8_t n, double pulse) {
  double pulselength;
 
  pulselength = 1000000;   // 1,000,000 us per second
  pulselength /= 60;   // 60 Hz
  Serial.print(pulselength); Serial.println(" us per period");
  pulselength /= 4096;  // 12 bits of resolution
  Serial.print(pulselength); Serial.println(" us per bit");
  pulse *= 1000000;  // convert to us
  pulse /= pulselength;
  Serial.println(pulse);
  pwm.setPWM(n, 0, pulse);
}

void loop() {
  // Drive each servo one at a time
  Serial.println(servonum);
  for (uint16_t pulselen = SERVOMIN; pulselen < SERVOMAX; pulselen++) {
    pwm.setPWM(servonum, 0, pulselen);
  }

  delay(500);
  for (uint16_t pulselen = SERVOMAX; pulselen > SERVOMIN; pulselen--) {
    pwm.setPWM(servonum, 0, pulselen);
  }

  delay(500);

  servonum ++;
  if (servonum > 7) servonum = 0;
}


The servo motor did not work even though the 1.5v * 4 power supply was connected to the shield.

In the meantime, I saw the video of the servo shield on YouTube, and the LED of v + next to VCC came in green. But my Servo Shield's V + led just kept on glowing red.




I am not good at English, but I would appreciate it if you could solve it well.

Thank you.,
Attachments
KakaoTalk_20190513_215221370.jpg
KakaoTalk_20190513_215221370.jpg (152.18 KiB) Viewed 167 times
KakaoTalk_20190513_215220861.jpg
KakaoTalk_20190513_215220861.jpg (137.33 KiB) Viewed 167 times

e_mergency
 
Posts: 5
Joined: Mon May 13, 2019 8:52 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by adafruit_support_bill on Mon May 13, 2019 9:18 am

Try with just one servo connected. Your power supply may not have enough for 8 servos at the same time.

adafruit_support_bill
 
Posts: 74601
Joined: Sat Feb 07, 2009 10:11 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by e_mergency on Mon May 13, 2019 9:22 am

I've already tried it, but it's still not.
By the way, the V + led should be lit green, why is it red?

e_mergency
 
Posts: 5
Joined: Mon May 13, 2019 8:52 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by e_mergency on Mon May 13, 2019 9:31 am

adafruit_support_bill wrote:Try with just one servo connected. Your power supply may not have enough for 8 servos at the same time.

I've already tried it, but it's still not.
By the way, the V + led should be lit green, why is it red?

As a result of my checking, it only runs up to Serial.println ("8 channel Servo test!") In void setup,
However, it has not been implemented since the pwm.begin () function.

e_mergency
 
Posts: 5
Joined: Mon May 13, 2019 8:52 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by adafruit_support_bill on Mon May 13, 2019 10:58 am

Please post a clear photo of just the front of the shield with nothing connected.

adafruit_support_bill
 
Posts: 74601
Joined: Sat Feb 07, 2009 10:11 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by e_mergency on Mon May 13, 2019 6:50 pm

adafruit_support_bill wrote:Please post a clear photo of just the front of the shield with nothing connected.


Here. Thank you for helping.
Attachments
KakaoTalk_20190514_074628425.jpg
KakaoTalk_20190514_074628425.jpg (124.9 KiB) Viewed 135 times
KakaoTalk_20190514_074628050.jpg
KakaoTalk_20190514_074628050.jpg (133.08 KiB) Viewed 135 times

e_mergency
 
Posts: 5
Joined: Mon May 13, 2019 8:52 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by adafruit_support_bill on Mon May 13, 2019 7:04 pm

That is not one of our shields. Looks like a generic copy. They may have just used different components.

adafruit_support_bill
 
Posts: 74601
Joined: Sat Feb 07, 2009 10:11 am

Re: HELP! Adafruit 16-Channel 12-bit PWM/Servo Shield's v+ l

by e_mergency on Mon May 13, 2019 7:20 pm

adafruit_support_bill wrote:That is not one of our shields. Looks like a generic copy. They may have just used different components.

Thank you for reply. I'll try to get another product again.

e_mergency
 
Posts: 5
Joined: Mon May 13, 2019 8:52 am

Please be positive and constructive with your questions and comments.