Positional sensing testing

Discussions related to MegaDrum Hardware

Positional sensing testing

Postby dmitri » Sat May 08, 2010 12:40 am

This is a version of MegaDrum firmware for testing positional sensing on mesh type pads. There are a few prerequisites and limitations:

1. Test means test. Don't expect it to work with everything, with default settings, in all circumstances. It can be buggy and may cause your MegaDrum to explode.
2. It will only work on a snare input.
3. The pad must not be too hot. If it is too hot it must be "cooled" with a voltage divider.
4. The first half wave of a signal from a pad should be positive, e.g my Pintech mesh snare is such pad. Most of other mesh pads out there, like Roland, Drumtec and etc, produce a negative first half wave. This is a schematic of a precision rectifier required for such pads (a Pintech mesh snare will of course work with it as well):
precision rectifier 1.png

precision rectifier1.pdf

As you can see, this precision rectifier works with a single +5 power supply. To achieve this the opamp must meet these requirements:
1. able to operate at below zero input
2. rail-to-rail output
3. has no phase inversion

I've tested it with LMC6034, ~£1.00 at Farnell (LMC6032 will also work of course but the pinout is different)
If the opamp is also "unity gain stable", e.g. LM6134 (~£3.00 at Farnell), then C3 and C4 can be omitted.
(Can you suggest a cheaper alternative to LM6134?)

This is the firmware to use for the test:
megadrum_20100515.zip


It has 3 new options added:
1. Positional. (Default is No).
2. PositionalLow. (Default is 5).
3. PositionalHigh. (Default is 15).

To enable positional sensing on the snare input set Positional to 1, 2 or 3 (corresponding to three variations of the positional sensing).
PositionalLow and PositionalHigh are adjusted so that to get a full range of detected positions (and MIDI CC messages) from a rim (PositionalLow) to a centre (PositionalHigh). The default PositionalLow and PositionalHigh are good starting values for Roland PD-125X with Positional set to 1.

When Positional set to 2 the good starting values for Roland PD-125x are 16 and 30. With Positional set to 2, MinScan must be set so that to cover a full half wave which is 40 (4ms) for Roland PD-125X.

Positional set to 3 is almost the same as 2 but with slightly different algorithm so you may need to set PositionalLow and PositionalHigh slightly higher.

For the Drumtec snare the good starting values for PositionalLow and PositionalHigh are 5-10 higher than for Roland PD-125X.

You can also enable some debugging if you set Latency to an odd value (...,37,39,41,... ) . In the top row of the LCD it will show relative position of the hit as calculated by MegaDrum: ^ symbol shown more to the left for centre hits and more to the right for close to rim hits.
In the bottom row it will show 3 values with every hit: the first is used for calculating position when Positional is set to 1, second - when Positional is set to 2 and third - when Positional set to 3. Use these values to adjust PositionalLow and PositionHigh.
You do not have the required permissions to view the files attached to this post.
dmitri
Site Admin
 
Posts: 8230
Joined: Fri Aug 03, 2007 8:05 pm

Re: Positional sensing testing

Postby mackanov » Sat May 08, 2010 1:21 am

Great great great news! Will be testing it very soon! Thank you very much Dmitri!
mackanov
 
Posts: 46
Joined: Mon Mar 08, 2010 2:05 pm
Location: Brazil

Re: Positional sensing testing

Postby zaklinacz » Sat May 08, 2010 8:05 am

Dmitri,
changing head piezo wires on input is not enough to get first half-wave positive from roland pad?
Do we need a dual-zone pad to make this work or a pad without active rim will also work?
BR
Michal
zaklinacz
 
Posts: 58
Joined: Fri Jan 01, 2010 7:22 pm

Re: Positional sensing testing

Postby dmitri » Sat May 08, 2010 11:38 am

zaklinacz wrote:changing head piezo wires on input is not enough to get first half-wave positive from roland pad?

Should be enough. Are you willing to dig inside a Roland pad?

Do we need a dual-zone pad to make this work or a pad without active rim will also work?

One zone/piezo on a mesh type pad is enough.
dmitri
Site Admin
 
Posts: 8230
Joined: Fri Aug 03, 2007 8:05 pm

Re: Positional sensing testing

Postby zaklinacz » Sat May 08, 2010 11:56 am

Should be enough. Are you willing to dig inside a Roland pad?

No, I have my PCB without any case right now, so I will only change wires coming from jack input to analogue board.
BR
Michal
zaklinacz
 
Posts: 58
Joined: Fri Jan 01, 2010 7:22 pm

Re: Positional sensing testing

Postby dmitri » Sat May 08, 2010 12:03 pm

zaklinacz wrote:
Should be enough. Are you willing to dig inside a Roland pad?

No, I have my PCB without any case right now, so I will only change wires coming from jack input to analogue board.

You won't be able to use the rim piezo in this case.
dmitri
Site Admin
 
Posts: 8230
Joined: Fri Aug 03, 2007 8:05 pm

Re: Positional sensing testing

Postby zaklinacz » Sat May 08, 2010 12:10 pm

You won't be able to use the rim piezo in this case.

Yes I know, but I can test PS immediately:-)
BR
Michal
zaklinacz
 
Posts: 58
Joined: Fri Jan 01, 2010 7:22 pm

Re: Positional sensing testing

Postby Ken Forgettable » Sat May 08, 2010 11:54 pm

YeeeeaAHHH,
It seems to me that there are 3 terminating conditions:
1. peak detection.
2. threshold level.
and
3. zero crossing.
where option one is twice as fast as option 3.

FYI my DIY 14" single ply (at my medium to high tension) does indeed do a half wave in < 4ms :D
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: Positional sensing testing

Postby dmitri » Sun May 09, 2010 1:21 am

I've made some improvements and updated the firmware in the first post.
Note, at the moment I'm doing all the positional sensing tests using a Roland PD-125X and a full wave precision rectifier. I will post schematics for the rectifier very soon, I just want to find best values for the resistors before posting them.
dmitri
Site Admin
 
Posts: 8230
Joined: Fri Aug 03, 2007 8:05 pm

Re: Positional sensing testing

Postby r0bbie » Sun May 09, 2010 9:03 am

Hi Dmitri,

Great you continued working on this feature!!

Could you please explain what variation in waveform you are looking for to determen proper PS?
This might help me to setup/finetune my snare using my scope.

Thanks.

Rob.
If it ain't broken try to improve it.
r0bbie
 
Posts: 94
Joined: Wed Jan 21, 2009 10:13 pm
Location: The Netherlands

Next

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests