{"id":14471,"date":"2019-06-19T11:01:36","date_gmt":"2019-06-19T15:01:36","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=14471"},"modified":"2023-09-06T02:54:55","modified_gmt":"2023-09-06T06:54:55","slug":"making-a-spl-db-meter","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/making-a-spl-db-meter\/","title":{"rendered":"Making a SPL dB Meter"},"content":{"rendered":"\n<p class=\"has-drop-cap wp-block-paragraph\">In the 1980s, there was no internet as like today and so the sources of entertainment were televisions, radios and cassette players. When I was a kid, we had an audio cassette player. We used it to play songs but my imagination was always fixed to its VU meter display with its fancy readings as shown below. It changed with the volume of the speakers and matched rhythmically with the sound coming out of it. During my engineering career, I got to know about the Decibel scale and sound pressure measurement. It soon became a goal for me to design an audio dB meter and recreate my child memories. In this tutorial, I will show how to make a dB meter that is accurate enough for general uses.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"297\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/vu-meter.png\" alt=\"\" class=\"wp-image-14474\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/vu-meter.png 595w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/vu-meter-580x290.png 580w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/figure><\/div>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Background and Application<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sound needs a medium\nfor propagation or travel. It can\u2019t travel in vacuum. Normally air is that\nmedium but sound can also propagate in liquids and other states of matter. I am\nnot going to lecture on how sound travels and its properties as Wikipedia details\neverything well <a href=\"https:\/\/en.wikipedia.org\/wiki\/Sound\">here<\/a>. Everything\nwe see around us has a measurement and a unit. In case of sound pressure, the\nunit is decibel. Our basic requirement is to be able to measure <strong><em>Sound\nPressure Level (SPL)<\/em><\/strong> in decibel scale with a typical 8-bit microcontroller,\nan ordinary microphone and without involving complex algorithms. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Measurement of sound has a number of uses. For instance, monitoring sound pollution, security system, monitoring the quality of an amplifier, detecting sound profile of an environment, etc. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Selecting Microphone<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the ease of work and for known parameters, I selected <a href=\"http:\/\/wiki.seeedstudio.com\/Grove-Sound_Sensor\">Seeedstudio\u2019s Grove Sound Sensor<\/a> which happens to have the following specs:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"158\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/Grove-sensor.png\" alt=\"\" class=\"wp-image-14478\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.seeedstudio.com\/\">Seeedstudio<\/a> \u2013 a Shenzhen, China-based\ncomponent manufacturer and global component supplier, has a good reputation in\nthe hobby-electronics community, particularly amongst Arduino and Raspberry Pi users.\nIt is one of the most reliable electronics partners that make quality items at\nreasonable price tags.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"http:\/\/www.seeedstudio.com\/Grove-Sound-Sensor-p-752.html\">Grove microphone module<\/a> that Seeedstudio sells under the <a href=\"http:\/\/wiki.seeedstudio.com\/Grove\">Grove<\/a> product family banner consists of an electret microphone and a pair of general-purpose op-amps in non-inverting configuration that increase the gain roughly by 100 times. The sensor I used was an old version one and the main difference is an additional potentiometer to alter gain. Shown below is the schematic of the current version of the sensor:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"441\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/amp-1-1024x441.png\" alt=\"\" class=\"wp-image-14485\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/amp-1-1024x441.png 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/amp-1-580x250.png 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/amp-1-768x330.png 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/amp-1.png 1211w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The microphone module is itself very small. The Grove header and connector are simple and all products of Grove family share the same pin\/header layout. The headers bring out power pins and signal pin(s). Grove connectors connect with these headers in one way only and the connectors have properly colored-wires. Thus, there is literally no chance of accidental wrong connections. The same type of header brings out the needed connections from the microphone module. We just have to connect them to our host microcontroller and power supply. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Math<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The\nspecs of the microphone in the Grove Sound Sensor suggests that it has a\nsensitivity of 52 &#8211; 48dB at 1kHz spectrum. Therefore, it is best to consider an\naverage sensitivity of 50dB.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The formula for sensitivity is as follows:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"90\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/image.png\" alt=\"\" class=\"wp-image-14486\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">where Output AREF is typically 1000 mV\/Pa (1 V\/Pa)\nreference output ratio.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thus, the sensitivity of the microphone in mv\/Pa is found by going on the other side of the formula as shown in the following steps:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"421\" height=\"239\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/image-1.png\" alt=\"\" class=\"wp-image-14487\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Going back to the schematic of the microphone module, we see that the original signal is amplified by about 100 times and so the actual sensitivity of the microphone is calculated to be:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"382\" height=\"36\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/image-2.png\" alt=\"\" class=\"wp-image-14488\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Microphone sensitivity is typically measured with a 1kHz sine wave at a 94dB&nbsp;sound pressure level (SPL), or with 1Pa pressure. This is a reference value. Thus, the SPL value is given by the following formula:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"50\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/image-3.png\" alt=\"\" class=\"wp-image-14489\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">where 94 is the base value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A dB reading of 40 represents near quietness while a dB reading of 95 represents the while of a train.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schematic<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"686\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/sch.png\" alt=\"\" class=\"wp-image-14473\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/sch.png 732w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/sch-580x544.png 580w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen, the above schematic was designed with Proteus VSM. There is no model for Grove Sound Sensor and so to mimic it, an interactive potentiometer was used in its place. Additionally, power and additional GLCD pins have been ignored in the schematic. However, those pins are present physically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Coding<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The code was written with CCS PIC\nC compiler and a PIC18F242 microcontroller was used for the project due to its\nlarge memories. CCS PIC C compiler\u2019s coding style is similar to that of Arduino\u2019s\nand so I guess nobody would be having any issue understanding the code. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The coding has two major parts. First is data collection and processing, and secondly, the graphical presentation of the collected data on a <strong><em>Graphical Liquid Crystal Display (GLCD)<\/em><\/strong>. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#include                                    #device *= 16  #device ADC=10 #fuses HS, PUT, NOWDT, PROTECT, CPD, BROWNOUT, BORV45 #fuses NOSTVREN, NOLVP, NODEBUG, NOCPB, NOWRT, NOWRTC #fuses NOWRTB,  NOWRTD, NOEBTR, NOEBTRB, NOOSCSEN        #use delay (clock = 10MHz)                              #define LARGE_LCD                               #define ref_SPL  94  #define sensitivity    3.16                                                                               #include  #include \"HDM64GS192.c\"              #include \"graphics.c\"        #include \"background_art.c\"                                                                                                                                unsigned char txt_dB_msg[30] = {\"SPL Meter\"}; unsigned char txt_dB_current[30]; unsigned char txt_dB_max[30];    unsigned char txt_dB_min[30];     unsigned char txt_dB_avg[30];                                      unsigned char x = 17;              float dB_max = 0.0; float dB_min = 100.0; float dB_avg = 0.0;              float dB_current = 0.0;                                                                                                                                          void setup(); void draw_background();                                                         float adc_rms();     void read_SPL(); void display_redings();             void plot_data();  float map(float value, float x_min, float x_max, float y_min, float y_max);                               void main()                                                                                 {                             setup();      draw_background();          while(TRUE)                 {         read_SPL();         display_redings();         plot_data();              delay_ms(400);     }                              }                                                                                                                                                                                              void setup()                                                                    {                                                   disable_interrupts(global);          setup_WDT(WDT_off);        setup_spi(spi_ss_disabled|spi_disabled);        setup_timer_0(T0_internal);                                      setup_timer_1(T1_disabled);                                                                                 setup_timer_2(T2_disabled, 255, 1);             set_timer0(0);        set_timer1(0);             set_timer2(0);        setup_ccp1(ccp_off);               setup_ccp2(ccp_off);        setup_ADC_ports(AN0);                                setup_ADC(ADC_clock_div_32);          set_ADC_channel(0);        glcd_init(on);           glcd_fillscreen(0);                    memset(txt_dB_current, 0, 30);             memset(txt_dB_max, 0, 30);         memset(txt_dB_min, 0, 30);            memset(txt_dB_avg, 0, 30);                                                                  glcd_text57(130, 4, txt_dB_msg, 1, ON);  }                                void draw_background()  {                                unsigned long n = 0;                          unsigned char i = 0;    unsigned char j = 0;    unsigned char cs = 0;                for(i = 0; i &lt; 8; ++i)           {                  output_low(GLCD_DI);                                 glcd_writeByte(GLCD_LEFT, 0x40);              glcd_writeByte(GLCD_RIGHT, 0x40);                  glcd_writeByte(GLCD_MID, 0x40);                                     glcd_writeByte(GLCD_LEFT,(i | 0xB8));           glcd_writeByte(GLCD_RIGHT,(i | 0xB8));            glcd_writeByte(GLCD_MID,(i | 0xB8));                output_high(GLCD_DI);                                    for(j = 0; j = 0) &amp;&amp; (j  0)     {         read_adc(adc_start_only);         while(!adc_done());         rms = read_adc(adc_read_only);           tmp += (rms * rms);               samples--;           }                          tmp &gt;&gt;= 4;                                rms = (sqrt(tmp));          rms *= 0.004875;           if(rms &lt;= 0)     {      rms = 0.004875;     }          return rms;                     }                                          void read_SPL()  {    dB_current = adc_rms();    db_current = (ref_SPL + 20 * log10(db_current \/ sensitivity));         if(db_current &gt;= 99)    {        dB_current = 99;    }                                                      if(x &gt; 125)     { db_max = 0.0; db_min = 100.0;     x = 17;                }        if(dB_current &gt; dB_max)          {      db_max = dB_current;      }                      if(dB_current &lt; dB_min)          {                     db_min = dB_current;    }                           dB_avg = ((db_max + dB_min) * 0.5);    }                                                                                        void display_redings()  {                                                               glcd_text57(130, 20, txt_dB_current, 1, OFF);       sprintf(txt_dB_current, \"Cr:%2.1g dB\", db_current);         glcd_text57(130, 20 , txt_dB_current, 1, ON);                                                     glcd_text57(130, 30, txt_dB_max, 1, OFF);              sprintf(txt_dB_max, \"Mx:%2.1g dB\", dB_max);     glcd_text57(130, 30 , txt_dB_max, 1, ON);               glcd_text57(130, 40, txt_dB_min, 1, OFF);              sprintf(txt_dB_min, \"Mn:%2.1g dB\", dB_min);     glcd_text57(130, 40 , txt_dB_min, 1, ON);                             glcd_text57(130, 50, txt_dB_avg, 1, OFF);              sprintf(txt_dB_avg, \"Av:%2.1g dB\", dB_avg);     glcd_text57(130, 50, txt_dB_avg, 1, ON);  }                                                                                                                   void plot_data()                                 {                                        unsigned char l = 0;                                l = map(dB_current, 40, 99, 61, 2);         glcd_line(x, 2, x, 61, YES);       glcd_line(x, l, x, 61, NO);         x += 2; }                                         float map(float value, float x_min, float x_max, float y_min, float y_max)    {                              return (y_min + (((y_max - y_min) \/ (x_max - x_min)) * (value - x_min))); }          <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Explaining the Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To efficiently collect data, the Root-Mean-Square (RMS) value of 16 raw output samples from the Grove Sound Sensor is taken and the value is converted from ADC counts to voltage. This way of sampling data ensures cancellation of unnecessary noise and glitches. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">float adc_rms()\n{                         \n    unsigned char samples = 16;\n    register unsigned long long tmp = 0;\n    register float rms = 0.0;          \n                      \n    while(samples &gt; 0)\n    {\n        read_adc(adc_start_only);\n        while(!adc_done());\n        rms = read_adc(adc_read_only);  \n        tmp += (rms * rms);      \n        samples--;      \n    }                     \n    tmp &gt;&gt;= 4;                           \n    rms = (sqrt(tmp));     \n    rms *= 0.004875; \n    \n    if(rms &lt;= 0)\n    {\n        rms = 0.004875;\n    }\n    \n    return rms;                    \n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The RMS voltage value from the sensor is then put to the derived formula discussed earlier. However, a microcontroller is not your ordinary calculator and it will behave erratically rather than showing an error symbol as in your calculator when it is forced to do a wrong calculation like dividing a value by zero. To avoid such incidents, the readings are checked for upper and lower hardware limits and confined if necessary, before processing and graphical representation. &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Further data processing is done to\ndetermine the maximum, minimum and average SPL values.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">void read_SPL() <br> {<br>    dB_current = adc_rms();<br>    db_current = (ref_SPL + 20 * log10(db_current \/ sensitivity)); <br> if(db_current &lt;= 40)    {        dB_current = 40;    }    if(dB_current &gt;= 99)<br>    {<br>        dB_current = 99;<br>    }<br> if(x &gt; 125) <br>    {<br>       db_max = 0.0;<br>       db_min = 100.0;    <br>       x = 17;            <br>    }<br> if(dB_current &gt; dB_max)      <br>    {     <br>       db_max = dB_current;  <br>    }              <br> if(dB_current &lt; dB_min)      <br>    {                    <br>       db_min = dB_current;<br>    }                   <br> dB_avg = ((db_max + dB_min) * 0.5);   <br> } <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now with the data processed, the data is ready for graphical presentation. The GLCD used here had a resolution of 192 x 64 pixels. It had three regions represented by three chip select (CS) pins. The first two regions were used for graphics while the third or the last region was used for text data. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every graphical presentation has two components \u2013 one is the static background part and the other is the dynamic foreground part. In this code, the static part is the dB scale and the enclosure where the SPL bars graph is to be shown. This part as shown below is loaded only once right after initialization. The dynamic part changes with SPL values in the form of thin vertical bar graphs. &nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/bmp-1024x512.png\" alt=\"\" class=\"wp-image-14476\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/bmp-1024x512.png 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/bmp-580x290.png 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/bmp-768x384.png 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/bmp.png 1025w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">void display_redings() \n{                                                          \n    glcd_text57(130, 20, txt_dB_current, 1, OFF);  \n    sprintf(txt_dB_current, \"Cr:%2.1g dB\", db_current);    \n    glcd_text57(130, 20 , txt_dB_current, 1, ON);     \n                                          \n    glcd_text57(130, 30, txt_dB_max, 1, OFF);         \n    sprintf(txt_dB_max, \"Mx:%2.1g dB\", dB_max);\n    glcd_text57(130, 30 , txt_dB_max, 1, ON);     \n    \n    glcd_text57(130, 40, txt_dB_min, 1, OFF);         \n    sprintf(txt_dB_min, \"Mn:%2.1g dB\", dB_min);\n    glcd_text57(130, 40 , txt_dB_min, 1, ON); \n                      \n    glcd_text57(130, 50, txt_dB_avg, 1, OFF);         \n    sprintf(txt_dB_avg, \"Av:%2.1g dB\", dB_avg);\n    glcd_text57(130, 50, txt_dB_avg, 1, ON); \n}                                \n                                                                             \nvoid plot_data()                                \n{                                    \n   unsigned char l = 0;\n                           \n   l = map(dB_current, 40, 99, 61, 2); \n   \n   glcd_line(x, 2, x, 61, YES);   \n   glcd_line(x, l, x, 61, NO); \n   \n   x += 2;\n}     \n\n                                  \nfloat map(float value, float x_min, float x_max, float y_min, float y_max)   \n{                         \n    return (y_min + (((y_max - y_min) \/ (x_max - x_min)) * (value - x_min)));\n}      \n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As shown above the first function is responsible for displaying text data. The second function is responsible for plotting the bar graph. The region where a bar is to be plotted is cleared before plotting. This allows us not to fully refresh the screen. The map function is a straight-line equation solver and it comes useful in quickly translating from one range to another. For instance, in this case, the map function translates dB readings from 40 \u2013 99 dB to 61 \u2013 2 Y-coordinate position of the GLCD. Over 100 bars (X-coordinate points) together show the dB trend plot. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Improvements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A number of improvements can be made\nto the project. Some of these include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Using\na more sensitive and professional microphone.<\/li><li>Using\na larger GLCD\/TFT display.<\/li><li>Using\na faster chip for faster data processing.<\/li><li>Adding\na computer or mobile-phone application.<\/li><li>Adding\nfeatures like FFT data processing, spectrum display, etc.<\/li><li>Adding\na temperature and pressure sensor to take care of changes in medium with\ntemperature and air pressure variations.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Demo<\/h2>\n\n\n\n<ul class=\"wp-block-gallery columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"662\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11313183_10200389875827572_7150279108599626701_o-1024x662.jpg\" alt=\"\" data-id=\"14483\" data-link=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=14483\" class=\"wp-image-14483\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11313183_10200389875827572_7150279108599626701_o-1024x662.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11313183_10200389875827572_7150279108599626701_o-580x375.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11313183_10200389875827572_7150279108599626701_o-768x496.jpg 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11313183_10200389875827572_7150279108599626701_o.jpg 1369w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"488\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11336848_10200389870307434_1037950550626620014_o-1024x488.jpg\" alt=\"\" data-id=\"14479\" data-link=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=14479\" class=\"wp-image-14479\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11336848_10200389870307434_1037950550626620014_o-1024x488.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11336848_10200389870307434_1037950550626620014_o-580x276.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11336848_10200389870307434_1037950550626620014_o-768x366.jpg 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11336848_10200389870307434_1037950550626620014_o.jpg 1369w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"668\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/10478731_10200389876187581_7731499384904138721_o-1024x668.jpg\" alt=\"\" data-id=\"14480\" data-link=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=14480\" class=\"wp-image-14480\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/10478731_10200389876187581_7731499384904138721_o-1024x668.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/10478731_10200389876187581_7731499384904138721_o-580x378.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/10478731_10200389876187581_7731499384904138721_o-768x501.jpg 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/10478731_10200389876187581_7731499384904138721_o.jpg 1369w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"752\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11266588_10200389873227507_5289857930890268648_o-1024x752.jpg\" alt=\"\" data-id=\"14482\" data-link=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=14482\" class=\"wp-image-14482\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11266588_10200389873227507_5289857930890268648_o-1024x752.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11266588_10200389873227507_5289857930890268648_o-580x426.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11266588_10200389873227507_5289857930890268648_o-768x564.jpg 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11266588_10200389873227507_5289857930890268648_o.jpg 1369w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"859\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11039305_10200389869747420_4541973740726294462_o-1024x859.jpg\" alt=\"\" data-id=\"14481\" data-link=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=14481\" class=\"wp-image-14481\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11039305_10200389869747420_4541973740726294462_o-1024x859.jpg 1024w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11039305_10200389869747420_4541973740726294462_o-580x486.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11039305_10200389869747420_4541973740726294462_o-768x644.jpg 768w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2019\/06\/11039305_10200389869747420_4541973740726294462_o.jpg 1369w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Graphical SPL dB Meter with Seeedstudio Grove Sound Sensor and PIC18F242\" width=\"860\" height=\"484\" src=\"https:\/\/www.youtube.com\/embed\/_grNn9yVFz0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Resources related to this project can be downloaded from <a href=\"https:\/\/github.com\/sshahryiar\/PIC-Microcontroller-Projects\/tree\/main\/GLCD%20dB%20Meter\">here<\/a>.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Author: Shawon M. Shahryiar<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.youtube.com\/user\/sshahryiar\">https:\/\/www.youtube.com\/user\/sshahryiar<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><a href=\"https:\/\/www.facebook.com\/MicroArena?ref=hl\">https:\/\/www.facebook.com\/MicroArena<\/a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>26.05.2015<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the 1980s, there was no internet as like today and so the sources of entertainment were televisions, radios and cassette players. When I was a kid, we had an audio cassette player. We used it to play songs but my imagination was always fixed to its VU meter display with its fancy readings as shown below. It changed with the volume of the speakers and matched rhythmically with the sound coming out of it. During my engineering career, I got to know about the Decibel scale and sound pressure measurement. It soon became a goal for me to design<\/p>\n","protected":false},"author":5,"featured_media":14482,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[954,1464,4,105,348,1466],"tags":[1646,680,1738,1739,512,1310,1736,1740,1735],"class_list":["post-14471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-display","category-featured","category-pic-projects","category-pic18f","category-product-review","category-tutorials","tag-8-bit-microcontroller","tag-audio","tag-db-meter","tag-grove","tag-microphone","tag-pic18f","tag-sound","tag-spectrum","tag-spl"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/14471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=14471"}],"version-history":[{"count":21,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/14471\/revisions"}],"predecessor-version":[{"id":15409,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/14471\/revisions\/15409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/14482"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=14471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=14471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=14471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}