Meta-FirmWarez II

Meta-FirmWarez II

More q/a about me and the lab. For earlier q/a, see Meta-FirmWarez.

1) Why do you have so many Tachikomas in your lab?

Because ponies won’t stay still long enough.

2) What the fuck?

I’m sorry you’re still retarded.

3) Why do you have stuff like this in your blog?

Because I like to practice what I preach.

4) Hackers are evil!

“Evil…makes me feel alive.”

NSFW. And actually a completely freaky ass video, that may be NSFA: not safe for anything. But I love the song….

5) Why do you waste your time on this stuff?

Is that supposed to be recursive?

6) Deadmouse?

Yep. <deadmouse>.

7) I’m using ultrasonics to determine distance. I want it to be very accurate, but my calculated transit time jumps all over the place. What gives?

Ok, first off when trying to measure the return signal using ultrasonic transducers, well, not just for distance, but for anything (I’ve used ’em to measure O2 concentration and flow, wicked cool physics trick there*) you have to step out of the time domain and think in the frequency domain. Few people do this natively, and the ones who do make lots of money as comm engineers and other phun stuff.

Let’s forget the fact that your return signal is going to be junky because of irregular surfaces, multiple reflections, all that jazz, let’s focus on one of the problems that most folks just don’t get, because they are thinking in the time domain. What does the return signal look like on a ‘scope? Ringing. That’s exactly what it is. These ultrasonic transducers are high-Q things. I once had a client that looked at me like I was insane when I told him I could NOT make his 34kHz piezo transducer work at 30kHz. It don’t work like that. And this dood was supposed to be some gee-whiz antenna RF guru. Huh? Anyway, hit one of these things, which is essentially a chunk of crystal, with even a half-cycle (that is PGT or NGT) and they ring. Like a bell. Same thing happens on the receive side. The return signal starts ringing in the RX transducer, except instead of decay, it builds.

Ok, still following me? Obviously your system knows when it sends the transmit pulse. The challenging issue is “when did I detect the return signal?” It’s this ringing signal that grows out of the noise. I’ve seen some people try and set a threshold and use peak detectors to interpolate back to an axis crossing. That works ok, unless you want to get that last absolute bit of accuracy, like the wavelength of the frequency you are using. Well, you can do even better if you want to get in to phase detection and such…see, there’s always another level in tech, and first order trivial solutions can be neato, but usually aren’t that great.

The problem with the threshold/peak detection method is that you will always vary by +/- a wavelength. Always. Because sometimes a given cycle will trip your threshold detector, and sometimes it will be the previous or following one. But, thank mathness, there is a solution. Instead of thinking in the time domain (that is what you see on an o’scope) and trying to futz with peak detection and all that nonsense, think in the frequency domain.

For one thing, you already know something: the frequency of your transmit and receive signal. So, is there a method you can use to easily test to see if that frequency exists in your receive input? Yep, it’s called a “correlation filter”. W00t! And they work very nicely when doing neat tricks with ultrasonics. As in “see signal down in the noise that other schemes can’t find” nifty. Sure improved the ‘flying tube’ detector I was working with. So now you’ve got something new to research, learn, and implement.

Ultrasonics are a phun and easy way to find distance for your bot projects. I even demo’d ultrasonic range finding for my son with ultrasonics using nothing but the transducers, a scope and an FG503 function generator. Yeah, eye heart old Tektronix stuff. Something I’d love to see done, and I don’t have time to fuxor with, would be for some bot builder to play with a little more frequency domain analysis of returned signals, for instance Doppler shift speed and distance calcs? Now we’re talking Fourier analysis, phun stuff. Also keep in mind these transducers are available in different frequencies, which with the right RX transducer and some nifty maths, could prove really cool. Ain’t tech grand?

8) I can’t figure out if you’re a creeper or a media whore.

Well, I’m pretty happy with the relationships I have right now, and I’m not actively pursuing anything else, so I guess that means “not a creeper”. I can’t really lay claim to media whore either since 1) I’m not in “the media” and 2) I’m not getting paid for being in or not in “the media”.

———————–
*Wicked cool physics trick:

Ok, check this out:

So, if you know the masses of two diatomic gases, M1 and M2, and their temperature, pressure, blah blah blah, you can calculate the speed of sound in that mixture at that temperature, etc. Or better yet, you can use ultrasonics to sample the speed of sound, and then calculate the ratio r of oxygen and nitrogen in a process that extracts nitrogen from atmospheric input and supplies you with concentrated oxygen. Well, it also extracts CO2 and any existing moisture, so that part of the assumption was correct. What wasn’t correct is that after going through the process the mixture was three gases, not two: there’s enough trace argon in the atmosphere that it affected the calculations. However, we were able to use a simple “fudge factor” and be very repeatable down to hundredths of a percent, well within our requirements.

And flow? As in medical liters per minute? That’s easy. To get speed of sound in our sample, ping in each direction, Vs = (V1 + V2)/2. Ah, but I also can get delta-V. So I know the velocity of the column of diatomic gases moving through a tube, of guess what, known volume. W00t! I now know flow. I actually had some ass hat jerkwad engineering manager interviewing me for a job a few years back tell me that this scheme wouldn’t work. The fuck? It did work, and it got through FDA approval. Fucking asshole.



« | »

Leave a Reply