RedBoard LED blink test error (LED blinking randomly)

I’ve set up the RedBoard on Windows 8 by downloading the IDE from the official Arduino website (the IDE seems to have installed the drivers, since it shows arduino port) and running the blink test from [SIK guide (circuit 1 aka blinking LED).

The blinking works fine for some time, than it starts to blink really fast and after a few seconds returns to normal blink rate, later starts to blink fast again, etc. (the LED next to pin 13 on the board blinks as well).

I tried changing the pin to pin 12 (by changing wires and updating the sketch) and get the same problem.

Furthermore, even if I set output to 13 and leave the wires in 12 instead of 13, the LED is turned off (as expected), but will eventually dimly blink (periodically in the fast pace that is not part of the sketch), which (since the output pin is programmed to be pin 13) seems odd to say the least.

Finally I tried to modify the sketch to simply light up the LED by only leaving digitalWrite(13, HIGH) in the loop, and again from time to time it starts the odd fast paced blinking.

I tried replacing the wire that leads from the pin to the LED, but nothing changed.

I also tried reseting the board manually, didn’t work.

So, I decided to try two more things, than gave interesting results:

  1. When I use an empty sketch (see below), the fast periodical blinking will still occur
void setup()
{

}


void loop()
{

}
  1. If I modify the sketch to write to Serial(see below), than it will work as expected (normal blinking with roughly 1s on and 1s off), but only when the IDE Serial monitor is open
void setup()
{
  Serial.begin(9600);
 
  pinMode(13, OUTPUT);
}


void loop()
{
  digitalWrite(13, HIGH);   // Turn on the LED
  Serial.println("on");
  
  delay(1000);              // Wait for one second
  
  digitalWrite(13, LOW);    // Turn off the LED
  Serial.println("off");
 
  delay(1000);              // Wait for one second
}

Any ideas what to try next or is this a broken circuit?

P.S.: Under Tools–>Board, I have board Arduino Uno selected](SIK Code Download Page - SparkFun Electronics)

I assume you have a resistor in series w/the LED. And that your observations are of that external LED, not an onboard LED. If true, it sounds like some odd power problem. Perhaps the connections are intermittent ? Is this running off of USB 5v or something else ?

A photo of your setup may be helpful.

dlotton:
A photo of your setup may be helpful.

The setup (as well as components used) is the same as the one provided in the [SIK guide, circuit 1

Mee_n_Mac:
I assume you have a resistor in series w/the LED. And that your observations are of that external LED, not an onboard LED. If true, it sounds like some odd power problem. Perhaps the connections are intermittent ? Is this running off of USB 5v or something else ?

Yes, there is a resistor, however the external and onboard LED are blinking at the same time (the onboard power on LED is constantly lit, while the onboard LED next to pin 13 blinks at the same time as the external LED).

Since I believe it might be a problem with the OS or USB (I also installed the [FTDI drivers, but it did not help), I tried using a Kindle charger (you plug the USB into an adapter) as a power source and that seems to resolve the problem.

While this is not ideal, I could work like this for a short while until I resolve the issue (although currently I have no idea how).

My concern is that the Kindle output is 5.0V and 0.85A. 5V is what the RedBoard gets from the USB anyway so I guess that should be OK, but I am unsure if 0.85A is OK (can’t find the RedBoard spec mentioning this…), does anyone know if this is OK?](How to Install FTDI Drivers - SparkFun Learn)](http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Kits/SFE-SIK-RedBoard-Guide-Version3.0-Online.pdf)

ArduinoGuy:

dlotton:
A photo of your setup may be helpful.

The setup (as well as components used) is the same as the one provided in the [SIK guide, circuit 1[/quote]

Understood, just thought we might be able to spot some issue you may be overlooking if we could see your actual setup… bad connection, wrong resistor value, etc.

ArduinoGuy:
Yes, there is a resistor, however the external and onboard LED are blinking at the same time (the onboard power on LED is constantly lit, while the onboard LED next to pin 13 blinks at the same time as the external LED).

Since I believe it might be a problem with the OS or USB (I also installed the [FTDI drivers, but it did not help), I tried using a Kindle charger (you plug the USB into an adapter) as a power source and that seems to resolve the problem.[/quote]

Tend’s to support Mee_n_Mac’s assertion that there’s a power issue. It kind of seems like the board may be continuously resetting or something. The question is, what’s the issue? Is it a problem with the supply, or is the something drawing too much current and causing the processor to reset or the supply to collapse.

ArduinoGuy:
My concern is that the Kindle output is 5.0V and 0.85A. 5V is what the RedBoard gets from the USB anyway so I guess that should be OK, but I am unsure if 0.85A is OK (can’t find the RedBoard spec mentioning this…), does anyone know if this is OK?

The current rating of that supply is fine. The board will only draw what is required i.e. the supply won’t force 0.85A. The board probaly shouldn’t be pulling more that a couple of tens of milliamps (0.010–.020A).](How to Install FTDI Drivers - SparkFun Learn)

](http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Kits/SFE-SIK-RedBoard-Guide-Version3.0-Online.pdf)

I see only 2 reasons that this could happen. First is that the redboard has a defect. Second, your setup and /or connections is messed up. Triple check everything. While the LEDs are blinking, wiggle wires and see if it changes anything. Take everything apart and start from scratch.

While you say your circuit is the same as the SIK, you maybe over looking something. Take a pic and attach it to a reply. I couldn’t tell you how many times that this has solved the issue.

