Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: Sensor acts weird on 9V supply on: February 05, 2013, 02:28:30 pm
Also I noticed even when it connected trough USB , if I gently touch the LM35 the temprature jumps 20° higher en then back to lower.
2  Using Arduino / Sensors / Re: Sensor acts weird on 9V supply on: February 05, 2013, 02:09:20 pm
What you describe is correct, however I suspect what you do is not. We have to spot the difference so can you post a photo of the 9V powered setup.

This is the 9V supply I use:

I've also posted a scheme of my project in my previous post.

Do you have a multimeter ?
Is the 9V adapter really 9V, or perhaps 14V ? Some adapters are very bad. Is it a DC adapter ?
I use a switching adapter of 7.5V for my Arduinos.
If you use the USB to power the Arduino, what voltage is the 5V pin ? The LM35 works with different voltages, but the voltage read at the analog input of the Arduino depends on the 5V.

Can you open a serial communication with the serial monitor of the Arduino IDE ?
Use Serial.begin(9600); to initialize and in write the temperature also to the serial monitor with Serial.println(TempC);
Is that also unreadable ?.

I don't have a multimeter at home atm. I've already tried with serial monitor but the problem is once hooked up with usb everyting is normal, also  I should clarify that the characters of the LCD fade and thats why it so unreadable (you can see the characters if you look close).
3  Using Arduino / Sensors / Re: Sensor acts weird on 9V supply on: February 05, 2013, 01:43:50 pm
Thanks for the replies.

You need to tell us how you wired it up.
Is the 9V going to the power jack?
Is the sensor wired up to the Vin pin or the +5V pin?

The 9V adapter is connected to the power supply.
As for the sensor, if you take the flat side of the LM35 my connections are:
- Left:  +5v Pin
- Middle: A0 Pin
- Right:  GND Pin

Did you find that sketch somewhere ? Please copy a link to it in your text.

You write a floating point variable to the lcd.
Is that allowed ?
I Don't think its the LCD since it works when connected to USB but not when connected trough 9V adapter.

Here's a scheme
4  Using Arduino / Sensors / Sensor acts weird on 9V supply on: February 05, 2013, 12:59:47 pm
Hello, I bought myself an arduino to play with since last week smiley. So I'm new to the world of Arduino.

I'm making a starter project in which you can see the temprature on an LCD. The sensor I'm using is an LM35.
The problem however is that with my USB everything is as its expected to be, but when I replace the USB supply with my 9V supply my sensor
reads 10° more then normal and de characters on my LCD are almost unreadble. I don't know what is causing this, so I hope someone can help me out  smiley

#include <LiquidCrystal.h>
//Analog Input
int SensorPin = A0;
//Digital Outputs
char TempLow = 18;
char TempHigh = 23;

LiquidCrystal lcd(13, 12, 4, 5, 6, 7);
float TempC;

void setup()
  lcd.begin(16, 2);
void loop()
  TempC = analogRead(SensorPin);
  TempC = (TempC * (5.0 / 1024.0)) * 100;
    if(TempC < TempLow)
  { //COLD
  if(TempC > TempLow && TempC <  TempHigh)
  { //GOOD
  if(TempC > TempHigh)
  {  //HOT

Pages: [1]