+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Full Member level 1
    Points: 814, Level: 6

    Join Date
    Jul 2016
    Posts
    119
    Helped
    2 / 2
    Points
    814
    Level
    6

    use of microcontroller as potentiometer and data storing device

    1) i have arduino nano and i want to read data from potentiometer and store it and use it on button press.



    2) i also want to set uc (arduino nano) as potentiometer., i know how to get pwm signal but i want different voltages as i write.


    kindly suggest ,me right way .

    thanks in adv.

    vraj

  2. #2
    Super Moderator
    Points: 73,905, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,992
    Helped
    3418 / 3418
    Points
    73,905
    Level
    66

    Re: use of microcontroller as potentiometer and data storing device

    Hi,

    1) In my eyes it makes no sense. A rotary encoder is more useful.

    But if you want a potentiometer as an input device, then connect the pot_wiper to teh microcontroller´s ADC input and the other pot_pins to VCC and GND.

    ****
    2) is not clear what you mean. ... a pot connected to a PWM output, so you can adjust duty cycle with the microcontrolelr and the voltage with the pot??? What is it good for?

    Anyway: use the pot_wiper as output. Connect one pot_pin to GND and the other to the PWM signal.

    ***
    A picture could help to avoid misunderstandings.


    Klaus


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  3. #3
    Full Member level 1
    Points: 814, Level: 6

    Join Date
    Jul 2016
    Posts
    119
    Helped
    2 / 2
    Points
    814
    Level
    6

    Re: use of microcontroller as potentiometer and data storing device

    1) i want to use uc to read and store values of potentiometer. so, i need code for programming . please help me

    2) use uc as voltage source like 1v, 2v, 1.1v, ...... to 5v.
    any range between 0 v to 5v.

    - - - Updated - - -

    1) i want to use uc to read and store values of potentiometer. so, i need code for programming . please help me

    2) use uc as voltage source like 1v, 2v, 1.1v, ...... to 5v.
    any range between 0 v to 5v.



  4. #4
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    126 / 126
    Points
    5,417
    Level
    17

    Re: use of microcontroller as potentiometer and data storing device

    Arduino Digital pins can only source or sink 40mA current. Using PWM output of uC as a Voltage source is of no use. You can only drive Leds from it.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  5. #5
    Super Moderator
    Points: 73,905, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,992
    Helped
    3418 / 3418
    Points
    73,905
    Level
    66

    Re: use of microcontroller as potentiometer and data storing device

    Hi,

    i want to use uc to read and store values of potentiometer. so, i need code for programming
    There are many codes around to read ADC. So where is the problem?
    And also for writing data to EEPROM...

    Klaus


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  6. #6
    Full Member level 1
    Points: 814, Level: 6

    Join Date
    Jul 2016
    Posts
    119
    Helped
    2 / 2
    Points
    814
    Level
    6

    Re: use of microcontroller as potentiometer and data storing device

    i want to make a project that store potentiometer reading in 0 to 1023 (analog input) value when i press the button and when i press another button, this data will use to make turn on-off- control the digital pin with pwm. that also want to make it repeat again and again.

    i know how to set the potentiometer value to digital ( dividing it by 4), which will be pwm output at digital pin. But my problem is, i will use 3 potentiometer and all value will change in short, i want to record steps. like at 1st stage, my 1st potentiometer's value is 500, 2nd potentiometer's value is 700, 3rd potentiometer's value is 1023.
    at 2nd stage, my 1st potentiometer's value chages to 750,2nd potentiometer's value changes to 200,3rd potentiometer's value will 1000.

    this type of value i want to store. after that i want to use this data when i will press button by (pulling any of i/o pin ) , this steps will repeat again and again.

    - - - Updated - - -

    Quote Originally Posted by Okada View Post
    Arduino Digital pins can only source or sink 40mA current. Using PWM output of uC as a Voltage source is of no use. You can only drive Leds from it.
    then how audio systems do their job? i show inside of it and it was having uc for remote control application. then how the volume up/ down will work?

    i have also a music system that dont having remote control. it has potentiometer! and when i buy it's upgraded version, it was having uc !



  7. #7
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    126 / 126
    Points
    5,417
    Level
    17

    Re: use of microcontroller as potentiometer and data storing device

    In Audio System Potentiometer is connected to amplifier. Potentiometer adjusts the voltage level of input signal to amplifier. I don't know what you want to do. Do you want to read adc value and convert the reading to PWM duty and generate PWM of certain duty ? If yes, then you have to read the three adc channels to which the output of the three potentiometers are connected. These will be in the range of 0 to 1023. If your PWM resolution is 8 bit (0 - 255) then you have to right shift the 10-bit adc result two bits and you will get value 0-255 and you can use this for your PWM duty.



  8. #8
    Super Moderator
    Points: 255,118, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,452
    Helped
    13543 / 13543
    Points
    255,118
    Level
    100

    Re: use of microcontroller as potentiometer and data storing device

    Audio or TV systems with remote control will use digital potentiometers or a similar functions integrated into their audio chip sets.

    Digital potentiometer ICs with SPI or I2C control are made by various vendors. Voltage controlled amplifiers have been used in old systems but aren't common any more.

    As for the first part of your question, you are apparently asking how to write arduino application software, e.g. read pin status, detect key press, store data etc.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  9. #9
    Full Member level 1
    Points: 814, Level: 6

    Join Date
    Jul 2016
    Posts
    119
    Helped
    2 / 2
    Points
    814
    Level
    6

    Re: use of microcontroller as potentiometer and data storing device

    here my question making wider scope!
    there were two different questions!
    there were two different questions both related to uc , and i also thought that answer will be so little so it would be better to ask in one question.



  10. #10
    Advanced Member level 5
    Points: 14,469, Level: 29
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,407
    Helped
    783 / 783
    Points
    14,469
    Level
    29

    Re: use of microcontroller as potentiometer and data storing device

    Quote Originally Posted by FvM View Post
    Voltage controlled amplifiers have been used in old systems but aren't common any more.

    .
    I remember those.... the microcontroller would generate a PWM waveform which was filtered and fed to the volume control IC.

    Nowadays, it is best to use a digital potentiometer. They are available as three-wire, I2C or SPI control. Some of them even have internal memory which will retain the last setting before it is powered down.
    My batteries are recharged by "Helpful Post" ratings.
    If you feel that I've helped you, please indicate it as a Helpful Post



  11. #11
    Full Member level 1
    Points: 814, Level: 6

    Join Date
    Jul 2016
    Posts
    119
    Helped
    2 / 2
    Points
    814
    Level
    6

    Re: use of microcontroller as potentiometer and data storing device

    thanks fvm and schmitt trigger i got my answer very well! of 2nd question thanks a lot, now i am waiting for simple code for save analog data.



--[[ ]]--