Showing posts with label sensor. Show all posts
Showing posts with label sensor. Show all posts

Monday, 11 November 2013

Temperature and op amps

As I said, turns out the conductivity sensor has no built in temperature sensor is in, which is a pain as I have to make a waterproof thermometer. No matter, I have the sensors - LM35. My LM358 Op Amps arrives (5x) and with them my 5v regulators L7805CV.

Even though the function for calculating the gain of an op amp is easy Vout / Vin = 1 + Rf / Rg, finding resistors from the box of resistors you have takes a bit of time.

I ended up choosing 2 x 270k for Rf and 55k for Rg. I don't know if 2 x 27 and 5.5 would be better. But I ran it in the Livewire simulator and it worked so we'll see.

Now I have the regulator I am going to include that too.

As usual the circuit is online. http://www.circuits.io/circuits/6588

G = 1 + Rf / Rg = 1 + (270k + 270k) / 55k = 540k / 55k = 10.8182

Using this ratio we can see that we top out at just over 30 ° C. An unlikely value for a tank of water in the UK

A quick test with that circuit and I get 1.5v in my nice cosy house.

° CLM35: 0.01V per ° CLM358: * 10.8182
00.000.00
50.050.54
100.101.08
150.151.62
200.202.16
250.252.70
300.303.25

Now the problem I have is how to make this :

waterproof!

Wednesday, 6 November 2013

Knocking some sense into it

I finally got the Atlas Scientific conductivity sensor all wired up.

Turns out I have slightly misunderstood the documentation which says "temperature corrected reading". But it turns out you have to tell it the temperature and then it responds with an adjusted reading. Luckily I have a bag of LM35 temperature sensors. Of course, this does give me the problem of making it water proof but that should be too much trouble. I could be doing without the added complexity but hopefully it's not too much to extra. The datasheet says that its output is 0 mV + 10.0 mV/°C

The analogue in pin on the NXP is in the range 0-3.3v so if we use that raw it is the range 0-330°C which is an order of magnitude away from perfect, so I'm going to have to add an op-amp, they are only £1.88 for 5! I'm actually a little bit excited about this :)

The test code, as usual, is on my account at mbed.org

I have written code to read the sensor, and pump readings out to Ethernet when ready. It is time for bed so this will have to wait until a suitable time. I also need a stable5vsupply for the sensor so I have ordered so 5v regulators too, I think I have a couple of 5v zeners for now.