remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 12:26 am

Hello! So I'm trying to hook up a few 0-10V PWM signals, using a PCA9685 breakout board and Darlington transistor.

I'm having trouble understanding the wiring, specifically in regards to the power to the board vs the power to the PWM signals using my external 10V power adapter. The following image is one I have from Ada in which it shows how to hook up the PCA9685 board:
Image

And the following image is an example of using a Darlington with Arduino PWM signals:
Image

Again, to reiterate, I'm hooking up PCA9685 to the Pi, then I need signals to be 0-10V PWM (I won't be using the arduino). Do I need to hook up the 10V power adapter to the main relay terminal on the PCA9685? Should I leave the main relay terminal on the PCA9685 empty and amplify the signal across the Darlington? I know the output on the PCA board will only be 5V going out, hence the need for the Darlington. Do I need 2 separate power adapters?

Thanks in advance for the help!!!

petrAgain
Posts: 4
Joined: Sun May 28, 2017 9:49 am

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 5:43 am

Yes, you need two power supplies.
OR one 10v power supply and a voltage converter, 10 to 5v. These can be simple and cheap (29p) but, for the power to drive a pi, they get rather hot as we found out when the heat sink started to melt the lego it was touching. We now use a switching voltage adapter (5 pounds) to deliver half an amp at 5v to the rpi, and let the 10v battery deliver 2 amps via a driver board to some motors. The size of the motors is limited to the maximum _amperage_ the darlington(s) can handle.

The _only_ thing that should connect the pi to your driver board should be 5 volt / 0.01 amp signal wires... and the ground wire.

Hope that helps.

P

User avatar
Burngate
Posts: 6289
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 10:49 am

I may be misunderstanding it, but as far as I can see:

On the Adafruit PCA9685 board, the main chip is powered by the 3v3 from the Pi, as in your top picture.
The V+ on the power terminal-block only supplies power to the middle V+ pins of the three-pin servo output blocks. Since you're not using those, you don't need to connect power to the terminal block.

The PWM outputs feed the bases of the darlingtons, the collectors feed the servos, and your 12v supply feeds those.
The 12v doesn't need to go anywhere else (though you may need to connect it to pin 10 of the ULN2803 if you wish to make use of its in-built diodes)
Ground, of course, must be continuous between the Pi, the PCA9685, the ULN2803, the negative of the 12v supply, and the servos.

remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 2:16 pm

petrAgain wrote:Yes, you need two power supplies.
OR one 10v power supply and a voltage converter, 10 to 5v. These can be simple and cheap (29p) but, for the power to drive a pi, they get rather hot as we found out when the heat sink started to melt the lego it was touching. We now use a switching voltage adapter (5 pounds) to deliver half an amp at 5v to the rpi, and let the 10v battery deliver 2 amps via a driver board to some motors. The size of the motors is limited to the maximum _amperage_ the darlington(s) can handle.

The _only_ thing that should connect the pi to your driver board should be 5 volt / 0.01 amp signal wires... and the ground wire.

Hope that helps.

P
Burngate wrote:I may be misunderstanding it, but as far as I can see:

On the Adafruit PCA9685 board, the main chip is powered by the 3v3 from the Pi, as in your top picture.
The V+ on the power terminal-block only supplies power to the middle V+ pins of the three-pin servo output blocks. Since you're not using those, you don't need to connect power to the terminal block.

The PWM outputs feed the bases of the darlingtons, the collectors feed the servos, and your 12v supply feeds those.
The 12v doesn't need to go anywhere else (though you may need to connect it to pin 10 of the ULN2803 if you wish to make use of its in-built diodes)
Ground, of course, must be continuous between the Pi, the PCA9685, the ULN2803, the negative of the 12v supply, and the servos.
Interesting, I appreciate both pieces of advice, however it appears that you guys each gave different advice: either I need two separate power adapters (one feeding the terminal input of the board [the power from the pi only powers the board this is true] and the other feeding the signal coming out of the Darlington), or only one single power adapter from the signal coming out of the Darlington and nothing directly connected to the relay terminal on the breakout board?

Can anyone else chime in here to provide some clarity? Again I do appreciate the input from both you guys, just not sure which one is right, lol....

User avatar
davidcoton
Posts: 4904
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 2:40 pm

Both posters are answering from their experience and the setups they have used. You need to determine which is applicable to your situation, and the experience of each poster.
Some hints:
1) Look at the post count, and possibly review some of the posters' other posts -- are they clear, unambiguopus, and generally accepted as correct by others? (But note post count is not definitive -- some people can post a lot of rubbish. To avoid paranoia, I don't have anyone in particular in mind.)
2) Judge whether the post details are corect and fit your situation. For example, what voltage are the Pi GPIO siganls to the Darlington? If you don't know, find out before you get something wrong and destroy your Pi. Knowing the correct answer will show who has posted with more attention to getting the details correct.
Signature retired

remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 3:02 pm

davidcoton wrote:Both posters are answering from their experience and the setups they have used. You need to determine which is applicable to your situation, and the experience of each poster.
Some hints:
1) Look at the post count, and possibly review some of the posters' other posts -- are they clear, unambiguopus, and generally accepted as correct by others? (But note post count is not definitive -- some people can post a lot of rubbish. To avoid paranoia, I don't have anyone in particular in mind.)
2) Judge whether the post details are corect and fit your situation. For example, what voltage are the Pi GPIO siganls to the Darlington? If you don't know, find out before you get something wrong and destroy your Pi. Knowing the correct answer will show who has posted with more attention to getting the details correct.
I appreciate the advice! In fact, I did this superficially prior to my previous reply, it seems that petrAgain has more direct relevant experience in that he runs a similar setup but he has only a couple total posts, whereas Burngate has thousands of posts and has provided a lot of great advice. It's definitely possible they both are right for different setups, although of course I was looking for the "best" answer being the most stable and cheapest. Before trying anything I want to do as much research as possible - I'll venture forward if needed, but if anyone else can chime in with any more insight it would be awesome? Thanks again!

remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Mon May 29, 2017 6:52 pm

Perhaps this will help. I shared the fzz file and here is an image of my envisioned setup with only one power supply. Should this work?

Image

https://drive.google.com/file/d/0B9hP62 ... sp=sharing

User avatar
Burngate
Posts: 6289
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Tue May 30, 2017 10:15 am

Actually ... No!

Your new drawing shows a 16-pin 2003; your original was a 18-pin 2803. That's of no consequence - the 2803 merely has an extra Darlington.
However, this new drawing shows your inputs going to Darlingtons 5 & 6, but the outputs coming from Darlingtons 5 & 7.
I assume this is just an error in the drawing, and you will connect it correctly, whichever Darlingtons you decide to use.

However, there is one connection you've left out, and without it it won't work! That's the ground connection to pin 8 of the 2003 or pin 9 of the 2803.
It's there in the second drawing in your first post. Is this also merely an error in your new drawing?

So, with those corrections, it will work!

As regards number of power supplies: yes, you only need one, unless you also count the one supplying your Pi, in which case you need two.

petrAgain was counting the 5v one supplying the Pi, and is correct in what he says. You need the Pi's 5v and the Servos' 12v.
I didn't actually specify a number. I understood you to be asking if another supply - so a second or third, depending how you count them - was needed to connect to the screw-terminals or to the V+ pin on the edge. You don't need that, so, as in your drawing, you only need the servos' 10v supply as well as the Pi's 5v.

User avatar
Burngate
Posts: 6289
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Tue May 30, 2017 10:54 am

I haven't been able to find any definitive information, but as far as I know, servo motors with a third PWM input wire require the signal to be driven both high and low.
A darlington can only drive it low - it's open-collector, and relies on the rest of the circuitry to pull it high.
This might cause you problems. Or maybe not. I just don't know!

remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Tue May 30, 2017 5:51 pm

