Help with program

maaca

New Member
Hello I want to send a signal by {three to five seconds} R-F to an input pin on a picaxe to toggle an accessory from on with a signal, and then off with the same signal at a later time which could be days or weeks. Using a transmitter and receiver from E-Bay that goes high when signal received. The smaller ones with coded signal are not powerful enough to cover the distance. In the past Ive used an electronic toggle using a lm556 as in att.file, But this time haven't the room for it on the pc board. Is it possible to even do this with picaxe?. Many thanks your help greatly appreciated.
 

Attachments

Aries

New Member
If I understand your proposed setup correctly, you want to receive a signal via a separate transmitter/receiver combination which goes high when a signal is received (and then presumably goes low when it stops).

Connect the receiver to an input pin of the Picaxe.
Connect the accessory to an output pin (you may need to use a transistor or darlington if the power can't be provided by the Picaxe).

DO
Monitor the state of the pin every second or so (if your signal duration is 3-5 seconds, you can't miss it).
When the pin goes high, keep monitoring it until it goes low again.
Change the state of the output pin.
LOOP

If you are concerned about remembering the state of the accessory (to deal with power outages, for example), then you can save the current state in EEPROM (using READ/WRITE)

During the second or so between each check of the pin, your Picaxe can do other things.

Or, as an alternative to continual monitoring, you might be able to use an interrupt.
 

inglewoodpete

Senior Member
If you just want a wireless link to operate a relay then something like Jaycar's LR8857 may suffice. These have link-selectable pulse or toggle outputs. I think there is a Bluetooth version too. Not as much fun as a PICAXE, of course!

You could probably find cheaper versions on ebay if you want to wait for it to be delivered.
 

maaca

New Member
If I understand your proposed setup correctly, you want to receive a signal via a separate transmitter/receiver combination which goes high when a signal is received (and then presumably goes low when it stops).

Connect the receiver to an input pin of the Picaxe.
Connect the accessory to an output pin (you may need to use a transistor or darlington if the power can't be provided by the Picaxe).

DO
Monitor the state of the pin every second or so (if your signal duration is 3-5 seconds, you can't miss it).
When the pin goes high, keep monitoring it until it goes low again.
Change the state of the output pin.
LOOP

If you are concerned about remembering the state of the accessory (to deal with power outages, for example), then you can save the current state in EEPROM (using READ/WRITE)

During the second or so between each check of the pin, your Picaxe can do other things.

Or, as an alternative to continual monitoring, you might be able to use an interrupt.
Thanks Aries Have worked it out and all good thanks for your input.
 

maaca

New Member
If you just want a wireless link to operate a relay then something like Jaycar's LR8857 may suffice. These have link-selectable pulse or toggle outputs. I think there is a Bluetooth version too. Not as much fun as a PICAXE, of course!

You could probably find cheaper versions on ebay if you want to wait for it to be delivered.
Thanks for your input also inglewoodpete.Unfortunately those boards only cover 40 meters and Im looking at 3000 but thanks anyway.
 

maaca

New Member
Thanks Inglewoodpete. Through a 12 element directional antenna I have covered that distance ok on 433Mhz. However it gets a bit big and have now changed the concept quite a bit. Sorry if I misled you.
 
Top