LM35DZ Temperature sensors not working

Hi, Im having issues with every LM35DZ I purchase. Im hoping someone can give me some guidance. Surly all 15 LM35DZ arn't faulty.

The project is for my 3ft aquarium and controls x4 90mm PC fans for cooling. Its completed and working perfectly with the first LM35DZ that came with ultimate starter kit, however, Ive made another PCB and every LM35DZ I plug into it doesnt work, same code. I plug my original LM35DZ in the new PCB and it works. Grrrrrr. Any Ideas?

the second nano is for an LDR to Map the LED in the LCD, for night time. other wise the LCD lights up the house :slight_smile:

Also forgot to mention, when i test the LM35's with a DMM I get resistance readings ground to signal. When the sensor is powered up the resistance goes to 00hm ground to signal.

Where did you get your LM35DZ? I've not heard much about these but other temperature sensors have been often remarked transistors.

Look at the printing and markings on the new vs the original.

just got em from Lonely Binary - eBay

I think You lack knowledge about electronics and measuring.
You can't really grab a circuit and apply Ohm measuring without knowing the circuitry inside the component.
Measuring resistance in circuits powered up is wrong in the same way. On powered circuits You can only measure voltages. Breaking up a circuit current measuring is possible.

Ebay...... You can get all kinds of crap from that place. Components recycled from rejected/returned circuits is common. Buy circuits from reliable sellers, and Ebay is not one of them.

you are correct in saying you cant measure resistance with a powered circuit. My bad. Ive re tested. Its about 27deg so 12v pin to sensor should roughly read 270mV. it shows 0v.

any suggestions for me where to buy then?

resolved. I need LM35.

Surprised you can't get just one Nano to do it all.

Tom.. :smiley: :+1: :coffee: :australia:

The digital DS18B20 is easier to use than an ancient analogue LM35.
You only need one Arduino pin for many sensors.

A single Nano would have been a lot easier.
An IRF540 is not a logic level fet, so a poor choice for a Nano.
A logic-level fet would not have needed a heatsink.
Leo..

Im sure it is, but I dont know how to use them. I know you only need 1 pin for many.

I would've rather had used 1 nano for both codes, but I dont know how to run 2 seperate codes simultaneously with 1 nano, last I checked you cant.

I have no idea about logic fets. It cant be that poor, it works perfectly.

Ive only been playing with arduino for 2 months. Pretty f***en good result being a newbie. haters gotta hate and pick the bad rather than the good. :slight_smile:

reason is this....
Fans are delayed as the temp heats up i didnt want the fans to rapidly turn on and off.
If I run the LED fade in the same loop I wont get a smooth LED fade.
It seemed the least hardest way to do it. :slight_smile:

Hi,

You don't run them in parallel, you run them one after the other in the void loop().
The speed of the loop will make it look like both are running at the same time.

Your codes may run a little slower but you will not notice the difference, how fast do you want to sample the temperature?

How fast are you sampling now?
Even sampling every 30Seconds should be enough, the thermal inertia of a 3ft tank will be quite long, and even one degree change will take more than the sample time you may have at the moment.

Tom.. :smiley: :+1: :coffee: :australia:

Not attacking you. Your build looks amazing.
There is always someone here to help you with hardware and merging two codes.

You might have been lucky with that fet.
A logic-level fet ensures max voltage to the fan with the least heat generated in the fet.

Timing (LED fade, fan delay) is best done with millis(), not with delay().
You can learn the concept with the BlinkWithoutDelay example in the IDE.

The LM35 needs user calibration, and stability depends on the code.
A digital DS18B20 is factory calibrated, stable, and has a higher resolution.
Attached is an example for three sensors. I didn't add print statements for clarity.
Leo..

#include <OneWire.h>
#include <DallasTemperature.h>

OneWire oneWire(6); // datapin D6 with 4k7 pull up resistor
DallasTemperature sensors(&oneWire);
float temp1, temp2, temp3;

void setup() {
  sensors.begin();
}

void loop() {
  sensors.requestTemperatures();
  temp1 = sensors.getTempCByIndex(0);
  temp2 = sensors.getTempCByIndex(1);
  temp3 = sensors.getTempCByIndex(2);
}

Thanks Leo :slight_smile: I appreciate it mate.

Looks like I have a lot more learning to do. I would love to make the circuit more efficient.

Agreed, Delay sux. Ive managed to calibrate the Lm35. With a lot of help from...

Void loop is 10 seconds. being an LM35, even with sampling 100 results in 2 seconds, It can go up or down .1deg's every 5-10 seconds. The fans really make a quick difference on the water temp. As Leo said below about using millis()
Rob :slight_smile:

I actually have 3 DS18B20 lol. it does look alot easier. I feel so stupid. lol