Author Topic: Bizarre malfunction..... Serial I/O only works when 5v sent into input  (Read 1040 times)

0 Members and 1 Guest are viewing this topic.

Offline Mp3Topic starter

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Hey everyone,

I started a thread about this MIDI sequencer I am repairing here, before i came to realize there are larger problems: https://www.eevblog.com/forum/beginners/dead-speaker-repair-diagnosing/

 For anyone wondering about the title, basically MIDI is a serial protocol sent over a 5 pin DIN, specification sends +5v on pin 4. It's common for sequencers and other "master" controllers to send 5v on that line. It is not very common input devices like keyboards, controllers etc do. I have the service manual for this device and will quote how it describes the serial I/O implementation:

Quote
5.00 MIDI I/O
 The MIDI hardware is a standard implementation. MIDI out begins at the 8031's TXD port
(pin 11) and travels via R6 to the darlington pair Q1/Q2. Note that the 8031's internal pullup is not
very strong, and older units (revision A) may require the addition of an external pullup resistor for
the MIDI out to function correctly (see section 7.7).
 MIDI in consists mostly of the opto isolator (U4), protection diode D6, pullup R7, and
threshold resistor R5. Note that the threshold resistor may need to be changed in order to eliminate
false MIDI triggers (see section 7.6).

After attempting to revive the speaker with no luck, i continued using it, and came to realize it was not recording and input from a MIDI keyboard properly. Only a couple notes made it through. I switched to a known good sequencer (the same model) and everything worked as expected.

Since sometimes notes would make it through and sometimes not,  and i happened to know the MIDi keyboard i was using didn't send 5v on pin 4 (most don't, but it's common for sequencers to send 5v), i decided to try with a keyboard I knew sent 5v on pin 4. Suddenly everything worked almost perfectly - once in a while the sequencer would mix up a note and accidentally play it back the note next to it (for instance, if I press key 50, it might register key 51 once in a while).

I then took out the PCB to look for damage, and saw none, but i noted the MIDI DIN connectors were ever so slightly loose, so i added new solder to all of them. I noticed the reliability of recognizing incoming notes improved just slightly.

I explained my situation to a friend who then suggested I replace the optoisolator. Does anyone else have suggestions for what i may try? The circuit makes use of a couple 2N4401 transistors, so i may attempt to replace them with new 2N4401 i have here. I don't have any resistors to replace but i will order some when I buy a new optoisolator.

I'm wondering if the optoisolator could have anything to do with the missing click track referenced in the other thread, or if that's indicative of a different problem.
« Last Edit: September 08, 2018, 07:24:12 am by Mp3 »
High school graduate
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Bizarre malfunction..... Serial I/O only works when 5v sent into input
« Reply #1 on: September 08, 2018, 07:47:26 am »
It might have a problem with the internal supply, not feeding the 5V for the midi to work properly so when you add the external supply it powers from there and some things works as it should. Clearly there's another problem, hence why you still have a problem. Being the PS issue I'd start with just that, maybe the decoupling caps got damaged in the fight of the supply and makes a noisy environment reading/writing the wrong data.

JS
If I don't know how it works, I prefer not to turn it on.
 
The following users thanked this post: Mp3

Offline Mp3Topic starter

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: Bizarre malfunction..... Serial I/O only works when 5v sent into input
« Reply #2 on: September 08, 2018, 08:18:29 am »
It might have a problem with the internal supply, not feeding the 5V for the midi to work properly so when you add the external supply it powers from there and some things works as it should. Clearly there's another problem, hence why you still have a problem. Being the PS issue I'd start with just that, maybe the decoupling caps got damaged in the fight of the supply and makes a noisy environment reading/writing the wrong data.

JS

I should have checked this first for sure; the system runs on 9V AC and has a single 5V 7805 regulator. I will measure it when powered on with my multimeter and see what it shows. But if i have to remove it from the circuit for proper testing, i might as well replace it with a brand new one.

I'll also be sure to test out the decoupling caps with my ESR meter.
High school graduate
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Bizarre malfunction..... Serial I/O only works when 5v sent into input
« Reply #3 on: September 08, 2018, 08:54:35 am »
If you study the docs to MIDI, there is always +5V on pin 5 on midi-out devices; that has to be like that since the opto is inverting the logic of the signal; the signal on the sender side is common 5V and shifts out on pin 5 to ground, so that on the receiver side the signal is non-inverted.

my Midi keyboard has 5V steady on pin 4
 

Offline Mp3Topic starter

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Re: Bizarre malfunction..... Serial I/O only works when 5v sent into input
« Reply #4 on: September 08, 2018, 09:20:57 am »
If you study the docs to MIDI, there is always +5V on pin 5 on midi-out devices; that has to be like that since the opto is inverting the logic of the signal; the signal on the sender side is common 5V and shifts out on pin 5 to ground, so that on the receiver side the signal is non-inverted.

my Midi keyboard has 5V steady on pin 4

Thanks but this is not a question of studying the docs or not. I made sure I had my facts straight, but I was being lazy in my speech.

The reality is many devices don't offer enough current on the 5V line, and there are many MIDI devices that operate on 3.3v instead of 5v. (It is a well known issue with unpowered MIDI thru boxes. To avoid ground loops, MIDI thru boxes are either unpowered or have the MIDI ground isolated from the power supply if it is powered.)

I had found anything I had that was capable of powering an unpowered thru box, even if just taking an input and spitting it back out via the Thru port, would make the MIDI I/O on the defective sequencer work perfectly.
High school graduate
 

Offline Cervisia

  • Regular Contributor
  • *
  • Posts: 83
  • Country: 00
Re: Bizarre malfunction..... Serial I/O only works when 5v sent into input
« Reply #5 on: September 12, 2018, 10:46:34 am »
specification sends +5v on pin 4

MIDI is actually a current loop. The specification suggests a circuit that does have 5 V on that pin, but if a sender uses a different circuit, and if a receiver relies on a characteristic of the original circuit except the current between pins 4 and 5, then those two devices will probably not work with each other.

Quote
Quote
… darlington pair Q1/Q2 …
:palm:

Quote
Quote
… threshold resistor R5. Note that the threshold resistor may need to be changed in order to eliminate false MIDI triggers (see section 7.6).

This sounds as if it might be the problem that you're having. (Do you have a schematic? If not, what are the component values?)

But it's more likely that the optocoupler's LED is damaged.

Quote
… i added new solder to all of them. I noticed the reliability of recognizing incoming notes improved just slightly.

How did you measure this?  :-/O  I suspect that this did not actually change anything.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf