RC Switch

Arnie

New Member
Hi. I have constructed a successful RC Switch but when the TX is switched off, I need to stop the Picaxe 08 from continuing random switching. The prog is as follows.
main:



pulsin 3,1,b1 'read the pulse width from receiver



if b1<150 then sw1

if b1>150 then sw2







sw1:

low 2

low 1

pause 100

goto main


sw2:

high 2

high 1

pause 100

goto main:

Any ideas would be gratefully received.

Arnie







 
 

BeanieBots

Moderator
First off, posting in the main forum will probably get you more responses.
Unfortunately, this is not a simple problem to solve. When you switch off the transmitter, the receiver gain automatically increases until it receives "something". This is usually noise which results in random length pulses.
I have had limited success by testing the pulse to see if it is within valid limits before acting on it. eg:-
off if between 150 and 170
on if between 150 and 130

For a simple on/off command, you will get better results if you test each signal say 3 times before acting on it. If you don't get 3 pulses in a row that meet the criteria, then don't do anything.
 
Top