SA2022 - Modular High End Analog Precision Preamp (with headphone amp, digital controlled relay volume, monitor output, IR remote, SE and bal. I/O)

Tony knows this but others might not, the NEC IR protocol uses a address (6-bits) and command (7-bits) structure, so the sender and receiver usually need to use the same address and the receiver must understand what functions must be implemented based on the commands that are sent.
Many moons ago I built a IR remote sender using a Atmel attiny2313, that I can share the source code and schematic but making a nice package is the challenge since I did mine on a protoboard. Also, since I wrote my code in bascom-avr you need that compiler and a programmer too
 
Last edited:
  • Like
Reactions: 1 user
Member
Joined 2011
Paid Member
Code:
Sender side:
const uchar kbdmatrix[4][4] = {
        {'0', '1', '2', '3' },
        {'4', '5', '6', '7' },
        {'8', '9', 'A', 'B' },
        {'C', 'D', 'E', 'F' },
};

Receiver side maps the pressed buttons to defines used:
#define IR_BTN_OK       0x34
#define IR_BTN_MUTE     0x43
#define IR_BTN_BACK     0x38
#define IR_BTN_PWR      0x30
#define IR_BTN_VOL_UP   0x31
#define IR_BTN_VOL_DOWN 0x35
#define IR_BTN_0        0x46
#define IR_BTN_1        0x39
#define IR_BTN_2        0x44
#define IR_BTN_3        0x32
#define IR_BTN_4        0x36
#define IR_BTN_5        0x41
#define IR_BTN_6        0x45
#define IR_BTN_7        0x33
#define IR_BTN_8        0x37
#define IR_BTN_9        0x42
I'm using an extended nec protocol. so you can theoretically have 16bit addresses and 8bit commands.
A TSOP4438 is used at the receiver side. my nec protocol based sender sends non standard commands! You have to program your own receiver to match my sender...
 
Last edited:
  • Like
Reactions: 1 user
Member
Joined 2011
Paid Member
Attached a perl file to generate a intel hex file for programming the pic16f690 (circuit shown at start of thread).
You can change the device id for your own needs. 16 buttons are supported (= commands)
 

Attachments

  • generate_16f690_ir_sender_hex_using_new_hex_id.txt
    7.2 KB · Views: 31
Member
Joined 2011
Paid Member
Douglas Self has done his Job more then very well! I am surprised what a vinyl can do with an on the top mm/mc phono stage.
Book? Tell us more!
BTW: I am using ZTX951 in the MC stage. MC testing needs some time cause the Denon DL103 is on the delivery way ...
The MC cartridge Denon DL103 arrived. First test of MC stage was a desaster. The MC circuit based on D.Self MC head amp from his book "Electronics for vinyl" using ZTX951 instead of 2SB737 oscillated like hell. Thanks to Bonsai's excellent summary of MC head amps I added a higher value capacitor from opamp output to inverting input to stop MC coil induced oscillation. About 470p instead of 15p does the job. Have had several days of sound test sessions which showed me the (positive) difference using a MC head instead MM cartridge.
Unfortunately I need to design a new MC preamp hat pcb.

First measurments showed very low noise and a very good SNR and THD - far beyond the vinyl specs. (Ortofon test vinyl has "0 dB" 1kHz test tracks with 0.9 - 1% THD which clearly shows the limits of vinyl and also the myth of "warm vinyl sound" because the distortions are mostly 2nd harmonics).

Stay tuned, more info will follow!

Happy eastereggs!
 
  • Like
Reactions: 1 user
Hi Tony

Happy Easter to you too and all.
A shame to hear about the circuit oscillation with that specific cartridge. Is this the only type you have tried? Can you reproduce the oscillation with an equivalent source impedance?
Wonder if the fix affects frequency response? Or other performance?
At one time I tried to sim the design, recall I had a problem and gave up on it.
If you have a fix, it works and sounds good otherwise, why make a new design?
That circuits been published many times. Never noticed any revisions. Make you wonder how many have actually built it, tested it with various types of MC cartridges.
Check out the pearl3! Interesting design, what you think? Jfet vs bjt? One member has done a smt version, not sure of testing? Even bonsai’s versions are interesting.
That’s cool to measure thd from a record. Really makes you wonder what’s worse, the vinyl or the speakers and we’re designing our amps wanting < -100dB distortion.
Personally I think vinyl is a waste of time. Tons of reasons why, but no different than using tubes imo. I like the albums more for the graphics, liners, notes etc that got lost with CD, digital for nostalgia reasons, but it’s a lousy medium.
Lots of questions, maybe too many :)
Take care. Have fun.

