1
\$\begingroup\$

I'm working with a circuit that should control the intensity of several LEDs using the CTL and REF pins on a buckpuck driver part number 3021-D-E-1000. I'm using an AD5204 digipot configured as a rheostat between the CTL and REF pins on the buckpuck to modulate the current seen at the CTL terminal, which in turn modulates the current the buckpuck sends to the LED (the higher the current seen at CTL, the lower the LED output). I'm using an Arduino to control the AD5204. The complete circuit I'm investigating is pictured below: enter image description here I believe the pertinent part of the circuit is: enter image description here

I can't get the LEDs to turn on. The switches (SW-SPDT) and the BJTs (Q1-3) are both used as on/off for the LEDs, while the digipot is supposed to control the intensity of the LED output.

My initial thought was that I wasn't communicating properly with the digipot, but I've confirmed with a logic analyzer that I am sending the correct SPI commands to the AD5204. This is the code I'm using (the Arduino 7,8, and 9 pins are written high to put the BJTs in cutoff, and the mechanical switches are connected to the Arduino pin, not to GND, so theoretically the current at CTL should be dictating the LED output):

#include <SPI.h>

int cs = 10;
int address = 1;
int potval = 10;

void setup() {
  pinMode(7,OUTPUT); digitalWrite(7,HIGH);
  pinMode(8,OUTPUT); digitalWrite(8,HIGH);
  pinMode(9,OUTPUT); digitalWrite(9,HIGH);
  pinMode(cs,OUTPUT); digitalWrite(cs,HIGH);
  SPI.begin();
}

void loop() {
  digitalWrite(cs,LOW);
  SPI.transfer(address);
  SPI.transfer(potval);
  digitalWrite(cs,HIGH);
  delay(10);
}

So I'm beginning to doubt that communication with the AD5204 is the problem, but that leaves me pretty lost. I'm not sure why the LEDs aren't turning on, especially since even if I weren't communicating with the AD5204, by default all pot values should be set to midrange (5kOhm).

At that point the LEDs should be on, as far as I understand. Is there something I'm overlooking in the rest of the circuit?

I've tried to be thorough with the information I've provided, but sorry in advance if I've left things out, and I'll try to add information as soon as possible if I have.

EDIT

Okay, so a couple things I've found:

(1) I don't seem to be changing the wiper value on the digipot--it remains at the default value of 5kOhm no matter what value I try to write to it. So that's one problem I need to figure out.

(2) At the same time, when the rheometer has a value of 5kOhm, the LED should be on. I've confirmed this on a breadboard with the same buckpuck I'm using on the PCB and a mechanical rotary pot--at 5kOhm the voltage at the CTL terminal is ~1.23 V, and the LED is at its brightest.

(3) On the PCB with the full circuit as pictured previously, I'm getting 4.3V at the CTL terminal for each RDAC on the 5204, which doesn't accord with (2).

\$\endgroup\$
3
  • \$\begingroup\$ There is no buckpuck 3031, there is a 3021, what is the full product number? \$\endgroup\$
    – Voltage Spike
    Jul 9, 2018 at 18:19
  • \$\begingroup\$ Sorry, it's the 3021-D-E-1000 \$\endgroup\$
    – cyin
    Jul 9, 2018 at 18:51
  • \$\begingroup\$ I think that's your problem right there, try using only the module with a variable resistor outside of your circuit \$\endgroup\$
    – Voltage Spike
    Jul 9, 2018 at 19:03

2 Answers 2

0
\$\begingroup\$

The first thing to do is make sure your digipots are communicating and switching correctly. Get out a mulit meter and put it across the W and B terminals and see if you see a change in resistance. If you don't then you have a pot issue (or the transistor is turning on unintentionally and shorting out the resistance of the rheostat). Another possibility is the CTRL pin on the buckpuck is shorting things out (you never know).

Test each part of the system separately, find a potentiometer and connect it to the buck puck without the transistor or rheostat connected (or grab an extra one of the bench) to make sure you have the right buckpuck, only the E and I versions have a 5V regulator, if it doesn't have this the rheostat or transistor won't work and you will need to provide a 'pull up' voltage for the ctrl pin.

I'll place my bets that you don't have the right buckpuck, if I read the datasheet right, only the 3021-D-I-xxxx will work in your application.

enter image description here

Edit:

By the way, if you have a 50k or 100kΩ part, you could exceed the current rating as the buckpuck can source 5mA and the 50k and 100k parts can only tolerate 5mA so if the resistance goes low enough you could burn the digipot out the lowest resistance is 45 ohms which is over 100mA which will burn the part out.

From the datasheet of the AD5204:

