# AC current sensor

This is a tutorial on basic transistor circuit design for multiple staging.
This is a AC current sensor, based on a "radioshack" 12.6V. 1.2A, power transformer, used as the detector.
Prepararation:
Begin by taking an ordinary 60W. lamp. Wrap its cord about 4 complete turns longitudenal around transformer.
Tape tightly, I taped it then used a mini bar clamp to keep the wires tight against the Xfrmr.
Also the transformer needs to set on a small piece of steel , my bar clamp takes care of that.
I put my voltmeter at the transformer windings primary side,for AC readings and with lamp off and on .
Using a AC voltmeter I got no readings.
------------------------------------------------------------
OBJECTIVE:
Theory is that by wraping a few turns of the lamp cord around a power transformer, that when lamp is
plugged in, the current through the corde would induce a voltage into the windings of the transformer,
and by hooking the primary leads into this amp will detect and amplify the change in voltage induced,
then rectify and further amplify the signal to be used to drive a load.
CIRCUIT DESIGN:::

See schem. #1

1. This first amp will be designed for matching a very high Z of the transformer output to a rather low Z input
of the next stage where most of the amplier gain will take place.
So this first amp will be used primarily for Z matching. Therefor not as much gain is needed. (Q1 stage CE. amp)
Choose VCC = 8V.
Choose R3 = 620K which is a good high Zin.
Choose R1 = 62K so as to start bringing Zout of Q1 lower for next stage.
Choose VCQ1 to be 1/2 VCC, so VC = 4V.
Choose VCE = 2V.
Therefor VEQ1 = 2V.
Calculate R2 by equations {VCQ1 / R1) = IC and R2 = (VEQ1 / IC)
R2 = 31K make it 33K a standard resistor value.
Now (VEQ1 + 0.7V.) = 2.7V. label as VBQ1.
So (VBQ1 / R3) = 4.35 uA. label as IDQ1.
So now ((VCC - VBQ1) / IDQ1) = R4
R4= 1.2Meg. Which will be 910K and 330K in series.
Static:
VCQ1 = 4.26V.
VBQ1 = 2.55V.
VEQ1 = 2.06V.
No need to change any values.
TEST:
Dynamic:
Now plug in the signal input through a 100uF capacitor at the base of Q1,
and a 100uF capacitor at the collector Q1 and check with osciloscope for any kind of wave form (60Hz.)
1.Depending on which way I looped the lamp wire around the Xtrfrmr, depends on which lead is the input
and which is connected to ground. I switched the wires around until I found a change in amplitude on my
osciloscope. I foiund for my set up that the ground wire is the side of the Xtrfrmr, closest to the wall outlet.
And the input is the side that the lamp is on.
2. The wave form shows a lot of noise, I first put C4 in the circuit to give some AC gain the noisey waveform
was amplified greatly. Then I put C3 in the circuit and that eliminated the noise and got a good 60hz. waveform
at around 10 mV. peak. With lamp off, this is the stage sensing line voltage even with no current flow through the lamp.
When I turned the lamp on I got a peak voltage of 14 mV. peak. So it increased 4mV.pk.
Now from here on out I will design this with voltmeters only.
So as to record actual volt. readings.

DATA:
lamp off = 7.6mV. rms.
lamp on = 22.6mV. rms.
OBSERVATIONS for stage Q1:
This stage is working very well, first of all no readings at the input, and at the output there is a standing
AC voltage of 7.6mV. due to sensitivity of stage to sense line voltage. When a true input comes in, lamp turned on;
then it detects this change and sends an output voltage of 22.6mV. Amplifies the change nearly 3 times.
Also good Z matching too.
How I know it is sensing line voltage, I used a battery and when lamp is UNplugged waveform shows
rf noise, when plug is in wall outlet and lamp is OFF, I get a rf noise superimposed on a 60HZ waveform.
Telling me it is sensing the line voltage and amplifying it.

DESIGN stage Q2:
Preliminary test,
Using a resistor sub box, switch in resistors for a load on the other end of C2 to ground.
Check for considerable decrease in amplitude of waveform with lamp on.
record the resistance value, so as to know what Zin needs to be for next stage.
Data:
design:
So I'll choose a 47K resistor for the next stage. And work some values to get high gain as well as
nice low Zout to drive the next stage.
Choose R7 to be 1/10 of R8 which is 4.7K, and make R6 27K to give a Av. around 5 (dc gain).
Calculations:
VCQ2= 4V.
VEQ2= 696mV.
VBQ2= 1.396V.
so R9 = to around 220K.
Static:
VCQ2=3.76V.
VEQ2=0.75V.
VBQ2=1.36V.
TEST:
Dynamic:
DATA:
Lamp off =705mV. rms.
Lamp on = 1.68V. rms.

DESIGN stage Q3:
Preliminary tests:
Now that I have enough volt output to bias a diode
Vpk. Lamp off = aprox. 1V.
Vpk. Lamp on = 2.37V.
So I have enough output voltage pk. to bias a diode for rectification, and filtering.
But first I need to bring the Zout of this amp low enough to run a load.
So I'll work it towards around 470 ohms, Zout.
To go from 27K to 470 ohms, I'll need a Common Collector amplifier arangement.
Design last stage for low Zout.
Assume Beta, to be around 100
I will also remove the capacitor and direct couple this stage to Q2.
Now I need to work some values to give me the least signal loss at the input of Q3,
but to have the smallest possible Zout at the emitter of Q3.
VEQ3 = 3V because VCQ2 = 3.76V. measured value.

Now add the rectification filter D1,R14,C5
.
Vout Lamp off = 1.56V..
Vout Lamp on = 1.86V.

Vout Lamp off = 1.28V.
Vout Lamp on = 2.03V.
LED'S work good with R14= 3K ohms.

CONCLUSION:
Overall circuit works ok.
This was designed using my benchtop variable power supply, 8V.
I made it to work with 9V. battery.
This will work at supply voltages from 7 - 12 Volts.
It works well with a 9 volt. battery.
When first turn on the circuit it takes a little bit for every thing to work properly
but once it's left hooked up to the battery it works fine.
C6 keeps the circuit from oscilating due to battery impedances.
But this could work better, so I will rework the output stage and add some
additional stages to give a good volt. output that's more predictable.
--------------------------------------------------------------------------------------------------------------------------
REDESIGN :::::
See schematic # 2:

First I will unplug the lamp and deal with the RF signal noise at the beginning input.
Using my osciloscope I found that 33uF is good to get rid of noise.
C3 takes care of that.
Stage Q1:
VCQ1, lamp off = 8.4mV. rms.
VCQ1, lamp on = 26.6mV. rms.

Stage Q2:
Needed to put C5 in the Q1 stage because of eratic readings. Probably oscilations.
VCQ2 lamp off = 283mV. rms.
VCQ2 lamp on = 607mV. rms.
Design stage Q3:
Choose R12 to match R6 at 27K.
Choose R10 to = 4.7K, to bring Zout down further.
Choose Av. = 4 so R11 = 1K
Calculate R13 to be 110K.
Calculated voltages:
VCQ3 = 4V.
VBQ3 = 1.55V.
VEQ3 = 0.85V.
Measured values:
VCQ3 = 4.15V.
VBQ3 = 1.5V.
VEQ3 = 0.85V.
no need to change values.
Dynamic Test:
VCQ3, lamp off, = 1.77V. rms.
VCQ3, lamp on, = 3.2V. rms.
Very Good Av. and response from lamp off to lamp on, condition.
Also the circuit is more stable and predictable on Vout. rms.

