Simple in-line power conditioner?

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
I've built a neat little ultrasonic sensing circuit (reference link below for previous post, and amplifier diagram attached, for those who are curious), and in *most* applications, it works fine. I've deployed a couple of these in some friends' garages, and so far, everything worked fine for everyone.

Then I shipped one to a friend in Maryland, 3000 miles away, and it doesn't work. I can't plug in an oscilloscope at that distance, but my instinct is that he's got a power input dirty enough that my 120VAC to 24VDC power supply isn't smoothing it well enough. From what I can see from what the machine is doing, it looks like I'm getting an 8khz signal overlaid on the wave. (I recognize the signs from early in development, when I was using low-cost power supplies that didn't produce a clean output.)

So I'm trying to figure out how to economically solve this problem. Some challenges:
- I can't duplicate my friend's problem locally. I could, theoretically, ship him my oscilloscope and get readings for what his wall power looks like, and what the 24V output looks like. But I'd rather ship him something to fix the problem, if possible.
- I don't have unlimited money for this. I could add a 24VDC switching voltage regulator with all of the requisite parts, and go from using a 24V power supply to using a 36V power supply. That would probably fix it, but the cost would be significant. Similarly, if I have to start adding in $20 inductors and $43 capacitors, it's not going to work.

I guess the optimal solution would be to use what's already on the board, just try to figure out where to insert some capacitors to smooth things out enough to make this work. I've attempted a couple of variations on the theme of "low pass filter" to try to make it work, but I'm not getting usable results from those.

Thoughts? I'm at a loss here. Thanks.

Dan




https://forum.allaboutcircuits.com/...output-for-a-d-conversion.122866/#post-987433
 

Attachments

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
For a little more background, some things I've tried:

Option 1 -- a simple RL low-pass filter on the input:


Option 2: RC low pass filter.


Option 3: A simplified version of a transistor based voltage regulator. Because I already have a 24VDC input, I skipped the transformer and the rectifier and just went straight into the circuit. For C1, I ended up using a 1000uF capacitor instead of a 5000uF capacitor (for cost). Similarly, I couldn't find anything smaller than 0.1uF for C2, so I used a 0.1uF there. For Q1, I used a generic bipolar NPN transistor, ON Semiconductor SS9018HBU. Reading the datasheet now, it occurs to me that I probably put too much voltage across it. But before I go order more parts, am I even on the right track?

 

dendad

Joined Feb 20, 2016
4,635
Does it have to be 24V or will 19V be good enough?
If 19V is ok, there are lots of old laptop supplies around and they would work well.
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
Does it have to be 24V or will 19V be good enough?
If 19V is ok, there are lots of old laptop supplies around and they would work well.
Thanks for the reply. I should add some more constraints:
1 - It really strongly wants to be 24V. If there's a compelling reason to use a lower voltage, I could shift the whole circuit down to 19V, but it would be a gigantic hassle.
2 - I need a scalable solution, e.g. something where I can get an arbitrary number of the same part repeatably. Getting a handful of power supplies off ebay might work once, but if I need to get The Same Power Supply a second time, I may not be able to find them.

I should also note that the power supply I'm using now is a pretty spiffy thing, after testing a whole bunch of lower cost power supplies. So switching to a different power supply doesn't really seem like the best option. Link to power supply: https://www.trcelectronics.com/View/Mean-Well/GST40A24-P1J.shtml

Does that clarify the problem? Thanks for the help.
 

dendad

Joined Feb 20, 2016
4,635
Ok, 24V it is.
I just wonder what is not quite right with your design that is is so sensitive to power supply changes. That is what I'd be looking at, not just the power supply.
Most of my products are 24V too as that is a "standard" in industrial equipment. The power supplies used range from batteries, full wave and half wave rectified transformer supplies and switchmode.
None of the supply variations cause problems with the devices, so I really think you are looking at a symptom but not the cause.
Check your bypassing in particular. I tend to over bypass and that has worked for me. Also the layout can cause problems. Try to keep high currents away from sensitive areas.
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
I'm sure you're right -- my design is probably off in some way. I figured the best way to fix it would be to filter the incoming power. What is "bypassing?" How do I "over bypass?"

I've attached the circuit diagram for reference. Note that incoming power goes straight to everything with no filtering, smoothing, or bypassing of any kind. For example, there's a short run of wire straight from the incoming power to the amplifier, with no magical components there to smooth out any kind of ripple on the input power. I'm guessing that the smart play is to put capacitors in series with elements that need some smoothing? Like, "bypass" the component with a capacitor? What kind of capacitor am I looking at there, like what capacitance, voltage rating, type, and so on? Will the cheap aluminum ones work, or do I need to add some of those $12 capacitors that look like they came from an old TV?

Thanks for the help,
Dan
 

Attachments

dendad

Joined Feb 20, 2016
4,635
For a start, add a 0.1uF ceramic cap across the opamp supply pins, 11 to 4. You can try just soldering it to the pins under the board.
I'd also put a 10uF tantalum cap across the pins as well, make sure you get the polarity correct.
At the 24V in, a 100uF or larger electro, 10uF tant and 0.1uF ceramic, all from +24V to GND could help. Using multiple caps helps to bypass the different frequencies.
You may find that is enough.
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
Wow, ok, so a *bunch* of caps, in various kinds, across the same leads.

Is there any way that I can over-engineer this? Making changes is pretty easy, but the friend with the screwy input power lives on the other side of the country. So to test, I have to build something (or several somethings) and ship them to him to try out. Whether or not it works locally will be interesting, but not conclusive of success.

I'll see what capacitors I have available, and will try some things out. Thanks.
 

dendad

Joined Feb 20, 2016
4,635
All circuits need bypassing. And a good rule of thumb is to add a 0.1uF cap across the power pins on each IC. As close as you can.
Good bypassing can fix a ton of problems. If the power supply is "wobbly" it is like trying to build a house on crummy foundations.
At least add the 0.1uF cap across the pins. Then the larger ones can be further away if needed as they will look after lower frequency noise and the short leads are not so important.
Can your friend add a cap to the board himself?
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
All circuits need bypassing. And a good rule of thumb is to add a 0.1uF cap across the power pins on each IC. As close as you can.
Good bypassing can fix a ton of problems. If the power supply is "wobbly" it is like trying to build a house on crummy foundations.
At least add the 0.1uF cap across the pins. Then the larger ones can be further away if needed as they will look after lower frequency noise and the short leads are not so important.
Can your friend add a cap to the board himself?
I think that makes sense. I'll take it for action. Tragically, my friend is extremely skilled with Java programming ... and little else. So I'll have to build a spare board here, modify it, and ship it to him. I'd like to put together 2 or 3 versions of it, in hopes of getting one design that actually does the trick.
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
While waiting for parts, I re-arranged the drawing to try to make things more clear. It helps me understand things, and may make it more legible for you to follow as well. Then I inserted bypass capacitors, as suggested, at the 24V input and across the amp power pins. ... Then I said "Where else might a bypass be necessary?"

There is a multiplexer which gets 24V power, and which does not currently have a bypass, though it's getting 24V power, which has a bypass. Is it necessary to have a bypass next to the MUX as well? Perhaps just a 0.1 uF right next to it?

The line labeled "half power reference" is the reference baseline for the amplifier. It has a bypass to ground, but none to supply. Is a bypass to the 24V supply necessary?

See the attached PNG for reference -- I've tried to clarify with labels where I've added bypasses, and where I think they might be required, additionally. Not sure if the other thoughts are overkill and unnecessary, or if maybe I've learned a principle and am applying it to new cases. Thanks again for the help.

Dan
 

Attachments

dendad

Joined Feb 20, 2016
4,635
Yes, good bypassing is important. And bypassing the half volts ref is a good idea too. It is generally worth having a 100nF cap at each IC. I have seen circuits that do not and they often work ok but for a few cents why not?
The aim is to get clean, low impedance (for noise) power supplies to all parts of the circuit. Layout can cause troubles too so that may need to be looked at.
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
Hmm, ok. I think I'll make a couple versions of the board with various levels of bypassing, ranging from "That'll probably do" to "This is almost certainly overkill." Adding a couple of 0.1uF caps across both ICs seems pretty rational.

I'm sure you're right about board layout. When I was arranging components on the board, I had no idea that the bypass capacitors needed to be adjacent to their protected component. So, for example, those little 1uF and 0.1uF capacitors that connect the "half power reference" line to ground are 3 or 4 centimeters from the IC they bypass. It would have been possible to put them farther away, but it would have been challenging, haha. Beginner mistakes, right?

Alright, the next version of the board should improve significantly. :)

Thanks,
Dan
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
Alright, an update:
- I added a bunch of bypass capacitors, basically all over the board. It didn't work initially; troubleshooting revealed that one of the bypass caps on the "half power reference" bus was causing problems. I cut that one out and it worked fine locally. (Note that it's worked fine locally for a while.)
- I shipped the newly assembled board -- working and doing all the right things, with bypass capacitors -- to my friend in Maryland. Still doesn't work for him.

I have limited troubleshooting information, because he's 3000 miles away. From where I sit, it still looks like a power smoothing issue.

I'm trying to think if I can come up with some way to duplicate this failure here, possibly adding some kind of noisy appliance to the same circuit as the ultrasonic sensor is running on to try to make it fail locally. That'd save a week's wait and $30 shipping for every test, anyway.

What's the next step? Any ideas on how to smooth power more aggressively? Would it help if I posted the current circuit diagram?

Thanks for the help.

Dan
 

dendad

Joined Feb 20, 2016
4,635
Your circuit should not be that intolerant of power supply issues. And really, you have not ascertained that is the problem.
Does you friend have any electronic knowledge to help you debug it?
If he can, get detailed voltage measurements from everything.
It may be you need to get all his installation back for testing. Make sure EVERYTHING is sent back. Often it is the bits that "can't fail" so are not tested that are the problem.

One example I had was a board I fixed and sent to Sydney was not working. They had "done nothing but plug it in".
After many phone calls back and forth, it finally was revealed, "Oh but we did make a new power lead" They wired it up reversed!
If I was told that first, not that they "just plugged it in", it would have saved a lot of time. That is not the first time "we have not done anything" has proved to be false!
I should charge for my phone time;)
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
Your circuit should not be that intolerant of power supply issues.
... This seems to be a key point, so I'm going to ask for clarification. My circuit, as designed, should be tolerant? Or a circuit, in general, if designed well, should be tolerant?

And really, you have not ascertained that is the problem.
True. It's basically speculation at this point. My friend has essentially zero electrical or electronic capability, so getting more data from him is unlikely at best. I could ship him my o-scope and ask him to take a bunch of readings, but that'd be a long shot, at best. He's eventually going to ship back what he's got so I can at least double-check that it still works here. With today's installation, he literally pulled it out of the box and plugged it in. I'm trying to imagine what he could possibly have done wrong, given that I even showed him in person how to plug it in. And all of the connections are keyed, so there's no wrong way to do it.

I'm not discounting your idea, mind you. I'm just racking my brain to try to guess how he could possibly have screwed it up, and I'm coming up blank.

... I have one troubleshooting option available, if I can talk him into doing it: Before I flew out to MD with this setup, I tested it using a battery and an inverter. Worked fine. If the problem is that the power in his house is too unstable, has some harmonic that I'm amplifying, or whatever, powering it off a battery would isolate that out completely. If that makes it work, then the problem is definitely power. If that still doesn't work, then I need to stop wasting time troubleshooting power.

I'll let you know how it goes. Thanks for the help.
 
Top