Comments: MIDI Shield Hookup Guide


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Hey Sparkfun! Thank you for making this part!!!

    We used this part to create the LuminescentGrand, an LED piano that generates light patterns from MIDI. We put it in an acrylic case replica of a mini grand piano.

    Check it out here:

    Also the mini-documentary of how we created this art piece:

    We used P9813 led chipset LED. We have a total of 1700 leds being driven off an overclocked spi data line. We get about 120 frames per second.

    Tell us what you think using our contact page.

  • Member #1388611 / about 6 years ago / 1

    Got mine working by unplugging the shield, upload the code to the arduino, and after plugin the shield back on

  • rkachowski / about 8 years ago / 1


    I really appreciate the tutorial. Coincidentally I've been wanting to create a midi->cv converter for my werkstatt since I got it 2 years ago, and your tutorial explains exactly how to do this. However, I've been trying to get this to work on my werkstatt, but I can't seem to get the correct cv out of the dacs.

    I've jumpered SJ1 and SJ2 to support the soft serial port, enabled the debug messages and viewed the debug output - it appears that the midi shield is correctly sending the data to the arduino and it's getting converted into some kind of voltage value which is then sent down the sda and scl pins. At this point in time i'm kind of grasping at straws...

    I have some questions however

    1. If the debug messages are showing what appears to be valid data, then this implies that the midi shield + arduino are configured and working correctly, right? (i.e. the problem is in my DAC setup - i unfortunately don't have an oscilloscope..)
    2. Are there any common gotchas or something obvious that can get overlooked? I have changed the address + cut the pullups on the back of one of the dac's,

    I've tried this circuit twice so I'm getting frustrated, but i'm not giving up. I've ordered some more dac's and an oscilloscope, but it'll be a few weeks before the shipping gets here.


    • Byron J. / about 8 years ago / 1

      If the debug messages are printing, then you can be reasonably confident that the MIDI parsing is working.

      From the sounds of it, you might not have good communication to the DACs.

      I don't recall anything out of the ordinary in getting them working, but it's been quite a while.

      To test the DACs without any dependency on MIDI, there is the DAC Test Sketch.

      If you want to try it without an oscilloscope, slow the loop down by adding a delay() to it, maybe 5000 milliseconds (5 seconds). Then you can use a volt meter to check the DAC outputs. The one should gradually ramp up, and the other should ramp down.

      I've also improved the circuit a tiny bit since then, using a TL431 voltage reference to make a precise adjustable power supply for the Pitch CV DAC (those DACs use their VCC pin as the reference supply). I describe it in the last comment over here.

      • rkachowski / about 7 years ago / 1

        Thanks for keeping in touch (even though this is pretty old)

        The main stumbling block was that the diagram for connecting the DAC's was wrong - SDA and SCL are switched around, they should be connected to A4 and A5 respectively. Weirdly they are referenced in the correct order in the paragraph below the diagram.

        Everything works peachy now

  • tappazee / about 8 years ago / 1

    Hi, I've just got the MIDI-CV controlling my Werkstatt and it works amazingly well - thank you! I was thinking about trying to add a glide/portamento function to make use of the remaining pot on the midi shield and wondered whether you had any ideas for the code required to do this? Thanks

    • Byron J. / about 8 years ago / 1

      I just looked over the code a bit. It's not exactly easy to do a software based portamento.

      A back of the envelope recipe might look something like:

      • Move the Wire transaction from updateCV to loop.
      • updateCV sets a global variable target
      • Add a second global variable currentCV
      • In loop, when currentCV isn't at target, add/subtract some value ( that relates to the porta time pot) to currentCV and write it to the DAC. Each time around, repeat until current reaches loop.

      My gut feeling is that this won't sound super great. The DAC output will stairstep, and the I2C update rate might be too low.

      In the end, it might be easier to do portamento in the analog domain: a varialbe series resistor and a cap to ground on the pitch CV output would do it (See VR14 & C62 in the Werkstatt schematic for an example).

      • tappazee / about 8 years ago / 1

        Hey, thanks so much for this advice. I'll give both ways a go on the weekend and let you know how I get on!

        • tappazee / about 8 years ago / 1

          I couldn't get anything useful software-wise so I made an analog glide circuit like the following, but with an LM324 instead of TL072.

          It worked a treat. There was just enough space to squeeze it on to the protoboard, then I replaced the unused 10k pot with the required 1M pot, placed back to front so that the legs dangled over the edge and could be soldered separately from the MIDI shield. Messy, but the whole thing works great :)

If you've found an issue with this tutorial content, please send us your feedback!