Pages: [1]   Go Down
Author Topic: board randomly stops powering my sensors  (Read 978 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It doesn't matter whether I'm using the USB or wall socket as the power supply, anytime during sketch execution the board will stop providing the 5/ 3.3 V . I've tried different sketches, I've removed components thinking it was a current issue, but it always ends up randomly killing the power until I reset it/ unplug it and plug it again.

Just to clarify, the arduino itself does not shut down, it reads and sends data like it's supposed to, even if the  data is a bunch of 0s because the sensors are powered off.
« Last Edit: July 06, 2012, 08:23:52 am by Joolz » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26285
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
because the sensors are powered off.
What sensors?
How are they wired?
How are they powered?
Links?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How have you determined power is "killed"?  Are you making measurements or observing some type of behavior?  Along with the hardware aspects that AWOL is asking for, code might be helpful to see as well.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

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

AWOL, thanks for your reply. I didn't think to provide additional info because like I said, adding/removing components does not seem to be the issue. I'm using a CNY70 as a line counter, MLX90614 (IR temp sensor), gas sensor MQ-7,  and humidity sensor HS1101-LF.

http://www.datasheetcatalog.com/datasheets_pdf/C/N/Y/7/CNY70.shtml
http://www.melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90614-615.aspx
http://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-7.pdf
http://www.meas-spec.com/downloads/HS1101LF.pdf

Line counter is wired to interrupt pin 2 on arduino board. IR temp. sensor, being an I2C device goes to pins A4 & A5. The other 2 go into A3 &A2 for analog measurements

Arduino 5V and GND wires go into the power rail of a solderless breadboard. All components are wired according to datasheet specs. I must stress the fact that everything works perfectly  fine until the arduino shuts the power off.
I've tried to isolate the problem to either  faulty hardware or a bad sketch, but even if I'm using only one sensor (with everything else unwired) it still happens.  

James, I just use a multimeter to measure voltage between the 5v and gnd pins on the arduino board. I get 0.  Following is the sketch I use to measure gas, you'll notice it's a straight ripoff from the examples. It'll measure for a while then just return 0s because the sensor isn't powered.

Code:
unsigned int BAUD_RATE = 9600 ;
 const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)
void setup()
{
 Serial.begin (BAUD_RATE);
}

int number = 0;

void loop(){
 // read the analog in value:
  sensorValue = analogRead(analogInPin);           
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255); 
  // change the analog out value:
  Serial.print(outputValue);
delay(200);

}

Thanks guys
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26285
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't see the sensor details from my phones, but gas detectors often have (relatively) meaty heaters - what sort of current does the gas detector draw?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just use a multimeter to measure voltage between the 5v and gnd pins on the arduino board. I get 0. 
This is where something isn't right.  The 5V pin/node is the same node that powers the ATmega328.  So if that node is getting "shut off" then the ATmega328 and Serial-to-USB chips would both be getting shut off as well.  You wouldn't be able to read "0" when the sensor stops responding because there would be nothing else running.


I can't see the sensor details from my phones, but gas detectors often have (relatively) meaty heaters - what sort of current does the gas detector draw?
The MQ-7's heater resistance is in the neighborhood of 30ohm. 
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 246
Code Monkey
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

James, I just use a multimeter to measure voltage between the 5v and gnd pins on the arduino board. I get 0. 

Yeah, I have to echo the sentiment that this is something you need to start with. I suspect you are exceeding the current that the power supply can offer, and it is shutting down.
Logged

I yield() for co-routines.

Offline Offline
Full Member
***
Karma: 0
Posts: 115
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that gas sensors heater is rated at a 350ma draw leaving 150ma for the arduino and the rest.  Your most probably a little bit over on power consumption. 
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that gas sensors heater is rated at a 350ma draw
No, it is rated for 350mW. Power, not current. 

The coil has a resistance of 33ohms.   So during the high cycle (5v) it will draw 160mA for 60 sec and the low cycle (1.4v) will draw 40mA for 90 sec.  This gives an average (engrish: about), 350mW.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

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

Well right now the board's connected to the usb port and and one 1A power supply through the dc jack. The duemilanove automatically selects the wall connection for power when both sources are available, is this correct?

Anyways, right now I'm using another board and everything seems to work fine. Will investigate the problem further when I have a little time, but thanks for your responses, hopefully one day I will also be able to contribute to  these boards.

On another note, I see this thread has been moved to the Project Guidance forum, so perhaps my next question isn't out of place here. What software do you guys use to draw your schematics? Right now I'm trying Fritzing, but there's not a lot of parts available.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26285
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What software do you guys use to draw your schematics?
In the unlikely event that there isn't a beermat to hand, I use the backs of envelopes.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well right now the board's connected to the usb port and and one 1A power supply through the dc jack. The duemilanove automatically selects the wall connection for power when both sources are available, is this correct?
As long as the voltage of that supply is >7.5V.

What software do you guys use to draw your schematics? Right now I'm trying Fritzing, but there's not a lot of parts available.
Sometimes the fastest is a piece of paper.
I like upverter.com because it is web-based and social is built in for sharing.
More advanced tools like Eagle have lots of power but learning curves associated with them.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Pages: [1]   Go Up
Jump to: