1

I have an Arduino Uno connected to two IR transmitters and respective receivers. Basically, when one of the receivers detects a beam break, I have a strand of LEDs display a pattern. This all works in principle, but the problem is that when the IR transmitters and receivers are connected to the Arduino, the LEDs flicker with random colors.

The specific parts I'm using:

Here's a video of exactly what's happening. At first, the IR transmitters and receivers are disconnected and everything is fine, then I connect the IR receivers and the flickering begins at around 8 seconds. http://www.youtube.com/watch?v=REAp5rODYUs. The flickering will continue even when I disconnect the IR receiver, albeit at a reduced rate.

Here's my wiring diagram:

Wiring Diagram

In the above diagram, the Arduino is powered via USB (I tried with a 12V power supply too), and the LED strand is powered from an external 12V power supply (I couldn't find a diagram for an LED strand).

If it matters, I should mention that I'm using the IRremote library to control the IR transmitters (http://www.righto.com/2010/03/detecting-ir-beam-break-with-arduino-ir.html) and the strandtest example from the Adafruit WS2801 LED library (https://github.com/adafruit/Adafruit-WS2801-Library) to test everything right now.

The strange thing is that I also have another strand of similar LEDs (http://www.adafruit.com/products/322) and they do not experience the flickering regardless of if the IR transmitters and receivers are connected or not. So the only thing I can think of is to use an external power supply for the IR so as it avoid connecting them to the Arduino. Is that a valid solution? If so, how do I got about determining what power supply I would need (in terms of voltage and amperage output)?

Finally, I'm more of a software engineer (ie, spend most of my time on StackOverflow) so laymen's terms are better if it all possible. Thank you!

shanet
  • 133
  • 1
  • 8
  • 1
    Since it works some of the time, the hardware is apparently wired correctly, although it's impossible to tell what exactly your circuit is without a schematic. It looks like you have a firmware bug. Beyond that, there isn't much to say. – Olin Lathrop Apr 03 '13 at 18:20
  • 1
    I think it might be useful to have the arduino code here. But even before that, here's a quick suggestion: what if put your LED-enabling and IR-detetion enabling code in `setup()` only, leaving `loop()` to do nothing. If flickering persists we _know_ it is a hardware issue, if not it is a software issue. – angelatlarge Apr 03 '13 at 18:26
  • I'm not so sure it's wired correctly because when the IR transmitters and receivers are disconnected, the LEDs work perfectly. It's when they are connected that the LEDs flicker. This suggests a wiring problem, yes? I just don't know enough about circuits to be able to say yes or no. And since I'm able to swap out the LEDs with another very similar strand (basically just less bright), and everything still works right even with the IR transmitters and receivers connected says to me that the software is fine. Is that a bad assumption? – shanet Apr 03 '13 at 18:32
  • @angelatlarge Right now, `loop()` is only sending color info the LEDs. I can move it to `setup()` so it will only run once though. – shanet Apr 03 '13 at 18:33
  • 1
    @shanet: If your code responds to IR receiver data, then could be software (and possibly + hardware issue). If other types of LEDs work fine, this biases things in favor of the hardware issue, possibly insufficient power? – angelatlarge Apr 03 '13 at 18:37
  • @angelatlarge I just moved everything to `setup()`; it's still flickering. The code I'm using currently is just a test sketch to make sure the LEDs are working. There's nothing at all related to IR in it. How would I determine an insufficient power issue? The LEDs are powered by an external power supply. As I posted in my question above, is it reasonable to connect the IR Rx and Tx to an external power supply? If so, how would I determine what voltage and amp output to use? – shanet Apr 03 '13 at 18:40
  • 3
    Measure the power supply while the flickering is going on. Do you have steady power of the correct voltage or not? – Olin Lathrop Apr 03 '13 at 18:54
  • I measured the external power supply powering the LEDs both with flickering and without. Both times it was a steady 12V. I also tried connecting just the ground on the IR receivers (no other wires to the IR parts) and the flickering was still happening. Then, as I connected the ground to the IR transmitters, it got worse. By the time I had connected the 5.5V to the IR receivers and transmitters, the flickering was essentially just random colors on the LEDs. Is it possible that some interference is happening inside the Arduino between the ground pins on the right and left sides of the board? – shanet Apr 03 '13 at 19:16
  • Thanks for your help everyone. I got it working. I guess I had something solder badly because I re-soldered everything and the flickering is gone and everything works as intended. – shanet Apr 04 '13 at 05:27
  • Just fyi, there are noise issues with these LEDs : http://electronics.stackexchange.com/a/68336/12189 – Jeff Burdges May 08 '13 at 17:15

0 Answers0