Time to DIY like it's 2009! (hobby has changed, man)

Discussion in 'DIY' started by Beefy, May 29, 2021.

  1. Wobbletits

    Wobbletits Facebook Friend

    Joined:
    Feb 9, 2022
    Likes Received:
    125
    Trophy Points:
    43
    Location:
    Maryland
    Not sure if anyone is interested, but I made this when I was working from home due to stuff... about 18 months ago.

    PSU...
    [​IMG]
    Pre... I should have added more features eh? Not enough wires.
    [​IMG]
    ... testing on the floor.
    [​IMG]


    Also redoing an EHHA now. I had to remake 2 channels... I was experimenting with NFB on one set of channels to compare as 2 single ended amps and I guess I just wasn't careful enough in my repeated part changes. Actually only destroyed 1 channel so I've got 1 spare ;/ but glass jar audio still had the original boards at the time. Good thing I ordered them then because it seems like it shut down almost right after Jeff fulfilled my order. It's kind of a shame to leave it not working when I have 20 someodd tubes for this.

    Maybe it's a shame the pre wasn't this build but there was no way I was going to fit 4 ehha channels in there (+se/bal conv / relay attenuation/source control) I can still use it as a pre, just no remote control... and this one can output 2 balanced + 1 single ended at a time for biamp+sub when I feel like I haven't burned enough money.

    [​IMG]
    ... and this is what the back looks like, though it's a b22 in the pic. They share a psu because I didn't feel like making 2 (one set of s22 went into the pre instead.) I have it wired so it works as 1 differential amp or 2 se amps at once ;/ conversion would have to happen elsewhere. I mostly just use balanced anyhow besides for some subwoofers.[​IMG]
     
    • Like Like x 5
    • Epic Epic x 2
    • List
  2. Beefy

    Beefy Friend

    Pyrate
    Joined:
    Apr 10, 2021
    Likes Received:
    1,738
    Trophy Points:
    93
    Location:
    Canada
    Wow, there is a LOT going on there in that preamp. There's, what, 4 digital power supplies, 4 analog power rails, LCDuino with d1 and d2 for input and volume, and 4 a24 drivers? I don't recognize the red preamp boards.

    Anyway, nice work!
     
  3. Wobbletits

    Wobbletits Facebook Friend

    Joined:
    Feb 9, 2022
    Likes Received:
    125
    Trophy Points:
    43
    Location:
    Maryland
    It's 8 analog rails, 4 for the main pres and 4 for the 2 sets of a24 which just do se -> bal and vice versa on one input and one output, (plus they feed a digital vu meter/scope thing off the se output.) Digital is all running off 1 5v psu, which is the lcduino and the vu meter. The extra SSR in the pre chassis toggles power for the vu meter.

    Err and the red boards are a Dennesen JC-80 knockoff, I too have many boards for projects from years ago that I never got around to...
     
    Last edited: Feb 17, 2022
  4. Beefy

    Beefy Friend

    Pyrate
    Joined:
    Apr 10, 2021
    Likes Received:
    1,738
    Trophy Points:
    93
    Location:
    Canada
    Oh I see the fifth S25/26 now, makes perfect sense!
     
  5. Wobbletits

    Wobbletits Facebook Friend

    Joined:
    Feb 9, 2022
    Likes Received:
    125
    Trophy Points:
    43
    Location:
    Maryland
    I suppose it's nice to see the front.
    [​IMG]
     
    • Like Like x 2
    • Epic Epic x 1
    • List
  6. peef

    peef Friend

    Pyrate
    Joined:
    Oct 5, 2015
    Likes Received:
    311
    Trophy Points:
    63
    Location:
    Montreal
    The multimeter in the hifi rack is a nice touch! ^


    The Stax amp is coming together. Now with real heat sinks, connectors, Lundahl inputs, and a piece of audio-grade timber.

    [​IMG]

    Next up is a board set for both the input and output transformers to clean up the last bits of wiring, and hopefully a chassis.
     
    • Like Like x 7
    • Epic Epic x 1
    • List
  7. JeffYoung

    JeffYoung Friend

    Pyrate
    Joined:
    Apr 11, 2017
    Likes Received:
    714
    Trophy Points:
    93
    Location:
    Ireland
    Did you drill some holes in the timber and fill them with dirt? It helps with grounding....
     
  8. Josh Schor

    Josh Schor Friend

    Pyrate Contributor
    Joined:
    Jul 13, 2020
    Likes Received:
    885
    Trophy Points:
    93
    Location:
    Ann Arbor Mi
    I am looking for someone who could/would build me a transformer based xlr to se box. Pancakes had offered and is really busy so not sure when he could do it. I have all the parts and a nice box( will need holes drilled for xlr and se connectors). I of course can pay for your skilled time building it. I am an older guy and do not have the skill to make this so it looks good and works properly. anyone interested please pm me
    best,
    Josh
     
  9. Beefy

    Beefy Friend

    Pyrate
    Joined:
    Apr 10, 2021
    Likes Received:
    1,738
    Trophy Points:
    93
    Location:
    Canada
    Just wanted to follow up on my issues with my relay-based volume controller turning on at full voltage noted above...

    Our good friend @fastfwd took pity on me and needed something fun to procrastinate with, and generously produced some code for the volume controller. Despite having never coded for Arduino, or even seen an Arduino board before, the code only needed a couple of tweaks and fixes to work *perfectly*. It now has elegant start-up and shutdown behaviour, easy custom mapping, excellent stability, and tunable speed/twitchiness. All in all, a raging success.

    The code is here, for anyone else who may ever have need of it......

    Code:
    //
    // Volume Controller
    //
    // Arduino Uno Code for Kevin Gilmore's 8-bit Attenuator V1.0
    // https://www.head-case.org/forums/topic/9407-digital-attenuator/
    //
    // Board group buy organised by Kerry
    // https://www.head-case.org/forums/profile/655-kerry/
    //
    // Code produced by fastfwd
    // https://www.superbestaudiofriends.org/index.php?members/fastfwd.8009/
    //
    // Code tested and customised by Beefy
    // https://www.superbestaudiofriends.org/index.php?members/beefy.10794/
    // https://www.head-case.org/forums/profile/684-beefy/
    //
    // WARNING!
    // Don't fire this thing up for the first time with valuable equipment connected!
    // Test the outputs with a multimeter or scope first to make sure that the pot
    // direction is correct, that the expected attenuation is achieved, and that
    // the relays don't pass full volume on power-down, power-up, or during switching.
    
    #include <Wire.h>
    
    // Configuration.
    
    #define REVERSE_CW_CCW  0   // Leave at 0 if pot rotation direction is correct,
                                // or set to 1 to reverse clockwise/counterclockwise
                                // volume effect.
    
    #define DEJITTER    2       // Ignore pot position changes smaller than this.
                                // Make the value larger if the volume spontaneously
                                // changes without touching the pot, or if the pot
                                // seems overly sensitive and twitchy.
    
    //   Code is prepared for two attenuator boards in balanced operation. Per board:
    //   8 Omron G6SK (set/reset dual coil) latching relays
    //   2 TI ULN2803A relay drivers (one for 8x2 SET, one for 8x2 RESET)
    //   2 TI PCF8574A I2C I/O expanders feeding the relay drivers
    
    // Rotary-pot analog input.  Reading the pot wiper across 0-5 V produces a value 0-1023.
    #define POT_PIN     A1
    #define POS_MIN     0                   // Full counterclockwise (max attenuation)
    #define POS_MAX     1023                // Full clockwise (min attenuation)
    #define POS_RANGE   (POS_MAX - POS_MIN)
    #define NUM_READS   10                  // Number of reads for averaging, each read takes about 0.1 ms
                                            // Cannot be higher than 32, otherwise you may overflow 'total'
    
    // 8574A I2C device addresses:
    //                             A2 A1 A0
    #define LEFT_SET    0x38    //  0  0  0
    #define RIGHT_SET   0x39    //  0  0  1
    #define LEFT_RESET  0x3E    //  1  1  0
    #define RIGHT_RESET 0x3F    //  1  1  1
    
    // Relay values
    #define RELAY_MIN       0       // Min attenuation (all relays off)
    #define RELAY_MAX       255     // Max attenuation (all relays on)
    #define LATCH_TIME_MS   4       // Minimum coil pulse width to latch the relays
    #define OP_TIME_MS      10      // Minimum time between relay operations
    #define RELAY_RANGE     (RELAY_MAX - RELAY_MIN)
    
    int gCurrentPosition;   // Pot position that corresponds to the current state of
                            // the relays.  Whenever we read the pot position, we
                            // compare to this to see whether it's moved far enough
                            // to update the relays (i.e., whether it's moved at
                            // least DEJITTER counts).
    
    void setup()
    {
        Wire.begin();   // Initialize as an I2C master.
    
        gCurrentPosition = POS_MAX + DEJITTER;  // On startup, ensure that we'll
                                                // update the relays regardless of
                                                // the pot's position.
    }
    
    void loop()
    {
    
        int total = 0;  // Cumulatively add data for averaging
    
        int pos;        // Pot position, 0-1023 (0 = full CCW, 1023 = full CW)
        int distance;   // Distance between pot position and gCurrentPosition
    
        int volume;     // Desired volume, 0-255 (0 = no attenuation,
                        // 255 = full -127.5 dB attenuation)
    
        // Read the position of the pot.  The readings aren't completely accurate,
        // so repeated readings may vary by one count (or maybe even a small number
        // of counts) even if the pot isn't deliberately moved.  To prevent the
        // relays from constantly hunting between adjacent values as they follow
        // these jittery readings, we filter out the jitter by only updating the
        // relays if the pot has moved more than DEJITTER counts away from the
        // position that corresponds to the current state of the relays.
        //
        // But this filtering method presents a problem:  If gCurrentPosition is
        // within DEJITTER counts of the min or max edge of the position range, the
        // pot won't have enough room to move DEJITTER counts toward the edge, and
        // therefore the relays will never be able to reach values at or near the
        // edges.  So when gCurrentPosition is within DEJITTER counts of the min or
        // max edge, we update the relays whenever the newly read position is
        // anywhere between gCurrentPosition and the edge.
        //
        // To ensure the jitter value can be kept low, multiple pot readings are averaged.
    
        for (int i=0; i < NUM_READS; i++){
          total += analogRead(POT_PIN);
        }
    
        pos = total / NUM_READS;
        distance = pos - gCurrentPosition;
        if (distance < 0) distance = -distance;
       
        if ((distance >= DEJITTER) ||
            ((POS_MAX - gCurrentPosition < DEJITTER) && (pos > gCurrentPosition)) ||
            ((gCurrentPosition - POS_MIN < DEJITTER) && (pos < gCurrentPosition)))
        {
            // Update gCurrentPosition.
            gCurrentPosition = pos;
    
            // Pot positions 0 to 1023 should logically map to relay positions 255 to 0.
            // This corresponds to the pot being 'off' when fully CCW, presenting no voltage to
            // the analog read pin, and maximum attenuation being obtained at high relay values.
            // If anything is wired incorrectly or the relay logic is backwards, the simplest
            // fix is to reverse the pot readings.
    
            if (REVERSE_CW_CCW) pos = (POS_MAX - pos) + POS_MIN;
    
            // Convert from POS to RELAY manually using mapped segements.
            // Comment out if using defined POS/RELAY values.
    
            volume = (pos >= 384) ? map(pos, 384, 1023,  63,   0) :   // Get Exstata from Buffalo to ~30 VMRS at 12:00 on the volume pot
                     (pos >= 127) ? map(pos, 128,  383, 127,  64) :   // Get from -63.5 dB to -32 dB in 1/4 of pot turn
                                    map(pos,   0,  127, 255, 128) ;   // Get from -127.5 dB to -64.0 dB in 1/8 of pot turn
    
            // Convert from POS to RELAY using defined POS/RELAY values.
            // Comment out if using manually mapped segments.
    
            // volume = map(pos, POS_MIN, POS_MAX, RELAY_MAX, RELAY_MIN);
    
            // Update the relays.  We can't do them all at once, so we do them in
            // stages: First we close all the relays that should be closed, then we
            // open all the relays that should be open.  This way, the intermediate
            // state of the relays will never be louder (lower attenuation) than
            // the desired end state, which should help prevent loud pops while
            // updating.
    
            // Turn on the SET relay drivers.
    
            Wire.beginTransmission(LEFT_SET);   // Build the I2C transaction string
            Wire.write(volume);                 // for closing L+ and L- relays.
            Wire.endTransmission();             // Transmit it.
    
            Wire.beginTransmission(RIGHT_SET);  // Build the I2C transaction string
            Wire.write(volume);                 // for closing R+ and R- relays.
            Wire.endTransmission();             // Transmit it.
    
            delay(LATCH_TIME_MS);
    
            // Turn off the SET relay drivers, leaving the relays latched.
    
            Wire.beginTransmission(LEFT_SET);   // Build the string for turning off
            Wire.write(0x00);                   // L+ and L- SET drivers.
            Wire.endTransmission();             // Transmit it.
    
            Wire.beginTransmission(RIGHT_SET);  // Build the string for turning off
            Wire.write(0x00);                   // R+ and R- SET drivers.
            Wire.endTransmission();             // Transmit it.
    
            // Turn on the RESET relay drivers.
    
            Wire.beginTransmission(LEFT_RESET); // Build the I2C transaction string
            Wire.write(volume ^ 0xFF);          // for opening L+ and L- relays.
            Wire.endTransmission();             // Transmit it.
    
            Wire.beginTransmission(RIGHT_RESET);    // Build the I2C transaction string
            Wire.write(volume ^ 0xFF);              // for opening R+ and R- relays.
            Wire.endTransmission();                 // Transmit it.
    
            delay(LATCH_TIME_MS);
    
            // Turn off the SET relay drivers, leaving the relays latched.
    
            Wire.beginTransmission(LEFT_RESET); // Build the string for turning off
            Wire.write(0x00);                   // L+ and L- RESET drivers.
            Wire.endTransmission();             // Transmit it.
    
            Wire.beginTransmission(RIGHT_RESET);    // Build the string for turning off
            Wire.write(0x00);                       // off R+ and R- RESET drivers.
            Wire.endTransmission();                 // Transmit it.
    
            delay(LATCH_TIME_MS);
    
            // Datasheet gives a "Min set/reset pulse width" spec.  It's unclear
            // exactly what they mean, but a conservative interpretation would be
            // that it's the minimum time between consecutive operations on any
            // relay.  Wait here to ensure that the spec is satisfied.
    
            delay(OP_TIME_MS - LATCH_TIME_MS);
        }
    
        // If you want to alter the loop so the pot is read more or less frequently,
        // change "delay(x);" here, where 'x' is the number of milliseconds to wait
        // between pot readings.
    
        delay(10);
    
    }

    Thanks again, @fastfwd! :)
     
    • Like Like x 3
    • Epic Epic x 2
    • List
    Last edited: Mar 3, 2022
  10. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France
    that’s awesome! I’ll try to remember this whenever I finish my board(s)

    That is what is great about programming. I’ve seen lots of languages and they basically have the same structures. They basically define variables and use loops the same way and just have a few things with formatting that’s different

    Much easier going from C to Go than from switching from Italian to Spanish
     
  11. Beefy

    Beefy Friend

    Pyrate
    Joined:
    Apr 10, 2021
    Likes Received:
    1,738
    Trophy Points:
    93
    Location:
    Canada
    You had the newer/smaller v2, right? I now understand a lot better just how different that version is. It uses an SPI interface on an all-in-one chip (MAX4820), instead of two separate PCF8574A I2C chips for set/reset. Makes the software a lot more complicated, unfortunately.
     
    Last edited: Mar 3, 2022
  12. gepardcv

    gepardcv Almost "Made"

    Contributor
    Joined:
    Nov 20, 2015
    Likes Received:
    408
    Trophy Points:
    63
    Location:
    Terra, Sol System
    Prolog and Haskell would like a word.
     
  13. Wobbletits

    Wobbletits Facebook Friend

    Joined:
    Feb 9, 2022
    Likes Received:
    125
    Trophy Points:
    43
    Location:
    Maryland
    I guess I kind of try out a lot of chassis... this one is okay but I don't really know what would fit besides maybe a class d monoblock. It came with the wrong sized iec socket but I had my own... heatsink has some pretapped holes, it is clearly repurposed from a larger chassis. I'm going to be lazy and use some of them to mount an L bracket for the output devices, way overbuilt for a pi2aes psu but I didn't have any projects small enough to fit in this thing unless someone has a better idea for what to do with it? Maybe some headphone amps could fit okay but the the heatsink is probably just as excessive there.

    I checked what transformers I have... 25va and 50va for 9v/18vct ... 25va would fit a lot better but if it actually has to deliver 3A 5v I did the math and it will be like 20+W of heat so a 30 va would be too small still ;/ the 50va is inside the chassis right now. Only have 100va and 15va for 12vx2 or 24v... might source a 50va one I'm not sure how much a pi2aes that isn't powering the pi4 needs tbh but I'm pretty sure 100va is way more than necessary?

    Gonna put the transformers in metal shields, if only because I don't want to just bolt the big one to the top... I think the shield would look a lot more professional, not sure the "small" one is gonna fit inside with it but c'est la vie.

    [​IMG]

    That's what I was able to populate on the boards with the parts I had laying around mostly just need a few more diodes and some electrolytic caps :/ and a single 1k resistor IDK how I ran out but I couldn't find any 1k that weren't smd ;/

    Technically those crossovers in the upper left are built into dog cremation urns... or that's what they were advertised as anyhow... they were the best (cheap) little wooden boxes I could find on amazon heh. Does that count as another chassis? ;/ Unrelated project.

    Ehha is coming along... waiting on an attenuator to "finish" it since I'm going to use the one it's using now for something else.
     
  14. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France
    i repressed the existence of Haskell
     
  15. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    The PI2AES uses less than 100ma. Using a transformer above 10VA might cause a too high rise in voltage. Just fyi.
     
  16. Beefy

    Beefy Friend

    Pyrate
    Joined:
    Apr 10, 2021
    Likes Received:
    1,738
    Trophy Points:
    93
    Location:
    Canada
    I'd go the other way with that, TBH. Small transformers below 10VA are highly unpredictable on their secondary voltage. A lightly loaded larger transformer, where you take the voltage rise into account from the regulation spec, is a much more reliable option.
     
  17. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    I agree. I just wanted to point out the issue since the pi2aes draws so little power on its own.
     
  18. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Anybody know what the misinformation tag means and why I did just get one?
     
  19. Wobbletits

    Wobbletits Facebook Friend

    Joined:
    Feb 9, 2022
    Likes Received:
    125
    Trophy Points:
    43
    Location:
    Maryland
    In that case the 15 va is probably fine eh.... maybe I will be able to fit both inside :O
    edit:
    I did some closer checking to be sure because my 15va transformers just have model #s written on them and it's actually 22v so I'm not sure it's gonna have enough v to be regulated to 24v so maybe I'll change out a resistor and drop the output voltage or...
    https://www.newark.com/multicomp-pro/mcta030-12/toroidal-transformer/dp/38K4875 is priced pretty well :/
     
    Last edited: Mar 20, 2022
  20. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    The pi2aes runs fine at 20v. .
     

Share This Page