+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Member level 1
    Points: 291, Level: 3

    Join Date
    Mar 2018
    Posts
    35
    Helped
    0 / 0
    Points
    291
    Level
    3

    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?

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 27,962, Level: 40
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,341
    Helped
    1056 / 1056
    Points
    27,962
    Level
    40
    Blog Entries
    6

    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 )



    •   AltAdvertisment

        
       

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

    Join Date
    Aug 2017
    Posts
    342
    Helped
    35 / 35
    Points
    1,791
    Level
    9

    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.



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 74,312, Level: 66
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,173
    Helped
    4031 / 4031
    Points
    74,312
    Level
    66

    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.



  5. #5
    Member level 1
    Points: 291, Level: 3

    Join Date
    Mar 2018
    Posts
    35
    Helped
    0 / 0
    Points
    291
    Level
    3

    Re: Potentiometer with Microcontroller

    Thanks for all the replies, I'm going to use MU-615A potentiometer which is 700 (+-200) ohms .



    •   AltAdvertisment

        
       

  6. #6
    Super Moderator
    Points: 74,312, Level: 66
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    12,173
    Helped
    4031 / 4031
    Points
    74,312
    Level
    66

    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.



--[[ ]]--