Pages: [1] 2   Go Down
Author Topic: Analog port readings are noisy? Did i destroy my analog pins???  (Read 1146 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

Cud someone pls tell me if I blew my Arduino Atmega M2560 micro controller analog pins by doing this:

I connect 5v to the Aref pin, and I read out analog readings of a temperature and humidity sensor on two seperate pins.
It was working fine yesterday while I powered it through USB and then after thru a 5v regulated circuit. I'm able to detect temperature and humidty readings.

But today the analog pins have gone haywire! The readings are fluctuating and way off. When I remove the pins from the sensor and connect them to ground and Vcc instead of showing me 0 and 1023 they give me values like 334, 662...

Has anyone ever experienced this before?

Btw Im able to still use the digital ports to switch on and off a fan but all the analog ports give me the same readings...

Any suggestions would be gladly apreciated.

Thanks!
Logged

Holland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 93
Troubles are there to be solved!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Has anyone ever experienced this before?
yes, and i geus you should get used to it and try to make some solotions wich decrese the noise (at least that is wat i've been doing since the expirience)

nick
Logged

humankind cannot obtain anything without
sacrificing something of equal value.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that only with the regulaged PSU ?!? If so is cause its not a proper clean one, probably a cheap one which makes sense. There are big difference between a cheap and a proper nice clean PSU. The latter tend to cost a quid or two.
Logged

10 LET Loop=Infinite
20 GO TO 10

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ohh so this is normal then kinda good to know I guess so long as I didnt destroy my microcontroller.  smiley

Nick, when I tested out the analog ports of another of the same board with analog pins to Gnd then Vcc I get a reading of 0 and 1023... Is it possible for some boards to hav an offset voltage and the others not?
What works for you? Resistors and capacitors? Because I've tried 10k, 1k and 1M ohm resitors both in pull up and pull down with no luck smiley-sad


iyahdub, nope unfortunately its not any cheap one first I powered it through those big trainer boards in my lab then I powered it thru a 5v regulated circuit I constructed using a 7805 chip which gives me a nice clean 5v... No matter what I do I still get a noisy power signal....
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 209
Posts: 13020
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I connect 5v to the Aref pin

Why?
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you know its clean ?!? U tested it ?!? Im saying this cuz i do a lot of pro audio circuits and know how noise can be a pain in the ass... Actually done something with arduino as soon as got external power, problems started. so had to sort iit through some proper filtering
Logged

10 LET Loop=Infinite
20 GO TO 10

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I connect 5v to the Aref pin

Why?

Because my sensors need a 5v supply and I thought that we have to power the sensor through it therefore
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 353
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I connect 5v to the Aref pin

Why?

Because my sensors need a 5v supply and I thought that we have to power the sensor through it therefore

?!?!?!
Logged

10 LET Loop=Infinite
20 GO TO 10

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 209
Posts: 13020
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I connect 5v to the Aref pin ... Because my sensors need a 5v supply and I thought that we have to power the sensor through it therefore

AREF does not provide power to the sensors.

Either leave AREF unconnected or connect a 0.1 uF capacitor from AREF to GND.  Until you have an understanding of the purpose of AREF and how to use it correctly do not connect anything else to it.


Edit: quote tag fixed.
« Last Edit: May 08, 2012, 12:41:39 am by Coding Badly » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ommgg seriously?? thankk uu for telling me that! I didn't know that it's the first time I'm working with microcontrollers and I was under the implression that Aref provides a voltage! so I guess I really did fry the analog ports then smiley-sad(
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you know its clean ?!? U tested it ?!? Im saying this cuz i do a lot of pro audio circuits and know how noise can be a pain in the ass... Actually done something with arduino as soon as got external power, problems started. so had to sort iit through some proper filtering

Its is a complete pain in the ass. I tested it using a multimeter and its pretty stable at 5.0012 I assumed this means its clean...I get the feeling this is not right? I'm new to this excuse me for my pathetic mistakes... Thanks for helping out
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I connect 5v to the Aref pin ... Because my sensors need a 5v supply and I thought that we have to power the sensor through it therefore

AREF does not provide power to the sensors.

Either leave AREF unconnected or connect a 0.1 uF capacitor from AREF to GND.  Until you have an understanding of the purpose of AREF and how to use it correctly do not connect anything else to it.




Ohh! I use a blutooth module to send data to a hyperterminal and this requires and Aref of 5v so I have to connect that too to transmit the sensor data while connecting the sensors to the analog ports. Is this wrong??



Edit: quote tag fixed.
« Last Edit: May 08, 2012, 12:42:27 am by Coding Badly » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 209
Posts: 13020
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


There is no way to tell from your description if you are or are not connecting things correctly.  I suggest creating and posting a schematic.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 632
Posts: 34510
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I tested it using a multimeter and its pretty stable at 5.0012 I assumed this means its clea
No this will not tell you if it is clean. A multimeter can not detect oscillations on a voltage, you need a scope to do this.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's all goood Thanks! I was connecting the Aref as well which I dont need apparently. So I just removed the Aref and its all good thanks!
Logged

Pages: [1] 2   Go Up
Jump to: