Author Topic: A SCPI Programmable (Precision) Resistor  (Read 5633 times)

0 Members and 1 Guest are viewing this topic.

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
A SCPI Programmable (Precision) Resistor
« on: September 05, 2023, 06:31:41 pm »
I'd like to share a project with you that I've been working on lately: A programmable resistor.

At the time I was looking for a decade resistance box for my small lab. A few days later I decided to build one myself - the goal wasn't to build the most precise and generally best programmable resistor - that task I leave to TME manufacturers. It started more as a quick exercise for two upcoming projects, mostly regarding the machanical design/and software. The project then evolved into something a bit more complicated than I originally anticipated, but most of the early design decisions remained - limiting the performance in some areas, but it's well beyond what I wanted to achieve anyway.

Main requirements were:
  • 0 Ohm to 1MOhm in 1 Ohm steps
  • Reasonably high accuracy and precision
  • A usable user interface with an LED display (nostalgia)
  • SCPI Programmable

This meant using a bunch of relays for switching in conjunction with relatively cheap 1206 0.1% 10ppm 0.4"W SMD resistors. Having the option to control all decades individually allowed me to not only calibrate the resistor and show the calibrated resistance value in the display, but also optimize the actual resistance selection based on the calibration values to match the desired value (setpoint) as best as possible (available for 2-wire and 4-wire). This was more an experiment with some obvious and less obvious limitations, but it worked surprisingly well.

I put some emphasis on the "programmable" part, meaning the SCPI interface offers many options, including a list function, a trigger system with bus, internal, external trigger and more.

The first diagram shows the absolute value of the deviation between the setpoint and the value indicated by one of my Agilent 34401A multimeters. The second diagram shows the absolute value of the deviation between the calculated resistance (estimate based on calibration values) and the value indicated by the Agilent 34401A multimeter. Connecting lines between data points for visual purposes only.

You can find a very detailed description regarding the design and capabilities as well as some resources below (so I won't repeat everything here...).


If there is anything you're interested in, let me know.

Thanks,
Sebastian
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3238
  • Country: gb
Re: A SCPI Programmable (Precision) Resistor
« Reply #1 on: September 06, 2023, 05:01:24 pm »
That's an impressive level of finish on the front and rear panels, very professional looking.  Can you sweep resistances atomically e.g. no open circuits or spurious resistance changes in the opposite direction whilst switching?
 
The following users thanked this post: Chipguy

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #2 on: September 06, 2023, 08:43:41 pm »
Thanks!

that is a great question. Right now I have implemented two switching modes: "fast", meaning switching all relays (almost) at once, and without any intended order; "break-before-make".

So the answer is no. Initially I wanted to have a mode that avoids an "open" during switching, but in the end I didn't bother, because
a) I simply usually don't need it
b) In some applications it might be good enough to just connect a capacitor in parallel with the programmable resistor.
c) With my topology, "monotonicity" during switching isn't achievable in the first place (not generally anyway).

It is certainly possible to improve the switching behavior though.

The first thing I'd consider is to switch the highest non-zero decade first, then the second-highest, ..., so that the resistance change would become smaller and smaller ("inter-decade" switching, if that makes sense).

Changing the resistance from say 2 Ohms to 4 Ohms with no interruption ("intra-decade" switching) could be achieved by switching on the 4 Ohms-path before opening the 2 Ohm path, resulting in 1.33 Ohm as an intermediate state. Or to 8 Ohm first, then to 4 Ohm (1.6 Ohm, 8 Ohm, 2.67 Ohm, 4 Ohm), not really great either, so for me the simpler first solution wins without a doubt... No matter what you do you'll end up with "spurious" or "non-monotonic" resistance changes.
 
The following users thanked this post: mikerj

Offline KE5FX

  • Super Contributor
  • ***
  • Posts: 1889
  • Country: us
    • KE5FX.COM
Re: A SCPI Programmable (Precision) Resistor
« Reply #3 on: September 06, 2023, 09:05:01 pm »
Looks amazing.  Is there a part number for that enclosure, or is it fully custom-designed as well?  Edit: never mind, found it!
« Last Edit: September 06, 2023, 09:06:49 pm by KE5FX »
 
The following users thanked this post: SebastianH

