Show Posts
Pages: [1] 2
1  Using Arduino / Motors, Mechanics, and Power / Re: SOLVED: Problem when plugging heavy load devices on the same outlet as Arduino on: October 13, 2012, 09:34:50 pm
There are several reasons an Arduino might reset, one of them is power drop-out, but its not the only one.

Thank you so much for this information. This is something that never even occurred to me.


Here is a crappy photoshop showing how everything is laid out: (i would take a picture to show wirings but the devices are all the way downtown.
2  Using Arduino / Motors, Mechanics, and Power / Re: SOLVED: Problem when plugging heavy load devices on the same outlet as Arduino on: October 10, 2012, 04:48:48 pm
Interesting..so in series with the cap. That would limit the rate of charge and discharge to about 22mA max. I wonder why that fixes the problem.

Honestly... couldn't tell you. lol.
3  Using Arduino / Networking, Protocols, and Devices / Re: How much current does Arduino official WiFi shield draw? on: October 10, 2012, 04:45:45 pm
From the HDG104 "Product Brief" we find that the worst case is sending 802.11b.  In that case the chip uses 725 mW at 3.3V.  I think that means 220 mA. If you figure 300 mA you will probably be safe.

Thank you!
4  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: October 10, 2012, 04:39:52 pm
220 between 5V and ground? Or somewhere else?

5  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: October 10, 2012, 04:34:38 pm
UPDATE:
I added a 220Ohm resistor from -cap->GND.... AND IT WORKS! no more surge problems!
6  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: October 10, 2012, 04:24:32 pm
I think that is going a little far. You only need to simulate with the appliances that will be used there. (and the microwave does not use any energy when plugged in)

I put my cap across the power supply output, not the 5V. Energy stored in a capacitor varies quadratically with voltage. My circuit ran for three days and never reset. Even if it does, I turned on the WDT for two seconds as a redundant safety measure.

How do you do it across the power supply output? I am using a USB adapter (5V, 1A).
Also, I have the WDT set for 8 seconds, but even with the WDT the arduino doesnt fix itself once it goes down (which is something I cant understand)
7  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: October 10, 2012, 04:15:26 pm
I tried connecting a 2200uF capacitor 5V>GND, but this did not solve the problem.

I replicated the problem by plugging in a fridge, a microwave, and a water cooler into a power strip and then connecting the arduino usb to the other plug in the same outlet. When I flip the power strip on/off, the arduino eventually hangs and loses connection.

This is a really annoying problem. :/
8  Using Arduino / Networking, Protocols, and Devices / How much current does Arduino official WiFi shield draw? on: October 10, 2012, 03:12:07 pm
Hello everyone.

I am trying to find out just how much current the Arduino official WiFi shield draws when RX/TX but i cant seem to find it in any documentation.
Can anyone chime in on this?


thank you so much.
9  Using Arduino / Programming Questions / Re: Arduino based incubator - hangs - SOLVED - power supply issues on: October 08, 2012, 01:53:26 pm
Add it from the 5V pin to one of the ground pins.  If its too big a capacitor its conceivable the USB supply could trip out (more likely for an actual computer/laptop than a wall-wart supply).

[BTW there is already 47uF on 5V rail on the standard Arduino]

thanks for your help. ill give it a shot later today and post results.
Here is the original thread with my issue for reference.
10  Using Arduino / Programming Questions / Re: Arduino based incubator - hangs - help! on: October 08, 2012, 01:32:07 pm
I placed a 2200 µF capacitor parallel to the output of my power supply and voila. No more reboots for the last 4 days.

Hey. I have the same problem right now with a heavy load circuit causing my arduino to hang. im using a usb adapter and a usb cable to power it. how would i go about putting the capacitor parallel to the usb power output?

i'd appreciate any help. thanks!
11  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: October 08, 2012, 01:26:17 pm
Hey everyone. Here is a quick update...

We purchased and tested a few different surge protectors on a bunch of different devices. Among the five surge protectors we tested, this one seems to solve the problem. The USB input is nice because if someone needs to use the outlet, they dont have to unplug the arduino.

I'm going to give the capacitor a shot and see what happens. This was just a quick-fix solution. Its been a week since I started using the surge protector, and that device is still alive (where as all the other ones are dead).
12  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: September 20, 2012, 12:25:57 pm
So the Arduino + wifi are working when nothing else is plugged into the AC outlet, then something else gets plugged in and wifi stops functioning, correct?
Can you post a parts list? Which Wifi-shield?  (datasheets are helpful too!) and a description of how you have connected everything (schematic).

To answer your first question, that is absolutely correct. It works completely fine until there is a change on the electrical circuit. Even if the arduino loses internet connection, it re-establishes it after a third failed attempt, and reconnects. I have the same exact device running in my office 24/7 with no problems. Sometimes, the client connection fails and it is unable to make HTTP requests, but then it successfully reconnects to the network, and re-sends the failed request and gets a 200OK. Every time a request is made or the arduino is reset, it checks into our server -- marking the device as "Alive." We have only noticed the problem on some specific outlets in the hospital where we know large monitoring equipment is plugged in. Plus, like i said, these said outlets are colored red and labeled "CRITICAL", so i assume its dedicated purpose is to run these monitoring stations. Its only those outlets that we are seeing the problem on.

As for the parts list, absolutely (schematics linked). Here you go:

So you have multiple Arduinos setup with essentially the same code and the act of plugging in the monitoring equipment puts the arduino on the fritz, correct?  Or multiple devices connected to the Arduino? If it's the former, we can probably rule your code out as the direct source of the problem.

Its the former. Its the exact same hardware setup on 20 different devices with exactly the same code except for minor changes with some defined constants used for device identifiers. I believe its safe to assume that the code is not the problem.
13  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: September 20, 2012, 12:05:04 pm
Quick possibility is add large external capacitor on the 5V from the adapter. Say 4700uf at 10V or more...

I was thinking something along the same lines. Or a recharging internal battery with enough charge to keep it going until the electricity is stable once again, so that watchdog can reset it. Or have some sort of hardware monitoring for voltage, and have it send a reset signal to the reset pin of the arduino when the voltage stops fluctuating.
14  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: September 20, 2012, 12:02:38 pm
Have you tried plugging the equipment into a different wall socket ? Maybe the "monitoring" power line (or that specific socket) can't handle the temporary load increase you have when plugging the equipment, so the voltage momentarily drops, making the usb charger drop the power to the arduino long enough to have it reset.
just my 2 cents.

Hello. We have many of the same exact devices plugged into many different wall sockets. I think what you are saying is the exact problem. It makes the voltage jump down and back up, causing the arduino to go haywire. The weird thing is that it completely messes up the instruction cycle. Im guessing even the memory containing instruction location is also getting corrupted. Its weird because i would guess the watchdog timer would still work, but it does not.
15  Using Arduino / Motors, Mechanics, and Power / Re: Problem when plugging heavy load devices on the same outlet as Arduino on: September 20, 2012, 12:16:42 am
Whenever another electronic that puts a heavy load
how heavy? what kind of load?
So the arduino is plugged into an outlet labeled "critical" in a hospital. this is the plug they use for their monitoring and testing stations (not too sure what they are called). Its a laptop, plus monitoring equipment. I can get an estimate for an actual measurement tomorrow since i am not too sure what exactly is plugged into it.

could it be a that the usb phone charger i am using is just a crappy one?
possibly...
I ordered some usb chargers that are supposed to be of better quality, so i will test those tomorrow and see if there is any difference.
I am not sure what code would be relevant here since this happens regardless of the sketch.
how exactly does it happen? is there a repeatable sequence of events. Details, please and please post the code anyway?
Alright, so I cant monitor the plug all the time. There is code on the arduino that sends a heartbeat signal via an HTTP get request to a server every 30 minutes. The server checks to see if that message has been received, and marks the device as alive. When the monitoring equipment is plugged in, it somehow causes a connection failure on the arduino wifi shield (the green light disappears and only the yellow is shown). So we unplugged and replugged in the equipment, and all the lights then turned off so i am assuming the wifi shield lost power.

Here is the code for the main sketch:
Code:
void setup() {

  /* Start WATCHDOG Timer at 8 Sec */
  setupTimer();
  wdt_enable(WDTO_8S);

  Wire.begin();
  radio.begin();

  /* Check WiFi Shield and Start */
  checkShield();

  connectToTheInternet();
  delay(1500);

  /* Delay the loop for 5 seconds to make sure
    the setup is complete  */
  delayFirstRun();

  /* Initial Check-in */
  hourlyCheck();
}


ISR(TIMER1_COMPA_vect) {
  wd_seconds++;
  if (wd_seconds >= WD_RESET_SECONDS) {
    wdt_reset();
    wd_seconds = 0;
  }
  seconds++;
  if (seconds >= TIMER_RESET_SECONDS) {
    timeToCheck = true;
    seconds = 0;
  }
}


void loop() {

  do {
    ** some radio / http request code here, unrelated to hourlyCheck() **
  } while (!timeToCheck);

  hourlyCheck();

}

Functions:
Code:
void setupTimer() {
  // initialize Timer1
  cli();          // disable global interrupts
  TCCR1A = 0;     // set entire TCCR1A register to 0
  TCCR1B = 0;     // same for TCCR1B

  // set compare match register to desired timer count:
  OCR1A = 15624;
  // turn on CTC mode:
  TCCR1B |= (1 << WGM12);
  // Set CS10 and CS12 bits for 1024 prescaler:
  TCCR1B |= (1 << CS10);
  TCCR1B |= (1 << CS12);
  // enable timer compare interrupt:
  TIMSK1 |= (1 << OCIE1A);
  sei();          // enable global interrupts
}

void hourlyCheck () {
  timeToCheck = false;

  if (clientConnect()) {
    ** GET REQUEST FOR HEARTBEAT CODE HERE **
  }
  else {
    requestRetry(); // code that retries the request three times, then resets internet connection, then retries the request
  }
}


And there are over 20 of the same devices plugged into different outlets, and i am only having the problem on the outlets with the monitoring equipment plugged in, so I know it has to be a power related problem.
Pages: [1] 2