Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Simple potentiometer

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Posts
    3

    Simple potentiometer

    Hello world,
    I'm totally new on this forum and with arduino/teensy
    I'm playing with teensy and try to connect a simple pot. On arduino it's OK: pot one side value 0 and 0Volt other side value 1023 and 5Volt... But on teensy the 5Volt is here on the middle of the pot! So the entire pot is not used only half the pot. It's a 10cm pot 10k linear, tried with a 50k pot also and same résults. So why teensy don't use the entire pot?

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,600
    Unfortunately, you did not write which Teensy you are using. It's difficult to help when the most important informations are missing.

    In case you use a modern 32bit Teensy (LC or 3.x), a short look onto the data sheet would tell you that, depending on the setting of the analog reference voltage, the ADC full scale is either obtained at 3.3V (default) or at 1.2V (with alternate reference settings). When using such a modern Teensy, it is recommended to connect the potentiometer between 3.3V and GND, and it it is strictly forbidden to apply more than 3.3V to the analog input pins because that would kill the internal ADC.

    In case you use the old, slow, and outdated 8bit Teensy 2.x, things are different.

  3. #3
    Junior Member
    Join Date
    Jun 2017
    Posts
    3
    Sorry,
    it's the teensy 3.2
    Will try another way to connect the pot,
    Thanks

  4. #4
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,600
    Electronic circuit design requires meticulous study of the components' data sheets BEFORE a single physical connection is made...

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,782
    The Teensy 3.2 - Most of the IO pins are +5v tolerant, except for a few analog only pins which are only 3.3v.

    On the Teensy 3.2, the analog system works with up to 3.3v. The hardware can handle the 3.3v, but anything over that will read as 1023 (or the maximum for the current set analogResolution....

    So if you wish for full range, connect the pot to 3.3v instead of 5v. Or setup the output through a voltage divider to cut down the voltage, or...

  6. #6
    Junior Member
    Join Date
    Jun 2017
    Posts
    3
    OK, will try as son as possible
    Than you guys for jour help

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,568
    Just connect the pot to the 3.3V pin instead of 5V. Easy peasy.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •