Help With Ad5220

Thread Starter

campeck

Joined Sep 5, 2009
194
The data sheet has this to say...

"Care should be taken to limit
the current flow between W and B in the direct contact state to
a maximum value of 5 mA to avoid degradation or possible destruction
of the internal switch contact."

My circuit looks like this...
It is a Cmos 555 running a pwm signal to a l298 dual hbridge. The duty cycle is controlled by the ad5220 digital pot. Recently, when code is run to speed up the motor, speed falters and quivers. And at the other extreme the motors are not turning so I can't tell if the same thing is happening. I suspect I should have used a bigger than 220ohm resistor on the ad5220?
(5-.7)/220 = 20ma...
 

Attachments

Thread Starter

campeck

Joined Sep 5, 2009
194
Because the MCU is a BASIC STAMP 2. And it only does one thing at a time.
So checking sensors skews the PWM. So I implemented this config which worked for a while. then this.

Do you agree that the ad5220 is defunct?
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
Because the MCU is a BASIC STAMP 2. And it only does one thing at a time.
So checking sensors skews the PWM. So I implemented this config which worked for a while. then this.

Do you agree that the ad5220 is defunct?
It probably is defunct. I would try changing R1 to 1k, which will guarantee that the current does not exceed 5mA, regardless of the code provided to the 5220.
 

SgtWookie

Joined Jul 17, 2007
22,230
I agree that R1 must be increased, but I'd go further than 1k.

If you increase R1 to 2.2k, and exchange the 0.01uF (10nF) timing cap for a 0.001 (1nF) timing cap, your timing would remain the same, and you should not see more than 2.3mA current through pins W & B.

You are generally much better off if you operate a device well under it's maximum specifications. In this case, you can easily do so with no change in circuit performance other than improved reliability.

[eta]
I was tired when I wrote the above, and didn't account for the resistance of the AD5220 digital pot.
The resistance of the pot would also need to be increased by a factor of 10 in order to keep the timing the same.
If your existing AD5220 is the 10k version, replace it with a 100k Ohm version.
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
The frequency of the 555 is primarily determined by C1 and the resistance of the pot, not by R1. See the attachment.
Changing R1 to 2.2k should be fine. When the pot code gets near the extremes (high or low), the duty cycle will be limited by the value of R1, since its value will be much higher than the resistance of the "short end" of the pot. Larger values of R1 will make this effect more pronounced.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Ron_H,
I realized my omission a few hours after I posted; I'd just gotten around to amending my post. ;)

Simply increasing R1 from 220 Ohms to 1k would significantly affect the PWM range.

But by increasing R1 to 2.2k, increasing the pot from 10k to 100k, and decreasing the timing cap from 10nF to 1nF, the PWM range and frequency remain identical, while limiting maximum current through the pot to less than 2.3mA. Worst case scenario will be on startup, where the timing cap is completely discharged.
 

Ron H

Joined Apr 14, 2005
7,063
The AD5220's resistor tolerance is ±30%. This means the frequency will ±30% of nominal, not including the tolerance of the timing capacitor. This is probably not a problem, but the OP should be aware of it.
 

Thread Starter

campeck

Joined Sep 5, 2009
194
So the consensus is 100k digital pot, 2.2K pre-resistor, And a 1nF timing cap.
That sucks since I just ordered two more of the 10k version. Oh well, More stock!

Yeah I'm not too concerned with the exact frequency of the PWM. But more with getting 0% - 100%. And even that isn't critical. As long as the motors can have some selectable speeds.

Since I'm ordering parts I will probably expand the circuit to a 556 and two 100k Dpots to control motor speed individually.

Thanks for the great help guys!
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, with a 1k R1 and 10k pot, you'll get a range of about 9% to 91% PWM
With a 2.2k R1 and 100k pot, you'll get a range of about 2% to 98% PWM.

If you reduce R1 to 1k, you'd get about 1% to 99%, but your risk of burning up the pot when set to max or min increases a fair bit.
 

Thread Starter

campeck

Joined Sep 5, 2009
194
2% to 98% sounds fine.

The 3v motors are being run by a 7.4v LIpO (before I upgrade to 9v motors) so I need to keep the average voltage down anyway. lol
 
Top