"Don't patch so close to me" (Proximity sensing) Jul 26, 2022 0:02:02 GMT robertlanger, pol, and 1 more like this
Post by dizzeesatchel on Jul 26, 2022 0:02:02 GMT
Inspired by discussion in the Future module wishlist thread...
I had a Pi Pico and a bunch of random bits & bobs already, so i was looking into LDRs and the like, with the thinking to sketch out a gestural control module. The Sharp Distance sensor was mentioned, which looks interesting, and can possibly be used directly without a microcontroller, but it seems a bit big for ideally a 1U module (could potentially strip the innards from the bulky plastic housing?)
I came across the adafruit VCNL4010 which is super-tiny and seems ready-made to hook up to a Pico. With a bit of trial and error, being fairly inexperienced at both electronics and Python, i was getting readings from the sensor (there's two on this board, proximity and ambient light level, but i focused on the proximity only for now). Sent the readings back out as smoothed PWM and used it to a) light an LED, woooo, b) drive some of the cv inputs on a Roundabout which bravely volunteered to be guinea pig.
modulating clock speed:
modulating speed, pitch, and filter cutoff:
i'm not entirely sure i'm doing the RC filter on the PWM correctly, so might be better off using a microcontroller with native analogue out??
the sensor has a really tiny range - only a few cm. I thought this might be good for precise control but it's way too small in practice
the Sharp sensor has a better range, maybe it could be mounted vertically to fit nicely in a standard module space?
I tried transposing the output voltage up from max 3.3 to 5v using a level shifter chip, but reading into the theory more i think what i really need is an op-amp, not a level shifter?
I'm bad at maths, and would like to generate a less linear response curve - ie. movements further from the sensor have a greater impact, and response slows down as you approach the sensor up close - but i can't figure out how to make that happen.
the biggest hurdle of all is that I don't really know what i'm doing, but it's quite fun making something which vaguely works