Offline
Newbie
Karma: 0
Posts: 7
|
 |
« on: May 07, 2012, 12:15:20 pm » |
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
Jr. Member
Karma: 0
Posts: 93
Troubles are there to be solved!
|
 |
« Reply #1 on: May 07, 2012, 12:38:09 pm » |
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
Sr. Member
Karma: 0
Posts: 302
|
 |
« Reply #2 on: May 07, 2012, 01:12:51 pm » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #3 on: May 07, 2012, 03:43:09 pm » |
ohh so this is normal then kinda good to know I guess so long as I didnt destroy my microcontroller.  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 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
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #4 on: May 07, 2012, 04:16:09 pm » |
I connect 5v to the Aref pin Why?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 0
Posts: 302
|
 |
« Reply #5 on: May 07, 2012, 05:19:32 pm » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #6 on: May 07, 2012, 11:44:59 pm » |
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
Sr. Member
Karma: 0
Posts: 302
|
 |
« Reply #7 on: May 07, 2012, 11:47:14 pm » |
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
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #8 on: May 08, 2012, 12:06:43 am » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #9 on: May 08, 2012, 12:23:28 am » |
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  (
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #10 on: May 08, 2012, 12:27:33 am » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #11 on: May 08, 2012, 12:29:28 am » |
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
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #12 on: May 08, 2012, 12:44:21 am » |
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
Brattain Member
Karma: 272
Posts: 25443
Solder is electric glue
|
 |
« Reply #13 on: May 08, 2012, 03:45:44 am » |
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
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #14 on: May 08, 2012, 07:08:36 am » |
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
|
|
|
|
|
|