Electrical – 5V Current Transducer to 3.3V Analog GPIO Input

3.3vanalogcurrent measurementgpiostm32

I am trying to find 3.3V variant of the 5V Current Transducer LTS_25-NP but so far no success. Is it possible to interface this 5V analog output to 3.3V STM32F407 analog input GPIOs?

Edit: I want to know about the 'FT' (5V tolerant input pins) for the purpose of sensor input when my MCU is powered from 3.3V power supply.

Best Answer

The output swings around a center voltage of 2.5 volts. The minimum load as specified in the datasheet is 2K ohm. What you want is to prevent the 2.5 volt 'center' from going above 3.3 volts at high current levels. Analog inputs are 'fussy' about input resistors staying below 1K if possible, so readings are more accurate.

Without using a buffer IC you are limited to a resistor ratio of 2/3. So in keeping with the sensors minimum load and the analog input resistor maximums you could make a divider with 2 resistors. A 1K 1% (R1) from the sensor to your analog input, and that point has a 2K 1% resistor (R2) to ground, so it shifts the signal down by 33%. The math says the analog input will get a maximum of 3.333 volts, but that is a peak value that would require your sensor to saturate. The 2.5 volt center voltage at the sensor will become ~1.65 volts at the analog input.

I am keeping the ratio simple so software can multiple ADC input by 1.33334. Another option is to make both resistors 1K 1%, so the input is divided by 2. To rescale it in software just multiple analog input by 2. You get better resolution at a ratio of 2/3 though it means using floating point to get the 1.3334 multiplier. To multiply by 2 can be done with integers or shift left one place (binary).

If R1 = R2 then R1 should be 1.5K 1% so to stay above the minimum rated load of the sensor without causing sample errors in the analog input.

Input sensitivity is 25mV/A, so you will have to factor that into your scaling routines.

schematic

simulate this circuit – Schematic created using CircuitLab