Online abeyer

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: us
Re: A SCPI Programmable (Precision) Resistor
« Reply #4 on: September 07, 2023, 07:26:43 am »
Looks amazing.

It had better for the prices that enclosure fetches!
 

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #5 on: September 07, 2023, 12:03:28 pm »
I wouldn't have paid that much and I didn't have to ;)
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3352
  • Country: nl
Re: A SCPI Programmable (Precision) Resistor
« Reply #6 on: September 07, 2023, 01:38:49 pm »
Is that a wooden dowel on the power switch?  ;)

I have some ideas into this direction myself, and (among others) had a look at the PXI programmable resistors from Pickering, and those easily cost over EUR1500, so you can have a nice DIY budget to make this yourself.

For myself, I am more of a cheap and simple guy.  I bought a 30x70mm PCB on Ali with 70 jumpers and later discovered that a Sweeny guy had that idea earlier (and probably many others too). The first time I wanted to use the thing, was to simulate a PT100 to set a fixed temperature, and I found the 1 Ohm resolution really lacking. A lot of the Pickering units have 0.1Ohm resolution. And even 0.01Ohm resolution would be useful, even if it does not have that accuracy. Often you just want to measure differences between small input changes.

I also noticed you "open sourced" the whole thing, and even made KiCad projects for the front and back panels. I am curious about more details of those. Did you order them as IMS (Insulated Metal Substrate) What is the quality of (up close) surface finish? Is the white as homogenous as it looks on the pictures?

Another part I am always interested in is the global build up of cost and time sunk into a project.

« Last Edit: September 07, 2023, 01:55:57 pm by Doctorandus_P »
 

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #7 on: September 07, 2023, 04:30:25 pm »
Yeah, it's a simple wooden rod, ~3mm diameter. The initial plan was to design and print a 3d part and this was a quick test. It worked so well, that I didn't bother changing it :D

You could add one or two decades to the design or just populate the PCB differently (e. g. for 0.1 Ohm ... 100 kOhm). That being said, the big issue is the contact resistance of the switches/relays. It might vary with switching voltage/switching current/age/temperature. The contact resistance of the EC2 relays I used in my design is fairly high compared with a resolution 0.1 Ohm (and even more so for 0.01 Ohm): I measured about 0.025 Ohms for both poles in parallel using my Agilent 34401A @ 1 mA measurement current in the 100 Ohm range. (Edit: This is an average of many relays in series using 4W measurement, determined during the calibration procedure.)

Depending on the topology used there might be a varying number of contacts in the signal path. As can be easily seen in the diagram, with the topology I've selected the deviation varies when changing from odd to even resistance values and vice versa. Actually, the number of relays in the signal path of a decade is 2* for even values and 1 for odd values (*in parallel with a resistor; at least for my design with 1 Ohm the improvement caused by the parallel resistor is insignificant). The deviation caused by the changing number of switches in the signal path is so large (i. e. ~0.025 mOhm) that I wouldn't feel comfortable going below 1 Ohm with my design. I would recommend using a different topology (meaning more relays and hence higher cost and other technical differences) and/or relays with lower contact resistance for the decades below 1 Ohm (maybe even for the 1 Ohm .. 9 Ohm decade).

Maybe also take a closer look at my documentation (see links above, hackaday or my personal page). There I have described many aspects of the design, including the problem with the contact resistance, which topology I used (and why) etc.

The front and rear panels are simple prototyping aluminum PCBs. The white solder mask is reasonably uniform. I ordered the minimum quantity of 5 PCBs and there are slight differences (e. g. visible scratches, silk screen uniformity etc.) The black silkscreen as well as the rectangular cutouts are not 100% perfect, but more than good enough in my opinion, not only, but especially if I consider the pricing of cheap prototyping boards. Again: Not perfect, but I'm more than happy with the result and this obviously depends on the PCB manufacturer.

Haven't calculated the cost yet, but I think it's a good idea to do so. I'll give you a number soon :) Designing the PCBs was relatively quick & easy, writing the software was much more time consuming and - quite franky - sometimes not that much fun. The project took me many hours, many more the I initially planned - but it's more capable than I initially planned :D How many hours though, I will never know - sorry.
« Last Edit: September 07, 2023, 04:33:03 pm by SebastianH »
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: A SCPI Programmable (Precision) Resistor
« Reply #8 on: September 07, 2023, 07:03:24 pm »
Looks fantastic. I love the red LED display. Even in 2023, it is easily readable and professional looking.
 
