Make sure the Samsung remote is modulated at 38 kHz. In order to test whether your module is working, go out and get a stock remote and try again. Is there a part number on the remote, or on the TV it is meant for?
Can you verify power, ground, and signal at the chip itself and not just the breakout? Could be you have a cold solder joint, but I would guess a non-functional breakout board since other remotes have not worked.
While we’re at it - can someone explain how the output can be read from this module to reconstruct a byte? My understanding is that the output of this modules toggles between 60% Vcc and ground - Vcc being a ‘1’, and Ground being a ‘0’.
I don’t understand how I can read this through the interrupt pin of my netduino - if I use interrupt, Im just going to receive ‘1010101010101010101…’ for ALL incoming signals - its the timing that will let me know if I have received a repeated 1, or repeated 0.
Do I have to forget about attempting to use interrupt, and poll the pin at intervals, then calculate if a byte stream has been received or not? That would work pretty simply, I just don’t like to waste processor time on a tight loop if I dont have to…
nimble:
if I use interrupt, Im just going to receive ‘1010101010101010101…’ for ALL incoming signals - its the timing that will let me know if I have received a repeated 1, or repeated 0.
Do I have to forget about attempting to use interrupt, and poll the pin at intervals, then calculate if a byte stream has been received or not? That would work pretty simply, I just don’t like to waste processor time on a tight loop if I dont have to…
Just dropped by and saw your post...
Your first option is to use InterruptPort and aggregate the timestamp values passed with each call of the event. That will give you the amount of time that each bit was on or off.
The other option is to use an external chip with a sampling input… You can ask it to measure for you and then download the data via SPI.
You could also sample a pin repeatedly…but if the garbage collector or such kicks in for a moment you might lose some data. .NET Micro Framework is not hard real time, so I’d avoid that strategy.
For small input streams, the InterruptPort is the best strategy.
Instead of using an external chip with sampling input, could I re-route the SPI clock back in to an interrupt port, set the SPI frequency to the sampling rate, and then when when the interrupt occurs, sample my GPIO that has the IR chip attached?
Would the GC still affect this?
With regards to using the timestamp option - wouldnt that be useless in the case that there were two '0’s or two '1’s sequentially, because it wouldnt generate an interrupt (no rise/no fall)?
I pulled apart my remote and scoped the infrared emitter output.
Attached are two files, one is zoomed out enough to see the actual data stream (data.bmp), the other is zoomed to a wave peak, so it shows the carrier frequency is indeed 38khz (well - when I tweaked things it said 38.67Khz - its a little off, but I think my scope needs recalibration).
No - you’re not blind - the forum is doing something weird, I posted this and it looked fine, the images were in the post, but the PNG files have since been removed from the server? wtf?
I’ll post them on a 3rd party site tonight and re-link them… Check back in 2 hours…
Aha - more progress. The data is encoded as PWM by the looks. So the image above shows something like 0110011…
However, It seems that the netduino cannot sample the data fast enough to decode it.
I think the interrupt method may do it - the problem is that the 8554 outputs Vcc when idle, and Vcc-30% (around) when a signal is being generated. This doesnt trigger an interrupt because it doesnt get close enough to 0v.
How do I get this output to generate an interrupt? More specifically - how do I get it to output 0v when idle as opposed to Vcc?
If you use a general purpose NPN transistor like the 2N2222A you can not only switch the sex of the output, but also get rail to rail output.
Take the Emitter and connect to ground.
Take the Collector and tie to one side of a 10K resistor. The other side of the resistor ties to 5V
Take the Collector (again) and connect this to your interrupt pin.
Take the Base and connect to a 10K resistor. The other side of the resistor goes to the output of your device.
When your device generates a voltage, the transistor will switch on, and the Collector voltage will become (almost) the same as the emitter or ground. When your device does not generate a voltage, the transistor is off and you have the 5V via a pullup connected to your interrupt pin.
It is possible you might need to play a bit with the base resistor value. Goggle will be your friend.
However, as you can see, (this is powered by 3.3v) is appears that a ‘1’ is 3.3v, and a ‘0’ is, oooh, about 3v, or a little less.
So - the ‘0’ certainly ISNT ground.
This means that I cannot use this output to generate an interrupt.
The product page on SparkFun says it generates a ‘stream of 1s and 0s out of the data pin’ - was I assuming wrong that a ‘0’ would be ground?
What do I have to do to get this to trigger an interrupt? I would hate to have to read this as analog…
Thanks guys… (yeah I know - Im a noob - pretty obvious eh - long time coder, first time tinkerer)
Actually it’s not clear to me from the pic just what voltages you’re seeing. Where’s ground on the scope pic ? From the label I’d say it’s the center line, which makes all the voltages apparently negative. Your scope says it’s a 10:1 probe and at 20V/div but I’ll guess like the scope is mistaken and it’s really a 1:1 probe and therefor 2v/div. That makes the voltages seen be -3- volts for the lower (logic 0) reading and something a tad higher for the logic 1 voltage. If my take on the pic is correct, go back and check your connections (and scope setup). The output of the IR receiver is an open collector transistor and should generate a fairly good “ground”. Both the IC and the board have pull-ups to Vcc (presumably 3.3v), so that voltage should be OK as well.
Use a DVM to check your supply voltage and also verify you’ve not got pin1 and pin3 not reversed somehow. The output (pin2) should be initially disconnected from the Netduino when scoping it out. When that works, then try it w/the Netduino.
Ideally you’d run this into a digital input to generate interrupts but I’m not familiar with the Netduino I/O ports.
Try looking around http://www.remotecentral.com/index.html for the encoding protocol used by Samsung. There are only about 3 major protocols used. IIRC the wiki on consumer IR was pretty good at explaining the general workings. If not Google will lead you to a good site (there’s a good one I can’t find ATM).
This chip is an “open collector” output with a built in 30K pull up resistor. If this is connected to a common ground (receiver and micro) and the Vcc is connected to 3.3V, then the output has to fall in that range (unless the chip is toast).
I think the OP needs to confirm the voltage levels that Mee_n_Mac brought to light. Once that risk is retired, then we need to understand why the voltage is not swinging. One good possibility is that the micro pin the receiver is connected to is still set as an output. This test should be redone with the output DISCONNECTED from the micro.