June 2014: BenchBuddEE

June 1, 2014

I made a design mistake on the custom board that might also crop up in the official board… I have the RELAY+ signal being sent from Digital 1 on the Arduino, which, as it turns out, is also the Tx pin for serial communication. This isn’t much of a huge issue as far as the relay goes: when I enable serial communication from the Arduino for debugging, I wind up with the relay permanently on and a pulsing relay enable LED. I suspect this will be a much more significant problem for the FAN_MODE pin when we get to that point.

This is a copy of the build log I maintained during the Contextual Electronics Session 1B class. I didn’t log the steps taken during the circuit design and layout portion, but since most of that was rip-up, re-drawing and time spent searching Digi-Key, you’re not missing much, I promise.

Bottom line, if you’re using Serial Communication, Pin 1 and Pin 0 will not behave as expected.

I’m going to try to find a little switch of some sort I can solder down to replace the 0Ω resistor that enables the signal to the relay, so that I can take it out of the loop when I need to debug something on that board.

Thomas said…
I found the same issue with FAN_MODE on the standard board. I’m thinking of hard-wiring LDAC low then using Digital 3 for FAN_MODE instead.

June 3, 2014

That sounds like a good idea Thomas. I didn’t quite understand from the data sheet what they meant by “double buffered latching” other than “you can latch with LDAC or CS, choice is yours”. Is there ever an occasion where a hard wired LDAC would be bad?

Thomas said…
My understanding is that if you hold LDAC high while writing a new control value to the DAC it doesn’t take effect (i.e., the output doesn’t change from the previous value) until the LDAC transitions to low. If you hold LDAC low then the output changes as soon as you complete control value write. The reason you might want to use LDAC is if you want better control of the timing for output changes and there are several potential applications for this. I’m guessing that the most common use is when trying to produce some particular wave form such as an audio output. The LDAC would allow you to change the output so it corresponds to the sample-rate. So you would do something like set LDAC high and pre-load the next sample into the DAC. Then at the next sample time (which could be triggered by a timer interrupt) you set the LDAC low to make the new sample take effect at that point. For our application I don’t think there is much advantage in using the LDAC.

June 5, 2014

Here are the results of me testing the FAN_PWM control. I have to say, I’m pretty stunned at how well it performed! As the PWM was increased by each 25%, the corresponding current drop was exactly spot on. Pretty amazed by that 🙂

Fan PWM Table

The code to implement was essentially what Chris added to his sketch…

And here are some scope captures of the PWM signal vs. DAC_OUT level…

* * *

Final bit of catching up for the evening, soldering down the dastardly MCP3901… everything turned out better than expected! After doing the initial blobbing of soldering to tack it down, then sort of, spreading a nice even coating of solder with a bucket of flux onto each side, I cleaned up each row of pins using close to a mile of solder wick.

Testing the Official Board was a piece of cake thanks to the “Michael’s Guide to Testing MCP3901 Continuity” map, but testing the custom board required me making a map of my own, which took a bit of time to trace out each pin to a recognizable location. For both boards, each connection tested out correctly, without any easily detectable solder bridges (tested against each neighboring pins), or bad joints.

Since the custom board had the chip rotated 90 degrees, it made it a little easier to get in on both sides of it.

June 10, 2014

The soldering for the FAN_MODE preparation…

Step 1: Bodge some wires to free up PIN 0…

Official Board…

Custom Board was trickier, as the 0Ω resistor pads are on the front for FAN_MODE and on the back for LDAC. I wound up using a little piece of jumper wire and soldered it between pin 5 and 7 on the DAC (LDAC and GND), then had to do a tricky multi-bend wire through the board front to back to relocate FAN_MODE.

Step 2: Install Q3… (Official Board and Custom Board respectively)

* * *

I first checked to see if the resistance basically disappeared when the gate of Q3 went high, and confirmed on both boards that the resistance Drain-Source became minimal when the Gate was given the 5v Signal, and that OPA Pin 7 was driven to rail voltage.

Then I tested the DAC PWM in coordination with FAN_MODE. Here are the measurements I have taken so far, in an attempt to determine if the FAN_MODE circuit is working…

Fan Output vs. DAC Output

There is slight deviation between the two boards, that could just be down to having a pretty crappy DMM that can’t seem to adjust fast enough to the changing values (and I’m not patient enough to set a 20 second delay or something like that.)

For some reason, when the DAC PWM transitioned from 255 to 0, the current output spiked to at least 1.35A, which has caused me to sacrifice four DMM fuses to the Gods of Electronics. I’d really like to understand why that was happening and how to prevent it.

In an attempt to figure out if there was a discernible difference in output at FAN_OUT+, with the DAC PWM running between when the Q3 Gate is HIGH vs. LOW, I wrote a little routine that basically does this…

Turn Q3: ON
Wait: 5 seconds

Turn Q3: OFF
Wait: 5 seconds

Repeat
Then I measured the voltage and current output in both states, FAN ENABLE and FAN DISABLE, and scoped the FAN_OUT+…

Gate Voltage

What that chart doesn’t show, is that with the Official Board, the FAN_OUT (mA) would exhibit those huge spikes I had seen above. Didn’t appear that way with the Custom Board, but that might, again, just be down to the sensitivity of my test equipment.

The scope measurements were pretty interesting. This shows a sort of macro view of what’s going on while Q3 turns off and on…

Gate Signal

The big chunks of signal slamming back and forth are the DAC PWM oscillations from 0-12V when FAN MODE = ENABLE. The calm period in between is standard 12V during FAN MODE = DISABLE.

Here I’ve zoomed in on the time domain during ENABLE. The measurement is Vavg, so 5.22V seems-ish correct-ish…

Gate Signal Zoomed

Here’s where I get confused though. The image above is from the custom board. This is the exact same measurement taken from the official board…

Gate Signal Zoomed - Official Board

Just eyeballing it, that pulse width seems only about half of what it was for the custom board.

It would help if I had some expected results to compare this to.

* * *

Went to Radio Shack… bought a $15 12V fan… seems like it’s working on both boards.

June 23, 2014

LED Driver circuit is installed and programmed on both boards and working correctly. Tested with six white LED’s in series on a breadboard … felt odd not using any resistors.