A simple soundmeter using the PIC 16F628 or 16F84 (5/20/2006)
I made this project as a test to improve a technic to read analog values without analog-to-digital converter. (ADC) I ended with this "sound meter". It may not work perfectly, it needs some improvement but works anyway. It have the feature of "auto-calibration", so it detects the signal, amplify it and measures it. Because the "auto-calibration" feature, it doesn't need an amplifier or any aditional circuit to drive the signal from the electret microphone.
The capacitor can be a 103k or a 220k. A poliester capacitor works better. The code is compatible con 16F84A or 16F628 so I can't define exactly what value should have. Anyway, If you find this projects interesting, you may be able to experiment with the value of the capacitor. Here is the schematic:
Here is a picture of the one that I build. As you can see, it was only a test, I didn't had the intentions to build this one and assemble it as a project.
Download the HEX code for the 16F628 HERE - Right click and choose "Save as..."
Download the HEX code for the 16F84A HERE - Right click and choose "Save as..."
The config should be: INTERNAL RC and PWRT ON for 16F628. For the 16F84A the config is External RC and PWRT ON
If you want to connect this circuit to another audio circuit, you can use this adapter:
How this works:
As I mention before, the reason of this project is becuse i'm working in a technic to read analog values directly from a signal without an ADC. Here is the method used to read analog values with a digital input output pin:
1. Connect a RC circuit to a Digital I/O pin.
2. Set the pin as OUTPUT and make it high for 1 ms (one milisecond)
3. Set the pin as INPUT and start a 16 bit counter until the input signal is low.
The value of the 16-bit counter should be the value of the input signal or the value of the RC. You can learn more about this technic at the Microchip's web page (www.microchip.com) reading the application notes at the documentation section.
|< Sonic: Mushroom Swiss Double Burger.||Homepage||Southern Zodiac.>|