I am using an AD590 temperature sensor that is interfaced to an STM32f427 MCU. It is a 2 pin sensor that must be connected to an ADC pin of the STM32f. But, the ADC590 needs a min of 4V to work and the STM32 is working on a 3.3V rail.

So, the first thing that comes up in my mind is using a voltage divider to step down from 4V to say 2.1V(which is my Vadc ref).

Is using a voltage divider advisable in such cases ? Also, should I then use resistors of high precision (say 0.1%) ?

enter image description here

  • \$\begingroup\$ What do you mean "voltage divider"? You need at least 4V to power the sensor, judging by the data sheet... Could you post a circuit about how you would want to connect it? \$\endgroup\$ – FMarazzi Jan 21 '16 at 14:11
  • 3
    \$\begingroup\$ The AD590 is a temperature to current transducer, so it would be useful to know how you are converting from current to voltage. Can you post your schematic? \$\endgroup\$ – Steve G Jan 21 '16 at 14:12
  • \$\begingroup\$ What is the value of R40? \$\endgroup\$ – Steve G Jan 21 '16 at 14:30
  • \$\begingroup\$ Just added the schemtic. Now, the ADCPIN net goes to the adc. But, since is 5V, I cannot feed it directly to the adc, as the STM32 is a 3.3V device. So, probably I will need to add a voltage divider. Also, I will do the math by connecting the voltage via the ADCPIN and the GND pin thereby finding out the current using ohms law. \$\endgroup\$ – Board-Man Jan 21 '16 at 14:31
  • 1
    \$\begingroup\$ @Board-Man yes. The value of R40 determines the maximum voltage going to the ADC pin (at 150 deg C). Get the value of R40 correct and you don't need to divide the signal down. \$\endgroup\$ – Steve G Jan 21 '16 at 14:40

You can just reduce the resistor to keep the voltage within range over the expected temperature range.

Keep in mind that if the temperature sensor wires get shorted the MCU will likely be destroyed. It's also not very good to run long wires directly to the MCU pins.

I suggest adding a resistor of 1-5K in series with the ADC input and a capacitor from the ADC input to ground of 100nF X7R.


simulate this circuit – Schematic created using CircuitLab

Do pay attention to Equation 1 in the microcontroller datasheet to ensure that you are not exceeding the maximum sample rate for the input impedance (which will be your load resistor plus the series resistor I mentioned plus Radc - the 6K ADC sampling switch resistance). Since the AD590 sensors respond with glacial swiftness by ADC standards, you can simply keep the sample rate within reason and you won't lose any information.

enter image description here

Also note that you will not be able to get a full 3.3V out of the AD590 with only a 5V supply. Check the datasheet. You may be limited to 1V to get guaranteed accuracy.

  • \$\begingroup\$ Personally I would add a zener parallel to C1. But then, I also don't know what Microchip says about the resistor to 5V thing on analogue inputs. Not many mfgs like that as an option. \$\endgroup\$ – Asmyldof Jan 21 '16 at 18:12
  • \$\begingroup\$ @Asmyldof It's only to protect the chip in case of catastrophic shorting. It cannot be expected the circuit to operate properly in such circumstances, even unshorted inputs would likely suffer. By the way, you cannot realistically use a zener in this application- the voltage-current curve of a 3.3V zener would not protect the input and would totally destroy the accuracy. It's preferable to use a switching diode (not Schottky- too much leakage) to a clamped voltage (shunt regulator) of perhaps 3.1V using eg. TL431 + R's- but this is better than the OPs original circuit and is simple. \$\endgroup\$ – Spehro Pefhany Jan 21 '16 at 18:19
  • \$\begingroup\$ Spot on about the leakage of course. My bad. I intended to point out that in ADC mode many pins become more sensitive to the "attenuate with an R" trick and forgot to consider that this is a uA scale, even though your picture states it. A second option would be to add an extra resistor tot he sensor path that would get it to voltage dividing 5V into 3V at short. Less safe than hard protection in the long-wire argument, but still, an option. \$\endgroup\$ – Asmyldof Jan 21 '16 at 18:34
  • \$\begingroup\$ @Asmyldof The voltage divider is not a bad idea in general. Unfortunately the drop-out voltage of the AD590 is really high so I don't think it will be good in this instance. \$\endgroup\$ – Spehro Pefhany Jan 21 '16 at 19:37
  • 2
    \$\begingroup\$ I guess I give up trying to annoy you into additions then ;-). I do notice I forgot to upvote you the first time I came here (I promise I meant to). \$\endgroup\$ – Asmyldof Jan 21 '16 at 22:39

This sensor produces a current output.
From the data sheet:
"The device acts as a high impedance, constant current regulator passing 1 μA/K."

Just choose your R40 to not go over the STM32's 3.3V limit and you won't need any voltage divider.

  • \$\begingroup\$ So, in other words the sensor can be assumed as a variable resistor(that regulates current flow depending on temp). This resistor in conjunction with the R40, will give me a reading of the temp mapped current. And since it is high impedance sensor, loading it with a resistor to the GND will pull the voltage. Intelligent selection of R40 will help me maintain it less than 3.3V. So, I will need another ADC pin that taps into the base of the R40 (or rather at the ground). \$\endgroup\$ – Board-Man Jan 21 '16 at 15:05
  • 1
    \$\begingroup\$ A variable resistor could be misleading, you should consider it as an ideal current source, with the current output being set by the temperature. If the ground is in common with the STM32, which should be, you don't need another pin. \$\endgroup\$ – FMarazzi Jan 21 '16 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.