Connecting 1 B10K Pot. and 1 SH SL60V B10 K pot. to 1 analog input

Hello Im new to arduino I found a tutorial on how to connect two pots into one analog input so they would work both (https://www.instructables.com/id/Multiple-Analog-Inputs-on-Only-One-Analoge-Pin/) I want to know if I connect all the analog inputs in the same way (2 diodes connected to 2 pots to 1 analog and 2 digital) how strong do I need the pull down resistor for ground ? What should I calculate here ? Im using arduino Mega 2560
Thank you :slight_smile:

You can, but do note the drop across the diodes and the fact that's temperature and current dependent. Just use the same values, they are not critical.

So I can use 10K ohm resistor on the ground and connect it in this way ? for every analog input?

Yes

septillion:
Yes

One last question do I need to use PWM or can I plug them to Digital inputs ? Whats the Difference ? Are PWM better used for LEDs ? thank you :slight_smile:

PWM is an extra function of the pin besides digital. Same for analog pins, those can be digital i/o as well. ofly when you call analogWrite() (for PWM pins) or analogRead() (for analog pins) you change the pin to that mode.

In this case, you need a digital i/o so you can use a PWM or analog pin for that but you will simply not use that function/mode. If you don't need that function then it's fine. But I guess you need more analog pins because of this solution?

septillion:
PWM is an extra function of the pin besides digital. Same for analog pins, those can be digital i/o as well. ofly when you call analogWrite() (for PWM pins) or analogRead() (for analog pins) you change the pin to that mode.

In this case, you need a digital i/o so you can use a PWM or analog pin for that but you will simply not use that function/mode. If you don't need that function then it's fine. But I guess you need more analog pins because of this solution?

Im making a MIDI controller and I want 16 pots classic B10K and 16 pots horizontal If i connect 2 pots to every single analog pin that makes 16 pots classic and 16 pots horizontal to 16 analog pins and 32 digital pins (or PWM) I couldnt find any other way to connect so many pots. Then I want to connect 16 buttons with 16 LEDS but I dont know if it will work if I connect 1 button and 1 LED to 1 Digital Input or even if it is possible ...
Btw the communication pins can be used only for shield ? or as Digital Inputs too ? Thanks.

I couldnt find any other way to connect so many pots.

An [u]analog multiplexer[/u] can select one analog signal at a time.

...If you look at the datasheet for the Arduino ATmega chip, you'll see it has only one internal analog-to-digital converter and an internal multiplexer connected to several analog pins.

16 analog pins and 32 digital pins (or PWM)

PWM is optional and you are NOT using PWM in this application. You'd program the pins as digital outputs.

Adun:
Im making a MIDI controller and I want 16 pots...

With this breakout board you can have 16 pots per analogue input.
Leo..

DVDdoug:
An [u]analog multiplexer[/u] can select one analog signal at a time.

...If you look at the datasheet for the Arduino ATmega chip, you'll see it has only one internal analog-to-digital converter and an internal multiplexer connected to several analog pins.
PWM is optional and you are NOT using PWM in this application. You'd program the pins as digital outputs.

"one internal analog-to-digital converter and an internal multiplexer connected to several analog pins."
so this means some analog pins can be multiplexed internally ? More clarification on this thank you

Hi,
What model Arduino are you using?

Tom... :slight_smile:

Adun:
so this means some analog pins can be multiplexed internally ?

Most Arduinos have just one A/D, with a multiplexer (selector) connected to the analogue inputs.
The muxer selects one pin, e.g. A0, and reads it. Then selects another pin, e.g. A1, and reads it.
All of this goes relatively fast. About 10 analogue inputs can be read in 1ms.
Leo..

Hi,
OPs diagram from Destructibles;

Tom... :slight_smile:

TomGeorge:
Hi,
What model Arduino are you using?

Tom... :slight_smile:

Im using Mega 2560

I would just simplify things and use an external ADC. You can get cheap I2C ADC's which seem just fine for this.

septillion:
I would just simplify things and use an external ADC.

Most external A/D converters (like the ADS1115) have an internal reference voltage that isn't accessable.
They are not really suitable for ratiometric input devices, like pots.
Leo..