Search This Blog

Loading...

Wednesday, 18 January 2017

Fiddling with a Transistor

Well,

I found myself scratching my head the other day trying to remember the difference between Class A, B and C amplifiers and how that impacted a transistor bias.

To help me, I've drawn this quick schematic:

Now, you will see that R1 has a "*" next to it; that's because we are going to play with this value.

The transistor base will switch on when the voltage on the base is greater than 0.6V.

So, if we place a 10K resistor where R1 is, we place the base at DC voltage of about 1.6V. If we now apply a 2V peak to peak signal to the base (in my example it's a 100KHz signal), then the lowest point of the signal the base will be at 1.6V minus half the voltage peak to peak = 0.6V. Therefore the transistor will be switched on for the full input signal cycle.

The voltages on TP1 are in yellow and TP2 in blue. Here the first example with 10K as R1:


You can see that all of the input signal is above the dotted line (which is at 0.6V) and therefore the transistor is biased on throughout - this is Class A operation. Harmonically it looks like this:



Now, lets change R1 for 39K which will place the base at DC voltage 0.6V and apply the same 2V peak to peak signal. This time the transistor is only switched on for about half the cycle and the resultant voltages look like this:


Here we have 180 degrees of the input signal turning on the transistor - this is Class B operation. Harmonically it looks like this:



Finally, if we remove R1 completely, then the base of our transistor is at DC ground (being pulled low by the 4K7 resistor). If we now apply our signal we see this:


So the transistor is only on for less than 180 degrees of our input signal - this is Class C operation.

Harmonically it looks like this:



Now, you may wonder what use Class B and C are? Well, in an audio amplifier - none at all! You would hear all that distortion and harmonic content and it would sound completely awful. However, from an RF perspective, we can easily remove the harmonics from the output and retain just the target frequency - they all seem pretty much the same now - agree? And Class B and C amplifiers consume much less power (because the transistors aren't turned on the whole time) so are far more efficient. We just need a suitable low pass filter at the output and we can "reconstruct" our signal.

Interesting, egh?

Sunday, 15 January 2017

Have you Really? Wow!

Well,

This isn't really radio related, but I'm scribbling here to document my steps (well, thats what a blog is for - isn't it?).

At home we have a really pants copper telephone line based Internet connection provided by Sky. Now, nothing Sky can do really as its the infrastructure that makes the connection speeds so slow. We have also been having issues with Wireless speeds generally and also often hit a "bonkers" (as far as I can work out) restriction on the number of devices that can connect to my network. For some reason the DHCP works fine up to 16 devices, but as soon as device 17 tries to connect it fails.

Often this will be my Spectrum Analyser but also it happens to be the visiting sprogs laptop - all very inconvenient.

So today I've bought a TP-Link router with 5GHz and 2.4GHz wi-fi to replace the Sky provided box. The man in the shop told me this was impossible, as Sky will not release the username and password needed to connect to their network.

So, hacking hat on, here's how I've done it:
  1. First, I downloaded some software called Wire Shark from here
  2. Then I installed the software on a PC connected with a wired connection to my Sky router.
  3. Start Wire Shark recording network traffic and then re-boot the router so we capture the network traffic as the router starts up.
  4. Once re-booted, stop the software capture.
  5. use the filter in the Wire Shark software to look only at "udp.port == 67"
  6. In the search results look for "DHCP Discover" traffic and expand
  7. In the expanded area you will find "Option (61) Client Identifier"
  8. Right click and find the option to copy as printable text
  9. Paste the results into a text editor (I used Notepad++)
  10. Low and indeed behold, there is your Sky username and password in the format "=username|password"
I then quickly connected to the router and noted down the MAC address from the "Broadband Port" section of the config screens.

So, armed with this information I plugged in my new shiny TP-Link router, selected "Sky Broadband" as the ISP and entered my username and password. Bingo! I then checked the help on the router and changed (or rather cloned) the MAC address of the Sky router - this is so that from an external perspective you can't tell that the router has been changed.

Result: Much faster wi-fi and no restriction on the number of devices I can connect.

Local conditions.

AVR dude - really?

Well,

Over the past few months or so I have been playing with kits from QRP Labs based on the genius of Mr Hans Summers.

I was using the VFO I made back here to clock my newly built Signal Generator from here and found some rather odd behaviour.

When I investigated this I found that the VFO output switched off every second:


I posted on the QRP Labs forum and very soon had a reply telling me this was an issue that had been fixed in a later version of the firmware.

So now I needed to re-program the AVR processor using the hax file available - I hadnt done this before.

So, here you will find that you can use an Arduino as an AVR Programmer - now I have lots of those. On the Arduino site you can see how to configure the processor on a breadboard:

I added a 7805 regulator and powered the breadboard contents from my local bench PSU. I connected the grounds together of the Arduino and breadboard, but not the power lines! So the Arduino is powered from the USB cable and the breadboard separately.

So assuming you already have an Arduino IDE installed and working here are the steps:

  1. Start Arduino IDE and load the ArduinoISP sketch and upload to your Arduino (the sketch is in the examples folder and my board is an Uno)
  2. Wire the Arduino board as the above diagram - I used a 20MHz crystal and 2 22p capacitors
  3. Download avrdude from here (I put my download into a local directory C:\Users\Mark\Downloads\QRP VFO)
  4.  Download the hex file you want to program from the QRPLabs forum files area 
  5. Open a command window in Windows (type cmd in the search box)
  6. execute the command "cd C:\Users\Mark\Downloads\QRP VFO" (replace my target with your local directory)
  7. then we need two AVRDude commands (replace COM13 with your Arduino COM port):
    1. To set the fuses: avrdude -P COM13 -b 19200 -c arduino -p m328 -v -e -U efuse:w:0x04:m -U hfuse:w:0xDF:m -U lfuse:w:0xF7:m328
    2. To program the flash: avrdude -P COM13 -b 19200 -c arduino -p m328 -v -e -U flash:w:VFO.s1.02c.hex (replace with your hex file)
Here's what it all looks like on the bench (which is rather a mess):


Here is our very beautiful Miss Luna Cat who has been with us since July 2015, and is now, finally, letting me stroke her. She is asleep in the shack on the bag that came with my recently acquired frequency counter:

 Local conditions

Saturday, 31 December 2016

The VLNA, Oh Boy!

Well,

I think I have finished the build of the VLNA for 13cm; having constructed the project I am wishing I had bought a ready built and aligned unit. This was the hardest project to date, mainly because of the very tiny components. I really struggled to get the input matching network parts in place - and have no test gear to actually measure the return loss or noise figures of the final build.

It looks like this:









You can see the input network components in the image above; it kind of looks like the instructions from G4DDK @DXING, but I have no means to actualy measure or test the input return loss.

Lets see.

Friday, 30 December 2016

Busy, Isn't it?

Well,

Following my Top Band anteanna from last time, here's a WSPR map:

I find it all rather hard to believe.

Local conditions.

Wednesday, 28 December 2016

Top Band (Again)

Well,

A while ago we had some work done in our garden, this resulted in the removal of a 'purglar'; now, this was all fine except it was supporting my top band antenna I made back here.

I've got round to making a replacement for the antenna today, nothing original - it's an end fed sloping, inductively loaded wire.

There's 54 feet of wire, 20 turns on a bit of tumble dryer vent pipe, then 5 feet to the feed point plus an earth rod (well two actually) on the sreen of the coax. Here's the inductor:


and this is the earth arrangement:






Now, I am planning to add several long counterpoise wires, but I haven't done so yet. I connected the antenna to my analyser thingamabob:

or if you prefer return loss:





I've been listening on the WSPR frequency tonight:




It will be a very inefficient antenna and also it has a very narrow bandwidth (like all inductively loaded antennas), but it's clearly hearing signals.

Here's a map after an overnight run:



I also took down the main 4M and 6M antenna today for maintenance, I've put somthing I had at the back of the shed in it's place temporarily, I've also put the 13cm antenna I had lying on my bench in the air:




Here's our two doing what Spaniels do on a beautiful frosty morning earlier today:


Good, egh?

Tuesday, 27 December 2016

More Sequencing Secrets

Well,

I've added a FET switch to the sequencer I made last time. The FET switch will provide +12V on RX to the masthead and will be used to switch the masthead relay and also power the VLNA.

The schematic looks like this:


and it's built on the same bit of veroboard as the sequencer:



It switches very quickly, here in blue is the PTT being enabled and in Yellow the power supply that will head up the mast:



So we will then have 200+ ms delay before EVENT 1 from the sequencer:


which will be used for things like turning on the PA bias and enabling RF 'n' stuff like that.

All in all this is coming on nicely.

Local conditions.