Jump to content

Infrared Distance Sensor


goule

Recommended Posts

Hi crew,

After spending a few monthes on other stuff that my midibox, I went back to work. I finally solved my problem (flickering values) with the distance sensors (Sharp GP2D12 - GP2D120) :

a bypass capacitor between Vdd and Vss was necessary (value : 680 uF) to get stable values and avoiding the controler to disturb values for other devices connected to AIN. With this capacitor mounted, the sensors are 100% usable for midibox project  ;D

Hope it will help,

Olivier.

Link to comment
Share on other sites

Maybe one of our Max/MSP masters could come up with something?

My 2c about Max is that it's proprietary and a lot too expensive, so I don't work with it; but I'm working on this for the MBHP platform:

The Sensorizer is ready (see my userpage, pics still missing), Syncronizer & Harmonizer still to be done.

In the meanwhile you just have to watch out for some software that converts CC's to NOTE_ONs. When your soundoutput is a single-voice synth, you don't even get no probs with NOTE_OFFs.

Or you wait a bit...

:)

Link to comment
Share on other sites

Audiocommander : I went to your web page, saw the "sensorisches Musikinstrument" section  ;D

WAOW  :D :o

You write you have pressure sensor, etc.

I can't wait more, tell me about what sensors you embeded into your machine !  :P ;D

Your web site is very fine by the way  ;)

See you,

Goule

Link to comment
Share on other sites

:) thanks!

I've built my first instrument in 2003 and used director, then I rewrote it with Objective-C and now I'm working on shifting the whole stuff into hardware-boxes...

About the sensorizer, I meant my wiki-userpage: http://www.midibox.org/dokuwiki/doku.php?id=audiocommander ...but the doku is not done completely; I'm still working on the sensorizer-page... (and your division function is still in good use, although preferrably fast bitshifting calculation is used instead :))

and I've not soooo many exotic sensors connected to, basically two Sharp Distance Sensors (the long range ones), and one FSR (Force-Resistance Sensor) that can be played very exactly once you got a feeling for it – together with one mid-range Sharp Distance Sensor.

Because I've build my Sensorizer in an open way (with connectors), I won't hard-wire new sensors, but am able now to experiment a bit... as the Sensorizer provides an AUTOSENSE feature ( 8) ), this is very easy to do...

I also implemented a "from/to" function which is great for all kinds of sensors, because you can restrict the range and then trigger the values with a really fine-tuned stepping...

The Pedal now provides three different (combineable) modes: Filter (plays only when pedal down), Panic (on release), Hold (sends MIDI sustain) and combinations of all. Esp. the Panic function is very cool, because you can add rhythm to the elsewise slow sensors... maybe I'm also putting up a small video ?

I am planning to implement two linear softPots from SpectraSymbol (the 8cm long ones, two stripes right next to each other)... next thing I want to do is experimenting with brainWave sensors :o and I've been also interested in Accelerometers, but until now they've been too expensive for my taste...

What I have already done is to connect a skin-resistance sensor, which is a lot of fun if two people are using that; I've called it Kontaktstation... you can make body-contact-music... and last exhib. I had kissing girls... but hey, maybe that's info for another thread :)

Anyway, I wanted to build the sensorizer as open as possible to use any kind of new sensors and store patches for the ones I have calibrated –

I know the current project state is far from being perfect, because I've been a bit in a hurry, but at least it's working quite well, and AFAICS there are no buffer overflows...

Sorry for long post, mate!

;D

Cheers,

Michael

Link to comment
Share on other sites

> Sorry for long post, mate!

Are you kidding ? I love that such long posts !  ;)

I'm very impressed by your project, lots of really good ideas (like sensors calibration, wich is cool not only as a min/max detector depending on the sensor but also for sound design, as sometimes only a subrange of a parameter is more interresting than the full range). And the experimental dimension of your project makes it really interesting (Kontakt, kissing  ;D ...)

> you can add rhythm to the elsewise slow sensors...

I think I didn't understand exactly what you meant ... perhaps a little video would be more suggestive  ;D 8) :D

I'm very interrested in your Force-Resistance Sensor stuff : what's the reference/cost and where did you buy them ??  :o

Were they hard to integrate them into the MBHP architecture ? I mean did you need extra components to plug them on the AIN ?

For the SoftPots : I have the XY pad I'd love to exploit (but still no FFC connector to solder/plug it on the AIN),

I was also sent the 20cm + 16cm + 7cm versions of their "ribbon controller" stuff (and will probably integrate at least the 1st whenever I succeed  :-\)

I also have a small one (4x2.5cm) which I havn't tested wet (I don't think it's a FRS but I have to give it a try anyway)

My turn to describe you my project  :)

Today, up and running, my baby got :

- 2 analog joysticks (free position), very light, right size/range, great for sound design  ;D

- 2 PlayStation joysticks (centered  8)) coming from an old-died-cable handle

- 1 Sharp GP2D120, which is configurable either in linear or log (native) mode

- 1 modulation wheel + 1 pitch bend, coming from my good old DX7s who finally died respectably (I also canibalized the "menu buttons / arrows" part of it)

- 2 detended rotary wheels (program change / OS menu navigation)

I added 8x 10-leds bargraphs that permanently display the position of all those (2 per axis per joystick - analog + PS2 joysticks share the same display like a "left hand / right hand" phylosophy). Today, the GP2D12 takes the display of one joystick (same value on both axis) and when you get off your hands, it displays the value of the corresponding joystick back after one second.

planning to add (in the best cases  :P :-\) :

- one other GP2D120 + two GP2D12 (to allow the possibility of having short or long ranges for each hand) hoping it will not push the power supply too hard  :-\

- a female jack 6.35 for connecting an expression pedal

- the SoftPots and the XY pad  8)

Still a lot of work to do as you can see, but I'll also have to make a video, or at least more recent pictures  ::)

Could you tell me a few words about  bitshifting calculation ?

Please forgive me for long reading  ;D :D

Goule

PS : let me know if by chance you go to Paris we will shake a beer together  8)

Link to comment
Share on other sites

this sounds very coool 8)

I got also some LED-arrays here, waiting to be built in... :)

PS : let me know if by chance you go to Paris we will shake a beer together

This is a great idea! I was about to suggest the same :)

– it's been a long time since I've been to France (et mon français est très mauvais ;D) and if I'll go there, I'll make a stop in Paris for sure (maybe already this winter?)

I had a meeting with Seppoman (the one who built the MIDI-Sofa) some weeks ago, this was great...

I'm very interrested in your Force-Resistance Sensor stuff : what's the reference/cost and where did you buy them ??

Were they hard to integrate them into the MBHP architecture ? I mean did you need extra components to plug them on the AIN ?

I got these from Conrad, they are about 6,- to 8,- EUR each; so I'm sure you get them for 3,- to 5,- EUR from a "normal" shop ::):

182389_BB_00_FB.EPS.jpg

just type "FSR" in the searchfield (ARGH, Conrad is too dumb to get a site where you can send links >:( )

it's range is from 2kO if you press very hard to 20 kO if you press very gently; so I just added a 7kO resistor in parallel:

[tt]

----FSR----

| |--- S

+ ----| |

| |--- GND

-----7k-----

[/tt]

It might be that the results gets a bit unlinear, but to be honest: I haven't noticed it :-\ ;D

By varying the value of the 7k, you can make the FSR more or less pressure sensitive...

I'm using these since 2003 and I really like them. In contrast to the Distance Sensor which are great for weeping and wooshing, playing a pressure sensor allows one to be relative exactly and accurate once you got used to it...

Could you tell me a few words about bitshifting calculation ?

sure, if you want you can peek into my sensorizer code (as I'm also using code from you, as already mentioned ;D ) –

the main calculation is: max-min = range (10 bit)

factor = range / 127 => for example 4

if f = 1,2,4,8,16 you can use bitshifting which is the same as a division / 2 each shift; so x >> 1 is the same as x/2; aka x >> 2 is the same as x/4

...but it is of course much faster than dividing. So I'm using the complicated division routine just for factors 3,5,6,7 and if possible take a look to keep the factor even :)

I think there was a great thread started by bill about nibbles and stuff in the C-Topic!

So long (got to work now a bit so I can afford more sensors ;D )

take care,

Michael

Edit: Noticed I mixed up ">>" with "<<"

>> is a bitshift to the right which is the same as a division through 2

<< is a bitshift to the left, which is the same as a multiplication by 2

Link to comment
Share on other sites

Hey hey this winter would be perfect !  8) Let's keep in touch and organize this for this period (and your french is surely better than my german)

The FSR stuff seems to completely fit into my device project idea, so sure I'll by one (and why not, two  ;D)

I'm sure it's a very valuable sensor to control, say a tremolo for instance (in a way, action could be quite close to a violonist's finger in my mind, but I gotta test)

Do you know the difference between the different models (except from the finger size  ;)) ?

Thank you so much for the explanation about the FSR's resistor + the bitshifting thingie  :D this is gold to me !

Laterrrzzz ! Thanx again,

;D

Link to comment
Share on other sites

I think I didn't understand exactly what you meant ... perhaps a little video would be more suggestive

I just posted my sensorizer project doku complete with pics and two small demo-videos as well as the complete project source code;

for consistency and to avoid double postings, I'll refer to the original thread:

http://www.midibox.org/forum/index.php?topic=5270.45

Cheers :)

Michael

Link to comment
Share on other sites

Funny, I was just thinking the same thing. Maybe one of our Max/MSP masters could come up with something? I can see how it'd be done, but my Max skills aren't good enough to do it.

In the meanwhile you just have to watch out for some software that converts CC's to NOTE_ONs. When your soundoutput is a single-voice synth, you don't even get no probs with NOTE_OFFs.

Or you wait a bit...

:)

If I can be of any help here with creating a Max standalone to convert the cc's to notes, give me a shout. It doesn't sound like it is too big a project.

regards

leigh

Link to comment
Share on other sites

  • 1 year later...

...gonna play the invisible piano???

btw: maybe i am mistaken but those looks like on/off state IR sensors, while this thread is about distance sensors, it may make sense to open a new thread.If i am wrong just IGNORE ME!

and hey cmon give us some hints about your project.. looks interesting

Simone

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...
×
×
  • Create New...