Electronics > Projects, Designs, and Technical Stuff

A SCPI Programmable (Precision) Resistor

<< < (6/10) > >>

Chipguy:

--- Quote from: SebastianH 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?

--- End quote ---

There they are.
The trick is, that each resistor value is just under 2 times greater than the one before. 95% to 97% is the sweet spot.
Once the microcontroller knows the exact value of each resistor is is possible to set very fine, actually ridiculously fine values. Beyond the capabilities of the resistors even.
Some of the relays are low EMF relays that also have a really constant contact resistance.

Have fun!

Chipguy:
Had a look at your design on github.

You did some nice things that I regret not having done as well.
My design only used one PIC microcontroller for the UI and the relay and one smaller one for serial to USB. There is an additional ARM controller inside the Ethernet but I don't count that.
Early on I ran into issues with the PIC18 microcontroller flash size and migrated to a bigger one.
Also the choice of the 4x20 Display turned out to be not sufficient for what I wanted.

I also like the power supply design you have choosen. I temporarily went with a external DC power supply design but also got a very similar AC/DC converter to yours sitting around in a box.
The case you choose looks awesome. The two unit I made use totally different cases but I am not satisfied with either of them
My goal was to make the device the same size as the most common 9 inch wide and 2U high devices on the market, like a 34401 multimeter or something.
However I could not find any suitable housing that would really do the trick.

SebastianH:

--- Quote from: zapta 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. 

--- End quote ---

Thanks! I thought about doing something like that, but buying old equipment and ripping it apart instead of repairing it doesn't feel right, generally speaking. It can be cheaper than buying a new case though. If I found a faulty HP unit damaged beyond repair, i think I would go for it. Actually, I just ordered an old non-working Agilent DC Mobile Communication power supply. So if I can't repair it...

In this series-style toplogy the contact resistance plays a significant role, as you can see in the first performance diagram in my first post: At 1 Ohm the deviation was about +5% .. 6% (4-wire measurement), meaning a total of 50-60mOhm for 2 relays in series + PCB traces etc. In these cases the resistor tolerances (0.1% spec) are negligible. The relative error drops very quickly though. For 2 Ohm it's already well below 2%, for 100 Ohm about 0.1% (all for 4W). With values above 10k it's the other way round - the resistor tolerance of (in my case) +-0.1% dominates the error. Then the calibration/adjustment improves the accuracy to a point where my 34401A's accuracy becomes a concern.

I implemented some measures to reduce the effective contact resistance, i. e. using both relay poles in parallel, shorting the upper decades for the three lower decades (i called that "bypass relays"). But at the time I didn't care too much about the accuracy of the really low values anyway. The lower decades are partially there to improve accuracy in the upper ranges...


--- Quote from: shapirus on December 15, 2023, 05:38:59 pm ---I want to hear how this thing sounds in action. It must be really sweet.

--- End quote ---

The signal relays are reasonably quiet. Plus the case doesn't have any cooling vents. I made a short clip (will take a few minutes for the higher resolutions):




--- Quote from: Chipguy on December 15, 2023, 07:44:28 pm ---
There they are.


--- End quote ---

Thanks, appreciate it! Will take a closer look at it! Did you do any measurements/graphs showing the accuracy? I might wanna know more ;) Which low EMF relays did you use?

SebastianH:

--- Quote from: Chipguy on December 15, 2023, 09:40:39 pm ---Had a look at your design on github.

You did some nice things that I regret not having done as well.
My design only used one PIC microcontroller for the UI and the relay and one smaller one for serial to USB. There is an additional ARM controller inside the Ethernet but I don't count that.
Early on I ran into issues with the PIC18 microcontroller flash size and migrated to a bigger one.
Also the choice of the 4x20 Display turned out to be not sufficient for what I wanted.

I also like the power supply design you have choosen. I temporarily went with a external DC power supply design but also got a very similar AC/DC converter to yours sitting around in a box.
The case you choose looks awesome. The two unit I made use totally different cases but I am not satisfied with either of them
My goal was to make the device the same size as the most common 9 inch wide and 2U high devices on the market, like a 34401 multimeter or something.
However I could not find any suitable housing that would really do the trick.


--- End quote ---

I use the STM32G4 series with 128kB RAM and 32kB Flash as you have probably seen. I didn't really optimize anything (not an embedded dev) and didn't write the firmware with memory efficiency in mind (like at all), except for switching on the "optimize for size" compiler option - and with that in mind and the SCPI library, FreeRTOS included the 128kB of Flash are barely ok. In future project I'll probably use a micro with more Flash. For DIY builds a few bucks aren't worth the trouble imho.

Let me tell you, if 4x20 isn't good enough then imagine how difficult it has been to utilize the 1x18 display properly ;) I'd like to use a 800x480 LCD touchscreen in the next project, but I'm not yet sure how this will work for me. This certainly requires a much more powerful micro, something like the STM32H series.

And yes, finding a good looking case that meets the requirements is really hard. I was lucky here, I guess. Unfortunately, my variant is only ~25cm in depth and has no air vents, so for anything related to power it's a challenge. It's available in other form factors and generally fairly customizable, but you really have to pay for it, so this is not an option for me.

Using an off-the-shelve AC/DC converter with built-in filter was very convenient indeed.

Chipguy:

--- Quote from: SebastianH on December 15, 2023, 10:19:04 pm ---
I use the STM32G4 series with 128kB RAM and 32kB Flash as you have probably seen. I didn't really optimize anything (not an embedded dev) and didn't write the firmware with memory efficiency in mind (like at all), except for switching on the "optimize for size" compiler option - and with that in mind and the SCPI library, FreeRTOS included the 128kB of Flash are barely ok. In future project I'll probably use a micro with more Flash. For DIY builds a few bucks aren't worth the trouble imho.

Let me tell you, if 4x20 isn't good enough then imagine how difficult it has been to utilize the 1x18 display properly ;) I'd like to use a 800x480 LCD touchscreen in the next project, but I'm not yet sure how this will work for me. This certainly requires a much more powerful micro, something like the STM32H series.

And yes, finding a good looking case that meets the requirements is really hard. I was lucky here, I guess. Unfortunately, my variant is only ~25cm in depth and has no air vents, so for anything related to power it's a challenge. It's available in other form factors and generally fairly customizable, but you really have to pay for it, so this is not an option for me.

Using an off-the-shelve AC/DC converter with built-in filter was very convenient indeed.

--- End quote ---

I was also thinking of using a 4" or so touch display.
An STM32H or F7 MCU using ToughGFX could handle that.
Alternativly there are those Bridgetek HMI processors. But I think they are rather slow.

I totally believe you that only 18 characters of display must have been a challengenging.
The bad desicion I made on the microcontroller made me write all the low level code myself sind almost nothing from the PIC libs worked.
The PIC compiler can't even handle pointers correctly. So that's something that created an extra headache.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod