Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › Arduino based passive analogue input selection & volume control
New Posts  All Forums:Forum Nav:

Arduino based passive analogue input selection & volume control - Page 2

post #16 of 123
Quote:
Originally Posted by PJPro View Post
..... a complete kit for something called the OptiVol module (from SKA Audio) can be purchased for less than the cost of the LDRs on the group buy. There may be a good reason for this (different quality LDRs?) so I have asked if anyone would care to comment on the SKA Audio offering.
The SKA module only uses LDRs as signal resistors i.e. two. The Lightspeed design uses four (series-shunt).
post #17 of 123
an idea I've been thinking of (way in the background) is to try some of these LDR things but have a CPU controller and a non-audio DAC (binary-to-voltage converter) drive the ldr's. the 'thing' about the ldr's, as I understand it, is that they need matching and calibrating. that's a natural thing for a CPU and some lookup tables to do! the trick is, then, to run some calibration on a completed circuit and generate the 'value tables' for the CPU to use.

in theory, that totally eliminates the matching hassles or non-linearity of the devices.

but I have yet to try this, myself. too many other projects still pending.
post #18 of 123
The guy organising the group buy also offers a matching service, which the vast majority of builders seem to go for.
post #19 of 123
my point is that the matching service is a liability. why? suppose one part goes bad. now the whole matched set needs to be junked.

you also are dependant on 'that guy' to do the matching. not very DIYish if you ask me.

finally, you can match BETTER if you have computer lookup tables to help do the offsets. you can get better matching than hoping for parts to 'line up' in tolerance.
post #20 of 123
Quote:
Originally Posted by linuxworks View Post
my point is that the matching service is a liability. why? suppose one part goes bad. now the whole matched set needs to be junked.

you also are dependant on 'that guy' to do the matching. not very DIYish if you ask me.

finally, you can match BETTER if you have computer lookup tables to help do the offsets. you can get better matching than hoping for parts to 'line up' in tolerance.
OK. Take your point. But aren't builders buying matched sets of stuff all the time e.g. transistors, tubes, etc. Otherwise, you have to buy a rake of stuff to get your one single matched pair? OK, if the lookup tables can do something to reduce/remove "waste", that can only be a good thing.
post #21 of 123
anyone at home can easily match transistors. and they're cheap and plentiful.

the lightspeed thingies are not. that makes all the diff (to me).

also, matching transistors are usually single value matches (gain or beta levels). no one really matches 'curves' on transistors.

but that's exactly what is needed with the lightspeed things. they might be slightly non linear in some regions and getting CHANNELS to match is very important as you ride up and down the vol level range.

a lookup table is THE elegant way to do this. the reason they didn't use them is - they might not know how to design or program the controllers (my guess).

they certainly are doing things the hard way, if you ask me
post #22 of 123
this idea is awesome. I already loved the SPDIFmaster (no time to do it though ), and this would yield awesome attenuators for little money.
Hope you can do it .
post #23 of 123
All you have to do is set the analog output to 0, sample, write to serial, increase to 1, ect to 255 and just log the results from the serial port and adjust the curve to match what you want and write it to a couple of volume arrays. It isn't that much code.

MAYBE an hour of work on breadboard and no reason at all you couldn't go from start to finish in one day.

I'd do it but even though I can hear stuff most people can't I'm still not able to hear the noise everyone seems to complain about in volume pots now so I'm a little unmotivated to say the least. I'm pretty sure they are talking about noise from when you move the volume control but since I don't sit around changing the volume while I listen to music I don't think I will gain much.
post #24 of 123
analog out is PWM!

(doh!)

analog-in is nice and clean. analog-out is a hack. nice try, though.

that's why I was planning on some kind of d/a converter so that I could send some 0..1023 (or 0..255) code and get a REAL analog constant voltage out from that. even an R/2R ladder would be fine. something that gives steady clean dc from it (important!).

then that DC would 'bias' the LDR thingies.

