Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with LM335 circuit

Status
Not open for further replies.

higginsdj

New Member
Hi all,

I know enough about electronics to identify components, solder a PCB and use a multimeter...... I have a Velleman K8055 USB board that I am trying to connect an LM335Z to. I don't care about temperature accuracy just resolution as I wish only to monitor relative temperature changes over a period of time.

Based on the LM335 data sheet, the temperature range I am interested in (10-30C) will output 2.83v-3.03v. I need to increase the resolution of this range to max (0v-5v). Now from what I have read (based on my limited understanding) I will need an Op-amp but have no idea how to design such a circuit.

My actual interest here is Geomagnetic monitoring and I need a logging thermometer to measure temperature variations inside a sealed box containing the very temperature sensitive geomagnetic sensors. Yes - I could buy one but they are expensive and I like the idea of building things myself - even though I don't understand the detail :)

Cheers

David H
Welcome
 
hi,
This is a typical level shift and amplify for a LM335 tempr sensor.
If you scale the SPAN to give a Vmax of 4.88V at the PIC adc input, this will correspond to 1000adc counts for a 20Cdeg change, makes the maths easier.

NOTE: the MCP6002 rail to rail OPA, powered from +5V.
 

Attachments

  • LM335_MCP6002.gif
    LM335_MCP6002.gif
    35.8 KB · Views: 311
I found them in Australia - but there are minimum order sizes dollar wise..... So I need to fill the considerable balance with other stuff!
 
Why bother with the amplifier at all? Get the basic PICAxe for like $3 and have it read the sensor and decide what to report.
 
Why bother with the amplifier at all? Get the basic PICAxe for like $3 and have it read the sensor and decide what to report.

hi,
This is what the OP asked for:
I have a Velleman K8055 USB board that I am trying to connect an LM335Z to.

Based on the LM335 data sheet, the temperature range I am interested in (10-30C) will output 2.83v-3.03v. I need to increase the resolution of this range to max (0v-5v). Now from what I have read (based on my limited understanding) I will need an Op-amp but have no idea how to design such a circuit.

The OP is using a Velleman K8055 PCB, how would a Picaxe be able to do what the OP is asking.??
 
Just offering a cheap, easy solution.

Doesn't the K8055 have ADC channels? Why the need to increase the resolution, when you can have the microcontroller read the value and make decisions from that?
 
Last edited:
Just offering a cheap, easy solution.

Doesn't the K8055 have ADC channels? Why the need to increase the resolution, when you can have the microcontroller read the value and make decisions from that?

The K8055 does have adc inputs, but by using the built in Vref of 5V, how can the PIC increase the resolution of a 0.2V signal,

For example a 0.2V change works out at [0.2/5]/1023 which is only 41 adc counts, thats only 0.5C/bit.

If the OP raises the 0.2V to say 5v thats ~1000 counts which gives a resolution 0f 0.02C/bit.

It doesn't improve the accuracy, which is approx +/-0.25C
 
Last edited:
Okay, but what's wrong with 0.5C/bit? He already said the accuracy isn't important. I just thought, since he's a novice, why bother making it more complex than it has to be? No extra circuitry, just booom...straight to the Velleman board.
 
You may be able to do away with the opamp altogether, by using oversampling on the ADC input. There is a requirement of some noise in the ADC measurement for it to work.

Basically you oversample the LM335 4 times for every extra bit of resolution you want & add all the samples together and scale it back to an appropriate value. e.g. if the K8055 has a 10bit res & you want 14bits (16484 levels) you oversample by 256 and get the voltage from
Code:
double voltage = 5.0 / 1024 * sum / 256;
 
.......................
 
Last edited:
Okay, but what's wrong with 0.5C/bit? He already said the accuracy isn't important. I just thought, since he's a novice, why bother making it more complex than it has to be? No extra circuitry, just booom...straight to the Velleman board.

He doesn't want to increase the accuracy, which you cannot do with the LM35 its +/-0.25C , he wants to increase the resolution.........they are not the same.
 
Last edited:
hi Doug,
The K8055 USB pcb is a bit limited in what you do with it.
I modified the one I have to a 18F2550 and wrote my own firmware with the Oshonsoft IDE,,, IIRC the Velleman is set for 8bit adc.??

I dont know if you have used it, but it works with a Visual Basic GUI in a PC.

Eric
 
I thought you were writing of 1000 counts of the adc above. Well, even if it's 8bit, it's still possible to oversample it, perhaps even up to a usable resolution.
 
I thought you were writing of 1000 counts of the adc above. Well, even if it's 8bit, it's still possible to oversample it, perhaps even up to a usable resolution.

I did state 1000 counts, I agree you can over sample for 8 bits, I think a problem could be the rate which he can get the GUI to read the adc, thats if he wants a fast update.

As always we are not exactly sure what the OP is trying to achieve.?
 
That's my point. Why bother increasing the resolution?

You have not read fully what the OP is asking.

He has Velleman USB pcb, which has an onboard two adc inputs to the PIC.

He wants to increase the resolution of a short section of an external LM335's range, if it was your project you could choose the accept the existing resolution and use a Picaxe, but he has asked how to use an OPA to increase the resolution/Span, using the Velleman pcb, this is exactly what I have posted.

Its doesn't matter whether you are bothered or not, its his project. OK
 
The OP did state he want to build a "low cost" controller of a very sensitive geomagnetic sensor, I'm not sure a LM335 is the best option? It is accurate enough at 0.5'C and can be oversampled a little but tryin to get a very accurate temperature reading to post-calibrate the geo sensors by attaching an amp to the LM335 is going to have lots of issues.

I recently got a LM335 to keep a xtal oven with around 0.01'C temperature stability but it was NOT easy! Just sticking an amp on a LM335 and expecting really high accuracy is not going to happen. USB power itself will vary the 5v rail as much as 40mV up and down depending what the user's PC and USB ADC module is doing.
 
OK, maybe it is my lack of understanding here...... Accuracy I assumed was to do with how well it could 'tell' the correct temperature. My interest is solely relative temperature variations - ie I don't care what the temperature is, just how much it varies. If the 'accuracy' of 0.5 degrees relates to both (abolute value and relative changes) then obviously I do not need the resolution I sought.

I'm happy to look at any solutions people can come up with. And I wouldn't even call me a novice - is there something lower :)

For the Geomagnetic sensors, I'm looking to keep the ambient temperature inside 1 degree variation BUT I am only monitoring the temp, not controlling it. BUT, if I had a small Pelter Device, theoretically I could control the temperature inside an insulated box couldn't I? I wonder how such a device might affect my geomagnetic sensors! Probably worth an experiment :)

This link shows the variation I am getting in each sensor (x, y and z)
**broken link removed**

This is with an approx +/-5 degree ambient variation. I need to keep the trace inside 50nt if my data is going to be usable and +/- 0.5 degrees would be perfect.

Cheers

David
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top