My initial thought would have beenthe capacitor, but you have already tried that.
Another possibility, could be IR from the LED (?), so could you try to shield the WS2801 from shining on the IR receiver and see if you are getting the same interference.
I looked at the data sheet for the IR LED , but it was mostly in chinese.
One other possibility would be to try with the pull up resistor on and then off on the input pin of the Arduino (7).
Hope this helps!
If you are looking at other IR receivers, I have had good experience with Vishay (no connection).
Issue: When the LED's are on, the IR controls to change light sequences are very unreliable/non-responsive.
Have you tried this with the LEDs not being connected but being driven by the software. It sounds to me like all that interrupt activity is spoiling the reception of the IR signal.
It sounds to me like all that interrupt activity is spoiling the reception of the IR signal.
Interrupt interference with FastSPI was one of my first thoughts. This is why I quickly reverted back to the Sparkfun bit banging method.
try to shield the WS2801 from shining on the IR receiver
I've since turned the IR receiver the other way, covered it with electrical tape and covered the LED's with a thick blanket. It still received commands from the controller and I saw spikes on the IR output, but not as many.
With all of this, I've been able to reduce the noise on the IR receiver's output to the point that it's more reliable, but I'd really like to 100% eliminate electrical/interrupt issues vs light sensitivity.
Just enable the internal pullup..as follows
pinMode(7, INPUT); // set pin to input
digitalWrite(7, HIGH); // turn on pullup resistors
..saves using any external components
Thanks for that, and I've added the internal pull-up to my testbench code.
Covering/uncovering the LED's doesn't seem to affect much, even when I've put an electrical tape 'hat' over top of the IR sensor.
So, I'm back to some form of electrical noise, although one would think it would be reduced when I'm running everything off of a battery.
Having a closer look at the power, and it does indeed appear that the signal is cleanest (and more operationally reliable) when I'm running off the battery. So, I at least have a direction and have thrown a cap across Vin and Gnd as well as the 5V and Gnd. Will have to play around some more.
In the meantime, the AC adapter is 7V @ 1A.
Thank god for the used Tektronix 765B that I bought the other week.
Yes it all sounds strange - if you have it wired up on a bread board maybe try to use 2 different ones.
Also have a look at this data sheet for a Vishay IR receiver - page 1. They also use an optional resistor along with a capacitor on the IR receiver, which I believe helps with noise (?). It may also help with your receiver. I did have one situation about a year ago where I needed these optional components, but most of the time I find they are not required.
The KSM-603LM's specs are pretty ugly. For example, relative reception distance vs. carrier frequency still has 50% sensitivity between 20KHz and 50KHz. Pretty much any light in the 10KHz to 60KHz range is going to trigger it (e.g. fluorescent lights). Compare that to a Vishay part where the sensitivity is 50% at 36KHz to 40KHz.
Thanks very much for your superb responses. I'm going to go find that Vishay part.
In the meantime, yep, I'm already using a couple of small breadboards (one is a shield) and will play around with the caps. I have 33pf and .01uf in ceramic. My 1uf and larger are electrolytic.
Since my current part runs at 40kHz, and that pin 3 is currently Vcc, it appears that TSOP34840 is my best bet. The 'very noisy' version is not available from Digikey.
Bear in mind there is nearly an IR receiver model for every different application & type of remote.
So if you see the 40 at the end of the model no, it means a modulation frequency of 40kHz (typical for SONY).
So before you order, try to check the type of protocol with IRremote and that will give you an indication of the likely modulations frequency (search for ir receiver vishay).
38Khz is more common (NEC and others).
36Khz(Philips RC6/RC5)
The manufacturer doesnt always match the IR protocol as often even the big players supply kit from competitors.
Bear in mind there is nearly an IR receiver model for every different application & type of remote.
So before you order, try to check the type of protocol with IRremote and that will give you an indication of the likely modulations frequency (search for ir receiver vishay).
I'm retasking an IR controller from a Chinese made 12V LED strip. In looking inside the LED driver module, the IR receiver looks a lot like the Vishay. Time to get out the screwdriver again.
Think I'll follow your suggestions and do more research. I'll also see about kicking $20 into your Kickstarter project. . . oops, Indiegogo. Done.
You're a star!...tnx....We are doing some amazing things with AnalysIR & IR. We believe we have achieved some firsts with the Arduino platform & IR and plan to publish all the Arduino code, if successful (which is looking likely).
...all inspired by Arduino, IRremote & IRlib etc....
IRremote reports that both my Chinese made IR remote use NEC codes, and that this uses a 38KHz carrier.
As a result, I've ordered a few Vishay 38KHz receivers from a store on Aliexpress.
In the meantime, I've been looking at the WS2812B SPI controller, which I'd love to re-program to use my own light sequences. Turns out it's got a Megawin MA803AS - 8051 Microcontroller inside. Methinks that re-programming that chip will not be easy. At all.
I just wanted to let you know, you're not the only one.
I'm using the IRremote library, a meter worth of strip lights, an IR receiver and an old stereo remote.
Keep getting invalid code errors which eventually crashes the whole thing and the chip has to be rest.
Tried it on a breadboard, same results. I thought I was getting noise through the voltage, and with your readings, I'm sort of correct. I'm out of ideas myself.