• Hardware
  • Low-Latency continuous output laser proximity sensor

Hello, everyone!

I am looking for a low-latency continuous analog output laser proximity sensor for use with the bela- it's going to be simple using of the distance values for synthesizer control.

I went through all kinds of electronics stores but it's real hard to get data on latency, or figure out which one is the easiest to connect to the bela. I'm an experienced software guy but the hardware part is rather new to me.

Thanks!!!

Carlo

This one can get you down to 100 Hz sampling interval (10ms latency) for almost all targets.

Looking at Table 7 in the datasheet indicates with more reflective targets you could even get down to less than 1ms.

If doing things like modulating filters and such I would think 10ms its not going to be discernable, and a 100Hz continuous reading could do the job reasonably well.

FYI it is not analog, but if you're an experienced software guy then I don't see this as a problem.


Cheap DIY Proximity Sensor
For latency comparable to your Bela system latency, it isn't out of the question to connect a copper plate to an output pin and drive it at the sample rate through a resistor. And measure it with an ADC:
Output_PIN->Resistor->Copper_Plate->ADC_INPUT

Range of resistor is 500k to 2.2Meg.
Size of plate around 16 sq inches, or 4"x4". I have used 3"x5" on other projects and got a capacitance range of 0.5pF to 7pF usable range. A little bit bigger would be better for the lower frequencies involved here, but your hand or foot ultimately sets the limit.


Theory:
As you move your hand (or foot) in proximity to the copper plate, the capacitance to ground changes, which changes the reading you get on the ADC. This takes advantage of the special case of digital aliasing where you are sampling a periodic signal synchronously to the samplerate. Every cycle you will take a sample at the same location on the waveform, so should be able to detect amplitude changes.

From there all you need to do is filter (average) the readings and calibrate the range based on the voltage change you get off the plate as you move your hand (or whatever) nearer or more far away from the plate.

Bela has to be referenced to earth for this to work very well -- this could be as simple as Bela in a metal box which has some kind of conductive connection to the floor you're standing on. You become part of the circuit.

I suggest a plate of approximately 3"x5" (piece of copper clad PCB works for me). I haven't tried this with Bela, or any microcontroller for that matter. I have made various analog circuits with oscillators and comparators which sense, filter and output an analog voltage. These work very well. I think with a Bela the circuit can be much more simple because the I/O pins are synchronized to the ADC sample rate.

I have done circuit simulations to test the concept for Bela and it looks promising. Do you want to be the guinea pig? The beauty of this is you can empirically tune this system by changing the resistor value to get the maximum change on the ADC, and then calibrate according to measured range. It's a simple concept.

Also note the plate doesn't need to be copper. Any conductive material will work (even aluminum foil glued to a block of wood would be fine).

To have more fun you can make aluminum foil balls and arrange all kinds of geometrical configurations to experimentally tune how it responds to proximity/expression.