cancel
Showing results for 
Search instead for 
Did you mean: 

Help with nucleo board and pca9685 servo board

FGuns.1
Associate II

Hello everyone,

I came here looking for help : I'm doing a project for an intership where i have to create an hexapod robot basically from the ground up, with particular interest in the electronics and programming part.

As a main microcontroller, we are using an STM32 Nucleo L476RG, where we plan to pilot 6 of our total of 18 servo-motors, and then we plan on piloting the rest of our 12 servo-motors using our Adafruit pca9685.

While using the datasheet, and different videos to learn how to use the pca9685 correctly, we ran into 2 main problems.

One of them is that the top part of the board, so the slots where you input your ground and your V+ to power the servo-motor pin row, isn't correctly connected with the servo-motor V+ row.

adafruit.PNG (275.16 KiB) Viewed 6 times

We tested to see the continuity with a multimeter, and it wasn't linked, while the ground parts all were, logically.

Which means that we can't power our servo-motors using the input designed for it, and we either have to use the V+ found on the left of the board, or directly attach our power to the V+ row of pins on the bottom.

Our second main problem is the PWM signal output amplitude is extremely low, around 5 mV, which we can't use of course. We tried looking up online why the output is so low, but haven't found the answer unfortunately.

Attached you'll find a picture of our results using an analog descovery oscilloscope. On the right side of the screencap we can see the scale (10 mV/div). We do manage to get our period of time correctly though.

So basically, problem 1 is we can't input our V+ where we should, because there's no continuity between the V+ input and the servo-motor V+ row, and problem 2 is our PWM signal amplitude is extremely low, so useless.

I tested this in 3 different pca9685 boards (clones of the original) and none of them worked.

Hopefully everything is clear, and someone can manage do lend a hand.

I can give more info in the comments.

Thank you very much!

3 REPLIES 3
Peter BENSCH
ST Employee

Welcome, @Fabien Gunst​, to the community!

When you say "board", surely you mean the Adafruit board?

Are you aware that the PCA9685 has PWM outputs but is a controller for RGBA LEDs, i.e. Red/Green/Blue/Amber LEDs?

By the way, the NUCLEO-L476RG is based on an STM32L476RG, which has many timers, some of which can implement up to four PWM channels:

  • TIM1: 4 PWM
  • TIM2: 4 PWM
  • TIM3: 4 PWM
  • TIM4: 4 PWM
  • TIM5: 1 PWM (3 are blocked due to other timer functions)
  • TIM8: 4 PWM
  • TIM15: 2 PWM

So you have a total of 23 PWM channels on one STM32 - why use (unsuitable) external PWM extension devices?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Could you perhaps DIAGRAM what you HAVE wired?

The V+ doesn't connect directly, it goes through one of the legs of the FET.

You're powering the PCA9685 from the STM32, VCC should be 2.3 to 5.5V, 3.3V should be fine.

Will want pull-ups on SCL / SDA

https://cdn-learn.adafruit.com/assets/assets/000/036/269/original/adafruit_products_schem.png?1475858980

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
FGuns.1
Associate II

Turns out the problem was a missing line of specific code related to the PCA clone that's needed to amplify the PWM signals amplitude.

Thank you for your answers.