Building the Mini YM synth MIDI shiled
  • I’m going to build the MIDI shield for the Mini YM Synth following these schematics (attached below), but I need a little help, tell me if this BOM is correct please, I don’t want to waste time and money (albeit components being cheap):

    1x MIDI female plug
    Resistors: 220 x2, 2.2K x1
    Caps: 1uF ceramic and 10uF electrolitic
    1x 1N914 diode (is this the diode?)
    1x CNY17-1 optocoupler
    1x three pin header
    1x L7805 voltage regulator
    1x led
    1x SPST switch

    is this everything?
    thanks!

  • ehm… have to bug you with another question:
    I’m not sure I’m reading the schematics correctly, is there a connection in the places I’ve marked with an arrow? I suppose not, but to be sure…
    question2: is the red marked square the optocoupler? Why don’t I see 6 legs there?

    UPDATE: uploaded correct picture

  • I don’t see the annotations. U1 is an optocoupler, it has a non-connected (useless) leg.

  • ehm sorry, I uploadad the wrong picture… I’ve corrected it now.
    Anyway thanks, the useless leg was confusing me.

  • There is no connection at the arrow on the left (otherwise you’re shorting the device sending the MIDI data, though it must have a protection resistor to be protected against that).

    The thing in the box is the optocoupler. An optocoupler is really a LED on one side and a phototransistor on the other side, sealed together.

    There is a connection at the arrow on the right – C1 and C2 are smoothing caps for the power supply and must be tied to ground.

  • thanks a lot for the detailed instructions! just one last question: is there a connection at the arrow right next to the optocoupler?

  • ok, now I know it all! Thanks again!

  • going to build the same thing for the MIDIo. the parts arrived yesterday, but my neighbors took it because i was not at home and today they were not at home :(

    please report, if it worked that way. are you going to put an resistor for R1?
    Mat said it should work without it.

    i was wondering about the connectin next to the optocoupler, too. thanks pichenettes, for helping out with that.

  • Well I’m going to breadboard it before I build it… so I can check and see if R1 is needed or not.
    I’ll keep you posted!

  • I was trying to reupload the schematics since they got corrupted during the server migration, but I won’t let me…

  • Upload fixed

  • thanks a lot!

  • Ok, I have reuploaded the schematics. I don’t have the one with my annotations anymore, so that one is still broken (but not a great deal I think).

  • Awesome. Will use your circuit to make a little box with 2 x YM minis that will be midified.
    Many thanks for sharing this info.

    Regarding integrating this MIDI circuit with the ym mini, I assume you need to connect the
    J1 pins to the YM mini board.

    Which pins to use (read the YM docs and I am prob senile because I could not find this info)?
  • @deebeecee: you’re welcome, though It’s not my circuit, credit goes to Wil Lindsay, the guy who made the Mini YM Synth.
    Anyway, yes J1 is the FTDI header on the Mini YM, so you connect the Midi Shield there (instead of the usb cable). I will also get powered by it of course.

  • ok I tried to build the thing. but utterly failed! :)
    the YM powers on, but when I send some midi nothing happens. Checked the midi cable, checked the audio cable, double checked the schematics orientation of components, but nothing, seems to be all right.

    Well there are two things that might not be 100% as in the BOM I listed above. I bought a bunch of wrong caps, 1nF electrolytic instead of ceramic, does that make a difference in this case?
    problem nr.2 I bought the wrong resistors, the huge green one is a metallic resistor… but again, value is the same, so it shouldn’t be a problem, or is it?

    I’m pretty sure I soldered the cables to the midi connector correctly nr.5 is the second from left and nr.4 is the 4th, right?

    I don’t know what else could be wrong… so I’m attaching some photos of my breadboard (sorry Olivier for using this forum for non-shruthi related things, but the forums over at Wil’s site are totally dead and here I get lots of people with experience from which I can learn things)

    so here comes photo nr.1

    nr.2

    and one that shows how the cables are attached on the FTDI header

  • I spoke with Wil last week about PCBs for this. He didn’t think people would be interested. I assured him he’d have no problem selling a few to some of the mutable gang and this post looks like proof!

    I feel your pain rumplefilter. This is the exact reason I didn’t even bothertrying this myself. I’m pretty got at soldering kits, not so much at assembling a circuit from schematic. I’ll forward this thread to Wil as ammo for a batch of PCBs!

  • Hmm, from the pictures you seem to have built it right as far as I can tell.
    Regarding the component choice, electrolytic caps are fine and the type of resistor does not matter here if the values are OK.
    One thing I though of, I think the listed capacitors may be a bit small if the mini-YM-thingie draws a bit of current and if your power source is not well stabilized from the start (like for example a 9V battery) - compare the Shruthi filter board schematics, there 100uF and 220uF caps are used in the same place.

    For the MIDI pinout, see for example here: http://www.interfacebus.com/PC_MIDI_Pinout.html
    For troubleshooting you should be able to just swap the green cables to test if pin 4 and 5 are mixed up.

    Good luck! =)
  • i have the parts laying around, too. but had no time to build it yet.

    maybe you could compare with this schematic, which does a similar thing and is proofed to be working;
    http://m.bareille.free.fr/midithrubox/midithrubox.htm

    i would be interested in PCB aswell.

  • Hmm the pinouts of the midi connector are a bit confusing since nobody tells you if the connector shown is male or female and if you’re looking at it from the front or the rear… I tried swapping the cables but nothing, still does not work.

    now I have another doubt. since there were hundreds of similar optocouplers I wonder if I got the right one…
    this is the one I bught

    Other than that I don’t know what could be wrong… on such a simple circuit.

    thanks a lot for your help people!

  • is it possible that I burned the optocoupler with a wrong midi connection?

  • Do you have a way of probing the voltage at the optocoupler output? Even with a voltmeter, you should read +5V and it should drop a bit when there’s heavy MIDI traffic.

  • you mean between pins 4 and 5 don’t you? I’ll mesure this and report back! thanks!

  • Also, try another MIDI source too… I’m suspicious of passive optos for MIDI. It didn’t work well on the first Shruti with some MIDI sources… You could as well replicate the Shruthi-1 MIDI input circuitry (6N137). It’s proven to work and plays well with the 644p too (but not with the 1284p :-/ ).

  • yes you’re right, my Shruti-1 only works with the midi output from the Korg DSS-1 neither the sound interface nor the controller keyboard are able to trigger the midi correctly. I’ll try that too!

  • OH! That reminds me of something Wil said in an email a while back!

    “This circuit will not work with the crappy midiman line of usb
    keyboards (Oxygen-8 etc..) as their signal power is off the Midi spec.
    Otherwise it’s worked with most things I’ve tried.”

    !!!!!!!!!

  • I don’t have a midiman… I’ve got a Novation SL-25 MKII but still… the Shruti wouldn’t like it so maybe that’s the problem

  • +1 for the Shruhti Circuit with the 6N137 – works perfectly with a PicAxe, even on a BreadBoard

    Maybe you just sprinkle in a Transistor and get a simple MIDI Repeater for all those faint MIDI Signals actual Gear seems to produce…

  • YO rumpelfilter,

    a quick google tour and i found this:

    It even features my personal favorite Chip the 7400 ;-)

    With this little hack (and using a 6N137 instead of the 6N138) you should boost your MIDI Signal sufficiently.

  • You don’t need the 7400. It’s because MIDI is “logic 0 = HIGH ; logic 1 = LOW” at the output of the opto ; so you need to invert the data to feed to a LED ; but if you need to feed the signal to a MCU you don’t need to invert the signal!

    Only the upper left of the schematics is valid for this application… up to the R7 pull-up resistor.

  • I think the idea of having a 74LS00 here is having nice sharp edges to your Signal? + you can drive this way 3 Thrus with one Chip. Im not hour if the Output of a 6N137 would be able to – I’m a noob when it comes to this ;-)

  • I’ll think about it. Thanks people for the great help.
    I’ll think about changing the circuit. But the thing is time is up, I need to do other stuff… (guess it was a bad idea in the first place to build this thing).

    Anyway, I checked voltages. I get 5V (well 4,97 to be exact) between legs 4 and 5 on the optocoupler. When I input some midi it fluctuates down to 4,83 but not lower than that. I don’t know how low it is supposed to go.
    Tried to input midi from the DSS-1 (which worked with the Shruti) but still the same: no sound whatsoever.
    I also tried to reattach the mini YM with the FTDI cable to the computer and it works fine that way (so at least I know it’s not the synth).

  • The 6N138 (with R11 in place) delivers very sharp edges – the amplification has such a high gain that whatever it receives is turned into square waves. A 6N137 (logic output) has even sharper edges.

  • Ok, then the reason for the 7400 is just using a 7400 ;-)

  • Hi!
    Another idea - since the Mini-YM is apparently designed to be used with a rather generic USBserial adapter cable, are you sure that it actually by default communicates using the MIDI standard bit rate (31.25 kbit/s) ? This is not a standard speed for computer serial interfaces.

    From looking at the Java source in that driver software they provide I think it uses 38400 kbit/s instead, which is a standard computer serial bit rate - but incompatible with MIDI. If there is a mismatch here it will definitely not work - the mini-YM will need a firmware fix.
  • Good catch larsen, good catch.

  • really well observed larsen! Well bleo said he would talk to Wil anyway… let’s see if he intends to provide such an upgrade.
    I’m reporting him the stuff on his forums as well… let’s see

  • Yep! good catch larsen! the FTDI cable (the generic usb serial can't handle a rea midi speed, so I bumped to 38400 (close but slightly faster).
    The atmel has no problem doing the 31250 speed, so I set up a boot sequence for the user to choose.
    Hold down the kill button on startup = 31250
    Normal startup = 38400

    This is all tested and working with my Yamaha QY10 and a friends full-size controller. Not so much with the Oxygen8.
    I didn't bother testing it with the midiman 2-1, as usb fills that function.

    glad you guys are able to work on this. i've been SWAMPED with the oneString. I should be out of the woods by mid-May.
    -Wil
  • hi Wil!
    Thanks a lot for the info! And I was imagining you were swamped by your new project (which looks totally brilliant btw!)
    kill button is the reset, isn’t it?
    I’ll try that asap!

  • ehm… just tried booting up holding down the kill/reset button. still doesn’t work :(

  • Have you checked that everything works in usb serial mode?
  • yes everything works in usb serial mode… but I noticed one thing. if I try to reboot the mini YM synth with the kill button pressed it still works in usb serial mode, which brings me to the assumption that it is not switching to the lower baud rate as Wil has said it would. Do I have the wrong firmware, the wrong chip?
    Mine is a YM2149F…

  • Dumb question: does the button even work? Will it reboot the synth when you hit it?

  • good question. But I can only reply with another question: how do I know that it is rebooting? should the lights blink as when I boot it up?

  • dunno i don’t have one! maybe try playing the synth, holding a note and then hitting the button?

  • ok checked the switch. it works, the circuit gets closed when I push it and if I have a note playing it stops it.
    Still… keeping it pushed while booting up does not make the thing work.

    I’m not sure I understood Wil’s words well, did he mean that this feature is already in the firmware or is he going to add it when he’s done with the oneString?

  • Sounded to me like it’s already been implemented and should work for ya. :(

  • yep I hoped so too…

  • yep... swamped with the oneString and a new performance project. whew!
    rumplefilter -- when did you get that kit?

    The "reset button" is not a true Arduino reset, it's actually mapped to D14 (analog 0). In normal use
    it shuts off the 3 mixers on the YM chip, and flushes all midi data. Sort of an emergency midi "kill".

    If it's held down while plugging in the device (powering on) it goes to 31250 as apposed to the normal 38400
    that I use for the usb-to-serial cable.

    I added that feature around March of last year, so older kits won't have the true midi function, though it's possible that an older version of the firmware slipped out the door. I plan on open-source releasing that firmware pretty soon, so drop me an email if you can't get it up and running. we can chat about getting you a preview copy ; ) wil [AT] straytechnologies [DOT] com
  • hi, thanks for explaining that in detail. I’ll write you an email!
    thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion