Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Opto coupler for energy measurment ?

Status
Not open for further replies.
The MCP3901 is a two channel A/D converter so you just use one channel to measure instantaneous current and the other to measure instantaneous voltage. You then multiply these two digital values together with a microprocessor to get the instantaneous real power. You take enough samples per second (10 times or more of the line frequency) to resolve any higher frequency components of line voltage and current (as possibly caused by non-linear loads such as from lamp dimmers or rectified power supplies), and perform this multiplication operation for each set of samples. You then calculate the average of these samples over an integral number of mains waveforms to get the real power.

The MCP3901 is not a simple chip to use so I suggest you thoroughly read its data sheet and try to understand everything in it to do a proper design. Note that the chip has a variable gain analog front end amplifier so you may not need any extra external amplification for the current measurement signal (which is typically a small voltage).

To isolate the load you can use optocouplers to transmit the digital signals from the MCP3901 to the microprocessor. That way there's no concern about the analog accuracy of the optocoupler since it's only transmitting digital signals. You will need a small line powered supply to provide the power for the MCP3901 and any other circuitry you may need to process the voltage and current signals before going to the MCP3901.
 
Last edited:
  • Like
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
Thanks for the advise crutschow. Yes even I felt that MCP3901 is not a simple chip to use when reading its datasheet. Have you used that IC before?
 

Thanks for the advise crutschow. Yes even I felt that MCP3901 is not a simple chip to use when reading its datasheet. Have you used that IC before?
Afraid not. A good understanding of the data sheet is the best way to learn how to properly use the device.
 
  • Like
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
Hi ADGAN,

I got a reasonable multiplier simulated on LTspice.
The preliminary circuit uses:
LM339, comparator
CD4001, NOR gate
CD4070, XOR gate
CD4066, CMOS switch

It is sad I can't upload files using "Manage Attachments". For an unknown reason it is blocked.
https://www.edaboard.com/threads/301333/

Therefore, I can attach here only a screenshot of its simulation.
Please note that I designed this first circuit to be supplied by Vcc+=5V and Vcc-=-5V.
But since the CMOS gate models, I have, should be grounded, I used two cascaded supplies, each of 5V. I was able supplying the gates with 10V and ground while the virtual ground becomes 5V (between the two supplies) for the AC signals. This is done for the simulation process only in order to get results. Therefore you will notice the addidtion of (-5V) when a plotted waveform is related to AC.

For instance, could you think another path to send you the LTspice files? For example are you a member in Yahoo LTspice group. In the past, I used uploading some of my works in its file section.

Kerim

- - - Updated - - -

Here are two screenshots; the schematic and some traces

https://obrazki.elektroda.pl/1893821800_1382259075.png

https://obrazki.elektroda.pl/6092456800_1382261420.png
 
Last edited:
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
I don't excatly understand the offset parameters used for AC1 and AC2, but if you are multiplying two sine voltages, there should be at least a component of double frequency in the output. If you are implementing the 4-quadrant multiplier correctly, the output is only double frequency (power ripple respectively circulating energy) and DC (average power), no fundamental.

I'm sure that a pwm multiplier works in principle.

Regarding attachment problem, did you try an alternative browser (Firefox, Chrome)?
 

I don't excatly understand the offset parameters used for AC1 and AC2

I cannot use a dual supply for the models of CD4070 and CD4001 to work correctly. I am allowed to specify their Vdd only.
So I shift by 5V the AC ground upwards so that these CMOS gates can have a real ground (lowest voltage) and Vdd=10V (it was +5V, -5V).
So in all AC voltage sources I also specified their DC offset as +5V which is now their virtual ground.

there should be at least a component of double frequency in the output
You are right and the output is 100 Hz and its values are all positive (but it looks like being a 50Hz sinewave too, see also the real product under it).

did you try an alternative browser (Firefox, Chrome)?
It is good that I am able to run IE9... It is better than nothing ;)

Added:
I don't excatly understand the offset parameters used for AC1 and AC2
Did you mean the offset=37 mV?
It may not be too important and I forgot that I included it.
It is actually the measured offset of the triangular wave midvoltage from ground (here virtual ground).
 
Last edited:
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
I fear, I didn't look sharp at the waveforms. Everything is allright.
 

The main idea of this technique is to make the chopping of signals work for the 4 quadrants.

I was running tests for different values of Vac2 while fixing the peak of Vac1 at +/- 3V.
I found out that for a peak voltage of Vac2 from 50mV to 3V the error deviation is about +/- 0.3 %, it is +/- 0.2 % from 100mV to 3V.
But this is just a modelled circuit to test mainly its function. Only when it is tested as real circuit, it is possible knowing to how far it is practical.
 
Last edited:

No I'm not a member of Yahoo LTspice group. You can upload the LTspice files to mediafire, rapidshare or any other file hosting sites and share the links here. So that others who might find it useful can also access it.
 
  • Like
Reactions: KerimF

    KerimF

    Points: 2
    Helpful Answer Positive Rating
You can upload the LTspice files to mediafire, rapidshare or any other file hosting sites

It seems a good idea though it will be the first time I look for a hosting site to upload files. On the internet, I used knocking the minimum doors possible to avoid unexpected surprises... good or bad ;)
I hope these hosting services are not blocked too after I register.

Added:
We assume that Vac1 will be proportional to the measured voltage. I suppose it is of 220V/50Hz power lines.
Vac2 will be proportional to the measured current.

A simple voltage divider could be used as the front part to read the load voltage. It will be followed by a buffer amplifier.
Do you have an idea on the maximum Vrms that the meter should expect?

The internal shunt of an ampere meter connected in series with the load could be used to read the current.
A preamplifier stage will be needed for two functions:
(1) Amplifying the mV input to Volts
(2) Generating two polarities AC2+ and AC2- for the inputs of CD4066.

As we see, the multiplier gives a proportional analog voltage of the product v1(t) and v2(t). It can be read directly by a conventional sensitive needle meter (after adjusting its internal resistance).
Also a conventional PWM modulator (or any other pulsing technique) could generate suitable pulses to drive an opto isolator in order to transmit the instantaneous measured power to an MCU.
Do you have an idea of the minimum time interval that the MCU has to read its average measured power? Reading the average value could be implemented by hardware or software.
 
Last edited:

I must confess that I really dislike contributions that post files on other channels than Edaboard attachment. This file hosting services are often spamming my computer, thus I usually ignore this data.
 

This file hosting services are often spamming my computer, thus I usually ignore this data.

This is what I tried saying ;)

I had a private website but... as most things else... it had to be lost (likely till the end of the international terror war, launched here since March 2011).

- - - Updated - - -

Hi Adgan,

Are you interested I upload you the files as texts here so that you make them as LTspice files?
If you do and you have LTspice, you can put them as files in the same folder then run the asc file.
 
Last edited:

ok that's alright

Do you also need CD4000.lib? For CD4070 and CD4001.

- - - Updated - - -

The text below should be named as:
meas_02.txt

*=====================

* For DualSupply_05-quasi.asc

.param Vgrd=5

.meas tran time1 when V(sqr)={Vgrd} cross=4
.meas tran time2 when V(sqr)={Vgrd} cross=5
.meas tran time3 when V(sqr)={Vgrd} cross=6
.meas tran T1 param time2-time1
.meas tran Tprd param time3-time1
.meas tran D_C param T1/Tprd
.meas tran Freq param 1/Tprd

.meas tran VtrgMax MAX V(trg)-{Vgrd}
.meas tran VtrgMin MIN V(trg)-{Vgrd}
.meas tran VtrgMid param (VtrgMax+VtrgMin)/2
.meas tran VtrgP param VtrgMax-VtrgMid
.meas tran VtrgN param -(VtrgMin-VtrgMid)

.meas tran Vmax1 MAX V(ac1)-{Vgrd}
.meas tran Vmax2 MAX V(ac2+)-{Vgrd}
.meas tran Vdly param {dly1}

.meas tran Pmax1 MAX (V(ac2+)-{Vgrd})*(V(ac1)-{Vgrd})
.meas tran Pmax2 MAX V(out)-{Vgrd}
.meas tran RTmax param Pmax2/Pmax1

.meas tran Pavg1 AVG (V(ac2+)-{Vgrd})*(V(ac1)-{Vgrd})
.meas tran Pavg2 AVG V(out)-{Vgrd}
.meas tran RTavg param Pavg2/Pavg1

.meas tran RTerr param RTmax/RTavg*100

.meas tran Pmin2 MIN V(out)-{Vgrd}

*=====================

- - - Updated - - -

