Input Voltage Divider

teensy_ino

Well-known member
Hello everyone,

How do I correctly design a voltage divider (e.g., 12V to 3.3V, 5V to 3.3V) for the Teensy 3.5 / 4.1
analog and digital inputs?

  • What minimum/maximum current should flow?
  • What would be the ideal value?

  • At what current do the protection diodes start to conduct?

Greetings from Germany
 
First find out the maximum source impedance the ADC is happy with. Then use that as the bottom leg of the divider and select the top leg to give an appropriate division factor. That way you'll use the minimum current needed. (*)

For example if the ADC wants 10k or less (no idea if this is the case), and you want to divide 12V down within 3.3V, I'd select 33k : 10k, for a division ratio of 1/4.3, which maps 12V to 2.79V and will handle upto 14.2V on the input before saturating.

Protection diodes should not be asked to conduct by a well designed divider. They kick in about 0.3V or so outside the rails, and unless protected will draw as much current as needed until they fry. Usually the top leg of the divider is reasonably good current limiting and will protect the protection diodes (remember they are only for ESD handling protection, not designed for continuous dissipation).

In my example above 20V on the input will lead to less than 0.5mA in the protection diode.

(*) you can use higher value resistors though, if your signal is slow, by adding capacitance across the bottom resistor to lower the impedance seen by the ADC.
 
Hello MarkT,

Where can I find the source impedance information for the Teensy 3.5 and the 4.1?

Some forum once mentioned something about less than 5 kOhms... but I'm not sure if that's correct?

Greetings
 
NXP provides the electrical spec.
IMXRT1060CEC Electrical Datasheet
Section 4.8 (page 63) for the Analog spec's. You'll see 5k, 12.5k, 25k Ohms (it's programmable).

Seeing as how most people use a 10k Ohm potentiometer on the analog input, it's a pretty save bet to use the suggested values @MarkT provided.

Off hand, I don't know what the default value is set to.
 
NXP provides the electrical spec.
IMXRT1060CEC Electrical Datasheet
Section 4.8 (page 63) for the Analog spec's. You'll see 5k, 12.5k, 25k Ohms (it's programmable).

Seeing as how most people use a 10k Ohm potentiometer on the analog input, it's a pretty save bet to use the suggested values @MarkT provided.

Off hand, I don't know what the default value is set to.
A 10k pot can have 2.5k of source impedance or less though. At mid-position its two 5k sections, one to ground, one to the input - if the input is low impedance that's two 5k's in parallel to low impedance, or 2.5k.

The datasheet of the chip is where to get information about the ADC as mentioned.
 
Hello BillFM,
Hello MarkT,

First of all, thank you very much for your information!

I just looked at the datasheets for the Teensy 3.5 LINK ( page 41) and the 4.1 again:

According to them, the Teensy 3.5 would prefer an input resistance of 2-5K.
  • The Teensy 4.1 has three different options:
  • 5-7K, 12.5-15K, and 25-30K.

In order to properly design a voltage divider and associated input protection circuits, it would be very important to know
what value the Teensy 4.1 is set to when shipped...
Who knows more about this?


@Paul Stoffregen: Can you tell me more about this?

Greetings from Germany
 
Hi AlainD,


Thanks for the tip – I'll keep it on my radar.
As far as I know, 100nF is often used for this (ceramic?)

Before I can continue working on the voltage divider design, I first need to clarify what the Teensy 4.1's actual impedance
at the analog input is in its factory state...

I'm still waiting for "the" right information on that...


Greetings from Germany
 
Last edited:
Before I can continue working on the voltage divider design, I first need to clarify what the Teensy 4.1's actual impedance
at the analog input is in its factory state...

I'm still waiting for "the" right information on that...
Try it out. generate a simple divider with precise (1%) resistors and measure what the ADC gives you. Then estimate the actual impedance.
IIRC, it is programmable, so you can change it.
I guess you have a teensy at hand and experimentation is holy grail.
 
Hi AlainD,


Thanks for the tip – I'll keep it on my radar.
As far as I know, 100nF is often used for this (ceramic?)

Before I can continue working on the voltage divider design, I first need to clarify what the Teensy 4.1's actual impedance
at the analog input is in its factory state...

I'm still waiting for "the" right information on that...


Greetings from Germany
The teensy 3.x ADC had a 10pF internal capacitor. So external 10 nF gave a worst case 0.1% accuracy, if the external capacitor was at the right voltage level when the reading started. But it also depends on the fluctuation speed and amplitude of the signal, the resistor values and what you want to measure.

For example resistors on a 10K NTC temperature probe will depend on the temperature range, but it will be a slow moving signal.
 
Probieren Sie es aus... Soweit ich mich erinnere, ist es programmierbar..

Hello WMXZ,
Thanks for the info, - but unfortunately it doesn't really help me.

The fact that the input impedance is adjustable is stated in the datasheet (section 4.8.2.1.1, page 64) – we already discussed this above.

My question was:
What is the analog input impedance set to on the Teensy 4.1 as delivered?

These values are the basis for correctly calculating a voltage divider...

To test this, I would either have to remove the sensors or put the car on the third floor...
It would be much easier to know the factory-set Teensy impedance...

The sensors I want to read via a 3.3V voltage divider output a voltage between 0-5V or 0-12V (or up to 14.4V).

BTW:
Unfortunately, I couldn't find any additional information about the input impedance of the digital inputs in the data sheet (or I simply overlooked it in the 119 pages) - Could it be that the values are the same as for the analog inputs?

Who knows more about this?
Perhaps Paul Stoffregen can comment on it?

Greetings from Germany
 
Back
Top