Just trying to turn an LED on/off with RF Link but flickers

I’m using the RF Link - 2400bps - 315MHz

everything is hooked up correctly and i verified when going through the KLP_walkthrough PDF

When checking the LED direct from the transmit digital data in pin all works fine, when checking from the 2nd pin (digital data out) on the receiver, an “On” (what should be 5v) value sends a quick blink and then it turns off, a 0 sends it ON, then it drops down to flicker.

I’m using a basic stamp to send the data

here is the simple code

P VAR Byte

ser VAR Byte

Main:

SERIN 16, 16780, [ser]

IF ser = 1 THEN

HIGH 6

ENDIF

IF ser = 0 THEN

LOW 6

ENDIF

GOTO Main

max msp sends the 0’s and 1’s to the stamp. like i said it’s fine on the transmit end, but i’m NOT getting out what I send in . Although it’s not behaving like this now, at one point if i sent it 1’s or 0’s every 10ms or so it would stay on or off with minimal breaks. That makes me think there was no link or some interference.

Please any help would be much appreciated. Is this the best way to do this (wirelessly turn an led on/off)? Optimally I want the receiver end to be as small and cheap as possible because i want to make many of these and give them out to people for the led’s to blink to music.

thanks

Shane

Hello,

I haven’t used a basic stamp, but I think this logic is better, just try it!!

...
IF ser = 1 THEN
HIGH 6
ELSE
LOW 6
ENDIF 
...

It migth work! :slight_smile:

like i said, the code works fine when tapped from the data in. this code also works fine for this purpose and is more concise since i only want to send two values, but i get the same behavior. it has to do with what is really happening in this transmission. seems like there is no “lock” and after it gets the 0 it just drops out and jitters. after a 1 there is no random blinking but nothing, perhaps a clue there but i have very little knowledge of electronics.

Any more suggestion or help anyone?

thanks for the new code suggestion

alejmrm:
Hello,

I haven’t used a basic stamp, but I think this logic is better, just try it!!

...

IF ser = 1 THEN
HIGH 6
ELSE
LOW 6
ENDIF

Shane’s approach is a better one for the application, as it tests for explicit values. If it is “1” the LED is ON, “0” it is off, and any other value is ignored.

However using the values of 0 and 1 can be problematic when you use a wireless link. These devices use ASK modulation (i.e. the data is sent by turning the transmitter on and off). The transmitter is ON for a one bit and OFF for a zero bit. If your data contains a lot of “0” bits, the receiver will adjust it’s AGC (increase its sensitivity) to look for a signal. If you look at the digital output of the receiver when your transmitter is off, you will see that the output flickers because it is switching based on noise and not the actual signal. There are a number of threads on this board that discuss the issues involved with these devices and provide solutions. Search the forum for “RLP”.

Shane, when you are ready to deploy your project to friends, you won’t want to transmit continously. as your sample code leads me to think that you are doing at the present time. The transmitters can have a range of 100 feet or more, and they can interfere with other wireless devices that share the same frequency (garage door openers, X10 wireless, wireless door bells, alarms, weather stations, other friends using your device, etc.)

ok i’ll search for this RLP discussion, this sux though because it makes me think that this won’t work how i want , unless the leds always flicker on for a second.

i WILL want to constantly be transmitting also. the lights will constantly be adjusted and sent information. there would be one transmitter and many receivers. i guess if someones garage opens across the street from a dance party to the beat it’ll be ok.

if these devices need a constant change or else imploy some automatic gain control thing is there somehting anyone knows about on here that i could use to wirelessly turn an led (eventually 3 RGB) on and off? mind you the receiver must be as small and cheap to fabricate as possible while the transmitter can be anything. only need 100yards.

i sure hope i can get this going soon as it’s central to my MFA main project this year.

thanks

shane

hmm, but why would it also turn off when i send a stream of all 1’s?

Bit stuffing comes to my mind, look at the USB bit stuffing or try to look at the 8b10b.

I believe that 8b10b will be the one to use because it takes in mind the average power of the signal. so if you have 0’s this codec will add 2 ones, trying to keep the average power stable!!

just my 2 cents!

PD. I am not an expert in this topic.

Take a look here:

http://www.printcapture.com/files/X10_RF_Receiver.pdf.

The trick is to turn on the transmitter for a while, let the AGC lock, then send some bits.

The receiver side is implemented as a state machine, looking first for the burst, then the silence, then the data bits.

I can post a receiver snippet if you want. It’s in C, uses TMR1 and CCP1 and is interrupt based. Transmit is fairly straightforward.

i can’t download it, the page is blank. are you sure the link is correct? whatever it is i hope it does not add much on the other side. it needs to be as small and cheap as possible. i’m not sure what is is you’re pointing to but after i can see it maybe i’ll be able to tell. i am new to this though.

thanks

Remove the last dot in the URL address. I had the same problem but a close inspection of that URL I found it has an extra dot in the end.

… Receiver.pdf. ← did you see the dot?

Alex

i spent all of today in a last run gauntlet effort doing everything i could think of to get this working, and it doesn’t. the closest thing was to send pulse code modualtion super fast and even then when it was mostly 0’s (even though there were still 1’s) it still lost the signal.

this .pdf looks like something but it i don’t know how to implement that and it looks like you need many milliseconds inbetween.

These led’s need to be just on, just off, and strobe super fast (faster than the eye can see still) to off.

which is just on / off , but that might happen many many times a second.

the receiver end needs to be small and cheap, even this receiver is pushing it . to implement this code in the link above wouldn’t i need more componants?

there has to be an easier way to do this. it’s almost as if the receiver is too complex. i need a tiny radio basically, and the led is the speaker, fed a square wave. maybe this digital solution isn’t the way to go?

thanks for all the help

shane

Cross-posting from another thread because I think it’s related:

Hey folks: In case this hasn’t already been covered:

I noticed that the output of the Laipac 434 rcvr won’t stay ‘high’ for more than 1/4 second or so, in the presence of a continuous RF signal.

That is:

  • Xmtr powered off - rcvr outputs random stuff.

  • Xmtr powered on with Data line high - rcvr output is high for about 1/4 second, then goes low and stays low.

  • Xmtr Data line toggling at least a few hz - rcvr output follows xmtr Data input.

Pete

Let me get this straight, you have the receiver’s digital output hooked up to an LED? My first thought was - what is the output current spec’d for? can’t be much. hope you didn’t blow the receiver output circuit. if that’s not the case, then could you share your schematic?

but more importantly, that’s just not going to work. the rf link is not a plug-and-play replacement for a wire. You need to use some sort of encoding for the transport. I would take a look at the holtek or lynx encoders. SFE doesn’t seem to carry them but these guys do http://www.rentron.com/PicBasic/RemoteControl.htm - lots of tutorials on there. You might need to add a flip flop

right this is the same problem… did this guy get a solution?

Let me get this straight, you have the receiver’s digital output hooked up to an LED?

…but more importantly, that’s just not going to work. the rf link is not a plug-and-play replacement for a wire. You need to use some sort of encoding for the transport.

I think the original poster was trying to drive an LED directly from the rcvr, or something similar.

I agree with you about the “it’s not the same as a wire” thing.

I was just trying to let folks know how it seems to work…

Other than using a uP on the rcvr side, I would think that the LED-control could be done with a pair of 1-shots driving an S-R flip-flop (each 1-shot is set to a different period, and so receiving two different pulse widths could control the state of the FF, or thereabouts…).

Pete

you might be able to do something with a flipflop. If it’s just for playing around, it’s fine, I guess. However for any kind of application, it’s just a bad design. This will trigger on any other transmitter out there. The minimal reasonable solution is some sort of encoded signal. the holtek encoders and decoders are cheap. Why take the risk of some other transmitter messing you up.

Remember, you don’t control the airwaves.