Volume control, laziness and unemployment

Discussion in 'DIY' started by m17xr2b, Oct 16, 2018.

  1. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    While I should really be focusing on my interview tomorrow there are other more important issues at hand. Keeping my ass on the couch for longer is one of them.

    Issue:
    The Teton is far away and I find it too tedious keep adjusting the volume by not even a full decibel when the next song plays either because of how it's recorded or I want to feel the rumble if it's the right track, Dragonborn would be such an example.

    Requirements:
    -
    keep existing sound quality
    - remote control while keeping option for manual adjustment
    - no maintenance
    - no modifications to the amp itself

    The first point excludes my Saga as just adding additional cables, connectors would mess up the sound quality not to mention tube coloration. The same goes for digital volume adjustment, I find the stage gets all weird if I alter the volume from foobar, those cut bits do have an overall impact plus I would have to set for the maximum ever volume as I cannot increase digitally.

    Some sort of remote control is obviously needed, the original idea I had was from my car's timing belt, some sort of motor connected with some sort of belt to the Teton volume knob. In addition I still need the ability to manually adjust without taking off the belt or any other interaction

    No maintenance as it would defeat the purpose of my laziness so no batteries or things that require adjustment or re-calibration.

    Solution:
    - be inbetween jobs for lost of free time to think and tinker
    - Arduino to receive IR signals and adjust a DC motor with PWM if necessary

    So I got to work, as with any of my first projects I know it will barely work and be shit overall so I didn't try to finesse it. Gen 2 is always better.

    Components:
    - Arduino Uno
    - 12V psu brick I found under the couch to power the DC motor and arduino
    - DC DC step down convertor for 12V to 7V conversion for Arduino to keep it's internal regulator happy. Could do without but I have extras from the tube tester project
    - Low RPM DC motor, this one is a high torque 3 RPM 12V
    - H Bridge
    - IR Receiver
    - Remote (I'm using the schiit one)
    - basic case
    - wires and connectors

    Arduino:
    First time with one of these,the web is full of tutorials and training. Basics are:
    It needs power, either 5V from USB, 7-12V from the DC input or 6-12V using the VIN like I did just because I have to power the 12V motor and I wasn't about to solder a DC barrel to hook up inside of a case.
    Software was pretty easy to figure out with no experience but I'm a software developer by trade so most things made sense.
    For the next one I would go Nano just for less power consumption and space and it does everything this one can.
    H Bridge:
    Takes between 5-12V based on the motor voltage, can output 5V to power Arduino directly but I have other future plans for it. This sits between arduino and the motor to actually power it and feed PWM signal.
    It also needs to have its ground shared with the Arduino for many reasons.
    In my case I don't PWM as the motor is pretty slow and I have a big ratio between the knobs where 1 turn of the DC motor is maybe a 5% rotation of the Teton.
    IR Receiver:
    Hate these porkers, blew a few, I've tried to replace the standard LED with a longer one but they didn't want to work so in the end I frankensteined a functional one out of two broken ones just to get things going. The issue is the main bulb is not forward enough to just drill a hole through the case as it can't properly read the signal at an angle. In the end I just let it sit outside the case.

    With the arduino you can read IR codes from any remote. I plan to use my logitech harmony for some more customised operations but for now I entered the schiit codes.
    Case:
    While the case is just big enough, it's not heavy enough. My goal is to have the motor just spin if it's at the end without it flying around so I added two steel bars at the bottom. Due to laziness I didn't want to make a mess with my dremmel cutting steel and just butchered the case instead. These were a bit loose and I was afraid of shorts so I wrapped them with tape and tried to glue both with bathroom silicone. This did work but it looks like I jerked off inside.
    DC motor:
    Got this a while ago for a different project but ended up working nicely. I can take around 40% less RPM with PWM around 140 out of 255 from my testing. The end was a standard M4 screw thread and I used a stand off to extend the shaft length.

    Still have to work at the code but this fits my needs for now:

    Code:
    #include <IRremote.h>
    
    int RECV_PIN = 2;
    IRrecv irrecv(RECV_PIN);
    decode_results results;
    
    int in1 = 6;
    int in2 = 7;
    
    const int ENA = 9;
    
    #define up 0x8FD8CF30
    #define down 0x8FD84FB0
    #define fastDown 0x8FD8AF50
    #define fastUp 0x8FD82FD0
    #define stopV 0x8FD88F70
    
    void setup()
    {
      pinMode (in1,OUTPUT);
      pinMode (in2,OUTPUT);
      pinMode (ENA,OUTPUT);
      irrecv.enableIRIn();
    }
    
    void loop()
    {
      Serial.println(results.value);
      if(irrecv.decode(&results))
      {
        if(results.value == up)
        {
          digitalWrite(in1,LOW);
          digitalWrite(in2,HIGH);
          analogWrite(ENA,255);
          delay(180);
          digitalWrite(in1,LOW);
          digitalWrite(in2,LOW);
        }
        if(results.value == down)
        {
          digitalWrite(in1,HIGH);
          digitalWrite(in2,LOW);
          analogWrite(ENA,255);
          delay(180);
          digitalWrite(in1,LOW);
          digitalWrite(in2,LOW);
        }
      if(results.value == fastDown)
      {
          digitalWrite(in1,LOW);
          digitalWrite(in2,HIGH);
          analogWrite(ENA,255);
     
      }
      if(results.value == fastUp)
      {
        digitalWrite(in1,HIGH);
        digitalWrite(in2,LOW);
        analogWrite(ENA,255);
      }
        irrecv.resume();
    }
       if(results.value == stopV)
       {
          digitalWrite(in1,LOW);
          digitalWrite(in2,LOW);
       }
    }
    [​IMG]
    [​IMG]

    Rubber bands didn't work as expected, they would build up tension and make a quick turn once it was too much, same for hair elastics.
    I'll keep trying other materials but for now electrical tape with the sticky side on the outside works the best. It has enough tension to fully engage and is loose enough to just slip if it's on the limit of the volume pot. The high torque is pretty beefy and could do some serious damage.

    The result is great, better than expected, it's not fast but exactly what I needed and the requirements are fulfilled. Below is real time speed.
    [​IMG]

    I've set the volume control two ways
    1. Run clockwise/counterclockwise until I click stop.Useful when I need to make a significant adjustment or at the beginning and end of music session.
    2. Stepped, where each volume press of the remote runs for 0.25 seconds, this way I can finely tune the volume as it's equivalent to a couple hundred steps. Might consider doing 0.4 seconds long term as it takes around 10 clicks to hear a difference.

    All in all this was around 20 pounds in materials. In the near future I'll have to build V2 for a cleaner look, could even try some posh wood case.

    Now for part two...
     
    Last edited: Oct 16, 2018
  2. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    Another reason for remote controlled volume:
    [​IMG]
     
  3. Senorx12562

    Senorx12562 Case of the mondays

    Pyrate
    Joined:
    Oct 26, 2015
    Likes Received:
    3,274
    Trophy Points:
    113
    Location:
    Bird-watcher's paradise
    So the cat can use it? This whole thread is ingenious and hilarious. Good luck with the interview.:)
     
  4. purr1n

    purr1n Desire for betterer is endless.

    Staff Member Pyrate BWC
    Joined:
    Sep 24, 2015
    Likes Received:
    89,771
    Trophy Points:
    113
    Location:
    Padre Island CC TX
    OMFG, that remote volume control is awesome.
     
  5. LetMeBeFrank

    LetMeBeFrank Won't tell anyone my name is actually Francis

    Pyrate
    Joined:
    Aug 4, 2017
    Likes Received:
    3,758
    Trophy Points:
    93
    Location:
    Jackson, Mi
    So he doesn't have to make the kitty move to change the volume ;)
     
  6. BenjaminBore

    BenjaminBore Friend

    Pyrate
    Joined:
    May 23, 2016
    Likes Received:
    2,842
    Trophy Points:
    93
    Location:
    London, UK
    Feel free to build a batch and sell me one for a nice tidy profit. o_O
     
  7. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    I would if the case wasn't such a bitch to work with, especially integrating the IR receiver.
    Maybe schiit is crazy enough to mass produce it. Tired of turning your own shit? Let schiit do it for you.
     
  8. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France
    Finally a post where someone can use the "code" block and you don't use it. Please edit
     
  9. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    ok mom
     
  10. kixx

    kixx Acquaintance

    Joined:
    Sep 23, 2018
    Likes Received:
    43
    Trophy Points:
    18
    Location:
    Imperial Starfleet
    A simple problem with an overly complicated solution ... i like it.

    I have actually been thinking of dabbing into arduino. Now i have to try and make one.

    :punk:
     
  11. Thad E Ginathom

    Thad E Ginathom Friend

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    14,129
    Trophy Points:
    113
    Location:
    India
    For the first few lines, I was thinking... just move the amp to be within arm's reach. Then I read on, and things turned into an absolutely awesome solution, vastly superior to my idea! Wish I had the skills to do that sort of thing.

    Hats off to you. Looking forward to the next model.

    All the best for the interview. How lucky it would be if the interviewer saw this thread already. You'd be sure of success. At least, you would be if I was doing the interview!
     
  12. GTABeancounter

    GTABeancounter Friend

    Pyrate
    Joined:
    Jan 6, 2016
    Likes Received:
    321
    Trophy Points:
    63
    Location:
    Ontario Canada
    Nice post, that deserves more than just a like! Thank you for sharing... and good luck at the interview!
    I can’t help but think that some snake oil company out there will take your idea and run with it at a crazy price point... a motorized remote for say 1500 would be a relative bargain vs speaker cable risers and such that sell for hundreds.
     
  13. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France
    Found this because I remembered seeing something similar

    5B04EA0C-B2A2-4F36-84C0-DE76F3FB6C33.jpeg
     
  14. zonto

    zonto Friend

    Pyrate Contributor
    Joined:
    Sep 30, 2015
    Likes Received:
    4,975
    Trophy Points:
    113
    Location:
    Boston, MA
    Looks like an actual passive preamp with remote control. Archival PDFs attached.
     

    Attached Files:

  15. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    Now for my main plan...motorising the Stellaris. The Teton control was an opportunity I later realised could be done in the same case with the same Arduino board.

    Same requirements as before but in this case I did plan to alter the amp itself as in replacing the stock volume pot.

    The DNA amp uses the TKD 2CP-2511 50kOhm pot and thankfully TKD has a motorised version of the exact same one.

    Now actually controlling it was the tricky part. HiFiCollective does have a kit available but that works by routing the actual audio signal into their board for whatever reason and would certainly have a negative impact on quality.

    First I added a on/off switch as I can't have it on all the time, I know it would bug me too much even if it's maybe 5$ per year.

    Added second H bridge with 5V input from the 5V output of the first H bridge. Whatever I tried it just didn't want to work even it should have according to the specs. There was no DC current for the output of the DC motor.

    Even if the H bridge is dual output the TKD motor is 4.5-6V where the other one is 12V. Tried the following:
    Both H bridges supplied with 12V with one H bridge feeding 5V to arduino and use the DC DC converted to take the 12V output of the second H bridge and make it 5V for the TDK motor. Should work.

    It took a while for my brain to comprehend it's own stupidity here and it clicked when the TKD motor only worked one way and the L298N mostfel would heat up to 70C+ in a few seconds when I tried the other way.
    The way an H bridge works to reverse the direction is to reverse the polarity of the voltage. The DC DC converted does not like that and who knows what was actually happening inside. This is why I only tackle small scale projects for electronics.
    I once almost measured the current value of a mains socket, didn't get a reading as the fuses blew up.

    The final solution:
    One H bridge with 12V input that also powers the arduino using the VIN pin from it's 5V output. The IR receiver is hooked to the same 5V supply.
    DC DC converted takes 12V and outputs around 5.7V to the second H Bridge. I guess in my first attempt with 5V was just too low for it to work, drop-off maybe. Output voltage for the motor is around 5.2V, well within the acceptable range.

    Also ditched PWM for the 12V motor as it's not needed. I do use PWM for the TKD motor as it can be quite fast and my usable range in the Stellaris is between 1 and 3 on the volume.

    Was getting tired and had code issue. My java teacher from uni kept coming into my head always use the boolean value first when comparing in if statements.
    And indeed when checking the switch parameter I was actually doing assignment instead of comparisons. = vs == and everything went south. I do hope my interviewer does read this now.

    Code:
    #include <IRremote.h>
    
    int RECV_PIN = 2;
    IRrecv irrecv(RECV_PIN);
    decode_results results;
    
    int in1 = 6;
    int in2 = 7;
    int in3 = 3;
    int in4 = 4;
    const int ENA = 9;
    
    unsigned long last;
    boolean  samiBagPlSaMaCac;
    
    #define up 0x8FD84FB0
    #define down 0x8FD8CF30
    #define fastDown 0x8FD8AF50
    #define fastUp 0x8FD82FD0
    #define switchOutput 0x8FD88F70
    
    void setup()
    {
      Serial.begin(9600);
      pinMode (in1,OUTPUT);
      pinMode (in2,OUTPUT);
      pinMode (in3,OUTPUT);
      pinMode (in4,OUTPUT);
      pinMode (ENA,OUTPUT);
      irrecv.enableIRIn();
    }
    
    void loop()
    {
      if(irrecv.decode(&results))
      {
    
     
        if(results.value == switchOutput)
        {
            samiBagPlSaMaCac = !samiBagPlSaMaCac;
        }
     
        if(results.value == up)
        {
          if(samiBagPlSaMaCac == true)
          {
            digitalWrite(in1,LOW);
            digitalWrite(in2,HIGH);
     
            delay(100);
            digitalWrite(in1,LOW);
            digitalWrite(in2,LOW);
          }
          else
          {
            digitalWrite(in3,HIGH);
            digitalWrite(in4,LOW);
            analogWrite(ENA,180);
     
            delay(50);
            digitalWrite(in3,LOW);
            digitalWrite(in4,LOW);
          }
         
        }
       
        if(results.value == down)
        {
          if(samiBagPlSaMaCac)
          {
            digitalWrite(in1,HIGH);
            digitalWrite(in2,LOW);
            delay(100);
            digitalWrite(in1,LOW);
            digitalWrite(in2,LOW);
          }
          else
          {
            digitalWrite(in3,LOW);
            digitalWrite(in4,HIGH);
            analogWrite(ENA,180);
            delay(50);
            digitalWrite(in3,LOW);
            digitalWrite(in4,LOW);
          }
        }
       
      if(results.value == fastDown)
      {
        if(samiBagPlSaMaCac)
        {
          if(last == fastDown)
          {
             last = 0;
             digitalWrite(in1,LOW);
             digitalWrite(in2,LOW);
          }
          else
          {
            digitalWrite(in1,HIGH);
            digitalWrite(in2,LOW);
            last = results.value;
          }
        }
        else
        {
          if(last == fastDown)
          {
             last = 0;
             digitalWrite(in3,LOW);
             digitalWrite(in4,LOW);
          }
          else
          {
            digitalWrite(in3,LOW);
            digitalWrite(in4,HIGH);
            analogWrite(ENA,180);
            last = results.value;
          }
        }
      }
      if(results.value == fastUp)
      {
        if(samiBagPlSaMaCac)
        {
          if(last == fastUp)
          {
             last = 0;
             digitalWrite(in1,LOW);
             digitalWrite(in2,LOW);
          }
          else
          {
            digitalWrite(in1,LOW);
            digitalWrite(in2,HIGH);
            last = results.value;
          }
        }
        else
        {
          if(last == fastUp)
          {
             last = 0;
             digitalWrite(in3,LOW);
             digitalWrite(in4,LOW);
          }
          else
          {
            digitalWrite(in3,HIGH);
            digitalWrite(in4,LOW);
            analogWrite(ENA,180);
            last = results.value;
          }
        }
      }
      irrecv.resume();
       
    }
    }
      
    Replacing the pot.
    Took plenty of pictures to make sure I don't screw anything up and labels what goes where.
    Now there comes a time where you have an ominous feel for no reason, that something is horribly wrong. I glance at the opened Stellaris, sweat started to grip me, heart was playing B.Y.O.B intro, bricks where shat, mom's spaghetti and everything, my labels of what goes where came off. I had just a bunch of wires and may be crippled my 10k amp.

    [​IMG]

    Once I decided not to seppuku, I traced the wires to see where everything goes, looked at the schematics of the volume pot and figured out what goes where. It's actually easy once you have a clear head, each strip is one channel, you have input on the right, output in the middle which goes to the input tube and both grounds on the left. Donald, please forgive for I knew not what I was doing.

    All this took about 8-9 hours and well into the night.

    To the original design I just had to add an extra H bridge for the Stellaris control. Ended up with a lot more wires than anticipated but this is a proof of concept for now and I'll build one with a proper case eventually or if this one breaks.

    [​IMG]

    The Volumenator 2000 is a dual purpose machine to control a physical knob of an amp/preamp and a motorised pot with a DC motor attached to it. Alps has a motorised version of their velvet series.

    Final testing for one remote two motors.
    [​IMG]
    I'm using input select button of the schiit remote to switch between the two motors.

    Naturally before buying anything I did check there is enough space. A direct swap later:
    [​IMG]

    Used a basic DC extender cable, cut off the male connector, routed it in one of the cooling holes underneath the chassis with the female side sticking outside. Soldered a male DC DC cable, hooked everything up and voila, remote controlled DNA amp. The same can be applied to the Stratus since it uses the same TKD pot.

    [​IMG]

    With this type of volume pot you can still manually adjust the volume where as the DC motor for the teton cannot be adjusted except by electricity.

    Main issue:

    Hum, like a truck load of hum, around 65-70dB worth of hum. I was expecting some noise when adjusting the volume but this was with just the arduino powered on and connected.
    Got rid of around 95% just by ditching the 12V brick hooked to the mains and using the HDPlex 12V output that's powered by the PS Audio P12. My jaw dropped at the difference this made, goes to show how important clean power actually is.

    For the remaining 5% I can try:
    1. Shielded cables
    2. Use a relay with the arduino that only enables connection while adjusting the volume and disconnects at idle.

    I've already ordered a single channel relay and plan to integrate it tomorrow.
    I have to do a better job at routing the DC cable away from all the components inside the amp, the relay may not be needed then but just for my piece of mind.
     
  16. m17xr2b

    m17xr2b Friend

    Pyrate Banned
    Joined:
    Mar 26, 2016
    Likes Received:
    3,988
    Trophy Points:
    93
    Location:
    United kingdomland of fish and chips
    Rerouted the DC cable and made sure it's out of the way
    [​IMG]

    The hum is completely gone as long as I don't use the switching 12V psu.

    Running fully balanced my usable volume range on the HD650 is from 0.5 to 1.5 out of 10. The remote control is fine enough to make precise adjustments so I always find the sweet spot for each track.

    Honestly having this option further enhances the experience of an already outstanding amplifier without adding preamps and complexity to the chain.

    The audio note input transformers and duelund caps make me feel 7y old, it's like the back end of a Lamborghini murcielago or Porsche carrera gt engine bay. I could stare at those for hours.
     
  17. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France

Share This Page