Preamp Control - Volume, input, mute, remote

FWIW
I found that the large size of the Mega caused problems in mounting the board in the case. Not a lot of room in my pre-amp. I used a Nano with no problems.
Maybe an option is to return to using the Nano and resolving the number of I/O pins problem with external chips, just as you have done using the 595 for channel switching. But then you are, again, into a redesign and turning new boards yet again. Who was it who said DIY saves money?

My suggestion of the MCP23008/MCP23016 (I2C) is a personal choice I suppose. With I2C you address the individual chip with values in the data stream so several chips can be controlled using just 3 pins; with SPI (eg. the 595) the chips are addressed using enable pins so adding more chips usually means using up more MCU pins, which, in some circumstances, is undesirable.

Geoff
 
The new circuit boards came yesterday and I built the encoder and display boards and half the analog boards. Found a couple errors in the BOM so had to order one cap and 2 pieces of one resistor SMD. Probably be done on Friday. And ready for testing.
I have implemented a standby option, now over 1000 lines of code, granted their is some white space and comments but mostly code.
 
So I am on the horns of a dilema. The Pulse Width Modulation which is used for dimming the balance LEDS and display doesn't work on some of the pins where it should. I found that when the IR remote code is included the PWM on certain pins stops working. What do they have in common, the built in timers. So now I am having to go through the IR code and change over to a different timer, the Mega 2560 has 6 timers so not an issue, but have to see which timers are used for PWM and which pins they affect and choose the right one and possible change the PCB for these changes. Live and learn.
Have a good one.
 
  • Like
Reactions: 1 user
Tonight I dug into the IRremote code and found one module where an addition of a couple comment // on one line and deleting them on another line changed the timer from Timer2 to Timer5. An easy enough change but a lot of reading to find. I will find out if it affects the pins that are used as digital pins, D44-D46. Otherwise just have to work on the logic of the new code, then it is ready for listening tests. Fortunately no changes to the PCB required.
 
  • Like
Reactions: 1 user
Still working on the code. Getting there. Here is a pic of the prototype.
 

Attachments

  • C432ACE4-6179-46DA-9AEF-B14797E40098.jpeg
    C432ACE4-6179-46DA-9AEF-B14797E40098.jpeg
    354.3 KB · Views: 248
Yesterday I finished writing and debugging the software. I then tried listening to it between my preamp and amps and found the volume control not working correctly. Found I had swapped the relay 1 pin with relay 8 pin, a couple minutes updating the code had it fixed and tested all the features with audio and found it to be good, great really. This morning I took it out to my audiophile business friend who will evaluate all the features and see if any changes are needed, might like different brightness on the LEDs or more volume difference in the balance control.

So as it stands now the Volume control will do: Volume (or course), Balance, display dimming, muting, and inactivate the preamp with a line to shutdown the preamp and amps if you want to wire that in.

The front panel will have a display for volume number and balance LEDs, Mute LED, and Standby (inactive) LED, and the IR receiver on one board. A Rotary Encoder that does volume up and down and the button on the rotary encoder is dual purpose, when the preamp is in Standby the button will "wake up" the preamp, when active it will mute and unmute. The IR remote is an Apple clone, or a real one, NEC coding; it does Volume up and down, Balance +3 db left or right in 12 1/4 db steps, mute/unmute, and activate/inactivate (standby).

I am turning the Display board to add an LED/resistor to use the RGB LED, with Red for mute, Green for Standby, and Blue for Active. The bottom control board is turning to reverse the board to board connector so the ribbon cable will be straight rather than twisted. Once I receive the new boards and test them then I will post the gerbers. In the meantime, here is the Schematics, BOM, and the code. Using the CCF Vishay/Dale resistors over the RN65/70 saves about $65, and sound so close I can't distinguish the difference. The PCB has a dual stuffing option for the load resistor which sets the input resistance at 10K, you can use the Vishay/Dale or a Caddock in that position. The Caddock spec better but I can't hear the difference and they are Freaking expensive.

I have also tested a couple different versions of the Arduino Mega2560 Rev3, one a real one $32, one a Chinese clone at $20, works fine, since the design is open source they should all work.
 

Attachments

  • VolumeControlBOM.zip
    24.1 KB · Views: 92
  • top Left Volume board V1.pdf
    34.6 KB · Views: 124
  • Bottom Right Vol-Control Board V2.pdf
    48.8 KB · Views: 118
  • Rotary Encode V1.pdf
    9.6 KB · Views: 147
  • Display Board v2.pdf
    21.6 KB · Views: 144
  • Volume-balance.txt
    38.1 KB · Views: 109
Once I receive the new boards and build up a new unit I want to experiment with changing the way the digits for the volume are displayed. Rather then evaluating and writing every bit for a LED segment I can replace several lines of code with one instruction. Instead of 24 to 32 instructions for each digit it would take one port write, for three digits that is 72 instructions down to 3 which should speed things up which will hopefully remove the smallest bit of flicker at the dimmest setting of the display.
 
Today I retreived my current set of boards and tested the port write to the display pins code and found it works even better. So once I build the new set of boards, due here is three days, and test I will post gerbers and new code.

In the mean time, I have 9 sets of PCBs for the earlier design that does not have balance or dimming. Uses an Arduino Nano and does volume and mute from a rotary encoder or Apple remote. The main board is 3.2"x10", the Display is 2"w x 1.5" h, and the rotary encoder board is 1"x1". One set of boards free to anyone willing to pay for shipping. The parts to populate run $125 with the CCF series Vishay/Dale resistors, or $190 with RN series Vishay/Dale resistors.
You won't find a better sounding volume control. ;)
 
Member
Joined 2001
Paid Member
Today I retreived my current set of boards and tested the port write to the display pins code and found it works even better. So once I build the new set of boards, due here is three days, and test I will post gerbers and new code.

In the mean time, I have 9 sets of PCBs for the earlier design that does not have balance or dimming. Uses an Arduino Nano and does volume and mute from a rotary encoder or Apple remote. The main board is 3.2"x10", the Display is 2"w x 1.5" h, and the rotary encoder board is 1"x1". One set of boards free to anyone willing to pay for shipping. The parts to populate run $125 with the CCF series Vishay/Dale resistors, or $190 with RN series Vishay/Dale resistors.
You won't find a better sounding volume control. ;)
I will take a set of pcbs.
George
 
  • Like
Reactions: 1 user
In the mean time, I have 9 sets of PCBs for the earlier design that does not have balance or dimming. Uses an Arduino Nano and does volume and mute from a rotary encoder or Apple remote. The main board is 3.2"x10", the Display is 2"w x 1.5" h, and the rotary encoder board is 1"x1". One set of boards free to anyone willing to pay for shipping. The parts to populate run $125 with the CCF series Vishay/Dale resistors, or $190 with RN series Vishay/Dale resistors.
You won't find a better sounding volume control. ;)
I'd appreciate a set of the early PCB's. Will send pm.
 
One note, this prior version requires an EEPROM programmed for the display and the Arduino Nano Programmed. I can program and solder the EEPROM on to the display board for $8. Are you able to program an Arduino? I can program and supply and Arduino if needed for $10 to $15. Just things to keep in mind. They are spelled out in the thread.
Thanks, John
 
This is related to IR receive. Yesterday my wife set a book on the coffee table on top
of a piece of paper covering a remote which continuously transmitted codes. The TV
and audio system could not read codes from the normal remote because of the chatter.
I'm in the process of adding code to count the number of continuous codes coming in
and after 10 seconds (100 codes) changes the readout until all activity stops and then
the display will return to normal. That is a fault I never thought about until it happened.

 
  • Like
Reactions: 1 user