News:

Forum may be experiencing issues.

Main Menu

Arduino Controlled Pedal Switcher Prototype: High pitch noise...

Started by greysun, February 10, 2024, 06:00:09 PM

Previous topic - Next topic

greysun

Hi everyone! Forgive if this is the wrong spot for this (and I'm happy to move it), but hopefully someone can help...

Because I made so many madbean pedals (not joking - like 80%+ of my board originated here in some fashion), I needed a switcher... 9 years after starting, I'm finally finishing it up.

I just got through (with the help of the Arduino Forum) coding and breadboarding this monster 16 effect, 9-bank pedal loop/switcher. Here's a demo off the breadboard:

https://www.youtube.com/watch?v=0g-en5EuvsM (please excuse the messy practice area, hehe)

It functions great, but there's definitely some digital noise bleeding into the signal. I put the LEDs (neopixels) onto their own 5v supply, and the audio doesn't share a ground or anything with the Arduino or other 5v supply needs... but I also have no filtering on the audio signal at all. Not sure if that's what's needed, and if so, what that looks like? Would love some advice...

My next step is getting a few PCBs made for it, so I have my work cut out for me...

I'll add tap tempo, tuner and master bypass to it once I get it into the enclosure. Overall, I'm seeing a finish line, but just need to fix that pesky high pitch noise!

greysun

Quick update - I realized that I never connected audio ground to the rest of the system - once I did that, the noise is almost totally gone - though it's still a bit faint.

If there's some kind of high frequency filtering or something I should attempt, I'm all ears.

This is turning out pretty cool!

madbean

I would look for obvious noise sources in the setup - room lights, breadboards, jump wiring, the particular wall socket you are using (some can be quite dirty for audio), etc. It's possible the noise will go away once it's PCB built and everything is shielded in an enclosure. Also, stick a couple 470uF caps and a 100n film cap in parallel to decouple the main power supply if you haven't already.

Also, maybe disconnect any pedals in the loops one by one to see if the noise level changes.

jwin615

That looks like a huge and awesome project. I'm not terribly well voiced in Arduino but pretty good on the audio and RGI/EMI side.
Hopefully, as Brian said, it all goes away once in a box. I definitely think your noise is originating internally though, not stray environmental noise. If it's possible, turn off any unused radios(wifi, Bluetooth...).  Adding extra filtering to all (3?) power supplies would be ideal. With that much cabling in you test setup, your probably just picking it up from that. What does perturb me is that as you Arduino cycles, the noise changes. That leads.me to believe either it or it's supply are the source.
That being said, start with adequate filtering there. ┬┐Maybe? even a ferrite bead if you want to get fancy.
Also, on Brian's coattails, any change with all pedals bypassed vs all bypassed and all powered off? If so, try to narrow down which one. Start with any pedal with a charge pump/buck/boost. Could also try running just a bunch of patch cables through the loops(no pedal) and see if it's cumulative/additive as more pedals are added.
And of course, wiggle any wires where data and audio cross.
Could also tin foil hat the Arduino and see if that depletes it. If you find that's the origin and filtering/changing supply doesn't remedy it, you may have to try a different model or find a shielding solution. Oh, also, run it headless(no screen) if able.
Hopefully some food for thought and something eventually helpful. Really want to see how this comes together as it's freakin awesome!

greysun

Quote from: madbean on February 10, 2024, 11:14:20 PM
It's possible the noise will go away once it's PCB built and everything is shielded in an enclosure. Also, stick a couple 470uF caps and a 100n film cap in parallel to decouple the main power supply if you haven't already.

470u?! I think the largest I've ever had on hand is 220u... would that work? I also have a LOT of 100u.

Everything is powered from 9v into two 5v converters (l7805s - one powers the LEDs, the other powers the relays). Typical setup for those - 100u, 100n, 7805, 220n, 100u. I separated the LEDs cause they were originally making a LOT of noise. Realizing this may be due to the grounding issue where I separated audio ground from the system - Once I connected audio/system ground, a lot of the noise went away, but there's still a faint high pitch...

The arduino is so far powered by USB, so that could have implications - I'm just not sure how to connect actual power since I think it's center positive.

I'll make another video this morning, the noise is far better once I connected audio ground to the system ground.

Quote from: jwin615 on February 11, 2024, 04:21:50 AM
That looks like a huge and awesome project.

What does perturb me is that as you Arduino cycles, the noise changes. That leads.me to believe either it or its supply are the source.
That being said, start with adequate filtering there. ┬┐Maybe? even a ferrite bead if you want to get fancy.

Also, on Brian's coattails, any change with all pedals bypassed vs all bypassed and all powered off? If so, try to narrow down which one.

Could also tin foil hat the Arduino and see if that depletes it. If you find that's the origin and filtering/changing supply doesn't remedy it, you may have to try a different model or find a shielding solution. Oh, also, run it headless(no screen) if able.

Really want to see how this comes together as it's freakin awesome!


First off, thank you - when I started it YEARS ago, not many folks had used this method with an Arduino - it was sort of a hacked instructable that I happened upon. Now it looks like others have tried similar to varying degrees of success. I have a good feeling about this one, though - Some folks at the Arduino forum really ran with it and insisted I use better code, then helped get it beyond where I thought it would land, so I'm excited.

I think filtering is the key here - perhaps specifically along where the relays are powered. You also mentioned tinfoil hat-ting the arduino, which means I should probably figure out the center positive supply. I have an adapter, I just need to wire it correctly.

I did try disconnecting and reconnecting the pedals, as well as just bypassing them all - same noise, but again the ground issue resolved a lot (But not all) of the noise.

Not sure what you mean by headless/no screen? I'm running pins right into an arduino mega, so there's no screens attached yet.

I'll post the completed project here; realistically, probably March - I've had the enclosure for years, and it'll be super custom (tuner, tap, master bypass, etc.), so I gotta be realistic - but it needs to get done and the parts out of my closet drawer. I still have to layout and order the PCBs; probably through JLC, even though I'll get more than I need. Annoyingly, I had single coil relays that worked fine on the breadboard, but through a misunderstanding on the Arduino forum about how they were triggered, I ordered dual coils. Turns out they essentially work the same way in this context, but I think I can account for that in the design of the PCB and either version can be used. Guess I'll have an extra, hehe...

More to follow... will employ some of these notes this morning...

greysun

The issue is seemingly resolved. I have a 220uf electro cap and .1u box cap along the power rail for the relays. I also wired up a socket for powering the Arduino, so everything is now on the same ground, and the noise is quite minimal.

I just redid the demo altogether - the guitar is live the whole time and I never hear it in the recording. It's working pretty nicely: https://youtu.be/S_nsFbjlikU?si=gU5EaoL_g21BBZqA

I think it's safe to hit up PCB design and move to the next phase... WOO! 

madbean


jwin615

Awesome!
I has kind of going through my troubleshooting concepts, but putting them into exhaustive words isn't always easy
By headless, I meant no screen. Just Incase there was some super noisey rectification stage on it's pcb. Due to the nature of the world's economics, very few things are built to the best of their ability anymore and instead to the cheapest of their ability. That can result in noisy single stage rectifiers where proper octavirus could be implemented for just a few cents more. This is extremely common in LED lighting.
Cheap LED bulbs scream interference like banshees at times.
It appears that you have the room, so I would consider, if I were you, placing both a mains filter on an IEC cable connect coming into the unit as well as a dedicated power supply. Control what you can control and in terms of powerline noise, that gives you a lot of control for very minimal financial investment.
Emi and RFI are weird but those two things will give you some safeguards moving forward for various environments.
Congrats on getting working and quiet and rocking.
You could absolutely use the other pole of those relays for led indicators by the way.
Great work!


greysun

Quote from: jwin615 on February 12, 2024, 06:40:58 AM
Awesome!
I has kind of going through my troubleshooting concepts, but putting them into exhaustive words isn't always easy
By headless, I meant no screen. Just Incase there was some super noisey rectification stage on it's pcb. Due to the nature of the world's economics, very few things are built to the best of their ability anymore and instead to the cheapest of their ability. That can result in noisy single stage rectifiers where proper octavirus could be implemented for just a few cents more. This is extremely common in LED lighting.
Cheap LED bulbs scream interference like banshees at times.

Got it - yes, I think there's some remnant *very very very* faint noise from LEDs or the Arduino itself - I think the Arduino is built well, but the LEDs are neopixels and probably use the... ummm... less good components in exchange for proper scale (the documentation on their site is actually for 2 separate, but similar, products, so... I like their functionality, but feel like they may be accounting for some noise, hehe).

Quote from: jwin615 on February 12, 2024, 06:40:58 AM
It appears that you have the room, so I would consider, if I were you, placing both a mains filter on an IEC cable connect coming into the unit as well as a dedicated power supply. Control what you can control and in terms of powerline noise, that gives you a lot of control for very minimal financial investment.
Emi and RFI are weird but those two things will give you some safeguards moving forward for various environments.

I found this (looks to be a good friend of the forum, and I'm pretty sure I've purchased an EQ board from them) and will incorporate:

https://www.youtube.com/watch?v=julbbj4R3Ko

I have no 470u caps, but I do have a lot of 220uf - perhaps I run them in parallel and can get close? Trying to avoid another order and use up what I've got - pedal building can be so wasteful! hehe. I'll call this the mains circuit

Right now, separating all the component areas into chunks, I have the Arduino (9v), the relays (5v), the neopixels/LEDs (5v) and the LCD (5v). I think it would make sense to add the mains circuit going into 1a) the Arduino (9v) and 1b) a 7805 circuit (5v) that would power the neopixels and LCD (100u > .1u > 7805 > .22u > 100u). I would add ANOTHER mains circuit into 2) 7805 circuit for just the relays. Maybe overkill? But also... does it hurt?

Quote from: jwin615 on February 12, 2024, 06:40:58 AM
Congrats on getting working and quiet and rocking.
You could absolutely use the other pole of those relays for led indicators by the way.
Great work!

The relays are using both poles now - one for sending to the effect, the other for receiving from the effect. However, the Arduino handles the LEDs, and the neopixels are cool for that because they only use one pin for many LEDs, and I can control the colors through code.

Quote from: derevaun on February 12, 2024, 07:35:36 AM
wicked cool!

Thanks! I'll be pumped once it's actually in the box and working, but for now I'm taking the wins! hehe.

mjg


greysun

Quote from: mjg on February 12, 2024, 09:23:42 PM
Nice!  It's good to see it really coming along.

yes! And thank you for the logic NOT gate advice - it worked great for the single coil relays, which I've since replaced with dual coils because of a misunderstanding, but will definitely be designing the PCB for both (not that I'll be selling these things - It took me 9 years to build ONE, lol - but it's good to have options should something happen down the road - JLC has order minimums, after all).

I tried the mains wiring per that video above - the Arduino parts did NOT like it, hehe... but the relays did! Whisper quiet in the audio signal, so It's looking like I'll power the Arduino straight from 9v, the LCD and LEDs from 9v (via 5v converter) and the relays from 9v to mains to 5v converter.

Awesome help from you all - this is why I love the internet sometimes, hehe... Thank you all!