Announcement

Collapse
No announcement yet.

Digital pots using relays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    The only drawback is, I think it's impossible to make a log taper variable resistor by this method. You can only have a log potential divider, the variable resistor has to be linear.
    What if you use 6 relays for 64 steps and then in the software just skip some of them for a total of 20-30 log positions?

    Comment


    • #32
      Well, it would still be a linear variable resistor. You would just be logarithmicating it in software.
      "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

      Comment


      • #33
        Since it's possible in software to "logarithmicate" a regular linear digital pot it will work for this one as well.

        Comment


        • #34
          Concerning the issue of how to make a 1M linear pot logarithmic I decided to take some measurements of real pots and approximate the function. Upon some more digging however as one would expect somebody already did that. Below is an article describing the procedure including 5 different audio pots used in HiFi(all measurements data and plots are in the zip file):

          Notes on Audio Attenuators


          After playing with those graphs a lot it turns out that for a 20 position 1M log pot we'll need an 8 bit linear relay pot (8 relays for a total of 256 positions, assuming 300 deg rotation and 15 deg increments) where we can skip certain positions (first non zero position) to get a log pot (10% of total resistance in position #10). For 30 positions however 8 bits are not enough and more relays will be needed but with 8 bits we can get very close to the data and plots in the XLS file.
          When writing the software one can include several different tables externally switchable via jumpers or DIP switches and make up their mind but I don't think that will make much difference assuming the pots used in guitar amps are far from the idealized log function anyway.
          In practice the values for an 8 bit 1M log pot go like this (in kOhms): 4, 8, 16, 32, 64, 128, 256, 512 for a total resistance of 1020 Ohms.
          The voltage divider ratios of this pot go like this: 1020/0, 1016/4, 1012/8 etc. Assuming the 4 k resolution you can easily adjust your pot values to the log functions from the original tables and if you include them in a graph together you'll see that they match very close to the idealized curves, even better than the real life pots data.
          This way for me the issue of how to logaritmicate the linear relay pot is pretty much solved.

          Comment


          • #35
            I must confess that I've taken this idea to the illogical extreme... A 4 stage programmable pre-amp that was supposed to use (I think?) over 200 solid state relays. Like your previous post, I found 8 bit rheostats to be the sweet spot for performance vs space/complexity. I personally didn't bother creating a logarithmic LUT, and instead just left it as a linear pot so I could use all 256 combinations. I remember it working extremely well. Unfortunately, I haven't had the time to complete it (it's been a year and I've only completed about 60% of it ). I'm not even in my final year of university and I've run out of spare time!

            Sort of taking this topic on a tangent, but I thought it'd be good to enlighten everyone about my experience with SSR's. Theoretically, the frequency response of the volume control will change ever so slightly depending on which SSR's are engaged due the shunt capacitances if used in place of normal relays, but I've found this to be a non-issue (or maybe I should call it mojo ). Additionally, they have a small resistance (about 25 ohm in my case) when turned on, which is pretty negligible for any sort of volume control in a high impedance circuit. They might be an alternative if you're looking to save space or for reliability reasons. However, I still used good old reed relays for channel switching, due to the shunt capacitance of the SSR's.

            I've only really tested the first 2 stages at high-ish voltages (I don't know if you can tell by the pictures, but there are supposed to be 4 of those big boards in total, 2 on each side stacked vertically). So far, I haven't detected any major tonal anomalies using SSR's at voltages up to about 150v, but since it was only 2 stages, the signal was still rather clean and nothing impressive was really happening. I was supposed to test the mainboards at higher voltages (the SSR's I have are rated at 400v), but never got around to it. The thing you see with the big mosfets and tons of surface mount components is a digitally programmable HV regulator, which is what made testing without explosions possible . You can tell I really like surface mount components! In fact, the relays are actually mounted in DIY (bent pin!) surface mount sockets. The reason for doing this is so that I could mount all the driving logic on the underside of the board, hence using the board as an isolating medium.

            In the lower left hand corner of the picture you can see the group of 16 relays (and associated resistors) which act as the volume control(s). The gunk over the pins is just some silicone conformal coating I had lying around for paranoia's sake. It's pretty much in a constant phase of construction so 90% of the connections aren't actually connected to anything (and the big board on the right obviously isn't complete)
            Attached Files

            Comment


            • #36
              Nice project, exclamationmark! I'm glad to see we're on the same page
              I hope my 8 Bit pot will be ready for testing in the next couple of weeks. I'll do some A/B test with the LDR Gain pot I currently have in my preamp.

              Comment


              • #37
                After playing with pots functions I compiled this table to be able to make some comparisons and settle on actual pot values. The comparisons are based on the rule of thumb described many places on the web: to get half the perceived loudness use one-tenth the voltage. The function with this property is VOUT/VIN= x^log 10/log 2 ≈ x^3.3, where x is the fraction of pot rotation. The rotation range of most pots is 300 deg. Below 10% taper (100k) is assumed for 50% of pot rotation.
                To get the ideal x^3.3 curve however you'll need a better pot resolution which makes things more complicated and is hardly worth the effort for the first couple of positions. Assuming 4k resolution (for an 8 bit pot) the next ideal to the x^3.3 curve must have 0 for first position which in practice is useless so the next step would be to assume 4k as first position. Last 3 columns apply to the digital pot I'm currently using to control my LDR gain pot. All this applies for an 1MOhm log pot.
                I tried to log some data from different popular brands guitar pots but since I'm not that deeply into Excel I don't know how to create a table that will include 20 rotation steps but 30,50 or 100 data points received from the logging. In continuous mode my logging software (Virtins Multi Instrument) produces a lot of data points which when included in a table produce the same number of steps which makes comparing the curves impossible. I would appreciate if someone helps with that if it's possible in Excel at all.
                Feel free to make any corrections to the table that you find appropriate and let us know.

                PotCurvesPWR33.xls

                Comment


                • #38
                  Here are some developments on my project.
                  I finally got my experimental board assembled and running. I used a DPDT switch to wire it next to the existing LDR pot so I can make some quick A/B tests. Below is how the board looks like:

                  Click image for larger version

Name:	RelayPotBrd1.jpg
Views:	1
Size:	102.9 KB
ID:	831987

                  It can be further miniaturized by using smaller relays like Omron G6K-2P series, Tyco/Axicom IM06TS series and similar. They can be obtained in bulk for less than 2$ the piece. This way a board with 4 such relays (for the 16 pos. linear pots) would measure around 36x27mm. For the log pots where 8 relays are used two boards can be stacked on top of each other and keep the same board size.
                  In the first graph below you can see my LDR and relay pots' curves compared to the theoretical curve:

                  Click image for larger version

Name:	LogCurves1.jpg
Views:	1
Size:	35.6 KB
ID:	831985

                  I took my time and did some measurements of different log pots from several manufacturers. As you can see from the graph no surprises there - all commercial log pots' curves consist of two linear sections with different slopes. Note that the 0-15 deg and 285-300 deg positions have the same values which narrows the useful range unlike the relay pot:

                  Click image for larger version

Name:	LogCurves2.jpg
Views:	1
Size:	50.2 KB
ID:	831986

                  In both cases the yellow line is what it should be in theory.

                  Full Excel table with all data:

                  RelaysPotTable.xls

                  I did a quick A/B test between both pots which you can find below. On the first two sweeps you hear the bridge humbucker, on the second two the neck humbucker. One of the sweeps is the LDR pot the other one is the relay pot. You tell me which one is which.

                  PTP-1 LDR vs Relay 1.mp3
                  Last edited by Gregg; 12-21-2013, 05:50 PM.

                  Comment

                  Working...
                  X