The text below should be named as:
CD4066.asy

*=====================

Version 4
SymbolType BLOCK
LINE Normal -16 -16 -32 -16
LINE Normal 16 -16 -16 0
LINE Normal 32 -16 16 -16
LINE Normal 0 0 0 -4
LINE Normal 0 8 0 4
LINE Normal 0 16 0 12
LINE Normal -28 16 -32 16
LINE Normal -20 16 -24 16
LINE Normal -12 16 -16 16
LINE Normal -4 16 -8 16
RECTANGLE Normal 32 48 -32 -48
CIRCLE Normal -14 -14 -18 -18
TEXT -28 -30 Left 0 Y
TEXT 28 -30 Right 0 Z
TEXT -28 31 Left 0 E
WINDOW 38 16 64 Left 0
WINDOW 0 16 -64 Left 0
SYMATTR SpiceModel CD4066
SYMATTR Prefix X
SYMATTR Description Analog CMOS Switch
PIN -32 16 NONE 8
PINATTR PinName EN
PINATTR SpiceOrder 1
PIN -32 -16 NONE 8
PINATTR PinName Y
PINATTR SpiceOrder 2
PIN 32 -16 NONE 8
PINATTR PinName OUT
PINATTR SpiceOrder 3
PIN 0 -48 NONE 8
PINATTR PinName VCC
PINATTR SpiceOrder 4
PIN 0 48 NONE 8
PINATTR PinName VSS
PINATTR SpiceOrder 5

*=====================

- - - Updated - - -

The text below should be named as:
CD4066.sub

*=====================

* CD4066 Analog Switch
* SYM=CD4066
* Transistor models are from LTspice group member kcin_melnick
* See message number 16897, **broken link removed**
* Analog Switch Control In Out Vdd Vss
.SUBCKT CD4066 2 11 4 10 7
X1 2 6 10 7 INVERT
X2 6 1 10 7 INVERT
M1 14 6 7 7 CD4007N
M7 11 6 14 10 CD4007P
M3 11 1 14 14 CD4007N
M4 11 1 4 14 CD4007N
M8 11 6 4 10 CD4007P
.SUBCKT INVERT 1 2 3 4
* Inverter In Out Vcc Vss
M1 2 1 3 3 CD4007P
M2 2 1 4 4 CD4007N
.ENDS
.MODEL CD4007N NMOS (
+ LEVEL=1 VTO=1.44 KP=320u L=10u W=30u GAMMA=0 PHI=.6 LAMBDA=10m
+ RD=23.2 RS=90.1 IS=16.64p CBD=2.0p CBS=2.0p CGSO=0.1p CGDO=0.1p
+ PB=.8 TOX=1200n)

.MODEL CD4007P PMOS (
+ LEVEL=1 VTO=-1.2 KP=110u L=10U W=60U GAMMA=0 PHI=.6 LAMBDA=40m
+ RD=21.2 RS=62.2 IS=16.64P CBD=4.0P CBS=4.0P CGSO=0.2P CGDO=0.2P
+ PB=.8 TOX=1200N)
.ENDS

*=====================

- - - Updated - - -

The text below should be named as:
DualSupply_05-quasi.plt

*=====================
Code:
[Transient Analysis]
{
   Npanes: 5
   Active Pane: 4
   {
      traces: 1 {524290,0,"V(ac1)-5"}
      X: ('m',0,0,0.002,0.02)
      Y[0]: (' ',1,-3.6,0.6,3)
      Y[1]: (' ',1,1e+308,0.2,-1e+308)
      Volts: (' ',0,0,0,-3.6,0.6,3)
      Log: 0 0 0
      GridStyle: 1
   },
   {
      traces: 1 {524292,0,"V(ac2+)-5"}
      X: ('m',0,0,0.002,0.02)
      Y[0]: (' ',1,-2.4,0.4,2.4)
      Y[1]: ('_',0,1e+308,0,-1e+308)
      Volts: (' ',0,0,1,-2.4,0.4,2.4)
      Log: 0 0 0
      GridStyle: 1
   },
   {
      traces: 1 {524291,0,"(V(ac2+)-5)*(V(ac1)-5)"}
      X: ('m',0,0,0.002,0.02)
      Y[0]: (' ',1,-0.6,0.6,6.6)
      Y[1]: (' ',1,1e+308,0.2,-1e+308)
      Units: "V²" (' ',0,0,1,-0.6,0.6,6.6)
      Log: 0 0 0
      GridStyle: 1
   },
   {
      traces: 2 {524294,0,"V(p+)"} {524293,0,"V(p-)"}
      X: ('m',0,0,0.002,0.02)
      Y[0]: (' ',0,-1,1,11)
      Y[1]: ('_',0,1e+308,0,-1e+308)
      Volts: (' ',0,0,0,-1,1,11)
      Log: 0 0 0
      GridStyle: 1
   },
   {
      traces: 1 {524295,0,"V(out)-5"}
      X: ('m',0,0,0.002,0.02)
      Y[0]: ('m',0,0,0.07,0.77)
      Y[1]: ('_',0,1e+308,0,-1e+308)
      Volts: ('m',0,0,0,0,0.07,0.77)
      Log: 0 0 0
      GridStyle: 1
   }
}
*=====================
 
  • Like
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
Yes please. To which folder should I paste this ?
 

Sorry for the delay, the main electricity is cut so I had to run the generator.
There are 5 files so there is one left.
If you have LTspice installed, you can copy the files into any folder you like as long they are together. Then you run the asc file by LTspice.

The text below should be named as:
DualSupply_05-quasi.asc

*=====================

Version 4
SHEET 1 3268 680
WIRE 2000 -304 2000 -320
WIRE -304 -288 -304 -304
WIRE -176 -288 -176 -304
WIRE -48 -288 -48 -304
WIRE 2224 -288 2224 -304
WIRE 432 -272 400 -272
WIRE 528 -272 496 -272
WIRE 1968 -272 1952 -272
WIRE 2128 -272 2032 -272
WIRE 1104 -256 1104 -288
WIRE 1136 -256 1104 -256
WIRE 1392 -256 1392 -288
WIRE 1424 -256 1392 -256
WIRE 1728 -256 1712 -256
WIRE 560 -240 560 -256
WIRE 768 -240 768 -256
WIRE 1856 -240 1840 -240
WIRE 1968 -240 1856 -240
WIRE 736 -224 704 -224
WIRE 1136 -224 1104 -224
WIRE 1424 -224 1392 -224
WIRE 1728 -224 1696 -224
WIRE 832 -208 832 -224
WIRE 832 -208 800 -208
WIRE 880 -208 832 -208
WIRE -304 -192 -304 -208
WIRE -176 -192 -176 -208
WIRE 176 -192 176 -256
WIRE 736 -192 704 -192
WIRE 2000 -192 2000 -208
WIRE 2224 -192 2224 -208
WIRE 144 -176 96 -176
WIRE 464 -176 464 -192
WIRE 240 -160 208 -160
WIRE 272 -160 272 -176
WIRE 272 -160 240 -160
WIRE 304 -160 272 -160
WIRE 400 -160 400 -272
WIRE 400 -160 384 -160
WIRE 432 -160 400 -160
WIRE 768 -160 768 -176
WIRE 144 -144 128 -144
WIRE 528 -144 528 -272
WIRE 528 -144 496 -144
WIRE 560 -144 560 -160
WIRE 560 -144 528 -144
WIRE 576 -144 560 -144
WIRE 1104 -144 1104 -224
WIRE 1104 -144 1072 -144
WIRE 1392 -144 1392 -224
WIRE 1392 -144 1360 -144
WIRE 240 -128 240 -160
WIRE 432 -128 400 -128
WIRE 2048 -112 2048 -128
WIRE -48 -96 -48 -208
WIRE -16 -96 -48 -96
WIRE 96 -96 96 -176
WIRE 176 -96 176 -128
WIRE 400 -96 400 -128
WIRE 464 -80 464 -112
WIRE 2016 -80 2000 -80
WIRE 2128 -80 2128 -272
WIRE 2128 -80 2080 -80
WIRE 2160 -80 2128 -80
WIRE 2272 -80 2240 -80
WIRE 2320 -80 2272 -80
WIRE 2432 -80 2400 -80
WIRE -304 -64 -304 -80
WIRE -176 -64 -176 -80
WIRE -48 -64 -48 -96
WIRE 1104 -64 1104 -144
WIRE 1136 -64 1104 -64
WIRE 1392 -64 1392 -144
WIRE 1424 -64 1392 -64
WIRE 1728 -64 1712 -64
WIRE 2128 -64 2128 -80
WIRE 1856 -48 1840 -48
WIRE 2016 -48 1856 -48
WIRE 2272 -48 2272 -80
WIRE 2432 -48 2432 -80
WIRE 848 -32 848 -48
WIRE 1136 -32 1104 -32
WIRE 1424 -32 1392 -32
WIRE 1728 -32 1696 -32
WIRE 816 -16 784 -16
WIRE 128 0 128 -144
WIRE 240 0 240 -48
WIRE 240 0 128 0
WIRE 304 0 240 0
WIRE 528 0 528 -144
WIRE 528 0 384 0
WIRE 912 0 912 -16
WIRE 912 0 880 0
WIRE 960 0 912 0
WIRE 1104 0 1104 -32
WIRE 1392 0 1392 -32
WIRE 2048 0 2048 -16
WIRE 816 16 784 16
WIRE -304 32 -304 16
WIRE -176 32 -176 16
WIRE -48 32 -48 16
WIRE 2128 32 2128 16
WIRE 2272 32 2272 16
WIRE 2432 32 2432 16
WIRE 848 48 848 32
FLAG -48 32 0
FLAG -176 32 0
FLAG -176 -80 Ref
FLAG 464 -192 CC+
FLAG 176 -256 CC+
FLAG 576 -144 Trg
FLAG 240 -160 Sqr
FLAG 560 -256 CC+
FLAG 272 -256 CC+
FLAG -48 -304 CC+
FLAG 848 -48 CC+
FLAG 2048 -128 CC+
FLAG -304 32 0
FLAG -304 -80 AC1
FLAG 912 -96 CC+
FLAG 960 0 PWM
FLAG 784 -16 Trg
FLAG 784 16 AC1
FLAG -304 -192 0
FLAG -304 -304 AC2+
FLAG 2000 -80 AC2-
FLAG 768 -256 CC+
FLAG 832 -304 CC+
FLAG 880 -208 SQ0
FLAG 704 -192 Trg
FLAG 1856 -240 P+
FLAG 1856 -48 P-
FLAG 1712 -64 PWMp
FLAG 1696 -32 SQp
FLAG 2000 -320 CC+
FLAG 1952 -272 AC2+
FLAG -176 -192 0
FLAG -176 -304 AC2-
FLAG 2272 -80 O1
FLAG 2128 -272 MUL
FLAG 96 -96 CC1
FLAG 400 -96 CC1
FLAG 704 -224 CC1
FLAG 2128 32 CC1
FLAG 2272 32 CC1
FLAG 176 -96 0
FLAG 464 -80 0
FLAG 848 48 0
FLAG 768 -160 0
FLAG 2000 -192 0
FLAG 2048 0 0
FLAG -16 -96 CC1
FLAG 2432 -80 OUT
FLAG 2432 32 CC1
FLAG 2224 -192 0
FLAG 2224 -304 PRD
FLAG 1392 -288 CC+
FLAG 1392 0 0
FLAG 1360 -144 PWM
FLAG 1104 -288 CC+
FLAG 1104 0 0
FLAG 1072 -144 SQ0
FLAG 1536 -240 PWMn
FLAG 1536 -48 PWMp
FLAG 1248 -240 SQn
FLAG 1248 -48 SQp
FLAG 1712 -256 PWMn
FLAG 1696 -224 SQn
SYMBOL voltage -48 -80 R0
WINDOW 123 0 0 Left 2
WINDOW 39 41 55 Left 2
SYMATTR InstName V2
SYMATTR Value 5V
SYMBOL voltage -176 -80 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 2.5
SYMBOL res 288 -144 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R6
SYMATTR Value 180K
SYMBOL res 224 -144 R0
SYMATTR InstName R7
SYMATTR Value 220K
SYMBOL cap 496 -288 R90
WINDOW 0 13 7 VBottom 2
WINDOW 3 -14 64 VTop 2
SYMATTR InstName C2
SYMATTR Value 220p
SYMBOL res 400 -16 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 150K
SYMBOL res 544 -256 R0
SYMATTR InstName R9
SYMATTR Value 1K
SYMBOL res 256 -272 R0
SYMATTR InstName R10
SYMATTR Value 1K
SYMBOL voltage -48 -304 R0
SYMATTR InstName V3
SYMATTR Value 5V
SYMBOL Comparators\\LM339 176 -160 R0
WINDOW 3 29 29 VRight 2
SYMATTR InstName U1
SYMBOL Comparators\\LM339 464 -144 R0
WINDOW 3 39 15 VRight 2
SYMATTR InstName U2
SYMBOL CD4066 2048 -64 R0
WINDOW 38 -103 74 Left 2
SYMATTR InstName U3
SYMBOL Comparators\\LM339 848 0 R0
WINDOW 3 90 40 Right 2
SYMATTR InstName U4
SYMBOL voltage -304 -80 R0
WINDOW 3 -122 153 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR Value SINE({DC1} {Vp1} {Freq})
SYMATTR InstName Vac1
SYMBOL res 896 -112 R0
SYMATTR InstName R1
SYMATTR Value 1K
SYMBOL voltage -304 -304 R0
WINDOW 3 -188 146 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR Value SINE({DC2} {Vp2} {Freq} 0 0 {dly1})
SYMATTR InstName Vac2
SYMBOL res 2112 -80 R0
SYMATTR InstName R2
SYMATTR Value 1K
SYMBOL res 2144 -64 R270
WINDOW 0 34 74 VTop 2
WINDOW 3 61 20 VBottom 2
SYMATTR InstName R3
SYMATTR Value 390K
SYMBOL cap 2256 -48 R0
SYMATTR InstName C1
SYMATTR Value 680p
SYMBOL Digital\\CD4000\\CD4001B 1776 -304 R0
SYMATTR InstName U7
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
SYMBOL Digital\\CD4000\\CD4001B 1776 -112 R0
SYMATTR InstName U8
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
SYMBOL Comparators\\LM339 768 -208 R0
WINDOW 3 89 35 Right 2
SYMATTR InstName U9
SYMBOL res 816 -320 R0
SYMATTR InstName R4
SYMATTR Value 1K
SYMBOL CD4066 2000 -256 R0
WINDOW 38 -103 74 Left 2
SYMATTR InstName U10
SYMBOL voltage -176 -304 R0
WINDOW 3 172 -38 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR Value SINE({DC2} {Vp2} {Freq} 0 0 {dly2})
SYMATTR InstName Vac3
SYMBOL res 2304 -64 R270
WINDOW 0 34 74 VTop 2
WINDOW 3 61 20 VBottom 2
SYMATTR InstName R5
SYMATTR Value 390K
SYMBOL cap 2416 -48 R0
SYMATTR InstName C3
SYMATTR Value 680p
SYMBOL bv 2224 -304 R0
WINDOW 3 -78 149 Left 2
SYMATTR InstName B1
SYMATTR Value V=(V(ac1)-5)*(V(ac2+)-5)/9.0225
SYMBOL Digital\\CD4000\\CD4070B 1472 -304 R0
SYMATTR InstName U11
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
SYMBOL Digital\\CD4000\\CD4070B 1472 -112 R0
SYMATTR InstName U12
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
SYMBOL Digital\\CD4000\\CD4070B 1184 -304 R0
SYMATTR InstName U13
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
SYMBOL Digital\\CD4000\\CD4070B 1184 -112 R0
SYMATTR InstName U14
SYMATTR SpiceLine VDD=10 SPEED=1.0 TRIPDT=5e-8
TEXT -824 -200 Left 2 !.tran 0 {END} {Start} uic
TEXT -824 -16 Left 2 !.include LM324-AL.txt
TEXT -824 -48 Left 2 !.inc CD4066.sub
TEXT -824 -80 Left 2 !.inc meas_02.txt
TEXT 24 72 Left 2 !.param Offset=37m DC1=5-offset DC2=5 Freq=50 Vp1=3 Vp2=2.1
TEXT -824 -320 Left 2 !.param END=2/Freq Start=END-1/Freq
TEXT -808 16 Left 2 !.inc CD4000.lib
TEXT -816 -248 Left 2 !.param dly1=0 dly2=dly1+180

*=====================
 
  • Like
Reactions: ADGAN

    ADGAN

    Points: 2
    Helpful Answer Positive Rating
Its asking for a file named "LM324-AL.txt"
 

Oh sorry, could you erase it on the schematic?
This file is not needed here since I replaced the LM324 IC with LM339.

I meant erase:
.include LM324-AL.txt
 

Also it says "couldn't find symbol(s): LM339, CD4001B, CD4070B
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top