Digital Volume Control



  • Hi everyone

    I'm new to My Sensor and Arduino. Just out of curiousty. Has anyone worked on a digital volume control using DS1802 Dual Audio Taper Potentiometer?

    http://datasheets.maximintegrated.com/en/ds/DS1802.pdf

    Is My Sensor equipped to do volume control?


  • Hero Member

    Looks like a nice device. If you can get the serial controlled with the Arduino it will work with MySensors. You could use a dimmer or var message.



  • So I'm guessing is not something that could connect directly to My Sensor. I will need a secondary MCU doing serial and using PWM to control the output... is that right?


  • Hero Member

    On the contrary. You can use one arduino for both functions. I suggest you first get the volume control working and then add the my sensors stuff.



  • @AWI

    I think I'm going to take a while putting this together. I'm new to My Sensor & Programming. Do you have any sample that I can work with?


  • Hero Member

    @mikemayers It looks like the DS1802 can be controlled a couple of ways, using a serial interface or with push buttons. Looking at the data sheet, it's not a standard serial interface, so you may be better off using something like the MCP4131 which has a SPI interface. The other option with the DS1802 is to simulate the pushbuttons using the pins of an Arduino.

    Cheers
    Al



  • This is an interesting project. The MCP4131 seem to be a better option but I don't know if you could have both pushbutton and SPI control via My Sensor simultaneously or one or the other.



  • @Sparkman

    Essentially, I'm looking to control the volume using push buttons or with My Sensor. Both options should be able to communicate with the volume UP, Down and Mute. I like the DS1802 that gives the flexibility to do both. But, since you say it's not standard serial interface and the MCP4131 will be an ideal choice. How can adapt similar feature on to MCP? Can the MCP be configured as PWM control using My Sensor Dimmer sketch?

    "The other option with the DS1802 is to simulate the pushbuttons using the pins of an Arduino."

    Are you suggesting connecting Arduino relays button actuator to the push buttons to simulate UP, Down and Mute. If so what kind of function should I add or remove from the sketch to have it turn ON the relay when the button is pushed and turn OFF relay when released. I think this will be the most low-tech method to go about that will get the job done without any tedious programming.

    Also, I was checking this project, linked below. If I can do something with this... I think it would work great.

    http://forum.mysensors.org/topic/936/backlit-dimmable-led-mirror-with-motion-sensor



  • @mikemayers A food of thought if you're going low tech. The MAX5486 could facilitate your needs. Bear in mind you will need additional circuitry for the DS1802 output because the DS1802 has a relatively high wiper (output) resistance and without buffering, the DS1802 can only drive a 1mA load. As a result it is recommended to use something like he MAX4167 operational amplifiers connected on each channel output.

    I was curious about PWM control and found a link that you might be interested in Audio PWM



  • @mikemayers

    I forgot to add this... Its using an Atmel MCU connected to DS1802

    DS1802 MCU Control


  • Hero Member

    @mikemayers said:

    Are you suggesting connecting Arduino relays button actuator to the push buttons to simulate UP, Down and Mute. If so what kind of function should I add or remove from the sketch to have it turn ON the relay when the button is pushed and turn OFF relay when released. I think this will be the most low-tech method to go about that will get the job done without any tedious programming.

    Hi Mike, what I was suggesting for the DS1802 was that you don't have to interface with it using the serial interface. You could use digital out pins on the Arduino to drive the button inputs on the DS1802 low and control it that way. The disadvantage is that you won't be able read the current state of it or go directly to specific volume settings.

    For the MCP, you could use 3 buttons that connect to digital pins on the Arduino. The code on the sketch would detect the buttons being pressed and then send appropriate changes to the MCP using the SPI interface. IMHO this is the easiest approach.

    Cheers
    Al



  • @Sparkman

    Using the "Arduino to drive the button inputs on the DS1802 low and control" is probably what I'm going to do.

    My question is, how do I change the Arduino relay sketch to have the outputs turn ON when pushed and OFF when released? Right now its push once to turn ON and push again to OFF.

    @jeylites
    I was also going through your advice on MAX5486 . If I'm going with the above approach, I'm guessing MAX5486 will be sufficient right...? Will I need additional electronic for the outputs?



  • Hey guys, I didn't hear from you. Just wondering how I could go about changing the sketch to push to on and how do you connect the Arduino to the switches? Thanks.


  • Hero Member

    @mikemayers Hi Mike, regarding connecting the switches, there are lots of examples on the net, including this one: http://www.mysensors.org/build/binary

    Can you post your modified sketch? The relay one will restore state after power-down/power-up. If you don't need to restore state, then you can eliminate all that code.

    Cheers
    Al


  • Admin

    @mikemayers

    You could also have a look at:
    http://forum.mysensors.org/topic/1288/example-dimmable-led-with-rotary-encoder

    Where you can use a simple rotary encoder for volume input control (which also works from controller side). Then you add the MAX5486 as output device to control the actual volume to your speakers.


Log in to reply
 

Suggested Topics

  • 4
  • 9
  • 9
  • 14
  • 933
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts