Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Digital Volume Control

Digital Volume Control

Scheduled Pinned Locked Moved General Discussion
15 Posts 5 Posters 6.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikemayers
    wrote on last edited by mikemayers
    #1

    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?

    1 Reply Last reply
    0
    • AWIA Offline
      AWIA Offline
      AWI
      Hero Member
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mikemayers
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • AWIA Offline
          AWIA Offline
          AWI
          Hero Member
          wrote on last edited by
          #4

          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.

          M 1 Reply Last reply
          0
          • AWIA AWI

            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.

            M Offline
            M Offline
            mikemayers
            wrote on last edited by mikemayers
            #5

            @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?

            SparkmanS 1 Reply Last reply
            0
            • M mikemayers

              @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?

              SparkmanS Offline
              SparkmanS Offline
              Sparkman
              Hero Member
              wrote on last edited by
              #6

              @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

              1 Reply Last reply
              0
              • jeylitesJ Offline
                jeylitesJ Offline
                jeylites
                wrote on last edited by
                #7

                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.

                M 1 Reply Last reply
                0
                • jeylitesJ jeylites

                  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.

                  M Offline
                  M Offline
                  mikemayers
                  wrote on last edited by mikemayers
                  #8

                  @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

                  jeylitesJ SparkmanS 2 Replies Last reply
                  0
                  • M mikemayers

                    @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

                    jeylitesJ Offline
                    jeylitesJ Offline
                    jeylites
                    wrote on last edited by jeylites
                    #9

                    @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

                    jeylitesJ 1 Reply Last reply
                    0
                    • jeylitesJ jeylites

                      @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

                      jeylitesJ Offline
                      jeylitesJ Offline
                      jeylites
                      wrote on last edited by
                      #10

                      @mikemayers

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

                      DS1802 MCU Control

                      1 Reply Last reply
                      0
                      • M mikemayers

                        @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

                        SparkmanS Offline
                        SparkmanS Offline
                        Sparkman
                        Hero Member
                        wrote on last edited by Sparkman
                        #11

                        @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

                        M 1 Reply Last reply
                        0
                        • SparkmanS Sparkman

                          @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

                          M Offline
                          M Offline
                          mikemayers
                          wrote on last edited by mikemayers
                          #12

                          @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?

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mikemayers
                            wrote on last edited by mikemayers
                            #13

                            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.

                            SparkmanS 1 Reply Last reply
                            0
                            • M mikemayers

                              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.

                              SparkmanS Offline
                              SparkmanS Offline
                              Sparkman
                              Hero Member
                              wrote on last edited by
                              #14

                              @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

                              1 Reply Last reply
                              0
                              • hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by hek
                                #15

                                @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.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                11

                                Online

                                11.7k

                                Users

                                11.2k

                                Topics

                                113.1k

                                Posts


                                Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • MySensors
                                • OpenHardware.io
                                • Categories
                                • Recent
                                • Tags
                                • Popular