Switching noise of ac motor

Go To Last Post
64 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have noise problem with switching small ac motor from mcu. The circuit is working fine with ac lamp and dc motor. I switch it using relay and it is on separated board. The relay board is simple,transistor drive the relay.i tried separated supply for mcu board and relay board but the problem still exists. It restarts and display random numbers on lcd

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the real world.

Combatting EMI effectively is a pretty big chapter in the electronics devision.

Your desctiption is not much more helpfull than:

 

"My thing does not work" HELP!!!

 

Before you put in some effort to ask better questions, I want to advise you to first read this:

http://www.catb.org/~esr/faqs/sm...

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Show us a picture of your setup.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Am i in the wrong section? I explained the problem. I did google search and i found that RC snubber is good for this problem so i used series 120ohm with 100nf ceramic capacitor across the relay contacts but nothing changed

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You might think the problem is simple, but in reality it can be fairly complex. Your circuit consists of invisible capacitors, transformers, inductors and antennas but you don't realise it. We have had a number of similar problems over the years here so you might want to search our previous discussions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is my setup

and the pcb of mcu

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have inadequate clearance on your relay board.

Your photo of your setup doesn't show us enough - you have some ps2 connectors - where do they go?

 

Remember - current flows in a loop. All your wiring may be part of that loop. Is there a transformer in there as well?

Last Edited: Sun. Mar 18, 2018 - 10:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no transformer . the ps2 go to the atmega8

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That photo was next to useless. Show your WHOLE setup. The quality of the answers is related to the quality of the information you provide.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this good?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't see any decoupling caps across ALL of the microcontroller's power and ground pairs. Are they under the pcb perhaps? They need to be right at the IC's pins for best effect.

 

Ross McKenzie ValuSoft Melbourne Australia

Last Edited: Sun. Mar 18, 2018 - 10:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is 1uf electrolytic cap at the right of atmega and 100nf at left.other than caps on the regulator output

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not good enough by a long shot. You should have a 0.1uF directly connected between pins 7 and 8 and another 0.1uF between pins 20 and 22. (If I remember correctly you are using a ATMega8)

 

Please show us the circuit diagram (not the pcb or its layout). The circuit diagram is also called the schematic in case you did not know.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I still can’t see how the unit is powered.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure you have a clamp diode across your relay coil (especially if transistor is bipolar).

 

Why have you not included a properly drawn schematic??!!?  

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There’s diodes across the relay coils from what i can see. What worries me is the lack of electrical safety - clearance on the pcb tracks and thin wiring that is probably not fused adequately.
Engmado - the basics of electrical safety are:
1. Wire size suitable for the voltage and current.
2. Fuse to protect the wiring. Wire rated for 1A - use a 1A fuse
3. Adequate clearance between mains and extra low voltage circuits. Around 6mm on pcbs.

Use a earth leakage breaker for your protection.

Last Edited: Mon. Mar 19, 2018 - 02:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I find it hard to give some supportive advise here.

As I said in post #2

myself wrote:
Combatting EMI effectively is a pretty big chapter in the electronics devision.
When I look at your photo's I see the result of someone who put quite some effort in (probably) one of his biggest projects ever.

Changing what you did however into a reliable product would require a complete redesign.

 

But with a bit of luck you might get it working good enough for your purpose.

So I'll try to limit myself here to some small stuff which might help:

 

1). Get some Ceramic Capacitors and solder them directly between the power pins on top of your uC.

2). Put series resistors on the uC pcb for all outgoing wires from the uC. If you have vor example a 4k7 base resistor in your relay circuit, then split that resistor in 1 and put 2k2 on the relay board and put 2k2 on the uC board.

3). Put series resistors on all uC inputs. At least 100 Ohm, but higher is better (For EMI) but if these get too big ( > 10k or so) you get other problems.

4). Separate all power wires from signal wires. The further apart the better.

5). Keep all power wires tightly together. Twist them and put ty-raps or tape around them.

6). Keep all signal wires tightly together. Twist them and put ty-raps or tape around them.

7). Put a real "common mode filter" in the power supply circuit, or at least an inductor. Almost anything > 10uH or so will probably help.

8). Put some split ferrite core's (see picture below) around your cabling.

9). Put a piece of sheet metal between the Relay board and the uC board. This piece of metal should be earthed / grounded. ( Can be made from ALuminimum soda can or steel preservatives can).

 

Laird-Signal Integrity Products 28A0640-0A2

If the list of suggestions I wrote above do not help enough, then I reccomend you do some background reading on EMI. Different kinds of it, how it gets into your circuit and how to combat it.

Then start (almost) all over. Design a 2-sided PCB with a good ground plane, and possibly a power plane opposite your ground plane (high capacitive coupling).

Put some EMI counter measures such as small ferrite cores and inductors on the PCB.

You could use some opto couplers to keep the EMI away from the uC.

 

Edit:

Electrical wires soldered to a PCB have a tendency to break close to the PCB on the edge where the solder (suched into the wire) stops and bare copper begins.  If you bend them flat to the PCB and glue them to the pcb the mechanical stability & reliability will improve.

 

 

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Mon. Mar 19, 2018 - 02:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you looked at your reset circuit--what do you have there?  Where is your schematic--do you want help?

 

The relay transistors need to share gnd with the gnd at the micro, so the supplies can't be 100% separated.  Alternatively, they could instead share V+, (depending on your circuit), but this is both rare and undesirable.

If the gnds were 100% separated from any possible direct or parasitic connection, the logic signals would mean nothing when they arrived at the relay board.  That would make them mad.

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this is schematic ,i didn't use resistor on mcu output as it will weaken the led current two. i used ceramic 100nf between 7&8 pin and 1uf electrolytic between 21&22 isn't this enough?

the relay board is separated from MCU board and they share the gnd. i tried separated +vcc but it doesn't help. I also added ceramic disc capacitor across every switch but nothing changed

Attachment(s): 

Last Edited: Mon. Mar 19, 2018 - 07:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bypass caps need to be ceramic, not electrolytic.  The ESR of an electrolytic is simply too high to meet the need.

 

100 nF on each pair of power pins.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You still havent answered my questions. Do you want to solve your problem or run around in circles?

Where does the 12V come from? Have you tried powering your circuit from a battery?

Your circuit shows a number of push button switches, but i don’t see them on your pcb.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

off course, i want to solve my problem. 

12 v come from adapter  like this. i also tried the psu of computer in vain. I didn't try the battery

the push button is connected to the pcb through ribbon wires as they won't be on the pcb

Image result for adapter or adaptor

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you realise this is critical information? I gather the power supply is a switched mode (light) rather than an actual iron transformer(heavy)? 

If it is a switchedmode, the transients are coming down the mains, through your power supply and through your circuitry. Your pushbutton inputs are acting as antennas. So, devise some tests so you can determine where the problem is occurring - try a battery is #1, #2, remove your pushbutton and other wiring that is not needed. Write some code so you can operate the motor and determine if there is a difference. Also remove your lcd, as its wiring will act as an antenna. Strip it back to the minimum and work forward.

 

If your tests determine the problem is the power supply, then look at how the current will flow across your 0V wiring. Make sure it doesn't flow across your pcb.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

engmado wrote:
Is this good? Attachment(s): Image icon 15214117795801607037728.jpg Image icon 1521411811219-2053523644.jpg

 

I notice in the relay board, the schematic shows three relays with the same part #, but one relay is different then the other two?

In the picture of the relay board, one transistor it oriented different then the other two??

 

On your mpu board, you need 100nf caps on both sets of vcc/gnd pins, no the 1uf electrolytic will not work here.

 

Jim

 

 

Click Link: Get Free Stock: Retire early!

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your schematics look like someone spent a heavy night of drinking.  Why the complete mess?

 

Aside from that, how does gnd on the relay board connect to gnd on the  micro board???

 

 tried separated supply for mcu board and relay board but the problem still exists

 

 

Also, how many times did you try changing hookup between dc motor, lamp and Ac motor...did the dc motor & lamp work each time?  How big of an AC motor?

A 100W bulb can have a pretty good 10x surge, so its a good fast transient load (compared to a motor revving up).

 

Try adding 0.01 uF on your reset line--any glitch there & you are resetting & also set BOD fuse as well. 

When in the dark remember-the future looks brighter than ever.

Last Edited: Mon. Mar 19, 2018 - 04:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used Psu of computer , i think it's switchedmode, but in vain.

I tried the battery for MCU board and power supply for relay board the problem still exist. I tried the battery for the whole system but it get empty after an hout so i can't judge it but i noticed that the lcd light is constant with battery ,but with power supply the light went faint with switching relay

Last Edited: Mon. Mar 19, 2018 - 10:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

they are connected with wires to separate them. what doesn't like you in the schematic?

the dc motor and lamp are working good. the problem with ac motor ( small grill motor), by the way the problem is n't frequent may be every 10 switching.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what doesn't like you in the schematic

Inputs go on the left, outputs on the right...your valve driver schematic is all backwards...the control signals should arrive on the left, you relays should be on the right.

 

Some connection look very jagged--why?    Show where you proceor pins connect to, not some twisted scramblwe  all over.

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The schematic does not represent your system.
You need to formulate a test that will determine if there is a problem or there isnt. Otherwise you go around in circles relying on magic.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes there is a problem when connecting ac motor, how to fix it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You havent given us enough information yet. I keep on telling you that the problem is more complex than you realise.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, ask me all questions you want and i will answer. I can't know what you are thinking.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try adding 0.01 uF on your reset line--any glitch there & you are resetting & also set BOD fuse as well. 

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I connected 10nf polyster cap on reset
I put aluminum paper on lcd cables
I separated the power supplies with common ground
I put the pushbuttons all on the board directly
Then i connect the relay and disconnect it manually fast
It resets and random number appears on lcd but not every time.
Is there any thing not on its place on pcb or trace path is wrong.
Do the jumbers that pass over the ground plane can cause this? ,i removed some jumber and connect resistors.

Last Edited: Tue. Mar 20, 2018 - 08:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi engmado

 

A polyester cap is not good enough. It has a considerable self-induction since it is rolled layers. Use ceramic caps only for decoupling, both on VCC/GND and reset.

 

Your power lines has large loops, and when relay opens the loops will emit electrical and magnetic noise. Twist the power wires in pairs to reduce noise, both power wires to the motor and the power supply..

 

Put an oscilloscope on VCC and reset of the uC to see what is going on. Noise on VCC can reset the uC.

 

And then I could suggest to replace the relay with a triac, maybe an opto-triac. That ensures break only at zero crossing. That will reduce noise pretty much.

Last Edited: Tue. Mar 20, 2018 - 09:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have 100nf ceramic i will use it.

could you tell me if the decoupling cap across vcc of IC is correct path for ground connection 

Attachment(s): 

Last Edited: Tue. Mar 20, 2018 - 10:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

random number appears on lcd but not every time.

An actual number or garbage?  That tells a story.

 

If garbage dots, ensure you wait 10 ms before writing to the lcd ...powerup can be slow.

 

 

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the first post, it is written:

 

I have noise problem with switching small ac motor from mcu. The circuit is working fine with ac lamp and dc motor.

This means that the relay coil has nothing to do with it. Also, the fact of switching AC has nothing to do with it (since OK with AC lamp). In all likelihood, it has to do with switching relatively high currents when the relay closes or opens near the peak of the line voltage. This is a particularly difficult nut to crack. Usually, the first step is to immunize the electronic circuit with as much bypass cap as you can manage. Grounds may also be an issue, especially if there are long ground traces or wires rather than a good ground plane.  Sometimes, common-mode chokes on the power input line do help. This is really where you need to put your effort because snubbers and such in the AC power circuit often result in unwanted power consumption.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sometimes it display characters in place that isn't its place and sometimes garbage . it was working fine without relay. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 it was working fine without relay.

Do you mean the relay or the load on the relay (motor)...your decryptions seem to vary.

What makes you think there is some sort of reset going on?  How would you see the reset?, just because the display might look scrambled does not mean the micro is resetting.

 

You should put out a long pulse (like 1 second) on a pin with an led at every powerup/reset....then  it is easy to tell if the processor is actually resetting. That is probably the first thing to determine.

 

sometimes it display characters in place that isn't its place and sometimes garbage

 Beware that could also be a general software bug (such as a numeric conversion/string problem upon a large/small/offscale startup value).

 

A cold lamp has a pretty high peak current surge (a motor may be lower for longer).  A motor, of course, makes a nice magnetic field to couple into any wire loops.

 

Again, first you need to know 100% whether your micro is truly resetting, or you will waste a lot of effort.  If you find resetting is happening, try lowering your BOD fuse from 5v, to 3.3v

 

 

Then i connect the relay and disconnect it manually fast

 

What does that mean? ...you are applying voltage to the relay coil with a piece of wire?...  The diode must always remain connected across the coil even if you "pull a wire".   Does the problem happen when the relay closes , opens or both? 

When in the dark remember-the future looks brighter than ever.

Last Edited: Tue. Mar 20, 2018 - 11:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No picture of the display yet. You’ve still not given a conclusive result to the tests i proposed. The secret is understanding where the current is flowing. Until you give us the WHOLE picture, you’ll keep going around in circles.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

you’ll keep going around in circles.

I got a circuit that ain't no melody, I'm gonna sling it to my friends 

Will it go round in circles, will it fly high like a bird up in the sky

I got a story ain't no sense, I let the bad parts win every once in a while

Will it go round in circles, will it fly high like a bird up in the sky

I got a program that ain't got no steps, I'm gonna let the music move me around

Will it go round in circles, will it fly high like a bird up in the sky
Will it go round in circles, will it fly high like a bird up in the sky

 

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

engmado wrote:
I have 100nf ceramic i will use it. could you tell me if the decoupling cap across vcc of IC is correct path for ground connection 

 

Hi engmado

 

Looking at your PCB and guessing a little.

PCB shown from top side, right?

IC1 is Atmega328 right?

 

Then GND is pin 8 and pin 22 on Atmega328. But they are not connected directly! They should (must!) be connected with an as short as possible trace or wire. If I read the PCB correctly, pin 8 and 22 are connected through a power mosfet pin, which creates a wide open loop that can collect a lot of noise from the surroundings. Thats a possible reason for your problems. Solder in a short wire between the pins.

 

If you have access to a scope, use it to search for voltage spikes on VCC, GND and reset pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

 it was working fine without relay.

Do you mean the relay or the load on the relay (motor)...your decryptions seem to vary.

What makes you think there is some sort of reset going on?  How would you see the reset?, just because the display might look scrambled does not mean the micro is resetting.

 

 

i mean the motor. 

i can see reset because there is a clock on display and it start from zero when reset.

avrcandies wrote:

Then i connect the relay and disconnect it manually fast

 

What does that mean? ...you are applying voltage to the relay coil with a piece of wire?...  The diode must always remain connected across the coil even if you "pull a wire".   Does the problem happen when the relay closes , opens or both? 

I connect and remove the wire from output pin to check the reliability of the circuit even with fast action. but the normal operation is n't fast. 

Last Edited: Wed. Mar 21, 2018 - 09:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

when i connect and remove the wire from output pin to check the reliability of the circuit even with fast action ,VCC on atmega 8 as shown in picture D1, Vcc has spikes on it (Is that mean diode isn't fast?)

but in normal operation when i let the program turn it on and off(without i interfere) the VCC is shown in picture D2, Vcc is almost constant. 

 

Attachment(s): 

Last Edited: Wed. Mar 21, 2018 - 09:23 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi engmado

 

Setting your scope in auto mode will likely not catch the problem.

 

Set the scope to single shot, trigger on negative edge and a voltage just below VCC. You are looking for a single event.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is that mean there is no noise on VCC?

I pressed autoset on oscilloscope I think VCC is constant now

Last Edited: Wed. Mar 21, 2018 - 10:09 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also be aware that the scope may pick up the same transient so be aware that what you see may not be reflecting reality. For example, my scope picks up the washing machine in my house. The interference is most likely coming through your power supply. Still no picture of the lcd. I had what seems to be an exact copy of your problem - a micro controller running some relays switch ac loads. The first problem was wiring. Separating the wires resolved that. Then the next problem was the mounting of the lcd. I had to mount it on a piece of plastic with adequate distance from the chassis. That took some time to figure out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

engmado wrote:
Is that mean there is no noise on VCC? I pressed autoset on oscilloscope I think VCC is constant now

 

Autoset on scope will likely not show transients. Autoset is good for repeated events, and useless for single events such as transients.

 

You have to work a little with your scope.

 

1. Set scope to single shot / single triggering.

Trigger to fire once on negative edge.

Trigger on voltage just under VCC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Then the next problem was the mounting of the lcd. I had to mount it on a piece of plastic with adequate distance from the chassis. That took some time to figure out.

Is  that mean it is connected to pcb through wires?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

peteralarsen wrote:
1. Set scope to single shot / single triggering. Trigger to fire once on negative edge. Trigger on voltage just under VCC.

sorry, i didn't get this how to do do it my oscilloscope is  gw instek 1104b it's new. what do you mean by Trigger to fire once on negative edge. Trigger on voltage just under VCC?\

I selected single then negative edge trigger mode, the probe is on VCC, Is that what you mean?

Last Edited: Wed. Mar 21, 2018 - 12:34 PM

Pages