SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By riden
#21700
Thanks for posting the photos, it helped me understand your configuration.

From what I can see, everything looks in order. The fact that the RX LED lights for a brief time indicates to me that the receiver successfully decoded a packet, but no other valid packets were received. There is a 130ms timeout on the receiver that will place all the data lines to logic 0 in the absence of valid packets.

Here is what I would do if I were troubleshooting this on the bench:

1) Take the opto-isolator out of the picture. Connect a 100k-200k resistor from the TX's D0 line to GND. Then pull up DO by connecting it to +5V and observe the RX LED. If that takes care of the problem, reconnect the opto-isolator leaving the pull-down resistor in place.

2) Take the RF link out of the picture. Connect DATA_OUT to DATA_IN and see if the problem goes away.

Another thing to check is to confirm that an LED connected to D1, D2, or D3 DOES NOT light when D0 is high and D1..D3 are low. The LED shouldn't light, but if any of the other ports light when D0 is activated, it may be indicative of a problem in the chipset (unlikely, but worth checking if everything else was checked).
By landon
#21740
Here is what I would do if I were troubleshooting this on the bench:

2) Take the RF link out of the picture. Connect DATA_OUT to DATA_IN and see if the problem goes away.
I did a direct connect and it behaves exactly as I would expect - a solid obstruction in the photo interrupter results in a solid lit LED out of the decoder.

I'll check the other suggestions as well to see if I can narrow this down further.

Thanks,

Landon
By riden
#21741
landon wrote:I did a direct connect and it behaves exactly as I would expect - a solid obstruction in the photo interrupter results in a solid lit LED out of the decoder.
That seems to point to a problem in the RF link. I can't tell if you are using one or two protoboards, but connect about a 6" length of wire to pin 4 (ant) of the transmit module and see if that helps. The transmitter isn't being loaded now, and that could be a problem.

To test the RF link, unhook the DATA_OUT line from the transmitter and connect a wire from the tx data pin of the transmit module. If you have a multimeter (a LED/resistor could be substituted), measure the output of the receiver as you connect the tx data line to +5 volts and then to GND. You should see a very definate and constant transition on the data line. If you connect the data pin to 5v and the output of the receiver is NOT constant, that will be a problem. Only bring the tx data line to +5 for a second or so, as you don't want to transmit continously.
By landon
#21769
I bought the 434 antennas from Reynolds http://www.rentron.com/Linx/RA-Antenna.htm and put one of them on the TX side instead of the 6" wire. Assuming the transmitter wasn't loaded at all, this should load it.

I also got identical behavior as before. Solid LED on the TX side and quick blip on the RX side.

I'll pursue your other suggestions and report my findings.
By landon
#21772
Well, I finally brought out the big guns and dusted off my old Hitachi O-scope (20MHz) that I bought out of college in 1984 :-) and took some screen shots of what I saw on the scope. Very interesting.

First, I checked the TX data in line to see if I could see the Linx encoding wave. Sure enough. I got a completely continuous (locked) encoding pattern. See this picture of the O-scope image: http://flash.360vl.com/~lcox/breadboard ... ataOut.jpg The scope is showing about 5 volts per major graduation so this looks very TTL-ish as I would expect. Again, this reading was taken on the Data Out side of the encoder that goes to the TX data line.

Secondly, I checked the digital data port on the RX side to see if I could see a corresponding wave. It's also obvious that the encoding is making it through the RF, albeit, by the time it goes into the Linx Decoder, the wave form amplitudes are not pure TTL any more. Here's a screen of the O-scope on the Data output of the Receiver (Data input to the decoder.): http://flash.360vl.com/~lcox/breadboard ... ata-In.jpg. Notice the TX and RX patterns correspond but the RX side is not at 0-5V like the TX side is...it looks more like 2.5-5v transitions.

Anyway, I'm not sure what to do about this at this point. It's clear the encoding is making it across the RF link but is different enough that it's not like the TX encoder output is connected to the RX decoder input - that worked, but going across the RF doesn't and it's obviously due to the difference in the wave form.

I don't know if it's due to the level changing that occurs coming out of the RX or some other factor. It seems like the wave is somewhat slower as I can see the edges on the RX side but on the TX side, I could only see the levels and not the edges. Don't know if that's meaningful, but just an observation based on these pictures.

Any ideas to try next?
By landon
#21773
One more thing to refine the above results - I calibrated the scope some more and see 0-4v square waves on the TX side coming out of the encoder's data out. On the RX side, I see 0-3.7/3.8v (not quite 4v) going from the rx radio digital data pin.

I've double checked that the receiver radio is seeing +5v on its +5 pin, so I don't think it's running low.

Again, if I run that 0-4v signal directly into the rx linx decoder I see a solid D0 out. I'm now wondering if I'm going to need to pull up the RF digital data out to true it up to 4-5v. I'll experiment with that to see if that would help.
By riden
#21787
According to the datasheet, the minimum input HIGH for DATA_IN is 0.8 * VCC (4v for a 5v input). I think the problem is that the amplitude of the input signal from the receiver is a bit low. Why that is, I can't say at the moment. Why don't you try putting a diode from VCC (anode) to pin 1 (cathode) of the decoder chip. This will reduce the supply voltage to the decoder by .6 - .7v which makes the input high threshold 3.44-3.6v. I think this will get things decoding for you, and then you can investigate why the output of the receiver is lower than expected.

Another idea is to take a 10k or so resistor and use it to pull up the DATA_IN line to +5v. I'd try the diode approach first to confirm it is an input level issue, which is almost certainly is seeing the oscillocope waveforms you provided.
By Philba
#21788
I'm not sure I follow the TX side picture but that transmitter, I believe, is for ASK. when the input is low, the transmitter is off and when it is high, the transmitter is on. As such, the transmitter takes some amount of time to ramp up so your pulses will be shorter than the direct connection. You might want to decrease the length of the low periods to see what happens.

I don't think the voltage level thing is an issue.

by the way, does your scope have some alignment problems or is the waveform really decreasing in amplitude in both pictures?
By landon
#21791
Thanks for the responses.

riden said:
This will reduce the supply voltage to the decoder by .6 - .7v which makes the input high threshold 3.44-3.6v. I think this will get things decoding for you, and then you can investigate why the output of the receiver is lower than expected.
Interesting. I will definitely give that a try and/or the resistor as well depending upon the results of the diode test. This sounds promising.

Philba said:
I'm not sure I follow the TX side picture but that transmitter, I believe, is for ASK. when the input is low, the transmitter is off and when it is high, the transmitter is on. As such, the transmitter takes some amount of time to ramp up so your pulses will be shorter than the direct connection. You might want to decrease the length of the low periods to see what happens. I don't think the voltage level thing is an issue.
The reason I went with the Linx encoder/decoder was so that all the timing would be taken care of for me in hardware. I don't have a microcontroller bit banging the pulses. The Linx encoder is doing everything. So, there isn't anything I can do to change the timing of the pulses.

I want to mention that I ran the experiment on both baud settings of the Linx (adjusted the baud on both ends) and got the same results on the faster baud rate even though the 434 should not be able to handle the faster baud rate. I wanted to see if there were any clues from that. None that I could pick up.
by the way, does your scope have some alignment problems or is the waveform really decreasing in amplitude in both pictures?
Yes, it's alignment is off (as I said, vintage 1984). To tell you the truth I'm not sure how to get it aligned - I went through the dusty old manual and don't see anything related to getting it aligned. In any case, it did what I needed it to do - told me what wave forms I was getting and their relative amplitudes, so for that I'm glad.
By landon
#21792
Ah found the ol' scope's alignment internal adjustment. Got her squared up. Nothing like something out of alignment to drive an engineer nuts.

Will get back to you guys on the diode/voltage level experiment.
By riden
#21793
landon wrote:Yes, it's alignment is off (as I said, vintage 1984). To tell you the truth I'm not sure how to get it aligned - I went through the dusty old manual and don't see anything related to getting it aligned. In any case, it did what I needed it to do - told me what wave forms I was getting and their relative amplitudes, so for that I'm glad.
I looks like the yoke, the coils on the CRT that control the positioning of the beam, needs to be adjusted. Please be careful since there is high voltage on the CRT (a few KV) and up to several hundred volts flowing through the yoke.

If the LICAL decoder specs say minimum input HIGH is .8 * VCC (4v with a 5v VCC) and you're not seeing that from the receiver, that would be a problem. I think the waveforms look pretty good, and I'm pretty confident that the receiver will be able to process the data as that is what it was designed to do.
By riden
#21794
landon wrote:Ah found the ol' scope's alignment internal adjustment. Got her squared up. Nothing like something out of alignment to drive an engineer nuts.
An internal electrical adjustment, now that being having the move the yoke anytime!
By landon
#21796
Ok, I'm getting scary good at taking o-scope screen shots.

But first, if you want to see an overview of the breadboard: http://flash.360vl.com/~lcox/breadboard ... oardRF.jpg. The Arduino mini-stamp in the upper part is separate. The only thing it's doing for me at the moment is giving me +5v from the USB connection. I plan to hook it up eventually to this experiment, but right now, the focus is on the middle (TX) and bottom right (RX). Notice my transmitter antenna strapped to the BBoard on the left. That's the 434 antenna I was referring to earlier that I got from Renton.

I did several of the suggested experiments. Here are the results.

I put a diode between VCC and pin one of the decoder to pull down the supply voltage as suggested by riden. Unfortunately it didn't help - in fact, instead of getting a consistent blip on the RX LED, sometimes it wouldn't light...it was a lot more inconsistent/ hit and miss.

I measured the voltage at pin one and got 4.75v so it didn't drop quite as much as might be expected. The Vin without the diode is about 5.05-5.10v, so didn't get the .6v-.7v voltage drop with the diode experiment and the results were unstable.

So, I replaced the diode with a straight jumper to vcc. Then found a 10k resistor and went from vcc to the data in pin of the decoder to try to pull that up. First, I did an o-scope shot of the data-in pin without the pull-up and got a nice wave on this shot: http://flash.360vl.com/~lcox/breadboard ... Pullup.jpg The bottom of the wave is my 0v reference point just so you know. So, it's amplitude looks like it's around 3.75v.

With the 10k pullup, here's the o-scope shot: http://flash.360vl.com/~lcox/breadboard ... Pullup.jpg You can see the pull-up did its job. The top amplitude of the wave is about 4.5v so should be right in the sweet spot, I think.

The results are maddeningly consistent. I just get a quick blip on the output side of the decoder with the pull-up.

I then tried running with both the diode on pin one of the decoder and the pullup on data in. Same results, though interestingly, it seemed a little more spurious. With the photointerrupter constantly blocked (high), occasionally I'd get some flicker out of the RX LED that seemed like noise except that without the diode and pullup, I never saw any flicker...half wondering if it was thinking about working, but wasn't quite there.

I appreciate all the ideas to check out. It's got to be close, but I don't know what's missing. Any other ideas to try?
By landon
#21799
One final thing before I bag it for the night. I have a second Tx/Rx radio. I substituted the Rx radio and got the same results, same voltages out of the data pin of the radio. So, either I have two bad parts, or they are working as designed (~3.6-3.75v on data out pin of the radio.)