Design Q4 stage:
Q4 will be a common collector amp config. to give required Zout neccesary, to drive a load.
So I'll choose R14 to be 470, assuming a Beta of 100 for Q4 would give a Zin around 47K.
So as to not load the Q3 collector so heavily with Q4's bias base current.
.I should have a little over 3V. at the emitter of Q4.
Static measurement. = VEQ4 = 3.5V.
Dynamic test:
VEQ4, lamp off, = 3V. rms.
VEQ4, lamp on, = 3.4V. rms.
Not good, with the Q4 stage direct coupled to Q3, caused Q3 to saturate the standing voltage.
So a change in input, lamp on, showed no significant change at VEQ4.
So I'll capacitive coupling between these strages, and bias Q4 with as high Zin possible, keeping Zout low.
Choose VEQ4 to be at 4V. And make R16 10 times larger than R10, = 47K.
Calculate R15 = 33K.
Calculations:
VEQ4 = 4V.
VBQ4 = 4.7V.
Measured values:
VEQ4 = 3.33V.
VBQ4 = 4.02V.
This is off because of the base loading effect due to low emitter resistor.
But for this application it will work.
Dynamic test:
VEQ4 = 3V. rms.
So this approach will not work. Either..
With Q4 in the circuit the VCQ3, rises to saturation on the standing voltage,
when I remove Q4 than VCQ3 goes back to normal.
I need to work with Q4 so as to keep it from interacting back to Q3.
Tests show that if I raise R14 to around 3K then the VCQ3 is working normal. (1.4V rms.)
(there's a small drop compared to 1.77V rms. of original value due to Q4 loading Q3.)
R14 is now changed to 3K. Also direct coupling can now be done.
Dynamic test:
VCQ3, lamp off, = 1.40V. rms
VCQ3, lamp on, = 2.07V. rms
VEQ4, lamp off, = 1.47V. rms.
VEQ4, lamp on, = 3.12V. rms
So far, a very small change in voltage that the transformer, detects, from sensing voltage,
to having voltage induced due to line current flowing to the lamp, was so small that it could not be,
measured with my meters.
But now this circuit amplifies the standing (non current) voltage sensed at the outlet, and the change in
voltage when current flowing to lamp, by amplifying this change by twice the amount.
(NOTE): I've learned that a common collector amp. can't just be thrown in with the smallest Zout desired
without careful testing and measuring, voltages at the previous stage, to make sure that the CC amp,
is not causing heavy loading, thereby ruining the signal coming into it.
Now it works properly at this stage.
Now that it's not in the milivolt region anymore, then I can no longer use small signal amps, because
the amp would be driven into saturation at the standing (sensed) voltage, and no change could be detected.
So now it's time to rectify and filter it to give a DC signal to work with for amplification and eventually switching
Design rectifying and filter:
Through experimenting, C10 is good at 1nF.
Test DC Vout:
VEQ4, lamp off, = 3.94V
VEQ4, lamp on, = 5.6V
Around 1.5V. increase, this will be a good signal to work with.
------------------------------------------------------------------------------------------------
Now Design of the DC amplifier:
I start more at the output and worked my way back to the rectifier stage, that way I can ensure
a low Zout and increase in Zin at each stage going back.

Refer topicture #3

See schematic #4

Stage Q5 DC amp
Choose R18 = 470 ohms.
Make Av.=10
That makes R19 = 47 ohms.
Choose VCQ5 = 4V.
Choose R16 A = 1k. (20 times > than R19)
Calculate R15 = 6.2K.
Test voltages showed good values.
Design stage Q6:
Stage Q6 will DC couple into Q5
Replace R16 A with stage Q6.
Calculate VBQ5, this will become VCQ6.
Then choose VEQ6 to be 1/4 of this value.
Calculate current through R16 A, and solve for new resisor value R16 B.
Then usual calculations solve for R17 and R20 A.
Test measurements showed good values.
Design stage Q7:
Stage Q7 will DC couple into Q6, replacing R20 A
Choose R20 B to be 1/3 of R20 A, and solve for current through R20 A.
This current value will be the collector current for Q7.
Usual calculations solve for R21 and R22.
Test measurements showed good values.
Now I have a high Zin at the input of this DC amp Q7 base input.
And a somewhat low Zout at the output of this DC amp, VCQ5, or VEQ5.
The base current is still having some effect on the DC rectifier circuit, so keeping with
BJT. I'll work the base input of Q7 to give more Dc gain to the input signal.

So I'll start with replacing R21 A with another amp stage, and use a 47K for emitter resistor.
Call that R21 B. Now calculate the current through R21 A and solve for ICQ8. = 38uA.
Now ( 38uA x 47K) = VEQ8 = 1.78V. + 0.7V = VBQ8 = 2.48V.
Choose another 100K for R23, and solve for the other bias resistor. Calculates out to 220K.
However due to high resistance values and sensitivity of the circuit at this stage I had to use
R24, R25, R26, to adjust values to get the desired VCQ5 back to it's nominal designed value
of around 4V.
Now everything is working good for static measurements of all bias voltages.
The AC amp is not yet connected, now I need to make another stage to take a positive input
from the rectifier and give a input to this DC amp. Because right now an input to the DC amp will
give an inverted output.
Now I tested with a 9Meg. resistance from positive supply to the emitter of Q8 and got a significant
response of VCQ5 going from 4.3V to around 6.5V. which means is one more amp preferably a
common collector amp inputing to the emitter of Q8, should give me all the High Zin needed to not load
the AC amp, as well as all the signal transfer needed to switch the DC amp to a relatively high Vout..

Design Q9 stage:
This was all done with experimentally switching resistors in and out until I got the proper VCQ5 at idle conditions.
Then switching the lamp on gave me a jump in voltage at VCQ5, neccesary to drive a load.
Lastly I hooked up the LED to the output and the entire circuit works perfect.

See final circuit schematic #5

-----------------------------------------------------------------------------------------------------
CONCLUSION:
When I first apply power to the circuit wether power supply or Battery, the LED lights
momentarily, then shuts off, it takes a good 30 secomds for everything to get into
equilibrium before the circuit is ready for use, but after that, I can turn the lamp on and
the LED will light up nice and bright, and stay lit as long as the lamp is on,
then turn lamp off, and LED turns off. This could be used to drive an opto isolater, so
as to drive a relay or something.
Overall this circuit was designed using BJT. only, and learning how to design by matching impedances,
and transfering AC signal through stages, then converting to DC and amplifying that signal, through
stages until the signal has enough strength to drive a particular load.
I designed it using my power supply set at 8V.
I varied the supply to find the min, max, volt. it would work at:
Results are, ( MIN> 5V. @ MAX> 12V. )
Good range of supply voltages for it do work at.
This circuit provided many challenges in impedance matching, and signal preserving, as well as amplifying.
I realize that this could have been designed a lot more simpler with less components, and different take on it,
but I wanted to design it working through the problems that are encountered and learning how to solve
those problems.

This circuit was more or less a excersise in problem solving when designing a circuit.

Author
hobbyist
Views
1,343
Last update