Pages: [1]   Go Down
Author Topic: Arduino mini, leds blinks when it shouldnt whith battery power  (Read 961 times)
0 Members and 1 Guest are viewing this topic.
Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I got an Arduino Mini 04, and have a little problem with it. When I power it with a battery trough the 9v+ and GND pins, a led that I have connected to pin 13 lights up, but it is blinking. It is blinking like there is something wrong with the power supply. It's brightnes is lower, and it looks like it blinks with about 10ms delay. This happens with any voltage connected from 5-9V. When I use the 5V pin and using a battery or an Arduino Uno, then there are no problems.

So why are the led blinking when a battery is connected? It looks like the loop does not run either. Is it the power regulator on the mini?
Logged

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

The Mini is designed with a lp2985 regulator, which has a relatively small amount of current capability:  150mA.  (300mA peak).  With an input voltage of 9V, you can probably only get about 100mA out of it before it starts shutting down.

Do have any other hardware connected to the board and what is the value of current limiting resistor are you using with the LED?

Logged

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

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply.

I had some other hardware connected. Had one of these connected: http://www.dfrobot.com/index.php?route=product/product&path=45_81&product_id=57

When I unplugged the power from it, it worked fine. Almoust. The led did not blink at it did at startup, but in my test code for the radio module, it sets pin13 high in the setup. It does not turn on. I do not have any resistor before the led, since pin13 has an bulit in resistor.
Logged

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any ideas?

Here is the test code that is uploaded to it
Code:


/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */


void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);   
  Serial.begin(9600);
  Serial.println("  Lets test the bluetooth module");
  Serial.println("Press 1 to light the LED, and 2 to turn it off");
  Serial.println("Entery: "); 
   digitalWrite(13, HIGH);
}


void loop() {
  if (Serial.available()){
  char input = Serial.read();
  switch (input){
  case '1': //turn led on
  digitalWrite(13, HIGH);   // set the LED on
  delay(100);              // wait for a second
  Serial.println("it works on!!"); 
  break;
  case '2':
  digitalWrite(13, LOW);    // set the LED off
  delay(100);              // wait for a second
  Serial.println("it works off!!");
  break;
}
  }
}


Logged

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

The LED use to blink and now it won't turn on at all?  You didn't turn the LED around by accident, did you?
Logged

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

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The LED blinks when it get data on RX from the radio module. But in the setup, it sets it high, so it should turn on. And no, it does not.

No, the led is not turned arround. It blinks at startup.
Logged

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

So you have pin 13 connected to something other than just the LED? 
Logged

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

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin13 is connected to the led, nothing else.

It seems like the setup() and loop() does not run. But only when I supply power trough the 9V pin. If I use a battery on 5V and supply it trough the 5V pin, it works fine. But any voltage from 5-9V on the 9V pin, then it does not work.
Logged

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

Sigh.  Please be clear what hardware is connected and what code you are running. 

As I tried to explain, the regulator used by the mini has a very limited current capability.  It really isnt suitable for anything but the mini itself.  Does your test code work if the radio isn't connected when you are powered by battery?

What kind of 9V battery?  Is it the small rectangle type?  If so, that is also a source of issue since IT has a very limited current capability itself.
Logged

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

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As I wrote, the hardware that has been connected is the radio module I linked to earlier. It only takes 48mA max on Tx(or Rx, dont remeber...)

I removed it, and using the same code as posted above. The only thing, is that when the radio module is not connected, I can not switch it off or on, but in the setup() it sets 13 high, so it lights up when it is starting.

the 9v battery is a small rectangle type, yes. I have tried different power sources. The battery was on 200mA, but I have also tried to power it with a more powerfull 9V battery on 2000mA. No difference, since the regulator does not let so much power go trough. But why does not the loop run?

I have also tried to power up the radio module with a separate power supply. Still no loop running.. I can try to upload a different code, but it should work with this one too...
Logged

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any Ideas?

If you read the thread you find the info you need, like hardware and code..
Logged

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It is still not working. Have tried different test codes, like the blink example, and the test code as posted above in the thread( It is a modifyed blink example...)

I have tried with and without the radio module, the only difference was the led did not blink as it did whit it connected. It is hard to explain how it did blink, but I can try. When the led should be on, and not blink, it looks like it blinks with a 10ms delay between the blinks, and it is almoust not visible, but the brightnes is oufcorse weaker... But whit the radio module removed, it did work properly at startup, but the setup() (witch sets pin13 HIGH) does not start, and since there is no setup() starting, no loop() either.

Can someone help me?
Logged

Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any help?
Logged

Pages: [1]   Go Up
Jump to: