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

Thread: Teensy Internal Reference Voltage Question

  1. #1
    Junior Member
    Join Date
    May 2016
    Posts
    6

    Teensy Internal Reference Voltage Question

    For the project that I'm working on I need the teensy to be able to read its battery voltage and shut down before it gets too low. I am using teensyduino. According to the arduino website, setting the new reference voltage is as simple as typing analogReference(INTERNAL) or analogReference(INTERNAL1V1) in the setup loop. Both of them worked fine for me when I tried them. My question is, does the teensy also have a 2.56V internal reference? I noticed on the pjrc website that it talks about using 2.56V. https://www.pjrc.com/teensy/adc.html When I try compiling with analogReference(INTERNAL2V56) I get an error. Any thoughts or advice would be appreciated!

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    579
    The Teensy 3.0 only has a 3.3v and 1.2v reference. Is this what you are using?

  3. #3
    Junior Member
    Join Date
    May 2016
    Posts
    6
    I am using Teensy 3.2 Did the older versions have a 2.56V ref?
    Last edited by intern2016; 07-18-2016 at 08:06 PM.

  4. #4
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    579
    I believe the Teensy LC did. Why don't you just use a voltage divider to bring your battery down to 1.2v?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,083
    Teensy 2.0 and Teensy++ 2.0 have a 2.56V internal reference.

    On Teensy 3.0, 3.1 and 3.2, the internal reference is 1.2V.

    Teensy LC does not have any internal reference voltage.

  6. #6
    Junior Member
    Join Date
    Jun 2016
    Location
    Rennes France
    Posts
    6
    Please can you put this information on product page. https://www.pjrc.com/teensy/teensy31.html . I have lost few time to find this post.
    Regards

  7. #7
    Sorry to be obtuse, but just to be sure, the "Reference Voltage" is in addition to the 3.3 volts the processor is running on, correct? In other words I think one can put a pot across +3.3v output of the Teensy 3.2 and 0V, with the wiper on any analog in, and get the full range of the pot without damaging the processor, or go to the "internal Reference" to use the 1.2V reference.

  8. #8
    Member
    Join Date
    Aug 2013
    Location
    Ohio
    Posts
    84
    Your assumptions are basically correct WRT connecting a pot between AGND and 3.3V, that is a pattern that I have been using to validate our analog subsystem at work. We connect the wiper to an analog input (DP0) through a small resistor with a cap to analog ground.

    If you wanted to use the internal 1.2V reference make sure your circuit cannot exceed 1.2V.

    The schematics show the rest: Teensy schematic page

    Teensy background:

    In all Teensy 3.x (3.0, 3.1, 3.2, 3.5, 3.6), the Kinetis processor's VREFL is connected directly to to analog ground (VSSA) which itself is connected to signal ground through a ferrite bead to limit high frequency noise. VREFH is connected through a 470 Ohm resistor to the analog supply (VDDA) which connects through a ferrite bead to the 3.3V supply, with a 0.1uF capacitor to analog ground.

    ADC background:

    The internal 1.2V reference is available as an ADC configuration option (REFSEL in ADCx_SC2), and using it requires the VREFOUT pin to be connected through a 0.1uF load capacitor to analog ground, which is part of Teensy 3.x designs.

Posting Permissions

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