For example, when VA = 0 V and Terminal B is tied to Wiper W, the output resistance values outlined in Table 8 are set for the RDAC latch codes.

enter image description here

This also means that If you have terminal A connected to W the resistance will be backwards (the table is for B to wiper W, so the \$ R_{WB}\$ values will be reversed from \$ R_{WA}\$

So when your design powers up, you default to 84Ω or 45Ω (depending on your part) and more than likely burn up the AD5204. You need to have series resistance to protect the AD5204

From the Absolute maximum ratings section:

enter image description here

\$\endgroup\$
14
  • \$\begingroup\$ Okay, I'm not seeing a change in resistance across the W and B terminals (or change in voltage). Unfortunately I was given this board pre-assembled, so I've ordered a separate AD5204 to test individual components, but that won't arrive for a bit. I do have the E version, so the 5V regulator is there. I've tested this buckpuck separately with a mechanical pot and the control worked fine. It looks like the I-version includes an on-board mechanical pot, which I don't think is what I'm looking for. \$\endgroup\$
    – cyin
    Jul 9, 2018 at 19:01
  • \$\begingroup\$ Probably the AD5204 and programming it, I'd unsolder the buckpuck from the board and try measuring the resistance with one, or simply measure the voltage on the ctrl pin \$\endgroup\$
    – Voltage Spike
    Jul 9, 2018 at 19:06
  • \$\begingroup\$ I...probably should have thought of that sooner. Thanks. So I seem to not to be changing the wiper value on the digipot, it stays at the default mid-position (resistance across rheometer = 5kOhm) no matter what values I try to write to it. So that's one problem. At the same time, even at this resistance value I think the buckpuck should still be turning the LED on. The CTL terminal is just seeing 5V, and according to the datasheet that means the buckpuck won't output any current. I'll edit my main post to include this information. \$\endgroup\$
    – cyin
    Jul 9, 2018 at 19:34
  • \$\begingroup\$ Whoops, sorry, I realized of course when the buckpuck circuitry isn't connected to the digipot I'm not going to see the voltage I expect. But I did double check with the buckpuck-connected digipot and found I was getting 4.3 V at the CTL terminal with the rheostat configured to 5kOhm, which I included in my edit to the main post. \$\endgroup\$
    – cyin
    Jul 9, 2018 at 19:54
  • \$\begingroup\$ Found another problem see post \$\endgroup\$
    – Voltage Spike
    Jul 9, 2018 at 19:58
0
\$\begingroup\$

I would expect the external resistance is the high side of a voltage divider.

My troubleshooting procedure would be:

  1. Disconnect either pin 3 (ref) or pin 4 (ctl)
    and see if the LEDs come on. I'd cut the track to pin 4.
    The LEDs should be on at 100% intensity.
    Measure the voltage at pin 4, should be between 0V and 1.5V, likely zero.

  2. While disconnected bridge a 2.5K resistor across pins CTL & REF
    and LEDs should dim ≈50%. Measure the voltage at pin 4, should be about 2.8V.

  3. Bridge a 10Ω resistor across REF and CTL.
    LEDs should be at minimum intensity or off.
    Measure the voltage at pin 4, should be over 4V.

  4. Reconnect pins 3 and/or 4.

  5. Remove the on/off transistor and debug the programming of the AD5204.



At the same time, when the rheometer has a value of 5kOhm, the LED should be on. I've confirmed this on a breadboard with the same buckpuck I'm using on the PCB and a mechanical rotary pot--at 5kOhm the voltage at the CTL terminal is ~1.23 V, and the LED is at its brightest.

The LEDs should be at their brightest when there is no connection between CTL and REF.

I would use fixed resistors to trouble shoot rather than a pot. 5K, 2.5K, and 10Ω. Once the LEDs are working properly with the resistors then I would connect the AN5204.

I would definitely take the transistors out of the equation until after the AN5204 is working.

You should not need a resistor between the AN5204 and the Buckpuck to limit the current to 11 mA depending on the voltage of the CTL pin with a 10Ω resistor connected between REF and CTL. As the pot resistance decreases the voltage at the CTL pin should increase from ≈1V @ 5K, to about 4V @ 0Ω. See Fig. 3.

On the PCB with the full circuit as pictured previously, I'm getting 4.3V at the CTL terminal for each RDAC on the 5204, which doesn't accord with (2).

A voltage of 4.3V on the CTL means the resistance between CTL and REF is low and the LEDs should be be very dim or off.

1.23V at the CTL pin means the resistance is fairly high and the LEDs are at maximum intensity.

See Figure 3 for voltage and current levels.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.