A precision LED/LDR-based Attenuator

Status
Not open for further replies.
I would also prefer a separate mute function/switch to maintain same volume when I fiddle with the system (a lot!) - an illuminated switch to show 'mute state' would be quite better too

I vaguely remember that it maybe possible to control 2, or more, separate stereo attenuator units with the single control unit - is that still possible if you include the balance control?

The reason why is if the new generation of digital Xovers (DSP units) continue to improve in quality of sound, then using a simple passive 4 way attenuator would be quite useful and the current L <-> R balance could be used to vary the high pass/low pass balance, for example ....

Check out the sound on a really high quality headamp, not 'mid-fi' - much easier to hear any problems like bass loading (fat bass) or treble stripping (thin, choked) - you can get quite critical now.
 
It doesn't worry me if there is an (almost) inaudible volume with the pot an minimum.
I would prefer just the mute function alone and (as an added extra) an option for the attenuator to activate a LED when the mute is on.


Actually, I was referring to the fact that when I press the 'mute' button on the remote sometimes it mutes and sometimes it doesn't.

I could fix this by changing the program of the IR receiver board to send a longer pulse when the mute is pressed, but that would make the way the chip works non-standard to other remotes, and I want this board to work with any programmable remote control out there.

The more correct way to fix the problem is to use a pin on the main chip that has a hardware interrupt capability -- thus when a pulse arrives at the pin of any duration however short, the command associated with that pin is executed immediately regardless of what else is going on. This is ideal for mute. I will remove the bottom-of-pot mute when the regular mute function is working properly, before I finalize the board.

Re the LED, I do intend to have the LED blink moderately slowly when the board is in mute.

And speaking of the LED, I was thinking yesterday that I need the balance knob to take control of the LED when it's being moved so you have a visual indication of when balance is exactly centered. This will allow the use of a plain linear pot with no detent and still know when balance is centered.
 
Last edited:
I have been following this thread, and am very curious what your set would be costing, just to know if it will be in my league, and thus worth waiting for.

What wonders me from the beginning is why you do not build it like the various remote control kits from ebay, with a rotary controller and perhaps a display. Then you can control all functions with only one knob, and there will be no worry that the potentiometer will age, or not track correctly. I know you stated that you like the feel of a pot, but is that enough to keep it in?

I think your solution is by far the best out there, so I am definitely interested if it will be available!
 
I have been following this thread, and am very curious what your set would be costing, just to know if it will be in my league, and thus worth waiting for.

@jslot, good question and good comment!

a) Re what will it cost, I'm wondering too! It ain't simple coming up with an answer to that, and is only half-answerable now because

a) the design was not finalized so I had nothing to show to a potential manufacturer to get a parts & labor quote (the half that probably can be answered now) and

b) the still-unanswered question remains how many to order initially because the quantity has a huge impact on the price-per-board (and what can I afford to bankroll to get started).

I live in a small town in NW Wisconsin, out in the sticks. Amazingly, there is a small-quantity circuit-card assembler right here in town who uses skilled manpower instead of capital-intensive machines to do the work and thus specializes in small quantities. He says he can do quantities from 10 to 1000 before it gets cheaper to order from China. If he's halfway right this will be extremely convenient.

At some point soon I will deliver the drawings and parts list to this outfit and see what they come up with. From there, add in shipping and sales tax (it seems Wisconsin is downright ugly when it comes to internet sales, I'll probably have to collect sales tax based on wherever you live and pay it to Wisconsin and they pass it on to your state -- all of which is a pain my the patootie).

When I have good numbers I will ask the question -- how many people are interested and with some sense of demand I'll place an initial order.

What wonders me from the beginning is why you do not build it like the various remote control kits from ebay, with a rotary controller and perhaps a display. Then you can control all functions with only one knob, and there will be no worry that the potentiometer will age, or not track correctly. I know you stated that you like the feel of a pot, but is that enough to keep it in?

Because, in the beginning, this was simply a challenge, a desire to improve on something that I felt needed a different approach from how it was being handled. I wanted to obviate the need to buy a big handful of LDRs to get four that could be put together to play well. Also, I wanted a current-controlled solution to reduce the impact of heating on operation. That was the main focus, everything else was secondary.

So, when that was done, I added on the pieces that I would want to make it play in a system, and it wound up as it did mostly because I designed it the way I would want it -- my version of the KISS principle is to design with sophistication and whatever complexity is required, but make the human interface as simple and as elegant as possible. For me, it's all about the sound, so digital displays and clicking knobs don't please me as much as a plain front panel with a few knobs and a pot that feels like a million bucks in my hand when I turn it. Motorized 10K linear Bourns pots are $11 from Mouser, and each has two pots for stereo so when one starts to act up you can move the wires to the other, or wire them in parallel for redundancy. Keep in mind virtually no current passes through the pot and they are not stressed in operation.

HOWEVER, my goal is to a) not load the design with features that force anyone into any bad choices and b) keep it flexible enough that features of choice can be added to suit most users. Hopefully, my design leaves you free to attach any remote control circuit you want to the board as long as it delivers 0-5VDC to control volume and balance, and a momentary logic high to activate the mute on/off. I feel that one of the things I did right with this board was to make it do the basic thing -- control the LDRs beautifully -- and allow the user to select and connect their choice of many varieties of third-party remote control boards.

But I am interested in your query about different control options -- could you point me to a few controllers that would please you and I'll see what it takes to make them play nicely with my LDR controller card.

I will eventually offer a complete preamp, I think, including LDR-only source selection, etc, but the raw boards will always be available and the main LDR control board will not be loaded with various features that would normally be an end-user preference.



Thanks for your questions -- very helpful.
 
Last edited:
I've been listening to my LDR board for a few days now, and loving it. But it looks like this is going to be a very expensive upgrade -- because I now want to build new speakers and amplifier and DAC to match my fabulous passive preamp! And so the rot sets in . . .
 
Thanks for your explaination about the pricing. All that you're going to buy will be dependent on the amount you will be buying, so yes that is difficult when you have no idea how many you're going to build ( and sell of course )

I was asking about the pricing because I just built an excellent sounding DCB1 preamp, but need to order a better pot for it ( lower value than I am using now ). If I knew I would be able to afford your solution, I would perhaps wait for that instead of ordering a better potentiometer.

About the controller, I just meant a rotary encoder that gives you pulses when turned, and with a pushbutton function in it. You can find them everywhere, just type it in on fleabay. The advantage is that you can determine the starting value of the volume, use the same thing for balance control, determine the sensitivity of the control and I think ( no programming experience so just a guess ) that it is easier to count pulses than to read an analogue value with your pic?
Also you don't need an extra power supply to rotate the potentiometer, and remote control will be much simpler as you do not have to control the pot anymore. In your setup I really cannot see the advantage of a pot, except for the feel of course.

Example:
Foto-FNESGZR4-D.jpg
 
Dang, getting the mute control right has been an adventure because of the interaction with the balance control. 🙄

Looks like I will have up to about to 25 dB of adjustment in the balance control (less when the volume is set where there is less than 25 dB available to minimum volume). Also have it set up so that when the balance control is at full travel to either side the opposite channel goes fully muted, which is an improvement.

Also, when the volume control is rotated fully counterclockwise, the sound is fully muted in both channels (audible only with my ear to the speaker cone).

OK, that's done, I'm moving on . . .
 
Thanks for your explaination about the pricing. All that you're going to buy will be dependent on the amount you will be buying, so yes that is difficult when you have no idea how many you're going to build ( and sell of course )

I was asking about the pricing because I just built an excellent sounding DCB1 preamp, but need to order a better pot for it ( lower value than I am using now ). If I knew I would be able to afford your solution, I would perhaps wait for that instead of ordering a better potentiometer.

About the controller, I just meant a rotary encoder that gives you pulses when turned, and with a pushbutton function in it. You can find them everywhere, just type it in on fleabay. The advantage is that you can determine the starting value of the volume, use the same thing for balance control, determine the sensitivity of the control and I think ( no programming experience so just a guess ) that it is easier to count pulses than to read an analogue value with your pic?
Also you don't need an extra power supply to rotate the potentiometer, and remote control will be much simpler as you do not have to control the pot anymore. In your setup I really cannot see the advantage of a pot, except for the feel of course.

In order for that control to work the way you describe you have to have your hand on it, right? Which means you're standing at the preamp? If you're willing to do that, then just buy a couple of el cheapo pots and use them without the remote control. The quality of sound of this board is totally indifferent to the quality of pot you use to control the level.

The remote is for convenience: volume & balance & mute from your seated position. You can buy any other remote control system you want that will deliver the control input the board needs, no need to use mine.

I will look into making my system even more flexible along the lines you suggest, but no promises -- it may be fairly easy, it may require major modification, probably the latter because a quick look online suggests I would need additional i/o pins on the chip.
 
About these 'them remote control 'things' -

I don't use them because it makes me get up off your A and get onto my feet every so often - apparently, you should do this every 15mon to avoid all the ills that accrue with daily prolonged sitting and this goes towards my 'better health' as my work days are now becoming more sedentary as I approach the magic retirement age (one job in exchange for another, it seems!)

However, not everyone's this inclined and I must say I'm quite comfortable sitting in front of this machine typing in my comments too!

Still waiting for the Tromayne's "Attenuators, Equilizers, Filters" book from Amazon (a bit slow) to 'nut out' the possible T-attenuators - I've forgotten just about everything!

I can help with your new speakers as a friend of mine builds one of the /best' bass drivers you can buy in 10, 12 and 15" - my light cone 15' prototype units sit in a 3.5 cu ft box with a +6dB boost at 30Hz and can easily operate up to 1k5Hz with very little mids colouration (I only use them to 150Hz) - quite remarkable - touting to 'get the numbers up' for a production run of 10 pairs of the 12" drivers .... (definitely a commercial interest here!)
 
In order for that control to work the way you describe you have to have your hand on it, right? Which means you're standing at the preamp? If you're willing to do that, then just buy a couple of el cheapo pots and use them without the remote control. The quality of sound of this board is totally indifferent to the quality of pot you use to control the level.

The remote is for convenience: volume & balance & mute from your seated position. You can buy any other remote control system you want that will deliver the control input the board needs, no need to use mine.

I will look into making my system even more flexible along the lines you suggest, but no promises -- it may be fairly easy, it may require major modification, probably the latter because a quick look online suggests I would need additional i/o pins on the chip.

Sorry if I offended you, didn't mean to do that!

Please have a look at the following video on youtube, shows exactly what I mean, rotary controller for setting volume, balance and input selection, and remote control. It is also controlled by a pic, but then again that pic does only this, while yours does the real magic🙂

https://www.youtube.com/watch?v=1rrxWEl_Lp8
 
The rotary encoders use quadrature output on 2 pins to indicate which way the shaft is rotating (plus a momentary switch to ground on some when pushed). It's fairly easy to decode this in the controller using only 2/3 pins. I agree with jslot that this as a better way to do the local control as you can do volume, balance, input select etc., using only one knob and it simplifies the remote/local situation.

Just out of curiosity, why are you using an IR decoder chip? The IR detectors can interface directly to a µP and your firmware can decode whatever keys you are interested in. The routines to do this are also fairly straight forward. This would also help facilitate the stepped mute (20db/40db/total mute) with a short/long press of a remote key.

What are you using for a controller chip? Are you writing the code in C or assembly?
 
Sorry if I offended you, didn't mean to do that!

Please have a look at the following video on youtube, shows exactly what I mean, rotary controller for setting volume, balance and input selection, and remote control. It is also controlled by a pic, but then again that pic does only this, while yours does the real magic🙂

https://www.youtube.com/watch?v=1rrxWEl_Lp8

Excuse me, too! I didn't want to sound ruffled but I see that I did sound that way -- when you design the whole thing, changing from an analog pot to a rotary encoder is not a matter of swapping out one for the other, the whole chain has to change including the programming.

The youtube video looked really neat. Questions I have -- does the audio go through the chip? And does the source switching go through the chip? Looked like a purpose-specific chip there with neat feature preprogrammed.

In order to keep the sound super-clean and pure while effecting those other neat capabilities I'm thinking I'd have to program the whole thing from scratch because that chip, if used as shown in the clip, would harm the sound as it passes through. What you do you think?
 
The rotary encoders use quadrature output on 2 pins to indicate which way the shaft is rotating (plus a momentary switch to ground on some when pushed). It's fairly easy to decode this in the controller using only 2/3 pins. I agree with jslot that this as a better way to do the local control as you can do volume, balance, input select etc., using only one knob and it simplifies the remote/local situation.

Just out of curiosity, why are you using an IR decoder chip? The IR detectors can interface directly to a µP and your firmware can decode whatever keys you are interested in. The routines to do this are also fairly straight forward. This would also help facilitate the stepped mute (20db/40db/total mute) with a short/long press of a remote key.

