Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

use of microcontroller as potentiometer and data storing device

Status
Not open for further replies.

Vraj

Advanced Member level 4
Joined
Jul 15, 2016
Messages
119
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
1,038
1) i have arduino nano and i want to read data from potentiometer and store it and use it on button press.:grin:



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
 

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
 
  • Like
Reactions: Vraj

    Vraj

    Points: 2
    Helpful Answer Positive Rating
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.
 

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.
 
  • Like
Reactions: Vraj

    Vraj

    Points: 2
    Helpful Answer Positive Rating
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
 
  • Like
Reactions: Vraj

    Vraj

    Points: 2
    Helpful Answer Positive Rating
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.:thumbsup:

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

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 !
 

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.
 

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.
 
  • Like
Reactions: Vraj

    Vraj

    Points: 2
    Helpful Answer Positive Rating
here my question making wider scope! :thumbsup:
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.
 

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.
 

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

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top