Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Man, PIO is so ridiculously OP.

71,887 Aufrufe • vor 6 Monaten •via X (Twitter)

34 Kommentare

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

This is just copper pads hooked up directly to gpio, and PIO state machines reading tiny changes in capacitance... without any "real" analog circuitry. (Credit to Matthias Wendel, I stole his pico-femtofarad code and made it into a 3D gesture sensing thing.)

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Here's my super janky setup just to check if it would work at all

Profilbild von 𝑫𝒂𝒏𝒊𝒆𝒍 𝑺𝒄𝒐𝒕𝒕 𝑴𝒂𝒕𝒕𝒉𝒆𝒘𝒔 🇦🇺
𝑫𝒂𝒏𝒊𝒆𝒍 𝑺𝒄𝒐𝒕𝒕 𝑴𝒂𝒕𝒕𝒉𝒆𝒘𝒔 🇦🇺vor 6 Monaten

Yeah is very cool. N.B. without a licence file in the repo you have to ask him to copy his code. I want to make a room size one of those using aluminium foil sheets above the plasterboard of the ceiling, in the roof space. Cheap privacy preserving room occupancy detection etc.

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

I'm gonna just take it on vibes that he doesn't care if I use his code. Putting a license file in a repo containing a single 200 line micropython script would be weird.

Profilbild von 𝑫𝒂𝒏𝒊𝒆𝒍 𝑺𝒄𝒐𝒕𝒕 𝑴𝒂𝒕𝒕𝒉𝒆𝒘𝒔 🇦🇺
𝑫𝒂𝒏𝒊𝒆𝒍 𝑺𝒄𝒐𝒕𝒕 𝑴𝒂𝒕𝒕𝒉𝒆𝒘𝒔 🇦🇺vor 6 Monaten

Most likely, but given that you are both nice humans you can ask him? Whatever I do I will certainly be sharing with him.

Profilbild von flat (simulator)
flat (simulator)vor 6 Monaten

is it just reading each pad’s capacitance and using that data to “triangulate,” for lack of a better term?

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Octagulate, but yeah (plus a ridiculous amount of sensor fusion filtering to get the data to be reliable enough for that)

Profilbild von DevMagister
DevMagistervor 6 Monaten

It really is. Why on earth would we NOT want a gaggle of extra, isolated cores for our io? Precise timing, zero jitter. It amazes me how inertia keeps the veterans from improving their game. The assembly is trivial with AI as well.

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

AI still kinda sucks at PIO assembly for whatever reason, but still super helpful. And yeah I've been working with ESP32s recently (someone else's decision) and omg they are such a shit show and I can't wait to go back to dealing with RP2350s.

Profilbild von DevMagister
DevMagistervor 6 Monaten

For me, AI (claude opus) has actually one-shot everything I have asked it to do with the PIO assembly. But I have mostly asked it to port existing protocols to it.

Profilbild von Coenraad Loubser 🇿🇦
Coenraad Loubser 🇿🇦vor 6 Monaten

You mean this is all Wacom and Synaptics has been doing the whole time?!

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Yeah, and your phone.

Profilbild von 3c685ab5014bb3d
3c685ab5014bb3dvor 6 Monaten

What are the limits of this in terms of the size the pads (so capacitance) and detection range? Would it work if instead of those pads you used... a house roof made of metal sheets to detect overflying airplanes? (I mean at low altitude close to the airport or sth, not at FL400)

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

idk, but that would be sick. I kinda live in the perfect place to test that. I'm like a couple miles away from a little private airport directly on the approach line.

Profilbild von Parthasarathy M
Parthasarathy Mvor 6 Monaten

Is this open source? I'd like to build something on top of this!

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Yep, here you go:

Profilbild von Baum
Baumvor 6 Monaten

Amazing! Done right, PIO is an absurdly powerful tool.

Profilbild von robby - rbby.dev
robby - rbby.devvor 6 Monaten

interesting! how did you go frame raw capacitance outputs, to proximity on a grid? Was there a sort of calibration step?

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

The arrangement is kinda hardcoded into a 4x2 grid. But yeah there's a "no hand" calibration at boot and then it uses a bunch of sensor fusion stuff to continuously calibrate out drift and noise. Mostly just a ton of hand tuning until it matched.

Profilbild von robby - rbby.dev
robby - rbby.devvor 6 Monaten

very cool! that sounds like where the magic is. i wonder if it could be combined some computer vision 🤔

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Yeah I'm a big fan of combining a bunch of different kinds of sensor data to make it feel super rock solid. I was considering an array of magnetometers too. Just cap sense alone is soo noisy

Profilbild von Gabriel Correia Brito
Gabriel Correia Britovor 6 Monaten

Is the Apple trackpad built on similar principles? It looks awesome!! Just add a small motor and you can build a fully haptic trackpad!!

Profilbild von Guillaume Ausset - @ausset.me
Guillaume Ausset - @ausset.mevor 6 Monaten

I see how it tracks across cells but inside….? What is that magic

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Just a fuckton of math, and remembering that digital is just an abstraction layer on top of analog. What it’s doing is pulling a pad high, then switching it to an input and waiting until it reads low, doing it ungodly fast to measure capacitance. Then more math to get a position

Profilbild von Guillaume Ausset - @ausset.me
Guillaume Ausset - @ausset.mevor 6 Monaten

But how do you know where you are on the pad ? I would have assumed that there would be some amount of symmetry for capacitance and that you wouldn’t be able to detect where you are with respect to the center but apparently no…?

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

You get the readings from the ones next to it, it doesn’t even really treat treat any one pad in a special way, it’s just always taking the centroid of all 8 pads.

Profilbild von AnarchistOwl
AnarchistOwlvor 6 Monaten

That’s nuts.

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Thanks, yeah I'm surprised this works too

Profilbild von Robert Dale Smith
Robert Dale Smithvor 6 Monaten

amazing!!

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Thanks! Maybe I should make this an HID controller and use it with your joypad thing

Profilbild von Robert Dale Smith
Robert Dale Smithvor 6 Monaten

YES!!! It’s a perfect. I’m just adding more and more USB/BT output modes. New web config about to push live.

Profilbild von Kevin Santo Cappuccio
Kevin Santo Cappucciovor 6 Monaten

Oh sick. I'll check it out

Profilbild von Robert Dale Smith
Robert Dale Smithvor 6 Monaten

Ping me anytime or jump in the discord. Project is very Claude code friendly. Can practically make custom controller firmware anything platform with just prompts.

Profilbild von Evo
Evovor 6 Monaten

Great, looks like you can build a button matrix out of it as well. What you could try next is salvage a tft panel with a faulty driver board and without the panel cracked which has a circuit matrix and try turning it into a touch panel. Could be some tech they could have used to make them touch screen in parallel to operating as polarizing filters.

Ähnliche Videos