How to use 1452 or 1701 make a signal level detector to make LED has different brightness while signal strength change?

Hi,

I want to use 1701 and 1452 to make a level detector to detect the signal strength,

but I don't know how to use blocks to make led brightness will follow the signal strength.

The led brightness level will follow the signal strength, if signal is stronger the led will more bright, the other side, the lower signal level will cause lower led brightness

(I think this may use the PWM to make led bright level)

any tips for making this function?

Thanks!

BR.

Parents
  • +1
    •  Super User 
    on Apr 16, 2019 3:28 PM over 1 year ago

         Hello Alvis,

         PWM can be done by comparing the signal in question to a ramp or triangle waveform.  The example shown below performs this function.  Incoming audio passes through a DC Block Filter to remove residual DC caused by the A/D converters -- use this filter anytime you're making level measurements; otherwise this DC, which typically measures about -45 dB, shows up with no input.  Peak Envelope blocks measure the left and right signal levels.  The Sawtooth Oscillator's output goes from -1 to +1; taking its absolute value provides a 1 KHz triangle wave spanning 0 to +1.  The two ABCD Comparatorsperform the PWM -- I show their logic inverted simply to make the schematic appear neater, and re-using the level signal for the logic "high"  level saves a DC source.  The GPIOs accept any nonzero input as a logic "high."  The attached project runs on a ADAU1701MINIZ board.

         Best regards,

         Bob

    PWM-1701-Level.zip

  • Hello there,
    If I want to make a signal light and a peak light, use two IO ports to connect a two-color LED. When there is a signal, one IO port outputs high. When the signal reaches a certain level, the other IO port outputs high. At this time, the signal LED output Low level? Note that I don't need PWM.
    thank you very much!

  • 0
    •  Analog Employees 
    on Apr 25, 2019 4:37 PM over 1 year ago in reply to zlb898

    Hello zlb898,

    The delay cell has buttons for choosing which memory it uses. You can use DM0, DM1 or PM (Program Memory). If your program has lots of loops and is not really big then there is often lots of unused program RAM so this is a useful feature. 

    Dave T

  • Hello Dave,

       Sorry, I didn't notice 0 and 1 below the delay unit. This design is very good. In fact, I just use the delay to explain how to allocate RAM. The problem I encountered was that I used the ADAU1450 to perform the reverb function. I found that RAM is not enough. Later I changed the ADAU1451 to solve this problem. Can I use the PM of the ADAU1450 as a reverb? This means I can save costs.

  • 0
    •  Analog Employees 
    on Apr 26, 2019 2:45 PM over 1 year ago in reply to zlb898

    Hello zlb898,

    If you have a lot of unused program RAM then yes, you can use it. The 1450 has a lot less data memory so it is a huge step down if memory size is important to your application. So this all depends on how much delay you need and the size of your program. The 1450 is also running at half speed so it can only execute half the program length. 

    Dave T

  • Hello Dave,

    You mean I can use the ADAU1450 to perform reverb. How to assign reverb to PM? My program is very small. I just need to know how to assign reverb to PM.

    Liangbin

  • 0
    •  Analog Employees 
    on Apr 26, 2019 3:23 PM over 1 year ago in reply to zlb898

    Hello zlb898,

    You select the "PM" button instead of the "0" or "1" buttons. 

    Dave T

Reply Children