AC Ripple in DC Line - Page 1
Forum section: electronics / beginners

author: Blade2021
author_rank: Newbie
timestamp: April 13, 2018, 06:01:20 pm
content: Hi All,First post so excuse my ignorance if I miss any rules or regulations. Heres my scenario that i've been fighting with for quite some time. Still haven't gotten really the magical answer. I am working with a Logic Level (5VDC), and industrial level (24VAC) system. I am using a rugged built arduino to control a set of 8 inductive coils to perform various operations on an industrial machine. Works great 85% of the time. However after running for some time, the LCD Display beings to crap out. Aka, starts displaying garbbled text. I have been working on this for over a year now with no fix just yet but I'm very stubborn so it'll give in eventually. I have tried using a MOV, although I do not know the values of it off the top of my head I will get those if requested. I do not know the exact size of the main coil that is causing me issues but we'll get to that. I recently just purchased an oscilloscope to help me troubleshoot the issues i've been having and this is what i've found so far. I do have a 200mV ripple coming out of the DC line. This ripple is not there if I do not run the main conveyor motor.I have unplugged the relays that go to the coils to see if they could be picking up the noise even though they do not connect to the motor directly. This did not change anything. I left the power supply (a typical wall wart) unplugged with the noise still on the DC supply line which leads me to believe it may be an EMI issue, but I don't know if 200mV is within reason for a typical ripple?Another scenario i've been working on is ordering the right MOV for my circuit. Its all 24VAC so if the math from the various websites is correct I should be looking at a varistor with a 36VAC maximum. Correct? Well that was set in stone in my thought, till I looked at the scope and it says my AC wave is typically 40VAC even though its a 24VAC system. Obviously this is probably cause its measuring wave top to wave bottom. So would the 36VAC varistor work or should I be looking at a varistor with a 40VAC rating?Please see attachments for scope images. In the first image I show the ripple coming through my DC power supply. In the second image (pic_12_1), I show the voltage spike when triggering the coil off.Thanks in advance for your time in reading this giant post.- Matt

author: tpowell1830
author_rank: Frequent Contributor
timestamp: April 13, 2018, 06:13:15 pm
content: First, welcome to the forum Blade2021. This is an interesting problem, however, it will be near impossible to troubleshoot with the given information. If you would post your schematic and the measure points of your scope probe, it would help immensely. Otherwise, we will be here for days speculating the scenario.

author: Blade2021
author_rank: Newbie
timestamp: April 13, 2018, 06:20:43 pm
content: My apoligies! I got ahead of myself and forgot to include those. I'll upload the schematics of both my latest design and my sub control which I'll explain below. I placed my probes on two places, which i'll explain here while I try to edit one of the drawings. The first probe I placed on my 5V distribution on the sub control with a link to the ground on the sub control. The voltage spike one shown in my OP, was taken with the ground lead connected to the AC neutral, and the probe connected to the SSR relay, relay #7. Shown on the AASchem. Again I'll do my best to do a quick edit of the drawing to better explain this.Thank you for the welcome,- MattEDIT:Hello, I just edited the schematic file and included where I put my probes. I also drew boxes around them just to highlight them the best I could. Tinycad doesn't give very many options for that kind of thing sadly.

author: Twoflower
author_rank: Frequent Contributor
timestamp: April 13, 2018, 06:31:57 pm
content: Depending on the design a garbled text on a LC Display could indicate a problem with your software. That happened to me. After some poking around I found my stupidity: I did not clean up the stack after returning from subroutines (yes it was assembler code). But in your case that might be a memory hole that floods your memory until it reaches the data-structure you want to display. A missing \0 at the end of a string, a for loop that overwrites it. The possibilities for that are manifold and easy to oversee.The 200mV could stray in through inductive coupling as you already assumed. To provide better support a picture or two of the wiring might be useful and probably the location of the 24V transformer. But if this is 'only' the 200mV and the result is all time the same (garbled text on the display) I would spend some time looking into the code. Because power supply inducted problems are usually more random.

author: Blade2021
author_rank: Newbie
timestamp: April 13, 2018, 06:39:09 pm
content: Quote from: Twoflower on April 13, 2018, 06:31:57 pmYou know I didn't think this was the cause in the beginning of trying to debug this but for some reason that does kinda make sense. I will look further into the code to see if I possibly missed something. I update the LCD with alot of information so its defiantly possible. One scenario that does still kinda point the finger at a EMF issue is when I turn the coil on, off, on, off, very repetitively it makes the LCD go completely blank. vs just unreadable text. This is something that is still random but I can reproduce.Quote from: Twoflower on April 13, 2018, 06:31:57 pmThe 24VAC transformer is located in a separate electrical panel aprox. 3 - 4 feet away from this control box. However getting a picture will be easy enough to produce so i'll grab one. Just don't be to critical on my wiring jobI'll edit this post after I get it.

author: Twoflower
author_rank: Frequent Contributor
timestamp: April 13, 2018, 07:18:49 pm
content: OK, I think that picture of the transformer is not needed. Unless the transformer is huge and has a extreme magnetic stray field ;-)One idea would be to run the code without the opto-relays to rule out problems from the power supply. But looking at your schematics it could be that you actually have more noise if you start to switch things and power on the LEDs of the switches. Not sure if you connected all GND pins of the controller The schematics are not fully clear here. It is very hard to relate both parts of the schematic.Also I'm not sure if you can do this with the 5V and the 6V on the controller board. Unusual, but not impossible. It would be good to check if the inputs are 6V capable.One idea is to setup the scope to single-shot and setup the trigger to fire if going below 4.5V. The measurement point is on the MCU-Board with a as short as possible GND wire (also connected to the MCU-Board). And see if your controller suffers any voltage drops in addition to the 200mV.P.S.: A very friendly note: Good thing that you noted the heat-sink requirement! On the other end the schematic is extremely hard to read. For example you seem to use the VDD sign for different supplies (the upside-down T), use the upward pointing arrow. The regulators are drawn different; one as the output on the right side (the common way) one to the bottom (very uncommon).

author: Blade2021
author_rank: Newbie
timestamp: April 14, 2018, 12:57:21 am
content: Quote from: Twoflower on April 13, 2018, 07:18:49 pmYeah, I could edit them next time i'm back at the office. Basically I have two types of sensors, one runs on 5VDC, the other on 6VDC. Then other various components aka, the controller, the relay board, etc. I have the ground of the controller connected to the 0V on the control and the the ground portion of the power distribution. I thought I had a picture kicking around to help show it but I can't find anything. I will get one the next time i'm at the office.Quote from: Twoflower on April 13, 2018, 07:18:49 pmThat I will give a try on Monday and report back my findings. I'm still very new to using a scope so might take me a little bit but i'll figure it out. As far as the regulators go, that is actually how they are made to be honest. Heh, its kinda funny I fried the first one, when I was prototyping cause I figured like you would expect that it followed the same pin out as normal but it is indeed a uncommon pin out. The VDD sign was my easiest way to show the different voltage levels. I do apologize for the confusion it may have caused. :/So I will defiantly take a wack at your suggestions on Monday when I get back to the mill and see what I can come up with. Until then thank you for your help. It is greatly appreciated and Hope you have a great weekend.- Matt

author: Twoflower
author_rank: Frequent Contributor
timestamp: April 14, 2018, 09:45:18 am
content: The schematics helped no doubt. Only it s a bit easier to read them if the 'graphical language' is more the common style. So no worries here. It was just meant to be a constructive comment. And I've seen much worse schematics.As the controller has to drive several loads (the LEDs and the solid state relais) the ground connection to the MCU can be a weak point. So you should make sure the controller grounding is not the weak point in the design.The single-shot is reasonably simple. In your picture 9_1 you had set the trigger level to 5.06V, reduce it to 4.5V. And set the trigger to 'Single' (probably now it's set to 'Auto') and make sure it is armed. If everything is fine nothing happens (no trace drawn). But as soon as the voltage drops or recovers, depending on the trigger slope, you get the plot. You can try that by slowly increasing the trigger voltage until the trigger voltage crosses the measured supply.Have a nice weekend too!

author: kony
author_rank: Regular Contributor
timestamp: April 14, 2018, 02:25:38 pm
content: Why don't you bulid this with COTS PLC module + HMI panel? They are cheap (sub 200$ for what you need, including the programming cable), ruggedised and prooven working. Redesign from prooven modules will be much quicker way to reach reliable solution, and most likely even cheaper with your time being accounted for.

author: Blade2021
author_rank: Newbie
timestamp: April 16, 2018, 02:05:03 pm
content: Quote from: kony on April 14, 2018, 02:25:38 pmAt this time, we have to much invested into our setup to switch. I've never been a very big fan of the ladder logic that PLCs use myself but I do appreciate the suggestion.Quote from: Twoflower on April 14, 2018, 09:45:18 amSo I have some good news and bad news. Good news is I connected a secondary ground from the controller to the power rail to help like you suggested. After doing this I ran a few tests and ran the machine for a few mins to see if I seen any changes. Normally I can reproduce the garbled text by switching a couple of relays somewhat repetitively. This time I did the same, but saw no changes in the LCD so we might be in luck; That's where the bad news comes in, Right now we only have so much product for the machine so I won't know until we can run it more. I am still going to hook up the scope leads to test for a voltage drop sometime this week (hopefully). If that extra ground really fixed the issue then I will be somewhat a loss for words. In a good way. I have been fighting this for quite some time so that would be a very cheap excellent fix! So with that being said. I will reply the results whether they be good or bad as soon as I get some and go from there. Like always I do appreciate the help, all input is gladly accepted critical or not. I will make adjustments to my schematic to try to make it more standard.Thank you,- MattEDIT: Forgot to mention I am also going through the code to double check that as well.

author: Twoflower
author_rank: Frequent Contributor
timestamp: April 16, 2018, 06:13:11 pm
content: That definitely looks like a not sufficient ground to the MCU board. To be on the save side connect all GND pins of the MCU. With most current going through the GND pin(s) it is not that important but a good idea to also connect all of the supply pins. With the additional grounding the Scope measurement is probably useless as I expected to see what the wires helped with.Yes the ground is sometimes overseen. And it is as important as the VCC routing. In your specific design the GND is more important as the current running through the IO pins adding to the MCU supply. So a much higher current is running through the GND pin. Also you should check, if the MCU allows such load at all. Sometimes they say a single pin can drive up to xx mA but the maximum total is lower than the sum of all outputs at this max current. Ant longer wires might create additional load above he static current the LEDs need.So probably it's worth to think about an additional driver stage. That driver would also make the setup more robust as they come with better protection circuits build in.

author: kony
author_rank: Regular Contributor
timestamp: April 16, 2018, 06:30:02 pm
content: Please don't get bitten by the sunken costs fallacy. I am suggesting PLC as very feasible option how to get stuff done in almost guaranteedreliableway. Judging solely from the schematics you had posted, there is much left to be desired for it being called industrial grade design or ruggedised. Ladder might look bit dated and cumbersome to work with, but it gets the job done.

author: Blade2021
author_rank: Newbie
timestamp: May 02, 2018, 04:43:26 pm
content: Quote from: Twoflower on April 16, 2018, 06:13:11 pmHello there!, I have an update. Everything is working great! I did find more noise in another machine that was causing similar issues but I traced it to a bad solder point on one of my support capacitors. No more noise, no more issues. Thanks for your help.- Matt