Monday, May 25, 2015

Free the PG-200!




Around three years ago, in april 2012, I decoded the PG-200 protocol. Using a Saleae logic probe I took a closer look at what happened while using the PG-200, and built a device that converts MIDI CC messages into PG-200 commands. This device, the MPG-200, also receives and transmits MIDI note messages, making it possible to completely control the JX-3P using MIDI.

To my knowledge, at the time I started the project only two other devices existed that could do this - the KiwiTechnics JX-3P upgrade and Patch Editor and the Organix Midi upgrade kit. These both require extensive modification of the JX-3P. Later, Mode machines made a PG-200 clone called the DT-200. I have yet to see the PG-200 protocol fully documented anywhere, but I may have missed something as I have not searched the web lately.

As a tiny gift to the synth community in honor of my daughter's birth, I now release all the information I have gathered. This document is based on the data found in the JX-3P/PG-200 service manual as well as a lot of work done by myself. Feel free to use it in any way you see fit, but I would be really happy if you acknowledged my contribution.

The complete protocol description can be found at http://www.xonik.no/mpg-200/pg-200/pg-200.html

Friday, May 15, 2015

Mmmmyeah... just one more bug.

I found the bug today. It wasn't the software - it is hardware related.

I have connected pin 2 of the midi connector to the PIC's MCLR. For some reason, when several midi messages arrive rapidly, the processor reboots. I assume it's induced noise on the line as I don't think the little phatty outputs anything on pin 2 (and it doesn't happen when just one or two messages arrive).

Fortunately, I foresaw that it could be a problem and added a solder blob jumper. After removing this the mpg-200 works as it should (but it cannot be programmed of course).

I have added a temporary normal jumper, so now things work again. I can just remove this jumper before shipping.


Btw: the midi connector didn't fit so i had to remove some of the copper and drill a new hole for the shield connector. Rookie mistake...

Thursday, May 14, 2015

Mpg-200 hardware verified

After some initial trouble - the pic18f25k50 has analog inputs on all ports that has to be turned off - I got the mpg-200 up and running. Receiving and transmitting midi works, but something is wrong with the software. Even so, it's great that the hardware is working as it should. The same hw will be used for other projects too.

The mcu runs at 16MHz without an external crystal which is really nice. And programming it through the pins of the midi input works like a charm, even with the  optocoupler in place!

Saturday, May 9, 2015

MPG-200 programming through midi cable

I soldered together the first MPG-200 today. I've made a few mistakes - my midi connector does not perfectly fit the board, and the electrolytic caps and transistors would have liked a little more space, but nothing serious.

I have yet to try it out as the mpg-200 firmware has to be adapted to the PIC18F25K50, but I got the programmer working. I've chosen to run the programmer pins, five in total, through the midi connector. The wiring is as follows:

Pin 1: 5V
Pin 2: MCLR
Pin 3: PGClock
Pin 4: PGData
Shield: GND

Now, I do not usually want the shield to be connected to GND, so I've added a jumper that must be removed after programming. Pins 1,2 and 3 are not normally used by midi so those are hardwired, but I've added solder-blob jumpers that can be removed should you use any equipment that use these lines for something else.

Pin 4 is normally midi in, but as long as I have not added the input optoisolator it can be used by the programmer as well.

The Mikroelektronika mikroProg connected to the MPG-200 through a custom cable

Saturday, May 2, 2015

Time to update my knowledge, paper style

I ordered the "Circuit Designer's Companion" yesterday. Hopefully it will answer all my questions ;-) Bwack suggested it after I pondered him with questions about ground/earth connections etc.

From the list of "others who bought this also bought" I recon it will suit me very well - the main suggestions seemed to be "Practical electronics for inventors" which I bought in Singapore in 2007 and "The art of electronics" that I bought a couple of years ago on Ebay (hot tip: you can get an "asian only" copy from India at half price if you're lucky).

DAC board soldered too

I finished something else yesterday - the DAC board prototype. My first real 0.5mm pitch soldering job. I think it turned out alright, I did as bwack suggested and tilted the card under the microscope. It looks good to me.

I can't test it with the sample and hold circuit just yet as I have no angled connectors for some reason. I may try just the DAC tomorrow though.

The DAC is an AD5547 dual output parallell input 16 bit device. There are two reasons I selected this. First of all, I selected the parallell version as I thought maybe I could load it faster than if I went for the SPI version. Second, I was not sure if I could load 32 sample and holds fast enough with only one DAC, this allows me to load two at the time before clocking the result into the sample and hold. The dual version costs significantly more than a single one though, so hopefully I'll get away with one channel. The sample and hold card lets me select which channel I want to use for output 17-32, so I can test both single and dual channel versions.

The DAC chip with its tiny legs. My index finger for measure.

Through the microscope. Before cleaning away the flux obviously

I had to add this as well, I am really impressed with the quality of the OSH park silk screen! Look at those sharp lines (this is at 80x magnification I think)

The DAC card with two high quality AD8672 opamps. I have socketed these to be able to switch between these and TL072s to see if I can hear any difference - the AD8672 is about $5 and the TL072 is $0.50, so if I cannot hear any difference I'll just go with the TL072.

The DAC and sample and hold together but not connected. The large white header is for analog power, digital power comes thru the 36 pin connector to the left.


PSU finished!

Tonight I finished something for a change. The dual transformer, triple voltage PSU is safely enclosed in a box, transforming away. The output voltages are only as good as my cheap multimeter of course, but I had no problem dialing in +/- 15V and 5 or 9V. For the moment I've set the output of the "digital" PSU at 9V as this is what the EasyPIC Fusion 7 wants.

the digital and analog PSU's grounds meet at a star grounding point. This point is in turn connected to the "chassis ground"/earth via a 100nF/50V capacitor as suggested by bwack. In addition, I have exposed earth on top of the PSU to be able to clip on my ESD wrist band.


The DGND and AGND meet at a star point which is also connected to Earth via a 100nF cap (inside the shrink tube)

Earth is also connected to a point outside the box where I can attach my ESD wrist band

The box