Another RF question from a simpleton

212

Senior Member
On this page (thank you for having it available)

http://drvernacula.topcities.com/400_metre.htm

In the second paragraph it says "The transmitter is rated at 4000 metres and it may well go that far when listening for a tone on a scanner"

I'm still trying to learn how to send "data" with RF and Picaxe... but all I want to do at the moment, is turn on an output pin when the RF receiver "hears" the transmitter is active. I have been using a cheap 315mhz set, with an encoder and decoder, because they came with them already. Now I want to try using Picaxes to replace the encoder and decoder, because later on I want to add more features to my projects.

Having trouble explaining here, so I'll just ask directly....Can the typical cheap RF units, being used by many of you guys, send and receive tones instead of "data"??? If longer distances are possible this way I want to try it...
 

manuka

Senior Member
It's dead easy to PICAXE generate tones to encode a transmitter, but tone PICAXE decoding could be tricky.Say goodbye to inbuilt TTY or DTMF,although Morse (if known) has some mileage,but simple tones can maybe suit- gasp- human decoding. I've had a lot of mileage from this, perhaps with the tone frequency & repetition rate indicating urgency etc. We once came up with temperatures indicated by so called" Swan Code" that even a child could follow. This is particularly easy organize with cheapie 433MHz ISM transmitters => http://www.picaxe.orconhosting.net.nz/434tx.gif . See further ideas => www.picaxe.orcon.net.nz

But why tones? Switching ? Both sending & receiving serial RS-232 is inbuilt into all PICAXEs, & although only typically 2400bps it's can be robust with good wireless links. Assorted error detection schemes (CRC,Manchester etc) have been rustled up by the likes of Hippy. Stan
 
Last edited:

moxhamj

New Member
Actually that is a little bit tricky with serin/serout. Say you send a serout once per second with a data packet. The packet might have b0=0 for low and 1 for high, and the receiver could change a pin to low or high depending on the data packet. But if you were sending a series of "highs" and the receiver had turned something on, and say the transmitter suddenly stopped transmitting (because its battery went flat). The receiver would be stuck waiting for a serin forever and would not go low.

A few solutions:

1) You could go to http://stores.ebay.com.au/e-MadeinCHN and look at the left in the "remotes and receivers with relays" and look for the momentary ones. This will do all you need and you don't need to even use a picaxe.

2) You could send a tone, eg 1khz, generated by a picaxe with the sound command, then the receiver RF module will hear that tone. If you put it through a low pass filter, eg a 10k resistor and a 1uF capacitor to ground, and measure the volts on the capacitor with a readadc command on a picaxe, you will get 0V when the Tx is off and 5V when it is on.

The disadvantage of both of these is how they fail at long range. They will both fail intermittently - sometimes a tone will get through and sometimes it won't and if you are driving a relay turning on a pump or something the relay might be turning on and off.

3) To solve this, you can use one of the multiple "Serin hang workarounds". This uses proper data packets so the data definitely gets there, and a way of kicking a picaxe out of a serin hang. At present my favourite is a picaxe18X doing all the comms and also pulsing one pin high and low regularly. A picaxe08 checks for these pulses and if they don't arrive, it sends a reset signal to the picaxe18X. Thus if the picaxe18X didn't get a radio packet for 5 seconds it would turn off the device it was controlling.

What is your application?
 

hippy

Ex-Staff (retired)
Would SOUND/PWM/bit-banging for the transmitter and PULSIN/COUNT for the receiver not work for dealing with tone only ?
 

moxhamj

New Member
I just reread the question which I think is "do tones enable longer range". Answer - not much more (maybe 10%) if you are sending data. If you are listening with an ear, then yes, a lot further. But that is more due to the fantastic noise rejecting properties of the human ear and brain, not the radio module.

But the range can be boosted considerably using different antennas, eg yagis. It depends on how far you need to go.
 

212

Senior Member
Thanks for the replies and ideas to try out. Range and application will vary because I am playing with all kinds of things with my new picaxe chips. What brought the question up is the one I am working on right now though. I am putting a little Jazz digital camcorder in the smallest case it will fit in, to be used for wildlife recorded movies...just for fun. The camera has been modified so it sees IR light, and I will use IR LEDs at night for light. With the cameras case being so small, I do not have room to use a PIR detector in it, so I will use a remote one. Since I will have a RF remote PIR sensor, I might as well put a light and sensor in the same case. I intend to have at least two remote sensor/lights, and I want them to both come on when either one sees motion...and turn on the camera and record too. Of course the light will have a day/night circuit to prevent it coming on in the daytime. So I don't need a lot of range for this project, and I do not need to tell the cameras and light what time or temp it is lol...but I do want to learn how to use my picaxe for more stuff. You old picaxe dogs still remember how exciting it is when you get something working right...I'm having a blast :)
 

Dippy

Moderator
Well, all of the above, plus some thoughts:

1. When you are pushing the range you are more likely to suffer from interference of one sort or another, especially with AM.
2. Consider 'pushing the wallet' and getting better quality modules and using FM. You will tend to get a better quality 'link' with FM intrinsically. There is usually a reason for cheapness. You may save $5 on the module and spend weeks trying to sort it. Up to you.
3. I would have guessed that if you want to push tone broadcast range then you will have to consider Band Pass Filtering and maybe AGC too and tone decoder.
4. Obv. antennae, ground planes, cable etc are of the utmost importance too

Have a look at the App. Notes on this page:-
http://www.radiometrix.co.uk/apps/apnt000.htm

There are some useful tips even if you wish to use the cheapest modules on the planet.
 
Top