So I'm using a LCD, 2 potentiometers and a LM35 temp sensor. What I want to do is: set a maximum temp when one potentiometer, show that temp on the LCD. With the other potentiometer, set a mínimum temp and show it on the LCD. Now, read the ambient temp. If it's lower or equal than mínimum temp, actívate one led. If it's higher or equal, turn the led off. Ambient temp is also shown on the LCD.
The thing is, everything works correctly, all three temps are showing and the ambient one is more or less accurate, but when i turn the mínimum temp potentiometer to it's maximun value, ambient temp shown on the LCD goes crazy, showing temps from 10 to 50.
I suppose I'm connecting something the wrong way, but tried changing potentiometers and temp sensor wires to many different places and still same problem. Any advice?
I imagine what is happening is that you are causing a short, by turning the pot all the way to its max value you are making the resistance between one side of the pot and the wiper 0. If your circuit design and reading skills are limited you can check this by putting a resistor with a resistance of say 1/10 the resistance of the pot in series in the line that is leading to the Arduino pin. Now try turning your pot to its max value I imagine you no longer are causing erratic things to show on the LCD.
A better fix is to place a resistor in series with the pot between the pot and ground, then the resistance between the wiper and ground will never be zero so you won't cause a short.
Remember shorts are bad and they often times lead to the magic smoke coming out of your circuit components, once the magic smoke is gone the components no longer work.
This is just a wild a**ed guess, we can help you more if you show us the schematic of your circuit and your sketch.
Right potentiometer is for max temp, left for min, the one causing problems. Then in the middle is another potentiometer, just for LCD adjustment. That thing next to the left potentiometer is the LM35 sensor.
If you need more pics tell me, I understand it aint easy to see much there.
I was careful, in Reply #1, to say that you should post a photo of a pencil drawing of the wiring diagram. That photo of a birds nest of wires is not suitable.
Robin2:
I was careful, in Reply #1, to say that you should post a photo of a pencil drawing of the wiring diagram. That photo of a birds nest of wires is not suitable.
...R
Rarely is the use of all caps a good thing, but it was well warranted in the last sentence, Robin2 showed great restraint.
Hi,
Check that the wiper terminals of each of your potentiometers is going to an analog input, and nowhere else.
That one end of each of your pots is going to gnd, and the other end is going to +5V.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
The exercise of doing a reverse engineer of your project may find the wiring fault.