Hi to all,
I have 2 433MHz transmitters and 1 433MHz receiver. I would like to use these to to control different aspects of a arduino program. The first transmitter will start a Millis Timer() and the second transmitter will stop then millis Timer() . ( no more than 1.5 to 2 seconds time between each trigger)
now I read that these cheap combos do not have individual signatures to distinguish 1 transmitter from another so the receiver might not be able to tell which is which, at least thats my understanding of these.
is there some way to for the program to interpret a different message from each and respond accordingly?? I have tried online but can't find suitable posts. If someone has been down this road I would like to hear their experiences. Thanks in advance
Please post links to the transmitter and receiver. Will an Arduino be connected to each transmitter and receiver? What event will trigger a transmission?
Thanks aarg, Yes both will have an arduino. A NANO each for the transmitters and an UNO for the the receiver. I have a PIR sensor connected to each NANO to relay the signal once motion is detected. here is the link to the radios
Only that I use RadioHead, so I could suggest specific examples. The two are almost the same. VirtualWire should include some example sketches that send a byte or something. You can use the same code to send a simple message. It only remains to send a different "message" which could be a single character, that is different for each transmitter. The receiver just checks to see which one was sent. It's really dead simple.
It's actually because it is so simple, that there are no posts on it.
mechup:
Hi to all,
I have 2 433MHz transmitters and 1 433MHz receiver. I would like to use these to to control different aspects of a arduino program. The first transmitter will start a Millis Timer() and the second transmitter will stop then millis Timer() . ( no more than 1.5 to 2 seconds time between each trigger)
now I read that these cheap combos do not have individual signatures to distinguish 1 transmitter from another so the receiver might not be able to tell which is which, at least thats my understanding of these.
is there some way to for the program to interpret a different message from each and respond accordingly?? I have tried online but can't find suitable posts. If someone has been down this road I would like to hear their experiences. Thanks in advance
No one has been down this road and is still on that road, because you are going to fall in the same trap they did. After even a short time both transmitters will begin to send their message at the same time.
The only way to avoid the trap is to have your receiver unit have the capability to "ask" each "transmitter" in turn to send it's data. You need a "master" to coordinate the operation. So each "transmitter" also needs a "receiver" in order to know when to send it's message.
@mechup, you didn't specify whether your transmitters would transmit periodically, or asynchronously (for example, when a button is pushed). If both transmitters are simultaneously transmitting, no data will get through. So if you are going to use it that way, you have to account for "collisions". The post above outlines one solution. It is not the only way - another way is to transmit multiple messages until one gets through. In that case, the transmit timing should be arranged so they send with different periods between transmissions.
ok. So i will have a bank of LEDs controlled by an UNO and a 433MHz receiver, 20 meters approx. away from the PIR sensors.
when the first PIR sensor detects motion it will send a signal from the first PIR/ NANO/TRANSMITTER assembly. This signal will bring on the LEDs and also start a millis timer()
The second PIR sensor will be at 19 meters approx. from the LEDs and UNO and when this PIR/NANO/ TRANSMITTER assembly detects motion it will send its signal to the UNO to stop the millis timer().
neither PIRsensors will be on at the same time. as I say I'm hoping to send 1 signal and approximately 1or 2 seconds later send the second signal.
once the second signal stops the Millis timer() the program stops and waits to be triggered again by motion from the 1st PIR assembly.
the cycle should be no more than 2 to 3 seconds in duration and at the most I will have maybe 6 cycles / minute.
Now I have the program working on a breadboard. I was using switches to mimic the signals. everything worked fine. I have replaced the 1st switch with a transmitter arangement and that works fine but I'm still using a switch for the second input to stop the millis(). this has me stumped. Sorry or the longwinded explanation but I didn't want to lead anbody astray.
The scenario is a bit different, but the thread linked below explores a concept for sending a synchronization signal over a cheap 433 MHz radio link. To send two different syncs, one would use a different trailing bit sequence and have receiver side software that can differentiate between the two.
I will give that a go and see how I get on , it could be as simple as a different message ,I hope , but the
different length pulses sound promising. I wiil report back as soon as I can.
A serial "message" is a collection of radio pulses for the bits of each character sent.
Unless you have other 433MHz signals to confuse the receiver, you don't need to send whole characters.
It's good to have at least a training preamble to achieve a stable DC operating point for the demodulator, and set the AGC if there is any. It all depends on how accurate you want your timing to be. The leading edge of a raw pulse of variable signal strength could have a lot of sloppiness to it. In fact, though, the comm libraries are not designed to achieve accurate latency in particular, just robustness and end to end data integrity.