Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Digital signal interface to computer

  1. Aug 27, 2010 #1
    I'm setting out on a project, and I need some basic direction. I am a programmer by trade; my father is a mechanical engineer who is pretty good at electrical circuit design as well---together we want to control a pipe organ by computer.

    The organ is already operated by electrical solenoids, and my father has created circuits to drive the solenoids. This is essentially a large shift-register. To set the state of the pipes, one must clock a serial data line with the correct data, then latch the registers.

    The other half of the interface is reading the state of the keyboard. This is also a shift register, providing a serial input to the computer.

    I am hoping there is some kind of signal processing board that we can drop into a Windows computer and use to read/write these shift-registers. Hopefully a simple software driver is provided.

    There is one bonus to this project: if we can get this far, we can also get the computer to read and write midi files, making the world's vast collection of midi music available to be played on our pipe organ, and also making the computer into a "recorder" of someone playing live.

    I am aware that we could implement this with dedicated controller chips, or use gate-array logic, or something like that---but neither of us has any expertise in this area.

    A significant question is data throughput---we must be able to read and write signals sufficiently fast. But we have a lot of room to play with, especially to get started, so mainly I want to understand if there is any existing system that fits our needs. Later we can talk about speed.

    A related issue to throughput is buffering. If we run this under Windows, and not as a dedicated controller, we have to handle OS interruptions etc.
  2. jcsd
  3. Aug 27, 2010 #2


    User Avatar
    Science Advisor
    Gold Member

    Buy a USB-DAQ from e.g. www.ni.com (but there are much cheaper alternatives if you google a bit), they all have digital IO lines (usually at least 8 of them) that should be able to do the job as long as you only need TTL-level logic.
  4. Aug 27, 2010 #3
    I would just use a regular micro with a FTDI chip to connect to the PC via USB. If neither of you have a big background in micros then I recommend you check out the Arduino open source platform. www.arduino.cc

    Fairly cheap and easy to use with a ton of examples and support.
  5. Aug 27, 2010 #4
    Thanks for the suggestions! I will look into them.
  6. Aug 27, 2010 #5
    Check out http://www.sparkfun.com
    They have many development boards and kits that use various micro-controllers. You'll want something that has a buncha digital I/O lines connected to a USB port so you can talk between your grown-up computer and the solenoids and switches on your instrument.
  7. Aug 29, 2010 #6
    Hmmm, sounds pretty good. You've definitely identified some issues with the OS as well as the support issues. With that I'd be tempted to simply say use a digital I/O card from a company like national instruments or esis.
    The problem would then pop up downstream as the project sired out due to timing issues, keyboard support, etc.
    Instead, I suggest you look into a midi interface. That will allow you to plug in standard keyboards, use existing music libraries, and interface with the PC using off the shelf support.
    The scary part is that you have to support the midi interface back at the organ. You're not the first to do this, so there are examples. I went out for about 2 minutes and found this reference:

    Best of Luck,

  8. Aug 31, 2010 #7
    There are timing issues in trying to control the organ from the PC directly, like OS interruptions. However, there is a little fact about the psychology of playback which makes it possible to have a latency in response.

    Software samplers (music sampling synthesizers than run on a computer, not dedicated hardware) are prevalent these days, and they operate by sending the output signal to a standard soundcard. The input comes from a midi keyboard. The output signal must be buffered, and so there is a latency.

    If you actually sit down at the keyboard and play one of these things, you discover that the latency is not bothersome. The important thing is that the output sounds must mirror your durations, intervals, and rhythms exactly, only that they are slightly delayed. I think latencies as much as 50 ms are not bothersome.

    So if we can get a type of digital i/o card that samples its inputs and buffers them, and buffers the outputs, we might be able to make it work.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook