This week has been great. I've spend all of monday evening building a ultrasone distance meter. I had already build the 40Khz oscillator on a standard pcb and build the 2 stage AC-amplifier on a breadboard. After adding a NAND schmitt trigger as a wave shaper the whole thing worked like a charm. Range from about 3cm to about 164cm (probably more, but the ceilling got in the way) accuracy: 1cm. Me happy!
So tuesday I've spend the evening soldering this circuit on the pcb too. When done all I got was noise. So my oscillator floods the receiver with noise. So now I'm going to spend the rest of next week getting the noise out of the receiver. aarrgh!
Lesson learned: don't mix sensitive analog amplifiers and fast digital electronics without proper noise handling.
But I'm not defeated yet! I've shielded the receivers wires, added a quick-and-dirty LC-filter on Vcc and GND of the receiver, and I'm trying to add a bandpass filter before the AC-amplifiers.
I'll get this to work or die trying
(the last is a very possibility. My ancient osciloscoop has a metal frame and wasn't grounded. I tend to wear a ESD grounder. Touching the oscilloscoops frame while wearing this grounder tends to be, well, a shocking experience. Now I've grounded the scoop too. Matter of keeping this a bit safe. Until I discover another ungrounded electric device that is.)!