Friday, July 8, 2016

MCP4261 as logarithmic potentiometer

   In previous article, I tested my MCP4261-502E/P dual digital potentiometer, now I show you how can use this dual potentiometer for audio (volume control), for that must change liniar characteristic to logarithmic characteristic (or like this).
   So, I use info from article Controlling Volume - log pots publish on TEXAS INSTRUMENS's site.
   
   For simple sketch and for not use more resource, I use log aproxximation, so I calculate the equations for each straights:
- for first, from 0 to 63%: y = x/5 (I know x=0 -> y=0 & x=50 -> y=10)
- for second, from 63 to 100%: y = 7/3 * x - 400/3 (I know x=70 y=30 & x=100 -> y=100)
  I use same schematic like in previous article:
and I write a sketch for test more cases, this sketch is MCP4261_lin_to_log_1.ino .
  I made 2 movies:

  For digital potentiometer with 16 steps + mute, I have next cases:
   Centralizing, we see some errors but for me there are acceptable:
and I cat continue experiments for implements this digital potentiometer in future audio project..

No comments:

Post a Comment