advertisement


PIC programming...

Richard Nichola

pfm Member
To cut a long story (very) short I've decided I want a surround sound thingy in the lounge. I've also decided to design and build it myself. I've decided on the following specification.

1) Power bits based on chip amps, because I'm too lazy to do that bit.

2) No digital processing in the amp, the player to do the decoding.

3) Passive pre section if possible, but wait for it...

4) Must be remote controlled. This is non negotiable as the TV sound will be going through the box.

So I've decided to do the control using relays and a PIC controller. I've coded assembler before, so I think I'll be able to make that part work.

However I haven't yet decided how to do the volume control. Anybody know where you can source a six gang motorised pot?
 
Another cheaper and probably simpler option would be to use an IC based volume control. You may lose a little in quality but you will (with careful programming and the right chips) be able to set and store levels for each channel without having to resort to an analogue soluiton for level matching.

There are some pojects doing this on Diyaudio.com

Ed
 
You can get 6-gang DACT attenuators, for the ultimate in perfomance, but this is a bit overkill.

The easiest motorised pots to buy are the Alps 'blue' type.

If you were a little ingenious you could have three stereo versions to get six channels at sensible price.

You could then make the external volume control a cheap single gang pot that simply produces a DC voltage, that you feed to an internal DAC on the PIC chip you choose.

By reading the DAC input you can obtain a volume control position, the resolution of the DAC determining the number of discrete volume levels you have.

You would need some hysterisis in the drive to motors, since you do not want the motors to be constantly toggling if the input to the DAC is on the edge of two values.

Alternatively, a rotary encoder could give you a direction input that you use to operate the motors in one direction or the other, much as most modern car radios do (the volume pot can be spun continuously). With care you could make this feel pretty useable.

I believe the resistor ladder in the 112 is based on the first principle - it's advantage being that when used with an electronic control you get the same 'feel' as a normal pot, if the DAC / micro / ladder is fast enough, as it's an absolute position encoder, not a direction of rotation indicator.

The disadvantage to this method is if the pot develops a fault, or becomes noisy, it will give spurious operation.

I'd consider electronic switching too, once you understand the failings in electronic switching, you can deal with many of the downsides, through careful support circuitry design.

http://www.maxim-ic.com/appnotes.cfm/appnote_number/638/ln/en

Andy.
 


advertisement


Back
Top