Jump to content

Electronics people, how would I do this?...


Fear the Weasel
 Share

Recommended Posts

Hi there,

I'm hoping to do a bit of a project, the goal being to come away with some useful knowledge basically.  I want to build a very basic interface on the front of my PC.  Basically just 4 encoders which can be monitored by software and converted to midi.  I considered a midibox but I really think this could probably be done a simpler way. Midibox is awesome, don't get me wrong, but parts are expensive where I am and surely Midibox is an overkill for this?

I've had a lot of experience coding C/C++ (barely any with hardware) so I could do any conversion to midi in software but basically I was wondering how to get the encoder signals into the pc in the first place.  Something with a PIC maybe? (I really don't know at all!  :)  :-[ )

Basically if I get something talking to the software I think I can manage the rest.

Ideas, thoughts, suggestions?

Link to comment
Share on other sites

New Zealand.  :D

If your getting at using a midibox to do it...surely there's a way to connect 4 encoders to a pc that's more straightforward.  I'm kinda interested in learning how these things are done, midibox is cool but so much of 'the basics' is done for me, even when I get my Midibox finished (different project) I'm not really going to know much about electronics and interfacing etc, just how to build a midibox.  ;)

I'm willing to learn stuff myself I just need a direction, at the moment I don't have even that.

Has anyone done something remotely similiar using the parallel port? 

Link to comment
Share on other sites

Good news, the parts aren't any more expensive down under or NZ than anywhere else. (I'm in Melbourne, it's a hop skip and jump from you)

Anyway if you're really keen to do it on a PC you might take a look at some case modding sites. I know they use Parallel pins to drive HD44780 LCDs, and I've seen notes on how to do it. Word is that XP won't allow you to write direct to the port and you'll need a special API for it.

Another alternative if you really want to learn about this stuff would be to use a smaller/older PIC or Atmel MCU and make a dedicated standalone box. If you go with a PIC with a UART you can adapt TK's schematics and use code from PICList, should be a piece of cake... Although you might miss having the bootloader!

Link to comment
Share on other sites

Cheers, for the reply.  Melbourne eh?  I've heard only good things about Melbourne when it comes to music and art, many Wellington people I know have moved there because 'Melbourne is just like Wellington, but huge!'.  :D

Alright, I'm gonna look into the parrallel port stuff for a start, then PIC stuff.  I've seen a few case mod sites about LCD's and I'm planning the same sort of thing with that.  Another reason why I'm shying away from the Midibox for this is that although this is just a hobby project I'm working on, I've had a fair bit of interest from muso friends etc. so if I ever get everything in my head working in reality (IF) it might be feasible to sell (on a very small scale).  I'm quite familiar with the 'request to sell' topic but I hardly think a midibox with 4 encoders (maybe even 2 buttons in the distant future  ;D) would qualify for an 'ACCEPTED'  ;). 

Thanks again!  :) (returns to scouring the internet...)

Link to comment
Share on other sites

My suggestion would be to use a PIC with a UART, one of the simple ones, or even a PIC18F452... and a USB to serial converter module like this:

4d_microusb2.jpg

http://www.dontronics.com/micro-usb.html

which you can use to power the device also.

But that's a suggestion if you specifically don't want a MIDIbox solution... for a one-off-not-going-to-sell-it project, I would suggest you use a MIDIbox, and get all the encoder handling and MIDI message code already done... just use the MIDIbox-to-COM interface (and not waste a MIDI port).

You could do it with a parallel port, but it would be a lot of old school stuff, I've done that ages ago with an EPROM burner project and you'll be limited to eight bits of input (i.e. four encoders) unless you add some multiplexing (i.e. more chips) or a microcontroller, so you might as well put one smart chip in the box from the start and be able to handle more knobs, buttons, etc.

So there's your choices I reckon... come away with useful knowledge in writing assembler for microcontrollers, doing it all yourself on a PIC, making a PIC burner, writing code for a device driver converting it to a virtual MIDI port, etc. OR come away with useful knowledge in making a MIDIbox and a bit of assember. I wouldn't waste time learning the hard way that parallel ports suck and are good for printers and PIC burners and not much else  ;)

Link to comment
Share on other sites

Parallel port.  It involves next to no programming or electronics skills.  All you need are the encoders, something to mount them on, and a printer cable (often findable for free if you look at the right places).  You do not need a PIC unless you want a larger solution.  It's by far the simplest option.

Cheers,

Tom

Link to comment
Share on other sites

It's simple, but as I was saying, a dead end if you want to do more than four encoders, or gain some knowledge to use later for other, bigger projects.

My comment about parallel ports sucking was more to do with XP getting in the way and the fact that some parallel ports are output only (maybe things have got better since the last time I did hardware using the parallel port).

But th0mas is right, I must admit, it is a pretty simple solution and would work just as well...

Link to comment
Share on other sites

The joystick port supports two joysticks - that's four pots (X+Y x 2).  I've seen software for using PC joysticks as MIDI controllers, then you just have to build a board with four pots wired up as if they were joysticks.  I've seen it done (on the web) and it's a lot simpler starter project than a parallel port/PIC thing.  If you were going that way, you might as well go all the way and make a simple MIDIbox.  You can build one with as few as -one- pot.

Let's see if anyone can beat me to googling up a link :-)

Course, I guess a lot of new machines don't have the old soundcard joystick/MIDI port.  You could stuff in an old soundcard just for this I suppose.

Link to comment
Share on other sites

VMIDIJoy - software for Windows - separate versions for analogue and USB joysticks - X,Y and Z so potentially 6 knobs three or four(?) knobs per joystick port.  Has a link to building the hardware. 

MIDI Toaster - another site with instructions, four knobs.

A bunch more links from the CDM forums, including Mac software for USB joysticks.

MIDI Controller software page from the Shareware Music Machine - Find "joystick" on this page - there's a few.

There ya go!

Link to comment
Share on other sites

VMIDIJoy is an old friend of mine :) I'm glad to see it's still around! It will support a pair of joysticks with three axes and also all the buttons including the directional 'hat', definitely very cool in pairs, I still have my Sidewinder 3D Pro for just this purpose :)

Link to comment
Share on other sites

My preference is MJoy. Here is what I call a MicroBox[attached]:

-2 bare pots

-1 twostate switch [select pressed A/B buttons]

-1 unused pushbutton [wired to button C]

-housing: box that used to hold sticks for celaning ears

I common work I ise it to control dry/wet effect output on mie SB Live! kx driver

In Traktor, well, that's another story...

[edit:] 4got to attach a pic

Pic_(1).jpg

Link to comment
Share on other sites

Wow, a few replies since I last checked, I thought this thread had died.  Thanks for all the advice and links guys.  I've been trawling around the internet picking up all the info I can.  I'm thinking of trying to use a PIC as I'd like to learn more about this sort of stuff and I tend to learn better chucked in the deep end...  ;)

That USB to Serial module is also the type of thing I was looking for.

Thanks guys, will hopefully get started on this in earnest in a couple of weeks.

Link to comment
Share on other sites

Sorry, if you look back I'm actually in New Zealand, 'stryd_one' is the one who's actually in Melbourne so I'm afraid I won't be able to make it..  ;)

I'm going the PIC route for this project.  I figure if I can learn this sort of stuff it'll open up a whole new bunch of possibilties for me.  I love making stuff.....  ;D  Should be getting some necessary things to start building and programming in about a week....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...