Page 4 of 6

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Feb 25, 2012 12:41 pm
by fotios
Hi Phil
Hmm... Yes, your thought about MUTE relay place is correct. I will do this. Regarding headphones; yes this relay will be controlled by MCU and indication on display will also be included. You know probably that the headphone Jack sockets include a switch that cuts the signal to main output when the plug is inserted into. Will replace this socket with the relay and will use simple stereo ¼” Jack socket. If you persist to also switch off the power amplifier, then we need another power relay to do this. IMHO, that is redundant at the moment that the small signal relay cuts the signal to amplifier. The REC OUT does no need to be remotely controlled, the INSERT yes. You can sit at a distance in a correct audition place to check the music signal difference with or without equalization. As for overloading, the supply level of all operational amplifiers included PGA2310 is +/-15Vdc. If the signal from the output of equalizer can exceeds 15Vp-p, yes will have signal clipping issue. ICs does not destroyed from overdrive (is most correct, overload means a very low load at the output of IC that can fry it) as they include clamping diodes in inputs. Addition of a DAC is a nice idea; we can allocate one of the 6 inputs to a DAC. Implementation of a DAC is not as difficult as it seems, the only needed are very high quality operational amplifiers for buffers and likewise high quality capacitors and resistors. Hardware like USB, optical and coaxial sockets are offered in excess on the market.
You know, there is an issue that bothers me. That is the REC outputs. My only recording device is a Sony Mini Disc MDS-JE780 (tremendous device! It has double ADC and DAC converters of 24bit and their sampling rate is unknown, is a secret of Sony) and when I like to do a recording I connect the CD player with MD directly thru an optical cable. In such a case, the REC LOOP of preamp does not offer anything. REC LOOP serves only in the case of using a tape recorder or a turntable. Do you thing that is necessary the second REC LOOP? Unless you do your recordings thru the analog Inputs/Outputs of your digital recorders.
Just a thought.
Anyway, I will make corrections on block diagram and I post the new later today.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Feb 25, 2012 3:31 pm
by philip davies
Hi Fotis,

With the headphone jack I was planning on using one with a switch so that I can use it to turn off a small relay that will in turn switch off my power amplifier. The amplifier I built a while back already has a 12 volt input to switch it on and off. The socket has not been wired up yet, it will be when I can try it with this project.

I have done the same as you as far as connecting the cd player to the minidisc player for recording, I think I have roughply the same sony md player you have :D and I agree on it being a brilliant piece of kit. Having one record output would be sufficient although having a second one would be usefull for me as I have a cd'r recorder and I am using it's analog inputs and outputs instead of the digital in and out becaue everytime I needed to record from cd to cd'r I have to swap optical leads. Also I do have a record player that I would like to use although it's a very cheap one.

Thanks Fotis, I will have a look at your updated block diagram later.

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 7:05 am
by fotios
fotios wrote:You know, there is an issue that bothers me. That is the REC outputs. My only recording device is a Sony Mini Disc MDS-JE780 (tremendous device! It has double ADC and DAC converters of 24bit and their sampling rate is unknown, is a secret of Sony) and when I like to do a recording I connect the CD player with MD directly thru an optical cable. In such a case, the REC LOOP of preamp does not offer anything. REC LOOP serves only in the case of using a tape recorder or a turntable. Do you thing that is necessary the second REC LOOP? Unless you do your recordings thru the analog Inputs/Outputs of your digital recorders.
Hi Phil.
My thought about REC LOOPS was incorrect. You are right. When we have two recording devices (e.g. a CD-R and a MD or TAPE recorder) then indeed we need two REC LOOPS.
Regarding Headphone Jack, you gave me a different idea: to use a traditional switched Jack socket. The difficult part is that, when a plug inserted into socket then the switching contacts go open. The switching contacts are just two and thru them passes the audio signal. So they could not be used to give a signal to MCU. The only way is the use of an ADC input of MCU to check if signal exists or not. If not, then MCU will turn on an output which can drive relays. In this way, during the normal interval of silence between the end of one track and the start of the next, MCU will also activate this output.
Do you know if there is any Jack socket with a third auxiliary switching contact? If there is a such type then the problem resolved very easy.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 8:51 am
by philip davies
Hi Fotis,

I have seen a few 6.35 mm jack sockets that has 3 switched contacts, one for left and another for the right channel. The third is used to switch off the 0v to the output. Could the third pin be used to switch off a relay or will it interfear with the audio signal?

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 9:04 am
by fotios
After a fast search on the web, i find that there are Jack sockets with 4 non switching contacts. If we insert a stereo jack, then the 3rd and 4th contacts are shorted to analog GND. We can use a 4N26 opto-transistor (or opto-isolator) to trigger a port of MCU when the jack plug inserted. See in schematic: The 4th contact is shorted to GND and the LED of opto is turned ON and the transistor is forward biased (is activated) so its collector drops to about 0V and triggers the port RB.1 as its internal weak pull-up is enabled (HI state). Thus the proccess of activating relays is executed by MCU. At the same time, analog and digital supply rails remain isolated thanks to the use of opto-transistor. I don't think that the LED of opto can load with noise the headphones output, LEDs in general are quite devices.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 10:34 am
by fotios
Phil, unfortunatelly the only 6.35mm sockets that i could find offer up to 3 contacts. So the plan should be modified. See in the new schematic: the Jack socket is from those with 3 switched contacts. When the plug inserted, disconnects all contacts. As long as the LED is ON and the transistor active, the voltage drop accross the resistor connected between its emitter and GND keeps the Port RB.1 in HI state. When a plug inserted the first contact that disconnected is this of LED to GND by turning it OFF. So the transistor is also turned OFF. Now the emitter voltage drops to zero and consequently triggers the Port RB.1

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 1:57 pm
by philip davies
Hi Fotis,

I see what you've done by using an opto isolator, that's a neat idea that you have thought up. That should deffinetly isolate the analog and digital supplies so that there is no noise or interferance.

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 6:48 pm
by fotios
philip davies wrote:Hi Fotis,

I see what you've done by using an opto isolator, that's a neat idea that you have thought up. That should deffinetly isolate the analog and digital supplies so that there is no noise or interferance.

Phil
Yes Phil. That is exactly what bothers me, the isolation of digital and analog supply GND rails. Here is the type of socket that suits in this circuitry.
Image

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 7:24 pm
by philip davies
Hi Fotis,

That's the exact type of socket I was thinking of. What would happen if we were to use an opto-isolator to drive a small circuit that will in turn switch on a relay. This circuit will be running off the analog power supply. We could use another transistor to adjust the voltage to suit the voltage rating of the relay coil. If the analog supply is +15 0 -15 then this relay and the extra circuit would probably need to be connected across the +15 -15 volt rails because if it were connected to the +15 and 0v rails then there might be small clicks audible in the headphones or speakers when the relay discharges through the GND/0v rail. The relay contacts could then be connected to the MCU.

I don't know if this idea will work but i thought I would share it with you. Let me know what you think.

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 9:52 pm
by fotios
philip davies wrote:Hi Fotis,

That's the exact type of socket I was thinking of. What would happen if we were to use an opto-isolator to drive a small circuit that will in turn switch on a relay. This circuit will be running off the analog power supply. We could use another transistor to adjust the voltage to suit the voltage rating of the relay coil. If the analog supply is +15 0 -15 then this relay and the extra circuit would probably need to be connected across the +15 -15 volt rails because if it were connected to the +15 and 0v rails then there might be small clicks audible in the headphones or speakers when the relay discharges through the GND/0v rail. The relay contacts could then be connected to the MCU.

I don't know if this idea will work but i thought I would share it with you. Let me know what you think.

Phil
Sorry Phil but i think my approach is better than yours :mrgreen: The opto-isolator solution is cheaper than a whole circuit with tranies etc. in addition that it triggers the MCU directly. So we can have a message "Headphones On" on display and a MUTE of output for a while, until headphones plug inserted securelly into socket. So no audible thumbs and clicks.
Whoa, okay, that's enough! Let's take a look at the BOM. I wait to receive 20 OMRON simple (Non Latching) relays, to be competible with you. Their coils are of 5Vdc. I need a power relay with 5Vdc coil and a good encapsulated PCB mounted transformer with 9 to 12Vac secondary at 0.8 - 1A or 10VA. Don't forget how many relays, LEDs, could be active simultaneously. We will also build our own remote control handset with 8 to 10 buttons. We need a comfortable plastic case. I found some in Farnell and some in Mouser. I will show you. I think is better to make some buys together, how much P&P charges Farnell inside UK?
Mouser from US for orders from 75 Euro and above, does not charges P&P. Make an experiment by placing some goods on basket, the P&P is shown automatically on the sum. Here is a link of nice boxes for remote control use. I like them very much: http://gr.mouser.com/Search/ProductDeta ... 46-1553AGY

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sun Feb 26, 2012 10:51 pm
by philip davies
Hi Fotis,

Fair enough that you think your idea is better, much cheaper approach than mine :D

If I remember correctly farnell adjust they're P&P charges up on the value of the goods (I think) and of course how quick you would like to receive the items. I have paid up to £5 - £10 for delivery. I think if you spend over £40 delivery is free.

I quite like the look of that enclosure, will be having a closer look tomorrow to see what's available on they're website and farnell's website. Mouser Electronics seem to charge me £12 for delivery if I spend under £50

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Mon Feb 27, 2012 12:01 am
by fotios
philip davies wrote:If I remember correctly farnell adjust they're P&P charges up on the value of the goods (I think) and of course how quick you would like to receive the items. I have paid up to £5 - £10 for delivery. I think if you spend over £40 delivery is free.
I quite like the look of that enclosure, will be having a closer look tomorrow to see what's available on they're website and farnell's website. Mouser Electronics seem to charge me £12 for delivery if I spend under £50
Phil, for that reason i told you to organize a group buy. I also have some parts in surplus, maybe you also have surplus of parts, we can exchange to save money. As for purchases either from Farnell or Mouser, we can make a BOM of what we need and i am sure that the total ammount will be enough for free p&p. Then, one of us will make the order (i trust you to post money in your PayPal account in advance :lol: what to hell!) and when receive the goods, he will post the parts to the other. A small parcel of up to 1kg, it costs from 3.5 - 10 Euro (registered) from Greece to UK via ordinary Post office and delivery is just 3 working days.
As for Farnell, i will send you a PM.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Mon Feb 27, 2012 12:22 am
by philip davies
Hi Fotis,

After reading that I can see a plan hatching :) I will PM you back!

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Wed Feb 29, 2012 12:06 pm
by fotios
Hiya
Here is the updated block diagram according to Philip request and suggestions.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Wed Feb 29, 2012 8:33 pm
by philip davies
Hi Fotis,

Thanks for posting the new block diagram, I think you have it all covered now to having a very high quality and versatile preamp :D

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Wed Feb 29, 2012 10:31 pm
by fotios
philip davies wrote:Hi Fotis,

Thanks for posting the new block diagram, I think you have it all covered now to having a very high quality and versatile preamp :D

Phil
Hi Phil
This moment i am working on a project - under request of a customer - almost same with this on the block diagram. You should know that there is one pin left over, so the total number of inputs could be increased to 7 instead the 6 shown on diagram. Currently, i try to arrange the two record loops; it is some complex. I think i will have ready the fcf tomorrow, i will post you to try it.
Phil, if you have the kindness please post me an e-mail in the direct address shown bellow in my signature - is my official e-mail address protected from my ISP - i would like to ask you about our plan regarding order of parts.

Edit: I forgot to inform you that just today the morning i finished a trial remote control "handset" using e-blocks. Success! :D I can have available any number of buttons (RC-5 commands) and transmition in any address. I will inform you about.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Wed Feb 29, 2012 11:39 pm
by philip davies
Hi Fotis,

Increasing the inputs from 6 to 7 would be a great addition to the number of inputs and a good way of using the spare pin of the MCU. I look forward to trying your fcf file when it's ready. Nice to hear that you have made a prototype remote control handset with success :D Good work :D

I will send you an e-mail now.

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Mar 03, 2012 7:16 pm
by philip davies
Hi Fotis,

Thought I would let you know that I eventually got round to trying one of those "One For All" remote handsets. I'm happy to inform that it does work :D the preamp recognises it as address = 0 which makes sense as the remote I've tried is for a TV set. I have also purchased a genuine Philips universal remote handset which I am currently waiting to receive.

Thanks Fotis

Phil

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Mar 03, 2012 9:20 pm
by fotios
philip davies wrote:Hi Fotis,

Thought I would let you know that I eventually got round to trying one of those "One For All" remote handsets. I'm happy to inform that it does work :D the preamp recognises it as address = 0 which makes sense as the remote I've tried is for a TV set. I have also purchased a genuine Philips universal remote handset which I am currently waiting to receive.

Thanks Fotis

Phil
Bravo Phil
I am very glad to hear it. For every problem there is allways a solution, i know it very well from my - 35 years - experience on electronics. The only that we have to do, are stubborn efforts.

P.S. Take a look in your e-mail box.

Cheers

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Tue Mar 20, 2012 5:31 pm
by Grahamm
My Preamplifier Interface PIC 16887h.fcf
Provisional design
(61.23 KiB) Downloaded 514 times
Greetings Fotios and colleagues
I have been trying, as a first project, to do a scaled down version of Fotios’ design. I am very grateful to Fotios for kindly sharing his knowledge. This is intended to be more of a preamplifier interface without active gain devices like a PGA2310. As I am a complete beginner to Flowcode (V4.5), it may be that I have been a bit too ambitious to do this as a first project, and I would very much appreciate some pointers or advice to get this design working properly. Afterwards, I can then look to changing macro/variable names and customising it a bit more so that it does not look too much like someone else’s effort.
What I am trying to do is to have:
• 4 remotely selectable inputs (CD, DVD, Tuner, AUX for example) which can switch either latching relays or solid state switches (yet to be decided).
• These same 4 inputs also to be manually selectable using a rotary encoder.
• A motorized pot for remote or manual gain/attenuation adjustment
• A ON/STANDBY pushbutton and a LED to indicate status.
• A MUTE pushbutton with a status LED.
• A LCD display indicating the input source, or volume (transiently, when activated remotely). If the volume pot is adjusted manually, it would not be necessary to indicate anything on the LCD display and therefore no feedback to indicate a change on the LCD would be required. If the volume is altered by remote control, a transient change of the display to, say, “Volume up” or Volume down”, could show before reverting back to displaying the input like “CD” for example.

Using a 16F887, the LCD display is provisionally connected to Port A, input switching outputs on Port D, RC-5 on RB0, Pwr/Stdby PB switch on RB2, Mute PB on RB3, Mute LED on RC1, Pwr/Stdby LED on RC2, Encoder pin A on RB6, Encoder pin B on RB7, and outputs to drive the Motorized Pot CW or CCW on RE0 and RE1 respectively.

I attach the fcf file in V4.5 that I have done so far. There is a provisional potentiometer macro which is not functional or complete. If anyone has a chance to look at this, I would be very grateful to receive any advice on what I have left out or done incorrectly and how I should proceed. I am having problems applying myself in a logical manner!

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Fri Apr 05, 2013 10:58 pm
by hyperion007
Is there a way to speed up the serial output in your code?
Since I am using the PGA4311 and I have to send 32 bits of data to the PGA chip and with all the 1us delays it adds upp to the point of not being able to read my 128ppr optical encoder fast enough, since the PIC is busy with bit banging out the serial data to the PGA4311.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Apr 06, 2013 5:31 pm
by fotios
hyperion007 wrote:Is there a way to speed up the serial output in your code?
Since I am using the PGA4311 and I have to send 32 bits of data to the PGA chip and with all the 1us delays it adds upp to the point of not being able to read my 128ppr optical encoder fast enough, since the PIC is busy with bit banging out the serial data to the PGA4311.
Hi
Try to reduce the 1us delays, say to half i.e. 500ns and then test again the code on your actual project. If it will works without errors then everything will be OK. To be sincere I don't remember the minimum time required by the storage registers of PGA4311 to securely latch the incoming serial data stream. Please let me know for the result.
BTW, what type is your encoder?

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Apr 06, 2013 7:54 pm
by hyperion007
But how can I reduce the 1us delays? Isn't 1us the minimum delay in Flowcode?

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Apr 06, 2013 8:51 pm
by fotios
hyperion007 wrote:But how can I reduce the 1us delays? Isn't 1us the minimum delay in Flowcode?
Yes, you are right about the minimum delay time given ready by Flowcode. Well, i don't know if this trick will works, but give a try: Right click with the mouse on Delay icon and from the drop down menu list select "properties", select first microseconds and then in the box "Delay Value" write exactly: 1*5/10 That could results in 0.5nsec. Please let me know.

Re: Hi-Fi audio preamplifier using Burr-Brown PGA2310

Posted: Sat Apr 06, 2013 10:44 pm
by dazz
Hi Fotios
Nice trick havent tried in hardware but it compiles ok
from the compiled c file

Code: Select all

//Delay
	//Delay: 1 * 5 / 10 us
	delay_us(1 * 5 / 10);

	//Delay
	//Delay: 1 * 100 / 55 s
	delay_s(1 * 100 / 55);

	//Call Component Macro

Regards
Dazz