Up to now 2 things seem to help:

1.If I modify the sketch to write to Serial(see below), than it will work as expected (normal blinking with roughly 1s on and 1s off), but only when the IDE Serial monitor is open

void setup()
{
  Serial.begin(9600);
 
  pinMode(13, OUTPUT);
}


void loop()
{
  digitalWrite(13, HIGH);   // Turn on the LED
  Serial.println("on");
  
  delay(1000);              // Wait for one second
  
  digitalWrite(13, LOW);    // Turn off the LED
  Serial.println("off");
 
  delay(1000);              // Wait for one second
}
  1. Using a Kindle charger as a power source.

I have attached the image of the breadboard

https://forum.sparkfun.com/download/fil … d62bf60a48

and the RedBoard

https://forum.sparkfun.com/download/fil … d62bf60a48

@ the OP: what OS ? Is there any chance your 'puter is shutting down the USB port because it’s not seeing any activity or ??? Could that be why it works when data is sent to the serial monitor ? Is this a USB 2 or 3 port ? If USB 3 can you try a USB 2 ? Can you detect any flickering of the on-board power LED ?

ArduinoGuy:
I have attached the image of the breadboard…

and the RedBoard…

Your attachments don’t appear to be working.

Not sure why the attachments aren’t working (when I am logged in to this forum, I can see the attachments…), anyway here they are:

[breadboard

[RedBoard

Mee_n_Mac:
@ the OP: what OS ? Is there any chance your 'puter is shutting down the USB port because it’s not seeing any activity or ??? Could that be why it works when data is sent to the serial monitor ? Is this a USB 2 or 3 port ? If USB 3 can you try a USB 2 ? Can you detect any flickering of the on-board power LED ?

I don’t see the “power on” LED blinking (just stays lit) and yes, I have tried using different USB ports. However, based on what seems to have worked, I too believe the problem might be with the USB/OS (BTW it’s Windows 8 ). Therefor, I plan on using a different computer with a different OS some time this week to see what happens.](Dropbox)](Dropbox)

Yeah, not sure why the previous attachments aren’t available. The new links work.

Not sure if it is parallax from the camera angle, but in the photo it looks like your power leads are plugged into 3.3V and 5V instead of 5V and GND.

I’m not all that familiar with this processor, but some IC’s can sink more current than then can source, or visa-versa. That could cause the problem you’re seeing. The circuit is intended for the processor pin to source current when the pin is turned on Pin would be 5V. If your blue (or black) lead is plugged into the 5V instead of GND, it is trying to sink current when the pin is turned off (pin provides GND).

dlotton:
Yeah, not sure why the previous attachments aren’t available. The new links work.

Not sure if it is parallax from the camera angle, but in the photo it looks like your power leads are plugged into 3.3V and 5V instead of 5V and GND.

I’m not all that familiar with this processor, but some IC’s can sink more current than then can source, or visa-versa. That could cause the problem you’re seeing. The circuit is intended for the processor pin to source current when the pin is turned on Pin would be 5V. If your blue (or black) lead is plugged into the 5V instead of GND, it is trying to sink current when the pin is turned off (pin provides GND).

Ah yes, the angle might not have been the best on the RedBoard image, but you can count the pins and count the pin labels, which shows the red wire is in 5V and the blue wire is in GND.

I’ve also sent an email to the guys at Sparkfun, I guess they might be able to tell me, if there is a problem with the RedBoard…

On a computer with windows vista things work the same as with the kindle charger, except for fast blinking a few seconds on plugin after than normal 1s lit 1s off as it should be.

Is that long initial blinking on computer USB plugin normal (on kindle charger there is a much shorter cca. 1s or less blinking, but I guess that is the RedBoard booting)?

ArduinoGuy:
Is that long initial blinking on computer USB plugin normal (on kindle charger there is a much shorter cca. 1s or less blinking, but I guess that is the RedBoard booting)?

The FT231 USB<=>Serial converter controls the reset line to the Arduino processor (See DTR signal). When plugging into the USB port there’s some time for negotiation of the USB connection. Likely, during that negotiation between the computer and the RT231 the reset is being held or repeatedly strobed, accounting for the additional delay when plugging into the USB port.

There may be some issues with the windows8 driver and control of that reset line. I believe any time there’s a connection to the serial port the reset line gets strobed. Windows8 my be trying to be clever (or just errant) about serial port connections and might be connecting/disconnecting the port causing the weird behavior you’re seeing.

dlotton:

ArduinoGuy:
Is that long initial blinking on computer USB plugin normal (on kindle charger there is a much shorter cca. 1s or less blinking, but I guess that is the RedBoard booting)?

The FT231 USB<=>Serial converter controls the reset line to the Arduino processor (See DTR signal). When plugging into the USB port there’s some time for negotiation of the USB connection. Likely, during that negotiation between the computer and the RT231 the reset is being held or repeatedly strobed, accounting for the additional delay when plugging into the USB port.

There may be some issues with the windows8 driver and control of that reset line. I believe any time there’s a connection to the serial port the reset line gets strobed. Windows8 my be trying to be clever (or just errant) about serial port connections and might be connecting/disconnecting the port causing the weird behavior you’re seeing.

I am talking to the guys at Sparkfun to see what exactly is going on, but based on what worked and did not work up to now, I guess this is what is going on.

Thanks for all the help guys.