Strange mains noise in circuit - Page 1
Forum section: electronics / general

author: anvoice
author_rank: Frequent Contributor
timestamp: April 19, 2016, 05:17:50 am
content: Hello,I'm designing a servo controller based on the 328P microcontroller. Problem is, when I connect this circuit to battery power instead of my signals I detect mains noise at 60Hz on every pin of the microcontroller, at an amplitude of about 2V, which seems unusuaully high to me. The only pin showing any kind of different behavior is the oscillator in pin, which shows the oscillator 20MHz signal riding on top of the larger and slower noise signal. The battery in open source configuration does not show such a huge mains component.I also tried connecting to a variable power supply unit I have (ebay stuff), but its output on the oscilloscope shows some giant blips (peak to peak of up to 10 volts) so I'm not sure I should be using that to power my MCU.I've attached a pdf of the circuit, please let me know if you need more info. Thank you.

author: Skimask
author_rank: Super Contributor
timestamp: April 19, 2016, 05:21:01 am
content: Without seeing the PCB itself, practically nothing...For all we know, you soldered the parts to wheat bread...

author: alsetalokin4017
author_rank: Super Contributor
timestamp: April 19, 2016, 05:48:22 am
content: As far as the mains signal goes: ten to one it's a poor scope probe ground.(It's really hard to get a good ground reference connection to wheat bread...)

author: Skimask
author_rank: Super Contributor
timestamp: April 19, 2016, 05:52:27 am
content: Come to think of it, the O/P never mentioned soldering anything either.

author: anvoice
author_rank: Frequent Contributor
timestamp: April 19, 2016, 07:21:16 am
content: No I made sure to use whole grain.Jokes aside, I did solder everything on... to a genuine PCB. The identical breadboard circuit worked fine btw.How could I try getting a better ground on the scope? Sorry if this is basic, I'm very self-learned.Is anyone aware of how to import the board design from Kicad? I can only get gerber files, I can post those, not sure it that'll help. Attached just in case. Thanks for feedback so far.

author: Richard Head
author_rank: Frequent Contributor
timestamp: April 19, 2016, 08:38:49 am
content: As a test, clip the ground lead to the probe tip, set the vertical sensitivity to 5mV/div and then touch the tip with your finger. If there is any 60Hz pickup the ground lead is open. This is common with scope ground leads. They normally break at the most inconvenient time.

author: anvoice
author_rank: Frequent Contributor
timestamp: April 19, 2016, 11:56:57 pm
content: Quote from: Richard Head on April 19, 2016, 08:38:49 amTried it. If I use the ground lead on the oscilloscope itself, I get nothing using this test. If I use the ground lead of the circuit, I get the same huge 60Hz noise the rest of the circuit exhibits, finger or not.

author: IanB
author_rank: Super Contributor
timestamp: April 20, 2016, 12:59:54 am
content: OK, let's circle round and look at the basics of using an oscilloscope. An oscilloscope probe has two parts, a ground clip and a probe tip. You need both of them to make a measurement (because you cannot make a circuit with one wire).How to make a measurement with an oscilloscope:1. Make sure your device under test (DUT) is floating and isolated. Either it must be battery powered, or it must be powered by an isolated supply.2. Attach the ground clip of the oscilloscope probe to a suitable part of the circuit such as the ground plane of the PCB. If there are any sparks or smoke disconnect it immediately and go back to step 1.3. If you are using more than one scope probe, all ground clips must be connected to the same point (electrically) of the DUT.4. Touch the scope probe to the pin or test point where the signal is to be measured.Also, before starting, make sure everything is working and the probe compensation screw is properly adjusted.

author: anvoice
author_rank: Frequent Contributor
timestamp: April 20, 2016, 08:28:07 am
content: Yep thanks that helps. Noise is gone now, but the MCU keeps giving back different signatures to the programmer... I'll remake the circuit from scratch in case the MCU is shot and see if that helps.