Magnus' Aleph P 1.7 (was the Balanced Zen Line Stage (BOSOZ)) project pageWell, this is the new project per august 2002. This far I've covered:
I will divide my efforts in the following parts: Outline
News
PeopleAs for now (august 2002), we are two people who decided to build the preamp.
Hopefully I'll order the stuff in the next couple of weeks. The projectIntroThis is not my first "do it yourself" (DIY) project. So far I've built a couple of amplifiers, a set of speakers and some cables. I've come to the conclusion that I need a decent pre amplifier. There are several reasons for that, though a simple attenuator (yet another previous project) is usually good enough (if not better) compared to a complex (or not so complex) pre amplifier design. An attenuator has very few parts, a very short signal path, and (usually very important) a low price. One of the shortcomings with an attenuator is, no supprise, that it only attenuates the signal from the source, which is usually a CD or casette player. There is no amplification at all. In most cases, this is not a problem. The signal coming from a normal source is usually in the 1 - 2 volt ballpark. This is perfectly fine. A power amplifier will amplify the input signal with a fixed amplification, which is usually stated in Db. This is probably not as easy to understand as to say "this amplifier will make the signal XXX times bigger", but if you know how to decode it, then it is not a big deal. A decent power amplifier (i.e the Leach Amp I've built) usually amplifies the input signal close to 26 dB, which gives plenty of headroom to use an attenuator. To understand this, you use the following formula:
26 dB makes about 20 times amplification of the input signal. So for the Leach Amp's output peak of some +/- 50 volts or so to the speaker, one need to input about 2.5 volts from the CD player. For a 1 volt input signal, you will have 20 volts on the output. 1 volt is usually close to the maximum voltage you get from using an attenuator (the combination of some recordings and some CD players might get you a higher value after the attenuator, but in my case it is close to 1 volt). This is normally enough, since seldomly need very much to fill up a room with noise. The Leach Amp is rated 120W, so if you loose some of the dynamics in it because of the attenuation of the input signal, it won't hurt you much. For another amplifier I've built, the Aleph 30, the amplification is only 20 dB. This doesn't seem to be much of a difference from the Leach Amp's 26 dB, but the difference is quite large. The Aleph 30 only amplifies the input signal 10 times instead of the Leach Amp's 20 times. Maybe not much of a difference there either (especially since the Aleph 30 is only rated 30W at a peak output of some +/- 20 - 25 volts to the speakers). But two times the voltage gain makes four times the power gain. Attenuating the input signal will have much more effect with the Aleph 30 than with the Leach Amp. Look at the following few lines:
With this in mind, and that a typical speaker load commonly is considered to be 8 ohms, you can see that for my Leach Amp, 1 volt on the input will give (maximum) 20 volts on the output -> P=20*20/8 Watts (=50 Watts, which is a lie. May be for a brief moment, but if we talk about RMS values, we divide this by 2). The Prms = 25 Watts, which is plenty (sure, it really is). For my Aleph 30, this is not good enough. 1 Volt on the input will give 10 volts on the output -> P=10*10/8 (=12.5 W, which still is a lie -> divide by 2 to get RMS) Prms = 6.25 Watts. That is quite a difference in the output power I get from the same input signal. Hence, my attenuator have to go... (you should know, though, that for the actual sound preassure to increase and make you believe the sound is twice as high, you need seven times the power... 30 Watts is plenty in a "working class", plain old livingroom, as the ones I'm used to. You need a 210W amplifier to say that it is twice as "good"/"loud" as my 30W, which in sound quality is not even true) Also, there are words out there (on the net offcource), saying that the Aleph 30 needs a good pre amplifier. I agree. Both because I like my Aleph a lot (so I want to play it as much as I can), AND (more important) it is a new project. I get to build stuff... I tried the attenuator on my Aleph 30 and it wasn't enough. Then I tried the crappy pre amplifier in my old NAD, which by the way had a broken output stage, so it was only useful as a pre amplifier anyways. It worked a lot better than the attenuator, but since I have my ProAc 2.5 clones connected to my Aleph, I kind of felt like it was time to do something about the next step before the power amp. Once you get started, it will never end. This hobby is like a disease. Phew, you are probably getting quite tired of reading my excuse for building something new by now. Well, here I am, no more excuses. The choice on building the Aleph P 1.7 was easy. Many people all over are perfectly happy with the Aleph P and it is designed by Nelson Pass, who has designed the whole Aleph series. I though I would just go for it and give it a try. After all, I'm very happy with his work so far. The design is pretty straight forward. It is a class A design, having only a single balanced gain stage. Simple enough. Complex enough. It's a beauty. I will not go into the workings and design of the pre amplifier. There are better sites on the net for that. I will describe how I built mine, which parts I bought, and give some hints on how I did the tricky parts. My goal is that others might use my words to save some time when they build their Aleph P's. Purchasing the partsHere is a table of most of the parts needed for an Aleph P 1.7.
Building the powersupplyWhen it comes to the powersupply, I made a decision that I wanted to separate the whole thing as much as possible. This, because I had not made up my mind on which type of relays to use for the attenuator. I didn't feel confident on building a hefty PSU with all the features. I will have three boards supplying power per channel.
This, and the fact that the PCB software I use have certain limitations concerning space (100 x 80 mm), called for separate boards. Here is a drawing of the first draft of the PSU board. I'll post pictures as soon as I get hold of a camera. It is built and tested, and everything is OK. It takes a while for it to get to the regulated 60V, but if you look at the schematics, you will see that C27 is slowly charged from 0V to some 64V through R118 (4.7Kohm) at startup. I used a spare IRFP644B from Fairchild instead of an IRF610 (from IR) for Q23. It has a higher voltage rating than the original (250V instead of 200V), though it has a little lower Rds (Resistaince between Drain and Source). I cannot claim I actually know exactly what that mean, but for a powersupply it very little difference. The important thing for Q23 is that it has a voltage drop of about 3 - 4V and that you can put some current through it for the regulation. I had it laying around in my scrap box and I didn't have any "real" IRF610 at the moment. Nowdays I get so few chances to play around with my electronics stuff, that I'm willing to make a few compromises just to get it done. The muting board will look like this: ![]() The muting relay board is not yet built, but it comes next on my task list. It is a small but very clever circuit. It consists of two different switching FET's. Q21 will turn on immediately when there is more than a few volt available on the power rail. It will also shut off really quickly when the power goes off. The FET Q22 will not turn on immediately. The Resistor Ladder R113+R114 effectivelly divides the 80V from the power rail get up to some 40V over R113 ( U over R113 = Vrail*(R114)/(R113+R114) ), also effectively limiting the current with their high values, when C31 is fully charged. This will take a short wile, but enough for the rest of the pre amp to stabilize, before the FET Q23 will start to conduct and let the muting relay turn on. One can say that Q23 is used as a delay, making sure the muting relay doesn't turn on too soon at power on, and Q22 is used to shut the muting relay off VERY quickly, as soon as the amp is turned off. Both FET's has to conduct in order for the muting relay to be turned on. Building the preamp boardsOn december 17 I etched and populated a board that looks like this: ![]() It didn't work. ;=) Something is wrong, and I have to troubleshoot it. (wow fixed it) Dec 20 2002, I had put a BC546 instead of a BC556 in place of the ZTX550. It works! Building the volume controlBuilding the volume control is an autonomous stage of the project. This is probably the last part of the building blocks needed for the final result. Until I get it built and tested, the rest of the preamp is actually being used, driven through a simple shunt attenuator (just a hight quality potentiometer + one resistor per channel). Also, the drawing for the relay controlled attenuator in the Aleph P is quite beautiful, when you get the whole picture. It is designed (cleverly) to give the exact same output resistance for the pre-amp board at all times. The resistors that are not connected from the pre-amp board to the output binding post of the box, is connected from the output binding post to ground. The resistors that are connected to the pre-amp board are connected in parallel, forming Re1 in the picture below. The "unconnected" resistors form (also in parallel) Re2. ![]() The ratio Vin//Vout is as follows Assume that Vin is 1[whatever unit], you get the relative damping right away as { damping = Re2 / (Re1 + Re2)}. You can have a look on my (really crappy) simulation in M$Excel here. There are a few things to do, in order for this to succeed.
The simplest possible relay driver is just a handful of cheap components; A transistor, one or two resistors and a diode. ![]() A LED is optional, but makes the whole thing look cool, and just a little bit easier to debug. To make the relay drive, you must make sure that there is enough current through the coil. This is easy to calculate, since the coil resistance is printed in the relay datasheet. In my case I use a 12V relay having 720 ohm resistance, hence the need for some 17mA current for it to drive (I=U/R -> I=12/720=0.01666...A). My (optional) LED together with it's companion resistor (R1) will burn off some 10mA as well. This means that the relay driver transistor has to cope with around 30mA collector current (10mA + 17mA = almost 30mA). The transistor I have in excessive amounts in my scrap box is MPSA06 (a NPN transistor having a beta value of more than 100). In order for that transistor to drive 30mA through the collector I have to make it saturate. This is done by sending a large enough current through the base of the transistor, see formula below. A bipolar transistor is driven by current, to be more exact the base current. But even if I try and make the Ic to be bigger than 30mA it will not go higher, since the current will be limited by the relay's and the LED ballast resistor's resistance. It is good though to force it into saturation (to allow for the current to be higher than 30mA). In my case, using the MPSA06, the base current has to be as lowest 0.3mA to drive the relay (Ib = Ic / beta -> Ib = 30mA / 100 = 0.3mA). I will use 5V and a CMOS latch to control the driver, which needs a ballast resistor (R2) to control the current to be just a little bit more than 0.3mA. The transistor will sink 0.6 volt from the base to earth. This leaves 4.4 volts to be sunk over the ballast resistor, which therefore has to be less than 14.7k to allow for more than 0.3mA to go through (R=U/I -> Rb = 4.4/0.0003 = 14666.7 ohm). In this case, I just let this go down to 10k to make sure the transistor saturates. The diode (D1) in the circuit is used to protect the transistor when the relay is turned off. The coil whill store a small amount of energy, which (if we don't use the diode) would EMF shock the transistor when there is no longer a current flowing throu the coil (actually only for a really short period, just when the current is shut off). One could have a lower value for R2, though one should use as large value as possible, to dissipate as little power as possible when the latch is pulling Q1 (leg 19) to ground. In this case, when the relay is shut off, there will be 5V sunk over R2 to "ground", through the latch (and the base of the resistor will be at 0Volt - shut off), at a current of 0.5mA (actually higher than when the relay is turned on). While this is not much power after all (P=U*I -> P=5*0.0005 = 2.5mW ), we should all save some for later use. ;-) Finally, I got myself to the point of actually designing the relay board. The scematic looks like this: And the PCB looks like this: So, now it is time to develop some software for decoding the volume knob and the input selector. The mechanical knob itself is an Alps rotary sensor (ELFA part no: 35-847-60), which gives a pulse train on two connectors (later called most significant bit, msb, and least significant bit, lsb). This pulse train indicates the direction the knob is turned. The pulsetrain is read as two bits, giving four possible states. These can be formalized as a statemachine as shown below.
It is pretty straight forward to see how it works when you put it in a statemachine. To decode this, using the PIC, there is two ways of doing it. Either enable some interrupts on the input ports, or poll the input regularily and compare the result between the readings. Interrupts are a pain to use for a beginner (like me). Polling is more my playground. Some pseudo code below describes how to decode the rotary sensor.
I am not ignoring "illegal" transitions (eg. from 0b00 to 0b11 is an illegal transition). I just decrease the volume in that case. In the example above, the only thing than can make the volume go up, is a "legal" inc-transition. All other transitions just make the volume go down. The assembly language code is a little different from the pseudo code, which is more readable. I believe most people with some programming experience get the grip of the rotary decoding by reading the pseudo code. The same algorithm will be used to decode the input selector. Below is the code I use for my volume control. PIC16F84A code;*****Set up the Constants**** STATUS equ 03h ;Address of the STATUS register TRISA equ 85h ;Address of the tristate register for port A PORTA equ 05h ;Address of Port A TRISB equ 86h ;Address of the tristate register for port B PORTB equ 06h ;Address of Port B COUNT1 equ 08h ;First counter for our delay loops COUNT2 equ 09h ;Second counter for our delay loops SHIFT_COUNT equ 0ah OUT_COUNT equ 0bh SHIFT_DATA equ 0ch VOLUME equ 10h OLD_VOLOUT equ 11h VOLOUT equ 12h OLD_STATE equ 0eh NEW_STATE equ 0fh ; Rotary encoder är kopplad till PORTB bit 0 och bit 1 ; Shiftregistrets klocka är PORTA bit 0 ; Shiftregistrets databit är PORTA bit 1 ; Latchen är kopplad till PORTA bit 2 clockbit equ 0 databit equ 1 latchbit equ 2 PC equ 0x02 rp0 equ 5 C equ 0 Z equ 2 ;****Set up the port**** org 0x000 bsf STATUS,rp0 ;Switch to Bank 1 movlw b'00000000' ;Set the Port A pins movwf TRISA ;to output. movlw b'11111111' ;Set the Port B pins movwf TRISB ;to input. bcf STATUS,rp0 ;Switch back to Bank 0 ;**** Blinka med databiten för att visa att det är en reset... bsf PORTA,databit call Loop1 call Loop1 call Loop1 call Loop1 bcf PORTA,databit ;****Initialize volume**** movlw b'00000000' movwf VOLUME movwf VOLOUT movwf OLD_VOLOUT ;*************************************************** ;****Main Loop**** ;*************************************************** Start movf PORTB,0 ; Read in rotary state andlw b'00000011' movwf OLD_STATE movf VOLOUT,0 call Shift_Out Rotary_Loop movf PORTB,0 ; Read in rotary state andlw b'00000011' ; Just the two lower bits are important bcf STATUS,Z movwf NEW_STATE ; Store state as "new" subwf OLD_STATE,0 ; Compare to old state btfsc STATUS,Z ; If zero flag is clear, skip next instruction goto Rotary_Loop ; if something happens, call decode_statechange call Decode_Statechange movf VOLUME,0 call Lookup_volume movwf VOLOUT ; This is for "releasing the unused relays" andwf OLD_VOLOUT,0 ; Just a tiny moment before activating call Shift_Out ; the new value for the volume call Delay_Loop1 ; Short delay movf VOLOUT,0 movwf OLD_VOLOUT ; Save the volume as OLD_VOLUME call Shift_Out ; Send out the new volume on the shift/latch registers movf NEW_STATE,0 ; Save the state as old_state movwf OLD_STATE goto Rotary_Loop Short_delay decfsz COUNT1,1 ;Subtract 1 from 255 goto Short_delay ;If COUNT is zero, carry on. ;*************************************************** ;****Start of the delay loop 1**** ;*************************************************** Delay_Loop1 movlw d'8' movwf COUNT2 Loop1 decfsz COUNT1,1 ;Subtract 1 from 255 goto Loop1 ;If COUNT is zero, carry on. decfsz COUNT2,1 ;Subtract 1 from 255 goto Loop1 ;Go back to the start of our loop. ;This delay counts down from ;255 to zero, 255 times return ;*************************************************** ; 2003-03-03 ; ML Shift_Out ;*************************************************** Shift_Out movwf SHIFT_DATA movlw 08h movwf SHIFT_COUNT Shift_Out_Loop1 rlf SHIFT_DATA,1 ; Shifta data ; Tänd eller släck data-signalen btfss STATUS,C goto Shift_clr_data Shift_set_data bsf PORTA,databit ; Tänd data goto Shift_done_data Shift_clr_data bcf PORTA,databit ; Släck data Shift_done_data bsf PORTA,clockbit ; Sätt clock (för att shifta ut den) bcf PORTA,clockbit ; Stäng clock (nu är en bit utshiftad) decfsz SHIFT_COUNT,1 goto Shift_Out_Loop1 ; Hoppa tillbaka 8 gånger bcf PORTA,databit bcf PORTA,clockbit bsf PORTA,latchbit ; Latch out the data (set latch) bcf PORTA,latchbit ; Clear latch return ;*************************************************** ;*************************************************** Decode_Statechange test_increase_statechange t11_to_01 ; From 11 to 01 -> Increase movlw b'00000011' subwf OLD_STATE,0 btfss STATUS,Z ; if equal check more goto t01_to_00 movlw b'00000001' subwf NEW_STATE,0 btfss STATUS,Z ; if equal check more goto t01_to_00 goto increase t01_to_00 ; From 01 to 00 -> Increase movlw b'00000001' subwf OLD_STATE,0 btfss STATUS,Z ; if equal check more goto t00_to_10 movlw b'00000000' subwf NEW_STATE,0 btfss STATUS,Z ; if equal check more goto t00_to_10 goto increase t00_to_10 ; From 00 to 10 -> Increase movlw b'00000000' subwf OLD_STATE,0 btfss STATUS,Z ; if equal check more goto t10_to_11 movlw b'00000010' subwf NEW_STATE,0 btfss STATUS,Z ; if equal check more goto t10_to_11 goto increase t10_to_11 ; From 10 to 11 -> Increase movlw b'00000010' subwf OLD_STATE,0 btfss STATUS,Z ; if equal check more goto test_decrease_statechange movlw b'00000011' subwf NEW_STATE,0 btfss STATUS,Z ; if equal check more goto test_decrease_statechange increase goto increase_volume test_decrease_statechange ; From 00 to 01 -> Decrease ; From 01 to 11 -> Decrease ; From 11 to 10 -> Decrease ; From 10 to 00 -> Decrease decrease goto decrease_volume ;*************************************************** ;*************************************************** ; 2003-07-03 ; ML increase_volume ;*************************************************** increase_volume movlw d'61' subwf VOLUME,0 btfsc STATUS,Z goto increase_volume_no_increase ; if volume is already 0 movlw d'1' addwf VOLUME,1 increase_volume_no_increase return ;*************************************************** ; 2003-07-03 ; ML decrease_volume ;*************************************************** decrease_volume movf VOLUME,1 btfsc STATUS,Z goto decrease_volume_no_decrease ; if volume is already 0 movlw d'1' subwf VOLUME,1 decrease_volume_no_decrease return ;*************************************************** ; Lookup table ;*************************************************** Lookup_volume addwf PC,1 retlw b'00000000' ; Volym 00 retlw b'00000001' ; Volym 01 retlw b'00000010' ; Volym 02 retlw b'00000011' ; Volym 03 retlw b'00000100' ; Volym 04 retlw b'00000101' ; Volym 05 retlw b'00000110' ; Volym 06 retlw b'00000111' ; Volym 07 retlw b'00001000' ; Volym 08 retlw b'00001001' ; Volym 09 retlw b'00001010' ; Volym 10 retlw b'00001011' ; Volym 11 retlw b'00001101' ; Volym 12 retlw b'00001110' ; Volym 13 retlw b'00010000' ; Volym 14 retlw b'00010010' ; Volym 15 retlw b'00010100' ; Volym 16 retlw b'00010111' ; Volym 17 retlw b'00011010' ; Volym 18 retlw b'00011101' ; Volym 19 retlw b'00100000' ; Volym 20 retlw b'00100100' ; Volym 21 retlw b'00101001' ; Volym 22 retlw b'00101101' ; Volym 23 retlw b'00110011' ; Volym 24 retlw b'00111001' ; Volym 25 retlw b'01000000' ; Volym 26 retlw b'01001000' ; Volym 27 retlw b'01010000' ; Volym 28 retlw b'01011010' ; Volym 29 retlw b'01100101' ; Volym 30 retlw b'01110010' ; Volym 31 retlw b'01111111' ; Volym 32 retlw b'10001111' ; Volym 33 retlw b'10100001' ; Volym 34 retlw b'10110100' ; Volym 35 retlw b'11001010' ; Volym 36 - 202 retlw b'11010010' ; Volym 37 - 210 retlw b'11011001' ; Volym 38 - 217 retlw b'11011110' ; Volym 39 - 222 retlw b'11100010' ; Volym 40 - 226 retlw b'11100101' ; Volym 41 - 229 retlw b'11101000' ; Volym 42 - 232 - retlw b'11101011' ; Volym 43 - 235 retlw b'11101101' ; Volym 44 - 237 retlw b'11101111' ; Volym 45 - 239 retlw b'11110001' ; Extravolymsteg - 241 retlw b'11101101' ; Extravolymsteg - 237 retlw b'11101111' ; Extravolymsteg - 239 retlw b'11110001' ; Extravolymsteg - 241 retlw b'11110010' ; Extravolymsteg - 242 retlw b'11110101' ; Extravolymsteg - 245 retlw b'11110110' ; Extravolymsteg - 246 retlw b'11110111' ; Extravolymsteg - 247 retlw b'11111000' ; Extravolymsteg - 248 retlw b'11111001' ; Extravolymsteg - 249 retlw b'11111010' ; Extravolymsteg - 250 retlw b'11111011' ; Extravolymsteg - 251 retlw b'11111100' ; Extravolymsteg - 252 retlw b'11111101' ; Extravolymsteg - 253 retlw b'11111110' ; Extravolymsteg - 254 retlw b'11111111' ; Volym 61 - 255 ;****End of the program**** end ;Needed by some compilers, ;and also just in case we miss ;the goto instruction. Here is a picture of the relay board and the control board (still on the experimental board). The circuit board with the big black caps on the left is the amplifier board for one channel.
Building the enclosureHere is a picture on the front (as it looks like at the moment)
N/A PartsHere is a PDF with the parts I need for the project. It is by no means complete and is just a help for me to get the parts I have decided for. The power supplyPreamp boardMisc
PicturesNo pictures yet.
I've created a few circuit boards, which I publish here after I built and tested them.
Since one of my goals is to help other people getting started as well, I'll just go ahead and list my references and links on the web.
Links in no particular order:
Links referenced to in the text above
|