Question: I am trying to read the temperature sensor in a car with a Raspberry Pi. The temperature sensor's resistance changes as the engine temp increases however the temperature sensor would be in parallel to the voltage divider that runs to the ADC I would read from and since the temperature sensor grounds in the engine block I am unable to read anything after the sensor.

How would I find the resistance of the temperature sensor and read it from the ADC?

![schematic](https://i.stack.imgur.com/TiHIZ.png)

[simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fTiHIZ.png) – Schematic created using [CircuitLab](https://www.circuitlab.com/)

Answer: 
Your ADC is monitoring the battery voltage. Your temperature sensor just passes current from the battery to ground. The amount of current will vary with the temperature.

![schematic](https://i.stack.imgur.com/C7Rql.png)

[simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fC7Rql.png) – Schematic created using [CircuitLab](https://www.circuitlab.com/)

*Figure 1. Set R1 approximately equal to R3.*

The output voltage will be given by \$ V\_{out} = 3.3 \frac {R\_3}{R\_1 + R\_3} \$.
In simple terms, your voltage divider is connected in the wrong place, so you are measuring the supply, and not the sensor output.

So conceptually speaking, you need to connect the ADC to the sensor output.

No Raspberry Pi itself has an ADC, so whatever ADC you use will be an add-on board. One very "black box thinking" solution would be to simply by a USB data aquisition system. More likely however you are using some SPI or I2C ADC chip on a breakout board/module.

Let's assume your ADC has either a 5v or 3.3v input maximum.

Given the relatively low impedance of the sensor as you depict it, you could probably connect the voltage divider directly to the sensor output, and the load of the divider wouldn't matter much. Only automative electrical environments are notoriously nasty - you get noise and spikes during operation, and it's not unheard for a car to be jump started with 24 volts, which could mean getting twice the designed input voltage. So you'll probably need some clamps for the voltage.

If you wish to avoid loading the sensor with the voltage divider (especially if something in the car is already reading it) then you may want to consider using an op-amp as a *buffer amplifier* first, and have that feed the the voltage divider. There are IC's marketed as being particularly suitable for the concerns of automative applications which you might consider.

Finally, two additional thoughts:

First a pi is a relatively delicate system needing steady quiet power. Depending on your needs, something simpler and more robust like an Arduino, ESP8266 or ESP32, etc might be a better fit, and these actually have their own ADC already.

The other is that in a modern vehicle, that sensor is probably already being read, and you might be able to obtain it via a CAN bus, OBD-II or similar...

---

If the temperature sensor is not an original part of the vehicle, then you should probably just get your own sensor more compatible with the pi, either an analog one and feed it from the same lower voltage supply, or perhaps a digital one such as a one-wire type sensor (though beware many of those on ecommerce sites are fakes that are only partially functional with software changes)