I need to design a circuit to measure temperatures in the range 15-40 degrees C (this will later be the basis for a regulator of a peltier-element for a fridge). I tried a circuit using the bandgap-reference of 2 transistors, but it did not work. Now I would like to use a circuit with a transistor used as a diode. I could only come up with a transistor (with B and C connected together), in series with a resistor (for a supply voltage of 12 V I will choose a resistor of 11.3...12 k). But I think this circuit is too simple. I also found this circuit, but I don't know how to make the dimensioning of the components.
You'll want to drive the diode (or diode connected transistor) with a current source. 10uA is a nice value. An easy(accurate) current source can be made with a voltage reference, opamp and resistor.
Edit.. I should add that there are a lot of power supply connections and bypass caps missing from the above schematic. (for R1 try two 1 Meg's in parallel (1% or better).. with more time than money you can futz with the R's )
The easiest is to get a off the shelf temperature sensor IC. These are cheap and plentiful, and do a much better job than you can cobble together on your own. These devices are available with a voltage output you can run into the A/D of your micro, or with a digital interface like IIC or SPI.
Trying to make your own just doesn't make sense, especially if you have to come here asking how.
If cost is a overriding concern, then the cheapest temperature sensor is probably a thermistor and pulldown resistor. These things have a large temperature response, so all you need is those two components to directly drive a A/D input of the micro. Another advantage of thermistors is that they can be thru hole and thereby mounted standing off the board up to a few 10s of mm. That can help in measuring air temperature and being less sensitive to board temperature.
The downside of cheap thermistors is that they aren't very accurate. This method is appropriate for measuring temperature to decide how hard to run a cooling fan, but not for controlling a environmental chamber to ±½°C.