The following users thanked this post: SebastianH

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #9 on: September 11, 2023, 03:09:36 pm »
Another part I am always interested in is the global build up of cost and time sunk into a project.

The following are very rough estimates. I didn't necessarily pay that much for this project specifically, because I had many parts left from other projects. When bought new the case is likely much, much more expensive than what is accounted for. For some of the parts like the PCBs there is a minimum order quantity that will slightly increase the cost in most DIY scenarios where you simply don't build that many units.

Mechanical parts (including case, panels, connectors etc.): 80 EUR
Mainboard (including PCB, main controller, relays, precision resistors etc.): 176,50 EUR
UI board (including PCB, ui controller, LED displays, rotary encoder, switch, buzzer etc.): 78,50 EUR
Power supply board (including PCB, power switch, AC/DC converter, DC/DC converter): 34,00 EUR

Total: 369 EUR. Pretty expensive, actually.
 
The following users thanked this post: Doctorandus_P

Offline Neepa

  • Regular Contributor
  • *
  • Posts: 61
  • Country: de
  • Mechanic by trade Electronics enthusiast by choice
Re: A SCPI Programmable (Precision) Resistor
« Reply #10 on: September 13, 2023, 06:30:48 pm »
A very impressive project, Sebastian! That front panel wouldn't look out of place in a Rohde&Schwarz catalog during the 80ies or 90ies! R&S liked to use these 17(?) segment Alphanumerical digits as well once upon a time.

The one ugly duckling is that dark grey knob in the middle. Would look better in white honestly.

Where from did you take the buttons and their caps? An old instrument you broke down?

Putting the board on standoff might have enabled you to solder the 4mm jacks directly to the PCB and reduce contact resistances a bit.


Certainly raises the bar for my own planned diy instrument over the winter!
Turbojet Mechanic playing EE.
 

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #11 on: September 13, 2023, 07:50:36 pm »
Thank you!  :)

The one ugly duckling is that dark grey knob in the middle. Would look better in white honestly.

I totally agree. This was more a temporary solution. I replaced it with a 3d printed knob that is more suitable for a rotary encoder. But sorry to disappoint you, it's grey as well, see below... Didn't like the white one I tried before that...

Where from did you take the buttons and their caps? An old instrument you broke down?

These are C&K (now littlefuse) PVA series switches with matching caps (available from mouser/digikey; there might be a significant price difference, so I'd recommend to check both distributors). There are different force ratings for the switches. I accidentally ordered switches with the higher rating (3.5N). Since I also ordered a rotary encoder with high detent force by mistake, the experience is consistent and not bad, but in my opinion not optimal either ;) I would likely use the 1.2N variant for the next project.

Putting the board on standoff might have enabled you to solder the 4mm jacks directly to the PCB and reduce contact resistances a bit.

I wanted it to be easy to (dis-)assemble, but you have a valid point there, no question. At least the Molex connector is redundant and at least I could have soldered the cables to the mainboard. That being said, the main "problem" is the contact resistance of the relays, no doubt about that.

Certainly raises the bar for my own planned diy instrument over the winter!

Now I'm curious... Any specifics on what you plan to build?
 

Offline Neepa

  • Regular Contributor
  • *
  • Posts: 61
  • Country: de
  • Mechanic by trade Electronics enthusiast by choice
Re: A SCPI Programmable (Precision) Resistor
« Reply #12 on: September 14, 2023, 06:12:27 pm »
I totally agree. This was more a temporary solution. I replaced it with a 3d printed knob that is more suitable for a rotary encoder. But sorry to disappoint you, it's grey as well, see below... Didn't like the white one I tried before that...

That looks even more horrid somehow. The grain on the plastic makes me think of marble for some reason. :-DD

Now I'm curious... Any specifics on what you plan to build?

I atleast plan to build an impedance analyzer.

DESIRED MAXIMUM SPECS:

Frequency range 10Hz to 1MHz(maybe even 10MHz someday).
DC Bias capability up to 100 Volts.
Test Signal Amplitudes up to 5-10V.
Ultimately in a Computer Terminal like form factor like a Tektronix 370 Curve Tracer but a lot slimmer in depth.
Graphic display built in with capability to plot colour Curves in a 3D waterfall including DC Bias, Impedance, and Test Signal Amplitude.
Accuracy hopefully better than 1%.

Ambitious I know but I plan to start with using an all in one chip solution first and then deintegrate more and more of the functions into discrete analog/digital circuitry. Getting to those maximum specs step by step. For this Winter I will be satisfied if I manage to integrate an Impedance Analyzer Chip eval board together with an RPI Pico, or similar, with a small 2X20 character LCD screen and some buttons into a single box.
Then growing from there.

More of a roadmap than a singular project I know. Buying a HP4274/75 or 4192A might be cheaper in the end but where is the fun in that? Heck while rare even a HP4284/85 should be but those boat anchors got digital calibration requirements in terms of floppy disk software and 90ies computers I don't wanna deal with.

And I simply flinch at the thought of making it a PC based device. I like to touch knobs/panel buttons thank you very much.


PS: Holy smokes I just found a chip/eval board that can do almost all I want after browsing AD's site for some minutes. https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-admx2001.html#eb-overview. Fucking expensive but it can do it.
« Last Edit: September 14, 2023, 06:22:25 pm by Neepa »
Turbojet Mechanic playing EE.
 

Offline Tigerwoods

  • Contributor
  • Posts: 22
  • Country: cn
Re: A SCPI Programmable (Precision) Resistor
« Reply #13 on: September 26, 2023, 04:04:45 pm »
Nice work.

As an engineer who's been studing in this field for a while (indeed our team have launched a Kickstarter campaign last year for our QR10 programmable resistance box https://www.eastwood.tech/en/ - which can achieve 0.1 ohm steps and up to ±0.01% reading accuracy), you need to solve two major problems if you want to make it more precision:

1. Forget about the ideal formula (it's simple if you ignore the relay's contact resistance and choose strict 2^n valuse to achieve 1% or 0.2% overall accuacy)

2. Find a smart way for calibration (time-consuming measurements can work, but it may not work so well for high accuracy)

At last, you should be careful to select the switches.

Good luck!
I love peace, alright let's fight.
 
The following users thanked this post: luudee

Offline luudee

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: th
Re: A SCPI Programmable (Precision) Resistor
« Reply #14 on: September 26, 2023, 05:04:08 pm »
Nice work.

As an engineer who's been studing in this field for a while (indeed our team have launched a Kickstarter campaign last year for our QR10 programmable resistance box https://www.eastwood.tech/en/ - which can achieve 0.1 ohm steps and up to ±0.01% reading accuracy), you need to solve two major problems if you want to make it more precision:

1. Forget about the ideal formula (it's simple if you ignore the relay's contact resistance and choose strict 2^n valuse to achieve 1% or 0.2% overall accuacy)

2. Find a smart way for calibration (time-consuming measurements can work, but it may not work so well for high accuracy)

At last, you should be careful to select the switches.

Good luck!


Looks like Kickstarter is over on that project. Can these unit be bought somewhere ?

What is the cost ?!

Thanks,
luudee

 

Offline luudee

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: th
Re: A SCPI Programmable (Precision) Resistor
« Reply #15 on: September 26, 2023, 05:10:07 pm »
Another part I am always interested in is the global build up of cost and time sunk into a project.

The following are very rough estimates. I didn't necessarily pay that much for this project specifically, because I had many parts left from other projects. When bought new the case is likely much, much more expensive than what is accounted for. For some of the parts like the PCBs there is a minimum order quantity that will slightly increase the cost in most DIY scenarios where you simply don't build that many units.

Mechanical parts (including case, panels, connectors etc.): 80 EUR
Mainboard (including PCB, main controller, relays, precision resistors etc.): 176,50 EUR
UI board (including PCB, ui controller, LED displays, rotary encoder, switch, buzzer etc.): 78,50 EUR
Power supply board (including PCB, power switch, AC/DC converter, DC/DC converter): 34,00 EUR

Total: 369 EUR. Pretty expensive, actually.

Hi Sebastian,


have you considered making these and selling them ?

I'd be interested !


Cheers,
rudi

 

Offline luudee

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: th
Re: A SCPI Programmable (Precision) Resistor
« Reply #16 on: September 26, 2023, 05:11:00 pm »
Nice work.

As an engineer who's been studing in this field for a while (indeed our team have launched a Kickstarter campaign last year for our QR10 programmable resistance box https://www.eastwood.tech/en/ - which can achieve 0.1 ohm steps and up to ±0.01% reading accuracy), you need to solve two major problems if you want to make it more precision:

1. Forget about the ideal formula (it's simple if you ignore the relay's contact resistance and choose strict 2^n valuse to achieve 1% or 0.2% overall accuacy)

2. Find a smart way for calibration (time-consuming measurements can work, but it may not work so well for high accuracy)

At last, you should be careful to select the switches.

Good luck!





Can it be controlled via LAN and SCPI ?


Thank you,
rudi
 

Offline Tigerwoods

  • Contributor
  • Posts: 22
  • Country: cn
Re: A SCPI Programmable (Precision) Resistor
« Reply #17 on: September 26, 2023, 05:23:16 pm »
It has a USB port (actually it's USB-COM that presents as a COM port on your PC). You can use simple command like "AT+SP=123.4" to set it output 123.x Ω
I love peace, alright let's fight.
 
The following users thanked this post: luudee

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #18 on: September 26, 2023, 05:49:14 pm »
At last, you should be careful to select the switches.

Which relays did you choose?

have you considered making these and selling them ?

No, it's not worth it for me. But if you want to build something like this yourself, most relevant parts like schematics and firmware for the main controller are open source (currently minus the UI board firmware). See my github account.
 
The following users thanked this post: skench, luudee

Offline delvo

  • Contributor
  • Posts: 38
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #19 on: September 27, 2023, 03:11:33 pm »
Looks great. Definetly will put this on my long list of things i want to build. Probably needs some modifications to bring the cost down to be more in my price range
 

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #20 on: September 27, 2023, 03:19:23 pm »
You could start with a different topology. (i. e. (1 Ohm)^n, (2 Ohm)^n, (4 Ohm)^n, (8 Ohm)^n per decade) to reduce the number of relays, use cheaper resistors, simplify the UI (the switches/push buttons are expensive...) etc. There is a lot that can be done to make it cheaper. :)
 
The following users thanked this post: mikerj, delvo

Offline Chipguy

  • Supporter
  • ****
  • Posts: 320
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #21 on: December 14, 2023, 11:15:24 pm »
That is a very good looking design.
I built two programmable resistance decade boxes so far.
However I took a different approach: These are 2 decades in one.
One is paralleling resistors for the range of 1 ohms to a obout 3400 ohms.
Above that a second serial resistance decade is put in serial that contains resistors from 3400 ohms to about 800 K ohm.
So I have a high resolution decade from 1 Ohm to 1.6 M Ohm.
I lives from knowing the exact conductance value of each resistor so it can combine them via succesive approximation to the desired value.
I can use 1% resistors no problem, main thing is: They need to be low tempco.

The unit in the picture is shown in PT100 simulation mode. I use it to simulate all sorts of temperature sensors, conductivity of saline solution and plain resistance of course.
For quick access I added 16 pre-programmable favourite buttons.

I build this in order to improve my embedded C programming skills which were in desperate need of improvement.
Needles to say that the code I wrote is bonkers and eventually got me stuck.

Just wanted to share that with you, so you know you are not alone  ;D
Where is that smoke coming from?
 
The following users thanked this post: ch_scr, luudee

Offline SebastianHTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: de
Re: A SCPI Programmable (Precision) Resistor
« Reply #22 on: December 15, 2023, 01:46:58 am »
Very nice! If you don't mind me asking: Are you willing to share the schematics of the resistor networks?
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: A SCPI Programmable (Precision) Resistor
« Reply #23 on: December 15, 2023, 05:28:18 pm »
Looks great. Initially I thought that you repurposed an old HP case.

What is the topology of the resistors/relays network?  Trying to understand how the resistances of the relays factor in, especially in low settings. 

 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1320
  • Country: ua
Re: A SCPI Programmable (Precision) Resistor
« Reply #24 on: December 15, 2023, 05:38:59 pm »
I want to hear how this thing sounds in action. It must be really sweet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf