YM3812 Part 9 – Synth Card

Post Categories:   YM3812 ModuleTags:   ,,,

9 thoughts on “YM3812 Part 9 – Synth Card

  • Tyler,

    I’ve built two of these now and could use some troubleshooting advice as I’m having the same problem with both of them. I know they both work because the Breadboard.ino sketch works fine on each of them. The problem is with MIDI (and I know it’s on the hardware side—Velocity.ino works, too, if I call handleNoteOn and handleNoteOff directly). Neither responds to any MIDI input…I’ve used a store-bought Korg-type DIN->TRS adapter, made and tried my own Korg-type and Beatstep-type adapters, tried different switch positions with both, etc., etc. I’ve checked and re-checked the solder joints and diode polarity, replaced the 6N138 ics, and so on. Nothing happens…the activity light doesn’t flicker. Can you suggest anything? Should I remove the Thonikonn stereo jack and try wiring in a DIN jack instead? Replace the switch?

    Thanks,

    Peter

    • First off, I admire your persistence! If you built it twice and neither are working, there must be something subtle at play. Here are a couple of thoughts…

      I would double check that the tip and ring of the connector actually connect to the correct pins on the DIN side of the connector. There are a number of different standards. Two of them reverse the connections (hence the switch). But there are also a few versions that connect to completely different pins on the DIN connector.

      If continuity checks out there, then the next step would be to follow the signal from the MIDI input, into the 6n138 and then into the microcontroller. If that all works…

      Then it could be a software issue. Are you using the AVR128DA28? or a different microcontroller? The AVR has a number of different serial ports. It’s possible that the software is looking to the wrong port?

      Hope that helps!
      -Tyler

  • Tyler,

    Thanks for the reply. Using my continuity tester, I discovered that there’s clearly something wrong between the MIDI IN jack and the 6N138…the tip and ring seem to be connected somehow! I’m wondering if I’m using the wrong switch. Your parts description above refers to the switch as a “DPDT E-Switch EG1271,” but when I looked at Digi-Key, it says the EG1271 is a SPDT switch. I know that what I’m using was sold to me as an EG1271…is it possible that it should be the DPDT type instead?

    I pulled the 6N138 and input MIDI directly to where 6N138’s pin 6 would have been…everything worked, so no software or microprocessor problem (and, I am using the AVR128DA28).

    Peter

  • Hey Peter,

    That’s some solid debugging, and I think you have 100% discovered the issue. SPDT stands for “Single Pole Double Throw.” That means that there is one connector (single pole) that can be connected to one of two points (double throw). DPDT stands for “Double Pole Double Throw.” That means that there are two different connectors (double pole) that can each go to two different points (double throw). It’s sort of like two completely separate switches that are physically connected so they switch at the exact same time.

    By using a single pole double throw, you are basically connecting all of the wires of each of the two switches together.

    You can probably either get a DPDT switch or skip the switch and just manually connect the inputs to the circuit. You may just have to swap which wire goes to which point on the circuit (tip or ring) depending on the MIDI to TRS connector. But hey, at least you can test it and get it to work!

    In terms of skipping the 6n138, I wouldn’t recommend plugging MIDI directly into the microcontroller. The 6n138 is there to fully isolate the microcontroller from the outside world so nothing bad happens to it… Anyway just swap out the switch and I bet everything will work perfectly!

  • So I went back and verified the part number. It should be EG2271 not EG1271. They look identical, but the EG2271 is DPDT instead of SPDT. Thank you for identifying the issue! That is 100% my bad—so sorry for the confusion there! I will update the parts list above to reflect the change.

  • Thanks! That should be an easy fix then. And, thanks again for sharing this project…I’ve had a great time following along and working on it!

    Peter

  • I built one, but I’m unable to program it. Additionally, the LED doesn’t light up when connected to either the FTDI cable or a 9V battery. I’ve checked, and I’m getting 5V output from the L78L05.

    Regarding the switch, I couldn’t find the original one in stock, so I purchased this alternative. I hope this isn’t causing the issue.
    https://www.mouser.ca/ProductDetail/Nidec-Components/CL-SB-22C-01?qs=XeJtXLiO41RGG9TnwtBv7A%3D%3D

    Let me know if you think to something else I should verify.

    Very cool project by the way.
    Thank you.
    Olivier

    • Hey there Olivier, sorry for the delay, I just saw your messaging as I scrolled through about 1,200 spam messages. Some quick thoughts: The LED is software controlled, so it won’t turn on until the AVR is programmed. Assuming the hardware is set up properly (diode is facing the right direction, you are using an AVR128DA28 and not the AVR128DB28, etc.), you may need to follow different steps depending on what version of Arduino you are using. If you are using the version where the logo is a circle, it should work just like it does in the article. If you are using a newer version of the IDE (the logo is a box with rounded corners) then you may need to program it from the menu: “Sketch” > “Upload Using Programmer” instead of clicking the normal arrow. As for the switch, I’m pretty sure that one won’t work… here is a link to the one that I used: https://www.aliexpress.us/item/2251832485877275.html?channel=twinner.

      Good luck! Let me know if you get it to work!

Leave A Reply

YM3812 Part 10 – Pitch BendYM3812 Part 8 – Velocity SensitivityYM3812 Part 7 – Percussive Maintenance