electronik

Upload: stan-patitul

Post on 09-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 electronik

    1/13

    Build your own FREE website at Tripod.comShare: Facebook | Twitter | Digg | reddit

    Jim'sWeirdWiredWorld

    Electronics/MOSFET IntegratedAmplifier

    MOSFET IntegratedAmplifier

    This is my first attempt at building a "proper" amplifier for general use, as

    opposed to the Mixer-Amplifier I had made earlier. This amp was made

    without too much concern to cost, hence several of the approaches I've takenmay be sub-optimal from the cost perspective.

    Overview

    y Microcontroller-controlled preamplifier, with infrared remote controlcapability. Volumeandothersettingsstoredinbattery-backed RAM.

    y LCDDisplay for volume, etc.

    y Three general-purpose line-level inputs, one tape input, one tape

    output.

    y 70W MOSFET-based stereo power amplifier.y Headphoneoutput.

    y +/-38V at 4A and +/-5V at 500mA power supplies.

    Microcontroller Unit (MCU)

    This forms the central control secion of the amplifier. It is based on a

    PIC16F84A microcontroller from Microchip.

    Themicrocontrollerisconnectedtothefollowingperipherals:

    y LM1973 Pot digital audio attenuator.y DS1302 real-time clock (RTC).

    y 2x16 character mode LCD through a 74HC163 shift register.

    y CD4094 latched shift register, acting as general purpose output ports.

    These ports are connected to CD4052 analog multiplexers which

    funcion as input source selectors, tape monitor selectors and Bass Boostmode selectors. It's also connected to the LCD panel's register-select

    pin and the speaker muting relay driver.

    y TSOP1736 IR receivermodule.y Three-buttonkeypad.y Headphone socket swtch, used to indicate to the MCU that headphones

    are plugged in, and to mute the main speakers.

  • 8/7/2019 electronik

    2/13

    The 16F

    ischeap fas

    and has jus

    the right amount of memory for the

    task Itdoes not have enough I/O ports for all functions in this application,

    hence I had to use serial "port extenders": usingshiftregisters to store data

    sent out over an SPI-Busstyle interface. SPI bus needs to be used any

    ay, tocommunicate with the RTC and the Pots.

    MOSF

    T Integrated Amp Controller CircuitConnector JP2 goes to the Pot on the preamplifier board. The LCD

    connects through a standard Berg header. Some modules have a 2x8

    connector in place of a 1x16, I'm notsure of the pinouts.

    The 16F84 runs off a 4MHz crystal, so it can execute roughly 1 million

    instructionspersecond: more than enough for the task. It has 1k of internal

    Flash program memory, 64 bytes EEPROM and 68 bytesRAM. The software is

    written in the 16F84's assembly language, assembled with MPL AB anddownloaded to the target through a home-made 16F84 programmer. The

  • 8/7/2019 electronik

    3/13

    keyboard port, connected to RB7-RB4 is also used as the in-systep

    programming (ISP) port. To do this, the MCLR pin is also brought out to the

    connector. The only disadvantage with this is that programming for the

    keypad was difficult; you have to remove the programmer and re -connect the

    keypad before you could test the new changes. The software (.ASM file) is in

    the file preamp_ctl.zip (9kB, version 1.3). I've tried to comment parts of the

    code, but it's not complete. The code currently has no known bugs.I originally intended the speaker muting relay and tape monitor ports to go

    to three general-purpose LEDs, hence the series resistors. They might,

    however, be a good idea, especially with the Pot connection, as it will serve

    to increase risetime, and reduce the signal coupling between the audio signals

    and the digital control signals.

    The DS1305 RTC has a 32 kH

    timekeeping crystal. It's main use is for it's

    96 bytes of battery-backed NVRAM, which are used to store the current

    volume, input source and bass-boost selections, even when the power is

    removed. I could have used the PIC's EEPROM for this, but it has a limited

    number of write cycles. I'd either have to have a brown-out detection circuittrigger an interrupt to make the PIC write to EEPROM, or live with a limited-

    lifetime amplifier. Using NVRAM is easier. The MCU talks to the RTC through

    an SPI bus (SCLK, SDI and SDO pins). The DS1305 includes a programmable

    trickle-charger which can be configured through the SPI bus.IC2 is a CD4094 shift register and latch. Data from the MCU is clocked in

    serially through the D and CLK pins. When the strobe pin STR receives a

    rising edge, the data from the shift register is internally latched and fed to the

    outputs. This ensures that the outputs do not change state when the MCU

    clocks data into or out of any of the other devices on the SPI bus (RTC, Pot,

    etc). IC3 is an 8-bit SIPO shift register. It behaves like the 4094, but there isno latch. This is because its outputs drive the LCD module, which has an

    internal latch.

    Preamplifier

    The Preamplifier section uses an opamp-based circuit to provide a total of

    +6dB gain, Volume control and two-step Bass Boost. Opamps used are the

    MAX414 low voltage, low-noise opamps.

  • 8/7/2019 electronik

    4/13

    MOSFET Integrated Amp Preamplifier Inputstage.

    The first stage (IC1A and IC1B) uses a non-inverting amplifierconfiguration. Looking at the channel based on IC1B, R13 and C8 provide RF

    suppresion, C11 andR8 behave as an LPF, andsets the input impedance ofthe preamp at 100k. R10 andR15 set the gain of thisstage at 2 (6dB). C1,

    C5, C6 and C10 provide supplybypassing. Mount C1 and C10 near the IC.

    In addition to the inputstage, thisdiagram includes a pair ofbuffers(IC1Cand IC1D) used at the output of the Pot, which has a high output

    impedance.

  • 8/7/2019 electronik

    5/13

    MOSFET Integrated Amp Pot

    The LM1973 Pot is the digital volume control chip used in thisproject. It

    contains three digitally adjustable audio attenuators with a 78dB adjustment

    range, and > 100dB mute. It accepts settings changes via an SPI-bus

    compatible interface. In the circuit, JP5 connects to JP2 on the controller

    board. It has one distinct advantage over similar devices made by Dallas

    Semiconductor, etc. in that it uses a split supply. Thus, no exta couplingcapacitors are needed to interface these to opamps.

  • 8/7/2019 electronik

    6/13

    MOSFET Integrated Amp Bass Boost and Driver

    The Bass Boost section provides two switchable levels of Bass

    enhancement. The input audio is first low-pass filteredby a second-orderLPF,

    whose cutoff frequency is 100Hz. The LPF isbuilt around IC2C and IC2DThe

    output of the LPF isgiven to a MUXbased on a CD4052. This mux can choose

    between ground, an attenuatedversion of theLPF, and the full

    LPF output.The selected MUX output issummed with the original audio, yeilding a Bass

    Boostedsignal. The outputs of thissection are fed to the final powerstage.

    The trimpotsR21 andR25 are used to set the bass level for the low-bassmode. This is usually not just the midpoint (50%) level, it's somewhere like

    70%. Itcan be adjusted to personal taste. IC2A and IC2B act as the summing

    amplifier and output stage driver. 100 resistors R11 and R16 are used to

    prevent the loadcapacitance from causing instability in IC2A and IC2B. 2 F

    couplingcapacitance isprovided.

    Input Selector

  • 8/7/2019 electronik

    7/13

    MOSFET Integrated Amp Input Selector

    The Input Selector isbuilt around two CD4052 analog multiplexers. IC2 isused to select the input source (CD/AUX1/AUX2) and IC3 is used to choose

    either the source selected above, the tape monitor or the tape monitor after

    noise reduction using National Semiconductor's LM1894 Dynamic Noise

    Reduction (DNR)chip. The DNRsection isbuilt around IC1, and isdiscussed

    on th s pag . JP1-3 are the source inputs, JP5 is the tape monitor input. R1adjusts the DNR level. This is adjusted while listening to a softpassage to just

    above the point where the quietest part of the programme material "drops

    out". JP4 and JP7 come from the MCU board and are used to select the inputs

    and tape monitor. JP8 is the tape-out port, and has the currently selectedinput. It is notbuffered, but itshouldbe. JP6 is the connection to the preamp

    board(both power andsignal). 1M resistors are provided to ensure that theinput capacitors of the preamp do not cause popping when inputs are

    switched from one source to the other.

    Headphone Amplifier

  • 8/7/2019 electronik

    8/13

    MOSFET Integrated AmpHeadphone Amplifier

    The headphone amplifier is based on National Semiconductor's LM4880

    headphone amplifierchip. Itreduces the size of the headphone amp used.

    Power Amplifier

  • 8/7/2019 electronik

    9/13

    MOSFET Integrated Amp Power Amplifier

    Thiscircuit is from David White's article in Electronics World(August 2001).

    It uses inexpensive HexFet Power MOSFETs as outputdevices. Since theirtransconductance is low, the rest of the design isgeared towardsproducing

    maximum open-loopgain. Overall Negative Feedback is used to set the gain

    to 27dB and to reduce the distortion.

    The input devices used (2SA970) are low-noise, high gain PNP devices.

    They have poorVce(max), so their supply voltage is reduced using a simple

    Zener diode regulator built using R3, ZD1 and C3. T1 is used as a current

    source. The author of the original EW article mentioned using a plain gate-source connected JFET, which isselected to produce 1mA current. AtRs. 25 a

    pop, I was not about to do this with BF245s. Besides, the current for my G-S

    connected BF245s is around 7mA. Insert a resistance in series with the source

    to reduce the current. Since the source-drain current is dependent on the

    manufacturing process, you should select the resistor for each BF245 in amultiple-amp. system. The value should be selected for 1mA current. If

    required, use a 1kpot here.

  • 8/7/2019 electronik

    10/13

    C1 forms the input blocking cap, but is shorted with a jumper because the

    blocking capacitor is already present on the preamp board. R1 and R2,

    together with C2 form an RF suppression network at the input. R2 sets the

    input impedance at 47k . R4 and R5 are the collector loads for T2 and T3. I

    found that using a current mirror did not improve the THD rating of the amp

    (at least in Spice), so I dropped that idea. ZD2 (A 2.7V Zener), C4 and C5

    prevent the base of T4 from getting beyond 2.7 V in the event of amplifierclipping, output device failure, etc.

    T9 and T10 forms the voltage amplifer stage (VAS). The original circuit

    recommended using 2SD756 transistors, which I couldn't find. The BF420 is

    similar, with slightly lower beta. It's a differential stage, with a constant

    current source formed by T6, T7, LD1, LD2, R10 and R11. A Wilson current

    mirror, formed by T4, T5, D1, R8 and R9 acts as the collector load for T9 and

    T10, ensuring maximum gain. T8, R13-15, RV1D2 and D3 form the voltage

    offset between the gates of the output devices, to bias them into Class AB

    operation. RV1 sets the bias current. T8 should be in thermal contact with the

    output devices. R10 and R19 are used to limit the current drawn by the gatecapacitance of the output devices. C6 and C7 form the Miller capacitors.

    Remember that you will need to change this if any of the transistors are

    substituted with different ones. I used styroflex capacitors here. R16, R17, C8

    and C10 act as LPFs to filter the supply to the VAS and input stage.D4, D5, ZD3 and ZD4 form a rudimentary short circuit protection for the

    output MOSFETs. It will limit the current long enough for the supply fuses to

    blow. C11, C12, C14 and C15 are supply decoupling capacitors. C12 anc C15

    should be placed near the MOSFET drains. C13 and R20 form the Zobel

    network, used to compensate for the speaker coil's rising impedance with

    frequency. L1 is a 10 ohm, 1W resistor with around 10 turns of enamelledwire wrapped around it, connected in parallel. This is used to prevent the

    speaker cable capacitance from causing amplifier instability. The circuit shown

    uses two paralleled MOSFETS, although this is not required; it just gives

    addiional stability. It may be necessary to insert0.1 or 0.22 ohm 5W resistors

    in series with each source before paralleling the MOSFETs, to prevent current

    hogging.

    R7 and R6 form the feedback network. These set the gain at 27dB. Ifoscillation is a problem, R7 can be bypassed with a 100pF or so capacitor.

    Note the separation of the signal and power grounds in the circuit. The

    input stage is referenced to the signal ground GND A. The decouplingcapacitors on the supply current are referenced to the power ground (GND).

    Also note that the outputZobel network is referenced to a third ground

    labeled GNDIO. GNDIO must be connected to the speaker connection posts'

    ground terminals, which are then wired directly to the power supply via a

    thick ground lead. A jumper is provided between GNDA and GND. I found that

    this jumper had to be cut to give hum-free operation, but your configuration

    may yield different results.

  • 8/7/2019 electronik

    11/13

    Power Supply

    The power supply for the amplifier has two sections: the low-voltage and

    high voltage sections. The high voltage section produces an unregulated+/-

    38V for the power amplifier. The low voltage section provides+/- 5V for the

    analogsections(preamp, inputselector, etc.) and+5V for the digital sections

    (MCU, LCD display, etc). It uses a custom-wound transformer, with 30-0-30@ 4A main windings and 12-0-12 @ 500mA auxiliary windings. A third 0-12winding isprovided fordriving the speaker mutingrelay.

    MOSFET Integrated Amp Power Supply

    The inputvoltage (erroneously marked "30V in")connects to a 35A bridge

    rectifier's+ and - terminals. The Bridge's AC terminalsgo to the extreme ends

    of a 30-0-30, 4A transformer. The transformer's center tap connects to themiddle pin (X1-3). The fuses I used are 5A slow-blow types. The connector

    labeled JP1 connects to the transformer's auxiliary (12-0-12) windings. The

    100nF capacitors C7-C12 should be placed near their respective regulators.

    C13-15 are tantalum capacitors. Three indicatorLEDs are provided to act as

    indication that one of the supplies is shortcircuited. They also behave as aminimum load for the regulators.

    Speaker Muting

  • 8/7/2019 electronik

    12/13

    MOSFET Integrated Amp Speaker Muting

    The speaker mutingcircuitpresented here uses the MCU to switch on the

    speakers after a short delay. The amount of delay can be software

    programmed. At switch-off, the local supply voltage (derived from thetransformer's auxiliary 0-12 winding)collapsesvery quickly, switching off therelay. The headphone jack includes a switch for speaker muting, this is

    sensedby the MCU (through portRB7), which then switches off the speaker.The circuit's input(J1.2)connects to the MCU'sspeaker mute relaypin (JP5.3,

    on the MCU board). A logic high at thispin switches on the relay, and hence

    the speakers. The relays usedshould have a 10A DC contactrating, otherwise

    seriousdamage can result. TheZenerdiodeused(ZD1) is a 12V type.

    Construction

    The various PCBs were built on Veroboard, excepting for the poweramplifier. These were made on FR4 PCBs, with a goodgroundplane, etc. The

    output devices were laid flat on the board, with an aluminium L-section

    between the devices and the board. This L-section is then bolted onto the

    heatsink.

    The amp wasbuilt into a standard amplifiercase (from Dexa). It, however,

    neededsignificant modification for this amplifier. A large hole had to be cut inthe rear to insert the heatsink. Rectangular hole was made in the frontpanel

    to insert the LCD panel. The tape selectorslots were used to implement the

    menu and up/down keys. One of the other switch slots was used for the

    infrared sensor. The cutouts for volume/balance/tone pots were used for

    front-panel input(RCA jacks), speaker active LED and headphone socket.

    Disclaimer

    These circuits are provided foryour own study only. They all deal with electricity and electronics, asufficientknowledge ofboth is assumed. I will not take anyresponsibilityfor anypersonal injury or

    damage to property arising from use or abuse of the information provided on these pages.

  • 8/7/2019 electronik

    13/13

    This page 2003 Jim George. Last updated on 02/27/03