How can I eliminate noise from square wave

Discussion in 'General Electronics Chat' started by zero11, Aug 11, 2010.

  1. zero11

    Thread Starter New Member

    Aug 11, 2010
    5
    0
    It 's a very low voltage square wave which is made from 18-0-18 Vac sine wave.But there are some noise at zero crossing.
    feed to port0.2 and 0.5 of a microcontroller .
    I don't know why it happen,may be 220Vac not pure sine ,
    How can I remove the noise or modify this circuit ?
     
  2. timrobbins

    Active Member

    Aug 29, 2009
    318
    16
    That's interesting? Do you get the same result with just the CRO connected (no CPU connections? It's most likely conduction through your cpu to ground, as you are applying a negative signal to an input of a cpu that is likely just powered from +5VDC.
     
  3. zero11

    Thread Starter New Member

    Aug 11, 2010
    5
    0
    :)
    I measure from work site building,while a product working.dirty sine wave 220Vac.
    I will make the PCB of this circuit
    and not connect to both input pin of cpu and measure the wave form again,
    but if the result are the same (have noise)?.

    thank you very much
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Try connecting a 220pF to 1000pF cap (ceramic or poly metal film) across the transformer secondary windings. Alternatively, try a couple of 220pF caps from P0.2 to ground and PO.5 to ground. You might also try replacing the 1N4004 diodes with 1N914/1N4148 fast switching diodes, as the standard 1N400x series are very slow to recover. Make certain that the current through these diodes is limited to ~20mA; that will give you a good bit of leeway if a transient hits your mains power.

    You have the ends of the secondary windings mislabeled as "L" and "N". Since the center tap is grounded, label it as "N". Arbitrarily label the upper as "L1" and the lower as "L2".
     
  5. zero11

    Thread Starter New Member

    Aug 11, 2010
    5
    0
    Thank you very much for your suggesstion.
    for 3 method to modify circuit ,and about mislabeled too.
    It was very kind of you.
    I appreciate it .
    Mr.Ros from Thailand:)
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You're welcome for the suggestions, but did anything work for you?
     
  7. zero11

    Thread Starter New Member

    Aug 11, 2010
    5
    0
    I will go to the work site today,and try the circuit .
    I hope it will work.
    thank you very much.:)
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    After looking at this again, I suddenly realized that you are going below ground for your uC input. This is not good at all! Microcontrollers and most other ICs do not "like" it when their inputs go outside their power rails (lower than GND/Vee/Vss or higher than Vcc/Vdd)

    You need to bias the center winding so that it is about 0.55v; that way, the output of the transformer will vary between about 0.2v and 0.8v.

    Here, I put together a simulation of the proposed modification to your circuit so that you can see the simulation output (see attached)

    R3 supplies current through D1, which keeps the transformer center tap biased at around 550mV. To keep things quiet, you really should put a small metal poly or ceramic capacitor between the center tap and GND; perhaps 10nF (0.01uF).

    If you still see noise on it, start adding those small caps I mentioned. You can go up to about 10nF for the caps on PO.2 and PO.5; beyond that and you may cause trouble for the uC when you power it off.
     
  9. zero11

    Thread Starter New Member

    Aug 11, 2010
    5
    0

    It was very kind of you

    Last friday I try the 3 way ,but It not work.
    and my co-worker found the noise appear when we connect data signal cable to the circuit .(data +/- to SN75176 DIFFERENTIAL BUS TRANSCEIVER ) when we remove data ,square wave pure.

    He found the data cable (they use telephone wire ,not shield cable ) are wiring together with AC load- AC line voltage in a same wire-way.(load are lamp 5 Kw/ch)
    He think that when AC line ,AC load dirty and Neutral ,may be noise interference to data cable.
    today he will go to the site and try to seperate the data cable from AC feed line.


    Thank you very much:)
     
Loading...