PS no Easter eggs, New Zealand lamb is the best we can do. And we drive by a sheep farm all the time.
 
Member
Joined 2011
Paid Member
Dear Rick,

the oscillations (~ 250kHz) can be reproduced using a 40uH coil directly attached at input (the cartridge has 38uH and 40R dc resistance).
The oscillation can be reproduced also with a spice simulation. Will upload the sim today...
... but for now I need to search for easter eggs in the garden...

Happy easter to all!
 
  • Like
Reactions: 1 user
Member
Joined 2011
Paid Member
Voila! Found the easter eggs in the garden, now had time to zip the simulation files ...
If changing C7 from 470p to 15p the oscillation starts.
Removing one or two ZTX951 increases the oscillation frequency ... colpitts osc.?
Changing ZTX951 to 2N4403 the C7 / 15p - no oscillation.

Have fun with simulation, Toni
 

Attachments

  • mm_mc_simulation.zip
    10.6 KB · Views: 22
www.hifisonix.com
Joined 2003
Paid Member
Tony, the rbb’ on the Zetex devices is very low (c 1.5 Ohms) so with a low emitter resistance and any small amount of base capacitance they may oscillate. I can’t find any rbb’ data on the 2N4403, but I suspect it is a bit higher than the Zetex devices and this is why it is not oscillating. One thing you could try is to put one or two ferrite beads in the base leads. Don’t use the solid SMD types as the end to end resistance will ruin your noise performance. You need to use the small hollow ones.

(Very nice looking preamp BTW 👍)
 
Member
Joined 2011
Paid Member
Thanks!

According to "The art of electronics - 3rd edition" p.501 the 2n4403 has Rbb 17 Ohms.
Have tried already using only one ZTX951 with ferrite bead - oscillates with same (relatively low) freq. I don't think that the ztx are oscillating - it is more the interaction of the high Cjc/Cje to the input. The opamp possible interacts with the MC cartridge on input (Cartridge + input capacitor are a form of LC circuit) via the relatively high Cje/Cjc of 3 paralleled ZTX951 (3*1.2n ~ 3.6n/3*290 ~ 900p). Using 2N4403 and adding the capacitors as shown in the picture provokes the same oscillation as ZTX951 ...
Colpitts?

Code:
*ZETEX ZTX951 Spice Model v1.0 Last Revised 27/5/92
    *
    .MODEL ZTX951  PNP IS=1.3766E-12 NF=1.013 BF=187 IKF=5.0 VAF=66.3
    +ISE=1.4E-13 NE=1.41 NR=1.0099 BR=56 IKR=0.9 VAR=33 ISC=1.7E-12
    +NC=1.4 RB=0.029 RE=0.020 RC=0.0255 CJC=287E-12 MJC=0.4522
    +VJC=0.4956 CJE=1.15E-9 TF=0.83E-9 TR=20E-9
    *
    *$
    *
 

Attachments

  • mm_oscillation_source.png
    mm_oscillation_source.png
    43.4 KB · Views: 38
Last edited:
  • Like
Reactions: 1 user
www.hifisonix.com
Joined 2003
Paid Member
Yes, almost certainly a Colpitts oscillator. Just check that the 2N4403 isn’t oscillating at HF. You might be able to quell the oscillation by loading the base to 0V with a 1-2nF cap. Since the source resistance (MC) is low, this will hardly affect freq response. I have not played with the Self circuit - it’s quite interesting.
 
  • Like
Reactions: 1 user
Member
Joined 2011
Paid Member
This tip is working at least in simulation. Changing the 470p cap on input to a 4.7n stops oscillation.
Square wave response has a hefty overshoot but well damped. In combination with C7 e.g. 100p the THD performance is still single ppm up to 20k
The new rev. 1.2 PCB will arrive in about a week or so ... tests will follow!

BR, Toni
 
  • Like
Reactions: 1 user