16 channel servo driver reset issues and schematics

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
PauliusLiekis
 
Posts: 12
Joined: Sat Dec 28, 2013 6:15 am

16 channel servo driver reset issues and schematics

Post by PauliusLiekis »

Hi,

I'm having some problems with reset of the servo driver so I have some questions related to that:

1) pwm.reset (from Servo_Example) doesn't do anything, i.e. if I have continuous rotation servo then it keeps rotating. Regular servos keep their position (i.e you can not turn them). I would expect it to stop rotating once you send reset signal. I tried on multiple different servos. I tried C++ and python code (i.e. different libraries). Any ideas why that would be happening?

2) occasionally on pwm.reset (on start or close of application) all servos jump to some position. The impression that they all receive some particular PWM signal. Any ideas why that could be happening? (I think it's pwm.reset, although I can not be sure, because it happens rarely, but when that happens it's quite bad for multi-legged robot...)

3) Becauses of combination of #1 and #2 I managed to fry one of my servo drivers :( Could you tell me what is the element marked in red in the attached image. I would like to replace it if that's possible.
Attachments
adafruit-16-channel-pwm-driver-marked.jpg
adafruit-16-channel-pwm-driver-marked.jpg (164.94 KiB) Viewed 1219 times

User avatar
adafruit_support_bill
 
Posts: 88155
Joined: Sat Feb 07, 2009 10:11 am

Re: 16 channel servo driver reset issues and schematics

Post by adafruit_support_bill »

The reset command does not stop the PWM signals from being generated. It sets the chip to a known addressing state for subsequent commands. To suppress PWM signal output, pull the OE (Output Enable) pin low.

The circled component is a reverse polarity protection MOSFET. You can bypass that if you are extra careful about your polarity. Of you can replace it with an IRLML6401.

PauliusLiekis
 
Posts: 12
Joined: Sat Dec 28, 2013 6:15 am

Re: 16 channel servo driver reset issues and schematics

Post by PauliusLiekis »

4) I also noticed that turning power off to the servo-driver (i.e. disconnecting it from RPi) sometimes resets the PWM signals, but sometimes doesn't... I'm confused.

User avatar
adafruit_support_bill
 
Posts: 88155
Joined: Sat Feb 07, 2009 10:11 am

Re: 16 channel servo driver reset issues and schematics

Post by adafruit_support_bill »

There is a restart bit in the Mode1 register that will signal the chip to reload the PWM registers after a sleep. But I believe that should get cleared by a power cycle. The most reliable way to assure that the chip comes up in a known state is to hold OE low while you initialize the PWM channels.

PauliusLiekis
 
Posts: 12
Joined: Sat Dec 28, 2013 6:15 am

Re: 16 channel servo driver reset issues and schematics

Post by PauliusLiekis »

Thanks for your help.

I think I came closer to solving my problem. I discovered several things:

1) My main servos work differently from other my test servos - they hold last position even if there is no PWM signal anymore. They stop doing it only when you turn off the power to the servo. So this causes really bad issues with PCA9685, because the breakout board can send incomplete PWM cycle (either caused by Reset function or EO pin) and that's really bad for servos that hold on to the last position - that's how I fried 2 of my breakout boards...

2) I had a version of Adafruit_PWM_Servo_Driver.py which has a Reset function (not sure why this: https://github.com/adafruit/Adafruit-Ra ... _Driver.py doesn't contain it). Anyway the version that I had had incomplete implementation of Reset function. You can see the fix here: https://github.com/PauliusLiekis/Adafru ... _Driver.py
After the fix both C++ and Python code stop PWM signals after call to Reset.


Can you confirm that the board can send incomplete PWM cycle (i.e. shorter/longer PWM pulse than it's supposed to be) on Reset/EO pin?

I guess there is no way to disable power to servos through the board, right? I'll just have to cut the power to the board itself through some mosfet?...

User avatar
adafruit_support_bill
 
Posts: 88155
Joined: Sat Feb 07, 2009 10:11 am

Re: 16 channel servo driver reset issues and schematics

Post by adafruit_support_bill »

Can you confirm that the board can send incomplete PWM cycle (i.e. shorter/longer PWM pulse than it's supposed to be) on Reset/EO pin?
I don't believe so. But even if that were the case, it would only be one pulse and not repeated. If you pull OElow before the reset, that should avoid any problem.
I guess there is no way to disable power to servos through the board, right? I'll just have to cut the power to the board itself through some mosfet?...
OE controls only the signal. To switch the power, you would need something like a MOSFET or a relay.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”