|
![](/i/fill.gif) |
Invisible wrote:
> Where the hell do you buy pressure sensors?
>
My choices are places like Adafruit and Sparkfun. Digikey, Mouser for
bulk parts, or for catalogs that are great brainstorming material (open
to random page, what could this part be used for). Radioshack if you
must. Or call a company that makes the sensor and ask for some samples
for a project you are developing.
Thinking about it, I don't know that I would use pressure sensors unless
you wanted pressure measurements. I don't know if that would matter for
pedals, as the pressure is going to be checked only once you have
already pushed it down. Simple dial resistors on each pedal would tell
you how far down they were pressed; optical encoders would work too
(dead mice scroll wheels, if you want those cheap). For more accuracy
than that, I would have to think about it more. Magnetic sensors might
work, but you would have to calibrate the whole set.
> You realise that MIDI is a serial communications protocol, right? It's
> not like you just connect each sensor to a different pin on the plug;
> you need some fairly elaborate electronics in there.
>
At the very simplest form, one input pin on any ol' micro-controller for
each pedal. If you have a force sensitive resistor (basic pressure
sensor) that is high resistance with no pressure and low when it has
pressure, use it to pull the pin low when pedal is pushed.** Wire it
differently if the sensor is different. Controller can just poll each
pin, or batches of pins where speed is an issue, and create the MIDI
packet to send. And if you are really set on having X packets per
second, the poll routine just stores the bits, and a timer interrupt
creates and sends the packet. Just make sure to have an optoisolator on
. . . crud, it has been forever since I did anything MIDI, I don't
remember if it is on the TX or RX wire.
Throw a multiplexer in, and you could use fewer i/o pins at the cost of
extra cpu cycles switching and waiting on the multiplexer. Going the
other way, a bigger chip so you can use 4 8-bit reads to get 32 pedals.
Or, really fancy, a 16 or 32-bit controller.
Elaborate? $8 micro-controllers are absurdly powerful now, and very easy
to program. Granted, most of the time it is assembly or some odd looking
java-esque language, but GCC will cross-compile to AVR and ARM chips.
The soldering might be tough, but for a prototype just breadboard it.
**I think that would result in less power drain than the other way
round, but I hack at these kinds of things, I don't engineer them.
Current limiting resistor on either supply or ground side, depending on
where you put the sensor, of course.
Post a reply to this message
|
![](/i/fill.gif) |