What are you using for a controller chip? Are you writing the code in C or assembly?

The main board has a chip that does the basic job well -- controls the LDRs and provides volume and mute capabilities. I'm leaving it that way for now.

The immediately available remote capability will provide volume, balance, and mute. If you want more (for now), you will have to either find a kit that works the way you want it to, or buy a ready-made solution, or design it yourself.

The obvious next step is to design an LDR-only input switching capability, and that will happen and it will interface nicely with the LDR board, but not right away. First I need to get this board done and available for folks who want the sound.
 
Now have a visual indication of exactly "centered" when you turn the Balance pot -- the LED goes out momentarily when the pot is turning and has reached the center range of values and then comes back on, whereas it flickers but is on continuously when Balance is being turned and it's away from center. I've played with the timing and like it very well.

You'll have to use your ears to decide how far off center the Balance is when it's away from center, at least for now.
 
Last edited:
As far as the single LED is concerned, in "play" mode, it displays center of Balance control as I've indicated above, and it shows Volume pot movement by flickering when the pot is moving. After the pot stops moving and the LDRs have completely settled down to match volume and balance pot positions, the LED glows steady on.

IMHO, the one LED does a pretty good job of indicating status, but if anyone has a thought about a status that can be addressed with this simple method, I'd be interested to hear it. (In calibration mode, there are separate indications for initializing, calibrating, and finished. The calibration process I have finally settled on takes about ten minutes, BTW.
 
Excuse me, too! I didn't want to sound ruffled but I see that I did sound that way -- when you design the whole thing, changing from an analog pot to a rotary encoder is not a matter of swapping out one for the other, the whole chain has to change including the programming.

The youtube video looked really neat. Questions I have -- does the audio go through the chip? And does the source switching go through the chip? Looked like a purpose-specific chip there with neat feature preprogrammed.

In order to keep the sound super-clean and pure while effecting those other neat capabilities I'm thinking I'd have to program the whole thing from scratch because that chip, if used as shown in the clip, would harm the sound as it passes through. What you do you think?

I totally understand the feeling with an almost finished product, that took years of development to get to the status of almost production ready, and several hundreds of posts it is not nice to hear that there might be an even better alternative. While reading my way through all the posts in two evenings, it struck me that this idea did not pop up.

BUT: I don't think total reprogramming is required. The most important stuff is controlling the output current to the leds, the calibration of that circuit, and finding a good way to control the balance, and you can just keep all that. I am not a programmer, but reading the pot position in your pic gives you a certain value, right? The rotary encoder just gives you this value in another way. All the rest stays the same.

The value of the display in the video depends on what your starting point is. When you build an amp from scratch, you might want to have a nice display in it, giving you all the flexibility of input changing, visual volume and balance control, and if you take it further LDR controlling of a baxandall tone control circuit.

If you want to upgrade an existing amplifier with the LDR volume control, there will be less ways to put the display in use, and space might be more of an issue to build it in the existing situation. There you might be better off with proper use of an indicator led.

Keep up the good work, I highly admire your ongoing persistance to get it to perfection!
 
Went to meet with folks from the local electronics assembler, and it went well. They work with a PCB etching outfit in Minneapolis that can read my files. They'll acquire the parts and install them except for the PICs and the LDRs which are my bailiwick at least for now.

ExpressPCB offers "four business day service" and the order that I put in mid-afternoon Tuesday Central Time (they are two hours behind at Pacific Time so it was noon or 1pm Pacific Time) won't get here until next Tuesday. I've been made uncomfortable before by their creative way of counting business days and in general I think their four business day delivery promise is not met if you count days as a reasonable person would count them; To me, two days to manufacture a Tuesday order is Wednesday and Thursday, and two days to deliver is Friday and Monday (or Saturday?). Obviously they don't get right on a job and they don't stay after 5pm putting completed packages into the UPS system. I don't think I'll go back there again unless I really need something only they can deliver. I'm also going to learn a different layout program so I'm not in any way tied to them. Hopefully the experience I have will make the learning curve fairly flat.
 
Maybe it might be worth using a socket for the PICs - that way, you could possibly alter the PIC for a different operation as an after market service - ie. one main board assembly and a simple insert for different uses

You could possibly do the same for the LDRs, but ....
 
Status
Not open for further replies.