Posts Tagged ‘kit’

Serial Investigations 1

Sunday, May 24th, 2009

The MIDI-Theremin kit uses a MAX232 chip to handle serial output, via a DB9 connector on the main board.

There is also standard MIDI out, and the old MIDI via gameport, which I am not bothering to install as I don’t have any receiving hardware with a gameport, although I have soldered the opto-isolator (IC3: 6N139) to the board, I’ll remove it and re-use when I find a need for one.

The Theremin’s PIC16F628A microcontroller outputs serial on pin 11, which goes to :

  • pin 5 of the MIDI connector (via 220R)
  • the gameport optocoupler
  • pin 11 of MAX232 (TTL Driver 1 input)

The MAX232 outputs RS-232 on pin 14 (Driver 1 output), which goes directly to pin 2 of the DB9 connector.

The Silicon Chip article states that a serial to USB converter can be used to connect the Theremin to a PC, I am hoping to eventually build in direct USB output.

Using a serial to USB converter cable, or even disassembling one and mounting it in the case, means that the serial signal is converted from TTL (5v) to RS-232 (-10V / 10V) to USB (~+/- 3V/5V?)

Removing the RS-232 chip completely and going directly from TTL to USB is the direct method.

First steps: mounting the MAX232 on a breakout board to test the kit as intended (before I potentially damage it with a mod), this also separates the RS-232 components completely from the main board so that I can swap in and out other serial output circuitry easily.

Breaking out the MAX232:

Three wires are required from the main PC to the breakout board:

  • Ground
  • TTL serial output from the microcontroller pin 11
  • +5V power for the MAX232.

When I first assembled everything, I only had only two wires coming from the main board, I had forgot the +5V supply line. There are a number of tests for the data output in the kit instructions. The voltages I measured without the supply were obviously much lower than they should have been.

The DB9 connector is attached to the breakout board by only two wires. This is a basic transmit only serial implementation. The MIDI-Theremin does not receive anything from the connected PC.
Here are the layout and connection points for the MAX232 breakout. This circuit may be useful for other RS-232 experiments/projects:

MAX232 Breakout layoutconnection points to MIDI Theremin PCB

I have soldered the DB9 pins directly together on the underside of the DB9 PC-mount right angle connector using short lengths of shielded and unshielded wire, being careful to avoid unintended shorts. The whole thing is held together with a rubber band, and shielded with a square of cardboard. It’s a bit messy, but compact, and hopefully only temporary.

With everything assembled (including the +5v supply wire!) and powered on, I am now reading the correct test voltages on the MAX232.

  • +5V at pin 16
  • -8.53V at pin 6 (ideal = -9V, but seems to be acceptable?)
  • 9V at pin 2 (up to 9.6V is acceptable)

breakout_topsidebreakout_underside

MAX232 info and pinout:
http://en.wikibooks.org/wiki/Serial_Programming/MAX232_Driver_Receiver
http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf

RS-232 serial pinout:
http://www.lammertbies.nl/comm/cable/RS-232.html#pins

Next post: TTL to USB plans using the FT232RL chip.

Jaycar MIDI-Theremin

Monday, May 18th, 2009

I recently finished assembling all the parts of my MIDI-Theremin kit and powered it on — it appears to work!

Here are some photos of the various sections, and the assembled kit undergoing testing and tuning. This is not properly assembled for presentation — but all the electronics are connected and it should work. I still have not decided how much effort I am going to put into the case and final presentation. That depends on how well my other mods turn out, and how much use I imagine I’ll get from a MIDI-theremin after trying it out.

I bought this kit from a Jaycar in Sydney at the beginning of the year. I have previously assembled a basic Jaycar theremin kit, which was easy enough to build, had a few improvements to the design which I found online, and was quite fun to play with. Currently that is in storage in NZ. I was going to buy another so I could use it in the UK, but was eventually convinced that I should ‘upgrade’ to a MIDI-theremin. To be honest, I am not fully convinced that a MIDI-theremin is a good idea — it seems to lose all the interesting analog advantages and coolness factor of the body-capacitance modulated sine waves from the ether. It does add MIDI, but then I have never been that excited by MIDI, I believe some people are, and I’m sure there is lots that can be done with it — this will be my chance to find out.

The basic Jaycar theremin kit is still available from Jaycar for AUD $59.95 (CAT. NO. KC5295). The MIDI version seems to be discontinued, but I bought mine for AUD $159.95 (yes, that’s quite a bit more!). The kit number is/was KC5410, and the Silicon Chip magazine articles that cover its construction are in the April and May 2005 editions. I just have the reprinted articles that came with the kit. The store I bought mine from in Sydney actually had a couple more on the shelves back in February, but they were in the process of taking them off their catalogue.

I couldn’t find much info on the web from anyone else who had assembled this kit. Some people had heard of it, some people had ordered one and had yet to construct it. I could not find any actual reviews of how good it was, or of any suggested mods or improvements. It also appears that this kit has been discontinued by Jaycar, so there might not be much more info forthcoming. Hopefully my writeup will be of interest to anyone else who has this kit, or has heard about it and wants to know more.

My planned mods:

Volume plate
— the aluminium volume plate that comes with the kit is quite ugly, and not really that substantial for playing, and looks nothing like a professional theremin volume loop.
For my original kit theremin I used some number 8 wire I had lying around (seriously :) ) to make a template / mock-up volume loop based on photos of pro-theremins (like the Moog Etherwave) that fitted with the kit’s plastic casing. The plan was to make a wooden case and get some metal tubing and shape it to match the template, but the wire fit perfectly in the case and looked ok, and was comfortable to play, so I kept it. I plan to start with the same kind of loop for this one, and potentially upgrade the whole case. The midi-theremin’s current silk-screened plastic top is nicely made, but does not scream ‘professional’.
For this current incarnation I have improvised No. 8 wire from a coat hanger. It’s not quite the same, but will do in a pinch.
I appreciate my current solution isn’t the most aesthetic either, but I feel it’s a step in the right direction.

USB Output
The kit comes with MIDI, serial (RS232), and Game Port output. There is no direct audio output.
I currently don’t have access to a desktop PC with serial ports, and only 1 old crappy laptop that happens to have a DB9 port. USB would be far more useful to me, and in place of having a converter cable, I’d like to have all the required electronics within the unit.

I considered a number of ways to get this functionality, and did a bit of research on various cables and chips which may be useful to others trying to do similar things with other devices. Currently I have all the RS232 circuitry on a temporary breakout board to test the original design, and how it works with a USB to RS232 cable I have. There are some warnings in the original Silicon Chip article about USB comms and drivers, so I want to try it out before making any permanent mods.

Creating custom MIDI patches for use with a theremin — something I’ll think about when I have the hardware sorted!

Upcoming post on my USB / RS232 investigations, and more details and comments on the kit.