I looked in my parts bin and found an ATMega88. The PWM generator of these AVRs is able to sweep the range from 0 to 3.5MHz, although not as precisely as the Disney people do: I can get only 32 usable points instead of the 200 they use. It does make the schematic quite a lot simpler:

As you can see, the AVR is the most complex part here. It uses the PWM generator on PB1 to output the frequency sweep. It's coupled via a 10K resistor to the sensor. The sensor will absorb some of the output voltage, so the amplitude on it will be less than the 5V the AVR outputs. The rest of the analog stuff is a barebones envelope detector: Whatever the maximum voltage is, the diode will dump it into the 1N capacitor so the AVR can use the DA-converter on PC0 to sample it. To make sure the 1N capacitor doesn't just stay charged at the overall maximum voltage, the 47K bleeds enough voltage out of it to allow the ATMega to take consecutive samples without worrying about left-over charge from the previous one. On the other side of the AVR is the 20MHz crystal, and a connection to an FT232 USB-to-serial module that transports the acquired data to the PC.

The complete setup is simple enough to build on a breadboard:

The roll of soldering wire isn't in the picture by accident: I actually decided to use that as my sensor. It's big enough to work well, and I had it on hand anyway.

« Prev 2 Next »

© 2006-2022 Sprite_tm - Contact