Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Midi controller relay - noise problem

  1. #1
    Junior Member
    Join Date
    Dec 2015
    Posts
    15

    Midi controller relay - noise problem

    I'm building up a midi controlled DPDT relay which allows me to bypass my guitar effects. Everything works fine. The relay is isolated with the current drawn to ground by a 2n3904. However, I'm getting this ticking noise each time midi data is received. I'm pretty sure it's Midi interference that's leaking into my audio signal but I cant find what's the issue. This is especially an issue when I send a stream of Midi CC messages into the looper.

    The problem still occurs when I remove the 6N138 opto isolator, and even with the microcontroller removed.

    Any ideas?

  2. #2
    How good is your shielding and power supply decoupling?
    Can you send pictures/schematics/code?

  3. #3
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Vancouver Canada
    Posts
    503
    Is there any chance your code is sending an impulse at the relay because of a coding error in the midi processing?

    To test you could run with the code pointing to a different pin. If it's still there then it's not the code.

  4. #4
    Junior Member
    Join Date
    Dec 2015
    Posts
    15
    Quote Originally Posted by Edward View Post
    How good is your shielding and power supply decoupling?
    Can you send pictures/schematics/code?

    I'm not certain if power supply decoupling is an issue. I removed the microcontroller and opto isolator from the sockets and all that is connected is the midi plug into the midi input, as well as the 1/4" amplifier out to the guitar amp. I just drew the PCB using the schematic I got from midi.org and hence following the midi standard. Midi input shield and center pin are connected to ground only via a 0.1uf capacitor.

    I'll take some pictures when I'm back at my workshop.
    Last edited by tyzjames; 02-17-2017 at 02:48 PM.

  5. #5
    Junior Member
    Join Date
    Dec 2015
    Posts
    15
    Quote Originally Posted by oddson View Post
    Is there any chance your code is sending an impulse at the relay because of a coding error in the midi processing?

    To test you could run with the code pointing to a different pin. If it's still there then it's not the code.

    Thanks for the idea. No chance of that happening as the problem still occurs even when I remove the microcontroller. I'm wondering if it is a EMI EMC problem

  6. #6
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Vancouver Canada
    Posts
    503
    When the Teensy is removed how is the MIDI circuit still connected to the relay?

    Whatever the connection... that's where the noise must be coming through. Likely on the ground side if bypassing (removing?) the optocoupler didn't sort it.

    If it had it would have pointed to power fluctuation when the optocoupler goes active.

    But if you removed it then nothing should be changing on the power side so it must be incoming voltages leaking from the physical MIDI interface circuit presumably through a shared ground with the relay.

    ...details required to say more... but do check your MIDI-in shielding isn't electrically connected to your circuit.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,135
    Maybe a ground loop problem?

    On simple way to explore & troubleshoot ground loops involves powering some or even all devices from separate batteries. If some devices are passing power supply currents through sensitive analog grounds, usually you'll discover the problem magically goes away when you remove the power connections and run stuff from isolated batteries. Of course batteries probably aren't a viable solution, but they're at least an easy way to experiment when what's usually a really difficult to understand problem.

  8. #8
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Vancouver Canada
    Posts
    503
    Quote Originally Posted by tyzjames View Post
    Midi input shield and center pin are connected to ground only via a 0.1uf capacitor....
    Say what!?

    There should be no connection between the shield of the input cable and your circuit... I'm 99.99% sure of this...

    I think the cap is less a problem than if it was DC grounded but I would assume non DC changes in the shielding's charge could be heard as clicks.
    Last edited by oddson; 02-17-2017 at 08:05 PM.

  9. #9
    Junior Member
    Join Date
    Dec 2015
    Posts
    15
    Quote Originally Posted by oddson View Post
    Say what!?

    There should be no connection between the shield of the input cable and your circuit... I'm 99.99% sure of this...

    I think the cap is less a problem than if it was DC grounded but I would assume non DC changes in the shielding's charge could be heard as clicks.
    Got this from the Midi standard:
    Pin 2 of the MIDI In connector shall not have any DC path to the receiver’s ground. However, a connection through a small capacitor (0.1μF typical) to ground is optional for improved high-frequency (RF) shielding.
    The shield connector of the MIDI In jack shall not have any DC path to the receiver’s ground. However, a connection through a small capacitor (0.1μF typical) to ground is optional for improved EMI/EMC performance.
    The shield connector of the MIDI Out and MIDI Thru jacks may be unconnected (N/C) or connected to ground for improved EMI/EMC performance.

    I'll try removing the caps to see how it works.

  10. #10
    Junior Member
    Join Date
    Dec 2015
    Posts
    15
    Paul and oddson, thanks for the inputs. I'll give your suggestions a go and update the results

  11. #11
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Vancouver Canada
    Posts
    503
    I guess it's OK but I'd never seen it implemented like that.

    Do check for a DC connection (maybe you have a solder bridge somewhere).

    The behaviour you described sounds like it has to come from the physical connection of the input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •