Friday, November 13, 2015

Adjustable Load

Using an idea originally described in an EEVBlog video (youtube-EEVBlog), I built a circuit that can “dial-up” a specific load (from 5mA up to 2A) and hold it even when the DUT input voltage changes. This will come in handy for testing power supplies. It uses an LM324 op-amp configured as a voltage follower that drives an N-channel power FET. A 1 Ω current sensing power resistor in series with the source lead provides feedback to the inverting input of the op-amp. Since the resistance is 1 Ω, the voltage across the resistor represents the actual current of the DUT. The FET is essentially acting as a variable resistor because when the gate voltage changes due to a change in output from the op-amp (controlled by changing the voltage of the non-inverting input), the FET drain to source current will change accordingly. Maximum power dissipation is ~25W so a heatsink with fan (from an old computer power supply) was added to keep the FET and resistor from frying.


The blue trimmer pot next to the op-amp sets the desired load.  This current is "expressed" as a voltage across "TP +" and "TP -" and is monitored with a multi-meter.


Initial tests revealed a severe oscillation at the op-amp output since they aren’t designed to drive high capacitive loads (ie. FETs). Searching for answers on the internet, I discovered this problem had already been addressed by others and simply added a small capacitor from the output to the inverting input (ie. negative feedback) to dampen the instability. Problem solved! Pretty cool test jig.

Thursday, October 1, 2015

Function Generator

I finally completed this project after tinkering with an Arduino for almost two years. I had purchased an Arduino Uno development board for my birthday in 2013. Arduino is an open sourced microcontroller platform with numerous software/hardware applications freely available on the internet. I had always wanted to build a function generator so this seemed like the perfect opportunity to put my creative skills to work. Waveforms are generated using direct digital synthesis (DDS) technology. I purchased an LCD display and a DDS module (AD9850) off of e-Bay. Adding a rotary encoder and a switch essentially completed the hardware. Now I just needed to tie everything together. That’s where the Arduino came into play. Starting with publicly available software that was written to interface with a rotary encoder (rotary-encoders-done-properly) and LCD display/DDS chipset (ad9850-dds-vfo), I modified the code to work for my particular needs. The result is a compact, easy to use function generator with the following specs:

· 10Hz-1MHz square wave (~5Vpp to 890mVpp)
· 10Hz-30MHz sine wave (~1.6Vpp to 80mVpp)
· Selectable frequency increments of 10Hz, 50Hz, 100Hz, 500Hz, 1kHz, 5kHz, 10kHz, 100kHz and 1MHz


Eventually I plan on adding a buffer/amplifier/integrator to the output to increase the gain and provide a triangle waveform.

Update (Summer 2024)
After sitting idle in my workshop for MANY years, I finally decided to finish this project and make the improvements I originally proposed. These are summarized below:

1) Triangle wave support.  My initial idea was to take the generator's square wave output and feed it into an RC integrator, thus creating a triangle wave.  This works fine for a single frequency but when the frequency changes so does the output level.  Another frequency related issue concerned the "flatness" of the triangle wave itself.  Ideally, the RC time constant for an integrator should be ~10 times greater than the period of the input signal.  As the frequency changes so does the need to change this time constant value in order to maintain a "flat" curve.  After tinkering with these issues for a while and still not finding a satisfactory solution, I went in another direction and eventually found a replacement chip for the AD9850.  The AD9833 is another DDS device but with added support for generating a triangle wave.  Also, the signal level for all three waveforms remains virtually the same throughout its frequency range.  The main tradeoff is that it has a reduced upper frequency limit compared with the original chip.

2) Increased load capacity.  Using an OPA690 high speed op-amp at the generator output, I can now drive loads up to 160mA.

3) Bias adjustment.  Signal polarity can now be shifted from fully positive to fully negative.  

4) Amplitude adjustment.  The output signal level (normally ~3.2Vpp) can be attenuated down to 0V.

Here is a picture of the newly completed unit:




Wednesday, March 11, 2015

Attenuators

Attenuators (aka pads) are useful for many things and are easy to make.  The ones I've made are known as "pi" attenuators because the resistors are arranged in the shape of the Greek letter π.
Pi attenuator
There are numerous websites around that can calculate the resistor values needed for a given value of attenuation and impedance (I work exclusively at 50 Ω).  Just be sure to consider the power rating of the resistors (especially R1 since it bears the brunt of the dissipation at high attenuation values).  Also, for RF projects you need to use resistors with low inductance values (ie. don't use wirewound) to minimize high frequency issues. One site that I found useful allows you to enter your parameters into an Excel spreadsheet (power-attenuator-calculator). 


I built a fixed 20dB attenuator (10W input) and two switchable attenuators (1W input) using metal film resistors.  I honestly spent more time and effort on the enclosures than the actual circuits themselves.  Once assembled they were easy to check out.  After terminating the output with a 50 Ω dummy load, I simply applied a known DC voltage to the input (being careful not to exceed the power rating of the input resistors) and measured the output voltage.  Plugging those two values into the equation below gave the expected attenuation:

                                          attenuation (-dB) = 20 * log (Vout/Vin)