So I spent the better part of the afternoon murdering some arduino’s and in the end got no where closer to my objective than from when i started. I guess tomorrow is another day.
I was reminded by a video by VK3YE about a PA chain he is working on using BD139’s that I had sometime ago thought about using them in a class c amp. I had seen something similar in a schematic for a circuit by Diz at Kits and parts. When you can get a good 5w from a pair of transistors that cost 20 cents and a couple tv baluns, why settle for less in your qrp rigs.
So i was looking for a way to make a negative voltage. Did a bunch of google and came up with a number of different ways. One that was kind of catchy was to use a 555 timer as an arsetable vibrator with a couple of caps and diodes to invert a signal voltage.
So in the above schematic, everything on the right of the 555 timer just sets up the chip to make a square wave which is then fed into C3. C3 and D1 invert the signal and D2 and C4 act as a filter.
So i built this on the breadboard as it gets very little love in this house. The cap on the right is the input and the output is taken from the junction of D2 and C2.
Using my signal generator rather than a 555 timer, I fed an 8v 50khz signal into the circuit. Yes my RedPotato scope has loss from the input protection diodes on its input and i am not using any compensation. So the yellow trace in the scope output is the input signal and the 2nd probe was used to measure the output voltage, 8v in -7v out, which is about right accounting for all the diode losses on the scope input and in the circuit under test. All in all i learned something out of this, which i am happy about and now actually understand what its doing and how it works.
On ebay there are these audio meter kits for like a buck delivered. I plan on using one of these as an S-Meter in receiver I working on. I know its hard to see in the image, but the 5th LED from the left is lit, the 10 turn pot makes adjusting the signal range a rather trivial matter. Just trim for the max audio voltage from the AF stage and it will be in the ball park. Its certainly no calibrated S-Meter, but it should give a fair indication of the strength. I am just feeding it with a few volts 600hz sinewave from my signal gen.
Ok, so i could not get the variable gain to work as desired the last time I updated this. Now it worked, I was getting Oh i dont know -3db of gain attenuation, but that was not anywhere close to where I wanted to be, IE to have 0 to -20db attenuation. So I have given up the ghost on that idea and put it back in the sometime when i know more basket.
Ok, so I still need to be able to vary the gain of the RF Preamp, well, rather than vary the gain, lets attenuate the crap out of it. So after a lot of googling about trying to find solutions, i came across a circuit that is a variable attenuator. It should attenuate things by a minimum of -3 to -20db, so that’s in the ball park, its just a handful of resistors, caps and diodes, and by varying a supply voltage with a pot, you can change how much signal passes through the circuit.
Its simple enough, that even I can do it. About the only thing it requires are PIN Diodes, which if you are a popcorn kind of guy like me you wont have, but i have plenty of signal diodes, so off to LT Spice to build and evaluate a the circuit to see if it will do the job I require and then, if it works ok, build a prototype on the breadboard to make sure its going to work for reals.
UPDATE: Well I am thinking that LT Spice might not be the best tool for this job, by their nature diodes are non linear and a pin diode is linear and it is a non trivial matter to do linear artistry in LT Spice. The outputs i am seeing are quite wrong the higher the attenuation becomes as can be seen by the following image, however, when i ramp up the voltage, the output trace does track in input trace perfectly, so i think i might need to just breadboard this one and see for reals what is going on.
Will update again after I have breadboarded the circuit.
So i got it all built, for some reason the gain adjust is not working and I need to investigate that to see why but other than that, it seems to be working and the gain is about what was predicted in the simulation as can be seen by the scope output below. So I will fix the few bits that need fixing and then move onto working on the IF filter. I think this will do the job required quite nicely.
Oh and I have worked out whats going on with the variable gain, Q2 is a current source, so it supplies more current to the amp above, not less, so what I need to do is redesign the amp to have the MIN amount of gain required for my circuit, then use Q2 as a gain boost. Now that I understand what is going on, I can redesign the circuit to have 3 to 12db gain swing. More than enough for the kinds of girls I go out with.
So i have merged the separate simulations together into the one file now to get a better understanding of how they will work together.
And the simulation looks promising, they seem to be happy working together.
So now I have built the RF Preamp onto the perf board with the bandpass filter. The only testing I have done so far has been checking for continuaty as i go along to make sure A goes to B and does not short to ground hehe. I still have to add in the pot for setting the amount of gain in the amp and to wind the 200 ohm to 50 ohm transformer that goes on the output of Q1. Its actually nice to see this moving along, lets just hope it works. HIHI.
RF Pre Amp
So I am back feeling a little better and it is time to move this project alone a little. Some say that for a 40m band receiver an RF Preamp is overkill. In some places it probably is, but where I live most of my contacts are over 1000km away, are weak at the best of times so I think having a little gain ahead of the mixer is a good thing, but it needs to be variable.
My initial thought was to replace an emitter resistor with a potentiometer but that would mean having rf running though cables to the front panel and the chances of things going bonkers increases when you do things like that. Emitter degeneration was still going to be the way to do this, but by using a second transistor as current controller, control the current and control the gain and that can be done with voltage and a pot. So no RF being shipped about the place.
So now for the actual circuit, this was one given to me by Pete N6QW homebrewing legend and all round good guy. Its one of his GOTO circuits, nothing fancy just a BJT amp optimized for bandwidth and as an IF Amp. So I took that and modified it slightly to fit my needs as a 7mhz rf preamp. And like batman off to the batcave, we hit the simulator in LT Spice to confirm that things are close to spec and things will work well within our design parameters.
Ultimate gain is about 9db, and with 3v on the base of Q2 the gain is like 3db or there abouts. Should be good enough for what I require. Now I just have to build it and see if the simulation meets up with reality. Will post an update when I have it built.
Now i also should mention that I was going to compare and evaluate a number of designs for each stage. I did pull some designs out of different schematics on the web and put them through their paces, mostly they were crap. There were some that were better, but they were not popcorn enough for this project. A very notable mention is the front end of the simple ceiver with its dual gate mosfet made from a pair of J310. While i have J310 here in the crap box I am saving them for another project. If I can keep this one to BJT only i will be happy. Anyways, time to melt some solder and see if it works.
So what do you do when you need to make a complex transformer like a 10 turn trifilar winding with a center tap that you might find at the input and output of a diode ring mixer, like the double balanced mixer below? Well you use a Spice Directive. If you have not forgotten everything you have learned so far, you might recall that all the way back in part one of this literary travesty that the last button in our list was the Spice Directive button and like all good men everywhere, our purpose is to push buttons, and with the pushing of this button your entire existence is now complete.
So in the circuit above we have a double balanced mixer, from left to right you have the local oscillator, a 10 turn trifilar winding, the diode ring, another 10 turn trifilar winding and finally the RF input. The IF output is at R1. As well are all experts in the field, we know that a diode mixer likes to have 50 ohm terminations all all its ports. So the LO, RF and IF are all 50R.
So we have a 2MHz input signal, being mixed with a 7MHz local oscillator to give the sum and difference frequencies, 7 + 2 = 9, 7 -2 = 5 so when we run this, we should be able to see 5 and 9MHz peaks which we can then filter out the one we don’t want and keep the other as the IF.
But before we do that, a Spice Directive for transformers always follow the same rules, they are numbered k1, k2, k3 etc followed by the group of inductors you want to make up the transformer, L1 L2 L3 and the final number 1 sets the coupling to perfect, you can of course set this to a number less than one and have imperfect coupling between the windings if you wish to simulate a lower Q than perfection.
So we run a transient analysis on our mixer circuit and we get a bonkers output that looks like this. Now like all good and proper mad scientists you might conclude that something is wrong, that this circuit is a failure and should should be confined to the annals of electronics history where the smoke has escaped and the shmoo released. But you would be wrong of course, because the thinkers out there will have realized that diode mixers are NON LINEAR and that the output will be the Sum and the Difference of the inputs plus all the fart noises, aka Harmonics.
So if we pull up the FFT window we can see then that we have 2 main peaks, one at 5MHz=LO-RF and 9MHz=LO+RF. And you can also see the double balanced action where the LO and RF are attenuated in the output quite substantially, and then in the rest of the spectrum you see those + and – pairs with their harmonics attenuated. It is actually a rather cool way to come to understand what a Double Balanced Mixer does and kind of how its doing it, visually.
So anyway, you now know how to make complex transformers, how to set the turns ratios and all that jazz and do quite a lot now in LT Spice. Perhaps its time to find a circuit that you have used before in a project, lay it out in LT Spice and simulate it and see if it does what it says it does, to see if you can improve it and make it better, or perhaps even find a better solution altogether. And do not forget to have fun.
So anyone who is not living in the 1850’s would have noticed a few years ago a revolution in signal generation with the advent of cheap micro controllers and modules in the way of the Arduino AD9850 DDS VFO. Now cheap and highly accurate signal sources were available to the masses, but they did have some limitations. Firstly the DDS output has a 200 ohms impedance, secondly its output was low, in around 300mv p-p and thirdly its output gain was not uniform across the entire frequency range and if it was being used as a local oscillator feeding a diode ring mixer the output needed to be amplified and buffered.
Alas poor Yorick, the internet came to everyone’s rescue with some eager beaver grabbing a handful of parts and some popcorn transistors and knocking up a buffer amplifier to add to the DDS to bring its output up to ear destroying levels, well -7dbm needed to drive the input of a diode mixer. But, was it any good? We now have enough peanuts in the brain box to test this thing and see if it was really all that up to scratch.
First lets run a transient analysis and take a look at the waveform. Its not very sinusoidal now is it. It is clipping hard on the negative rail and well when any form of clipping happens we make fart noises AKA harmonics. So here is a new trick to add to your LT Spice bag of tricks, we can look at the FFT output and see the harmonic content.
RIGHT CLICK the waveform window, select VIEW->FFT and you will get a nice frequency analysis of the harmonic content, we can see that the 2nd and 3rd harmonic are about -20db down on the fundamental. This might be important in your design and if this was the FFT display of a final amplifier you should be hitting panic buttons because the Law is generally the 2nd harmonic needs to be -50db down on the fundamental. Check with your local authority to be sure to be sure because a clean signal is a nice signal. However, with a DDS buffer, this may or may not be a problem in your design.
Next we can perform an AC Analysis on buffer amp and see its gain over a range of frequencies. We can see there is a large rolloff in gain from about 10Mhz and onward and by 28Mhz we have lost almost -3db gain. Now this might be enough to stop your diode ring mixer from turning on if your -7dbm signal is now more like -10dbm, the mixer will not mix, and that might suck bad for your circuit.
So now you know enough to make simulations on amplifiers and buffer stages to see if they actually do what you want them to and if you are really cleaver you will now be thinking of ways of optimizing this circuit to make it work better, like by rebiasing Q1 by adding a low value resistor from emitter to ground so that its not clipping the negative rail, by adding a low pass filter maybe to clean up the harmonics and by optimizing component values to get a flatter gain response. What you do will depend on your actual needs and implementation. Either way have fun.