Burngate wrote:Actually ... No!

Your new drawing shows a 16-pin 2003; your original was a 18-pin 2803. That's of no consequence - the 2803 merely has an extra Darlington.
However, this new drawing shows your inputs going to Darlingtons 5 & 6, but the outputs coming from Darlingtons 5 & 7.
I assume this is just an error in the drawing, and you will connect it correctly, whichever Darlingtons you decide to use.

However, there is one connection you've left out, and without it it won't work! That's the ground connection to pin 8 of the 2003 or pin 9 of the 2803.
It's there in the second drawing in your first post. Is this also merely an error in your new drawing?

So, with those corrections, it will work!

As regards number of power supplies: yes, you only need one, unless you also count the one supplying your Pi, in which case you need two.

petrAgain was counting the 5v one supplying the Pi, and is correct in what he says. You need the Pi's 5v and the Servos' 12v.
I didn't actually specify a number. I understood you to be asking if another supply - so a second or third, depending how you count them - was needed to connect to the screw-terminals or to the V+ pin on the edge. You don't need that, so, as in your drawing, you only need the servos' 10v supply as well as the Pi's 5v.
Yes!! Good catch on the pin, it was just an error in the drawing. I forgot about the ground to the Darlington, so big thanks on that!

As for the appropriateness of the solution, I've seen others that used this solution with success, I just wasn't able to find any specific diagrams or details on the setup. But I do know that apparently people have had success with the PCA9685 and Darlington to drive 0-10V PWM signals.

I really appreciate both of your input. I'll work on wiring this week and will post a follow-up. Thanks!

remix7196
Posts: 10
Joined: Sun Apr 09, 2017 4:48 pm

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Fri Jun 09, 2017 4:42 pm

So unfortunately this didn't work. The "Power" LED on the PCA9865 went out when I plugged in the AC adapter, and I smelled burning. It appears the PCA9865 wasn't damaged too bad, since i2cdetect still detects the board at the proper address, and once I unplugged it the Power LED came back on to the breakout board.

I'm wondering what's wrong? Based on input above I went ahead and adjusted the diagram to depict exactly how I hooked it up. I was looking at the PCA9685 and it does say V+ max at 6V, and the adapter is 10V, is that what's wrong? The Darlington is supposed to amplify the PWM signal up to 10V. I read online that the PCA9865 and the Darlington combo is the right way to achieve multiple 0-10V PWM signals, though, so I can't imagine this is an incorrect board for the solution? Please help, anyone!

Image

User avatar
davidcoton
Posts: 4904
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Fri Jun 09, 2017 7:47 pm

I don't know the specific interface board you are using, but the outputs of the board do not want a 10V supply. The Pi's 5V should go there. It is only needed to switch the Darlington on, and the ULN2003A is designed for 5V.

The Darlington outrput is pull-down only, so the load must be connected between +10V and the Darlington output. 10V should go no-where else.

Make sure you do NOT connect 10V to the Pi -- it will fry. As to what did get burnt, possibly the output stage of the driver board. You may find that the first two outputs no longer work. Or possibly the first four (it looks like 4 output chips for 16 channels). The rest may well have survived. It is also possible that two channels of the ULN2003A have suffered.
Signature retired

User avatar
Burngate
Posts: 6289
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hooking up 0-10V PWM with PCA9685 and Darlington

Sun Jun 11, 2017 10:53 am

You're moving the goal-posts with each drawing!
The earlier ones feature 3-wire servos, but the latest one has 2-wire motors.

As david says, the load must be connected between +10V and the Darlington output, so move those two white wires from gnd to +10v.
Also, the PCA9685 board doesn't use and doesn't need the 10v supply, and the Pi would be destroyed if 10v reached it.
10v must only go to the motors.

So you can remove the red wires from the breadboard, and from between the breadboard and the AdaFruit board.
Ground, of course, has to be continuous between Pi, PCA9685, breadboard and 10v supply negative.

Return to “General discussion”