1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Need help simulating circuit

Discussion in 'Circuit Simulation & PCB Design' started by CanuckCrazy, Oct 27, 2017.

  1. CanuckCrazy

    CanuckCrazy New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Likes:
    0
    Hi,

    I'm interested in monitoring my energy consumption use at home and came across https://openenergymonitor.org. There they explain how to use a CT sensor with an Arduino to monitor a circuit (see image attachment). Conceptually I understand how the circuits work with the Arduino output used to bias the CT sensor output in order to get the voltage positive for the Arduino analog input. However, I would like to better understand the purpose of the capacitor in the circuit. To do this I tried modelling the circuit in a few simulators such as LTSpice and Partsim, but I am not getting expected results. To model the CT sensor I simply used a current source with sine wave at amplitude 0.0707A and frequency of 60Hz. But I am not seeing the signal output being offset by 2.5V as expected. Also, when I put a probe on line going into capacitor I am seeing a large voltage sine wave completely biased in negative. I'm wondering if someone is able to model this and show me how they were able to do it as I am at a loss to do so. Thanks in advance.


    upload_2017-10-27_13-14-20.png
     
  2. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,289
    Likes:
    1,223
    Location:
    Cardiff, Wales
    Here's an LTspice sim:
    CT-use.PNG
    The cap is there to smooth/stabilise the mid-point voltage.
     
  3. CanuckCrazy

    CanuckCrazy New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Likes:
    0
    Hi Alec, thanks for the quick reply. Your circuit looks almost identical to the one I did so I'm not sure why results are not the same. But I will check when I get back home. Also, thanks for the info on the cap. So am I correct in saying the cap would be to filter out noise from the 5V supply to get a steady mid-point voltage of 2.5V to bias the signal coming from CT sensor?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,289
    Likes:
    1,223
    Location:
    Cardiff, Wales

    Correct.
    Perhaps you had your circuit ground in a different place?
     
  6. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,611
    Likes:
    478
    Location:
    L.A., USA Zulu -8
    It also filters the 60Hz, so that the midpoint is DC and doesn't have any 60Hz riding on it.
     
  7. CanuckCrazy

    CanuckCrazy New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Likes:
    0
    Hi Alec, I did have additional grounds and that caused a problem. Placement of these is almost an art form :) I read somewhere that a good practice is to set a ground at every source, but in doing so at the current source I set mid point at 0 and that give me incorrect results.
     
  8. CanuckCrazy

    CanuckCrazy New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Likes:
    0
    Is it fair to say that it is more to filter out noise on 5v line that from the 60Hz current source as that source is on a closed loop with low impedance?
     
  9. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,611
    Likes:
    478
    Location:
    L.A., USA Zulu -8
    No.
    It filters any 60Hz signal load current which has to go through the resistor divider.
     

Share This Page