+ Post New Thread
Results 1 to 6 of 6
-
8th November 2018, 14:49 #1
- Join Date
- Mar 2018
- Posts
- 37
- Helped
- 0 / 0
- Points
- 501
- Level
- 4
Potentiometer with Microcontroller
Hi,
If my microcontroller's operating voltage is +3.3V, Is it possible to connect +6V operating potentiometer's wiper pin to microcontroller's ADC input?
Or Is it possible to use external +6V operating ADC IC with +3.3V operating microcontroller?
-
Advertisement
-
8th November 2018, 15:53 #2
- Join Date
- Nov 2006
- Location
- Brazil
- Posts
- 8,917
- Helped
- 1130 / 1130
- Points
- 29,873
- Level
- 42
- Blog Entries
- 9
Re: Potentiometer with Microcontroller
Why not use a simple resistive divider along with the potentiometer ?
Thus you are able to limit the maximum value of the input voltage in the ADC.--------------------------------------------------------------------------------------------------
Part of the world that you live in, You are the part that you're giving ( Renaissance )
-
Advertisement
-
8th November 2018, 16:11 #3
Re: Potentiometer with Microcontroller
No you cannot directly that is through pot feed 6V to a 3.3V MCUs analog input pin because it will damage the ADC module.
You can use a voltage divider and make necessary conversion in the code. A 2x 5k resistor will divide the voltage into 3V and 3V. So, you can use one 5k resistor at top and a 5k pot at bottom in the voltage divider and connect the POT wiper to ADC input pin.
-
Advertisement
-
8th November 2018, 22:52 #4
Awards:
- Join Date
- Jul 2009
- Location
- Aberdyfi, West Wales, UK
- Posts
- 13,461
- Helped
- 4492 / 4492
- Points
- 82,046
- Level
- 69
Re: Potentiometer with Microcontroller
.. well, actually you can wire it with 6V at the top of the wiper as long as the voltage from the wiper is never allowed to go higher than the MCU supply voltage. If it goes higher the ADC input will fry.
The easiest way to prevent it happening is to use a single resistor from the top of the potentiometer to the 6V supply but as you haven't told us what value the potentiometer is, we can't advise on the value to use. To halve the voltage you probably want one with the same resistance as the potentiometer track. For example if you potentiometer is 10K, add a fixed 10K between the track and the 6V line.
Yes, you can also use an external ADC device that can directly measure 6V but then you have to check you haven't moved the problem to one of logic levels differences between the MCU and ADC.
Brian.PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.
-
9th November 2018, 13:55 #5
- Join Date
- Mar 2018
- Posts
- 37
- Helped
- 0 / 0
- Points
- 501
- Level
- 4
Re: Potentiometer with Microcontroller
Thanks for all the replies, I'm going to use MU-615A potentiometer which is 700 (+-200) ohms .
-
Advertisement
-
9th November 2018, 15:44 #6
Awards:
- Join Date
- Jul 2009
- Location
- Aberdyfi, West Wales, UK
- Posts
- 13,461
- Helped
- 4492 / 4492
- Points
- 82,046
- Level
- 69
Re: Potentiometer with Microcontroller
What is your application Vilfred?
That value is quite low and if you only want to vary a voltage for measurement it will waste quite a lot of power.
Brian.PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.
+ Post New Thread
Please login