Total Pageviews

Sunday, February 10, 2019

Keithley 7013-C relay card headless operation

    This will be just a quick post of one things I've been woring on. I have a lot of stuff on the back-burner and about 4 or 5 really interesting blog posts that await to be written up. unfortunately there's a lot of work that has to go into the experiments for those, so bare with me.

   Now that I've made my excuses, here's what I came up with, for using a Keithley 7013-C relay card as standalone.

   It's not that  complex, but it kind of took a lot of time just because of the metric ton of soldering I had to do on the LEDs and wires and also because the modifications to the existing equipment was quite complex. A lot of cutting, filing and drilling... you know, the fun stuff

I got this relay card really cheap but don't have the Keithley DMM for it. It's for a Keithley 7001 Mainframe scanner, but I don't have that neither do I want to buy it. So I decided to put together a platform that allows me to take advantage of the realy card and use it to take measurements of....well, electrical stuff.

   For those curious, you can find all the specifications and schematics in this link.

  The guts of the card are pretty simple. Three  serial shifters, UCN-5841A and, of course, the relays.
   Keithleys are strange beasts, so together with the normal 5V DC supply, there's also a 14.6 V and 6 V rail.... go figure. Nothing some LM317s can't handle.
Note to self... make sure the voltage diciter on the LM317 meets the minimum current load (~10 mA works best).

  The unwilling donor is a piece of  old 19 inch rack mount Philips video equipment. The card slots are almost the right length to fit the relay card in. Almost...
Which in home-gamer talk, that's "take out your rotary tools".

  The front panel was the first to get the make-over.

   I gutted the donor, took out one whole card and took off the components from a second one, so that I could use that as a platform for the miscellaneous stuff I needed (wiring, power supply). I also made everything as modular as possible, with connectors everywhere, so in the future, if I get any more bright ideas I can implement them quite easily.....that, and it makes sense to quickly undo connectors instead of hard soldering stuff together, in case of some unhappy misshaps.

    The transformer secondaries were made for 12V DC operation, so I had to series two of them for the 14.6 V DC rail. Not ideal, but the current demand isn't that high so there should be minimal power dissipation. After about 30 or 40 minutes of playtime with the thing, turning relays on and off, none of the linear regulators got warm, so I guess my hunch was correct. I also did multiple 12 hour runs and everything is still OK. Even a blind dog gets lucky sometimes...

   Those LEDs on the front panel that I showed are to have a visual guide of which relays are doing what, so I also modified the card  itself and added a connector and wires to the shift register outputs. 

Remember kids, 5 minute epoxy might seem handy, but it's a piece of crap. Don't use it. Use the normal epoxy. 5 minute epoxy has a tendency not to stick well and just ruin everything afterwards. Either that, or use Araldite epoxy.

   And of course the drivers for the actual LEDs:

  I organized the whole thing in 2 rows, 10 LEDs each. The botton row is attached to a big PCB that also has the hex buffers on it. The upper row is just stuck on a small piece of protoboard and a ribbon cable going from that to the other board.

   I used a plethora of hex buffers, basically what I had lying around. I think it was two 74LS04, one 74LS19 and something else I don;t remember right now. I'm not really picky, as you can see. Anything goes.

    Of course, nothing is as simple as it looks. The relays are wired in what might seem to be a weird way to the shift registers. For example,  outputs 1 to 4 on the last shift register are wired to channels 1 to 4 but outputs 5 to 8 are wired to channels 8 to 5. So basically the second nibble (last 4 bits) in the first byte (order is LSB to MSB) are reversed. This also goes for the other two shift registers. Confusing? Here's something to help explain  it better

  Also, just a quick mention.. with so much wiring flopping around in the breeze, I used ETFE/PTFE  insulated wire, because it's a given that at some point you'll touch some wires with your soldering iron. It saved me a lot of headaches, let me tell you.

   The controller software, running on an Arduino, is not necessarily the best, in terms of efficiency, but it gets the job done. There's two main parts to the whole thing:
 - The input command handling part
 - and the actual data output to the shift registers

The command handling part isn't really SCPI standard, but I thought this is the easiest way to implement. Strings on  Arduino isn;t the simplest thing to get working well.

A command can be either for a single relay:

or multiple commands

The ";" at the end of a command is a must, in either of the two formats. The SW doesn't throw  back invalid format errors (yet) but nothing will happen if the romat isn't right (as far as I know)

The data to be shifted to the SW is first decoded from the input command, then stored in an array,  Relay_ch[]. From here, because of the way things work with these shift registers, the data gets switched arround into Relay_ch_toSend[] the finally out of the Arduino;

For the actual signals that go to the registers, this si how it happens:
  Data pin set either high or low, depending on whether  Relay_ch_toSend[] is a 1 or a  0. Then a clock pulse is sent in order for the data to be input to the register's register. (I actually  meant to write this)
Once all the desired serial data is loaded, a Strobe pulse will load it into the output latch register and then, pulling Enable low will activate the outputs of the registers.

   Because the PC needs to interface with mains-connected equipment, I've isolated the digital lines using some 4n25  optoisolators. The turn ON time of these is quite OK, but the turn-off...well... let's just say that the Arduino waits around a lot, in software. Hence thosewait times in the software in between switching  the data and clock lines.

  The first test I did was to measure the leakage of 5 wet tantalum capacitors with my Fluke 8505A. Probably the relays are not too well suited for this, but the results are more or less consistent. Did 3 12 hour test runs, after the caps were  formed @10V for at least 24 hours and both the Arduino and Keithley relay board behaved flawlessly.

As always, this is the link to the pics I have for this project. Enjoy


Post a Comment

google-site-verification: googlee8a41f51abde7545.html