you'd need 4 dac entities since you need a series and shunt LDR, and double that for stereo. double that for balanced (lol).
post #25 of 123
its not the noise in volume pots (there is no noise that I'm aware of) but its channel separation that suffers as you rotate the control away from 0db point.

the concentric rings on pots creates a capacitive effect and the more you go toward full atten, the more you muffle the stereo. a triangle graph effect is seen in RMAA's on pot-based amps and usually not seen on non-pot versions.

also, pots are slow to move (even motor ones). sometimes I like to quickly get to a volume level or even use memorized volume levels on a remote.
post #26 of 123
PWM shouldn't be an issue. The opto isolators most commonly used have a rise time of .005 seconds and a fall time of .080 seconds. Setting the PWM on the Arduino to 32khz gives you an on-off cycle time of .000031 seconds. That's 161 cycles before the unit can even go from full off to full on. Plenty fast! If you want to smooth it a 1uf cap should be more than adequate.
post #27 of 123
I did consider using a cap to create some kind of smoother dc. but think of this: ANY modulation that the variable R sees will directly affect the attenuation. the modulation will come thru, I'm afraid (just a guess).

what I'm thinking of is a digital pot like the MCP41010 series. control that via the arduino and simply have the ends of the pot be + and ground and the wiper goes to either a buffer (maybe) or directly feeds the LDR.

that, to me, seems like a much more stable and clean solution. not too many extra parts, either.

what I don't know, yet, is the linear pot to log mapping that you'd want for vol control. and if the range gets too squeezed due to the log nature and only have 255 slots on the digital pot to select from. maybe 2 pots in a gang, to get more res? don't know. have not tried any of this yet

not saying the pwm smoothing won't work at all; but it would not be my first choice.
post #28 of 123
Well, I've got a few MCP4261 pots I could play with(256 step, dual wiper, 100k). Wouldn't stop you from having to log all the positions and make a map for an unmatched set but I'm pretty sure that worst case you'll get 100 steps out of it. Maxim even gives you what you need to make a log taper from a linear taper digital pot. Take your readings in the log configuration and make your adjustments accordingly. Not bad for a couple of bucks! Off to make a set with some CDS cells, LEDs, and old metal jack sleeves.

http://ww1.microchip.com/downloads/e...Doc/22059b.pdf
post #29 of 123
Thread Starter 
I hope I will find some time next week to get some schematics started.
I do not think that it is easy to find a solution that is good for anybody.
So I think my way will got to an modular, stackable approach.
Currently I have identified some variables that people want to choose or play with:
  1. Single ended vs. balanced
  2. SE<->BAL conversion
  3. Volume control
  4. Buffer?
I think you will have some space on top (so in Z-Direction) - so a stackable approach could give nice effects.

First thing I will concentrate on is the whole switching thingy. Other things will follow - lets see how it works.

But to come back to some of your questions:

Quote:
Originally Posted by linuxworks View Post
I have heard great things about the THAT1646 chip

RCA to XLR? It's THAT (1646) easy! - AVS Forum

it seems pretty well respected in the pro audio community. yes, its 'a glorified op amp' (sort of) and so the discrete folks will turn up their noses to it. but the rest of us won't be bothered

there's also matching bal->unbal converter chips from THAT corp, I think. (the THATcorp guys used to be the old dbx company, I believe).
I will check that out. I have also seen some good reviews about the exotic (for me) SSM2142.

It will be modular anyway

Quote:
Originally Posted by linuxworks View Post
an idea I've been thinking of (way in the background) is to try some of these LDR things but have a CPU controller and a non-audio DAC (binary-to-voltage converter) drive the ldr's. the 'thing' about the ldr's, as I understand it, is that they need matching and calibrating. that's a natural thing for a CPU and some lookup tables to do! the trick is, then, to run some calibration on a completed circuit and generate the 'value tables' for the CPU to use.

in theory, that totally eliminates the matching hassles or non-linearity of the devices.

[…]
That is an marvelous idea. You can include this in a boot sequence and have never to bother about this anymore.
The idea of combining two ADCs or digital resistors is a good idea.

Quote:
Originally Posted by linuxworks View Post
analog out is PWM!

(doh!)

analog-in is nice and clean. analog-out is a hack. nice try, though.

[…]
you'd need 4 dac entities since you need a series and shunt LDR, and double that for stereo. double that for balanced (lol).
Quote:
Originally Posted by linuxworks View Post
I did consider using a cap to create some kind of smoother dc. but think of this: ANY modulation that the variable R sees will directly affect the attenuation. the modulation will come thru, I'm afraid (just a guess).

what I'm thinking of is a digital pot like the MCP41010 series. control that via the arduino and simply have the ends of the pot be + and ground and the wiper goes to either a buffer (maybe) or directly feeds the LDR.

that, to me, seems like a much more stable and clean solution. not too many extra parts, either.

what I don't know, yet, is the linear pot to log mapping that you'd want for vol control. and if the range gets too squeezed due to the log nature and only have 255 slots on the digital pot to select from. maybe 2 pots in a gang, to get more res? don't know. have not tried any of this yet

not saying the pwm smoothing won't work at all; but it would not be my first choice.
I have playing around with getting some steady signal from PWM lately. The only way to get something some real clean signal from PWM is using some kind of butterworth filter. Any RC,RCRC combination still have significant noise.
I think getting a clean signal from PWM will be very hard. And despite the LDR are perhaps some kind of slow – I suspect it WILL induce noise.

If you create some kind of circuit to deal with any irregularities – why not use anything cheaper than LDR - like optocouplers or opto transistors or diodes?
BTW: How about non linearity of LEDs?

I think a self calibrating solution is positively the best way to go.
post #30 of 123
Thread Starter 
To give you an image of the whole system I have drawn an image:


An Arduino compatible CPU is driving the whole system. It will have plenty of outputs for LEDs and plenty of inputs for buttons, rotary encoders or even analog potentiometers. The decision to base it on Arduino is to make programming as easy as possible. There is plenty of help out there to program it to the specific needs.

The basic input selection can switch between a number of balanced or single ended inputs. For each input it is configurable if it is balanced or single ended.
The output can be balanced or single ended – according to your needs.

To convert between single ended and balanced there will be an an single ended to balanced converter. This module will be plugable in some way so that you can choose the technolgy you like (opamps, discrete or whatever).

The volume control will be an plugable module too. To enable the use of an chip or LDR.

If needed a balanced to single ended converter can be attached after the volume control. But most probably this be not part of this design.

Next step will be to design the switching - which should be easy. Currently I am thinkig about a fixed number of inputs or some bus like approach. The later wuold have the sweet advantage to be more extensible. Any wishes?
New Posts  All Forums:Forum Nav:
  Return Home
Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › Arduino based passive analogue input selection & volume control