Electronic – arduino – RF transmitter connected directly to sensor

arduinoRFsensorwireless

I am trying to implement the following :

I got 2 (more than 1 anyway) distinct sensors and an arduino and I need to get the sensors' state wirelessly.

Here is what I have thought of so far:

As for the wireless part, I am going with 2 RF transmitters and an RF receiver (433Mhz – found this on ebay)

My problem is, I need to distinguish between the 2 RF transmissions. I do not expect them to go off at the same time, but I can't simply send a simple HIGH transmission. And I don't want another arduino controller simply to handle the sensor.

My thoughts were to implement a custom bit sequence per sensor using the following :

  • a 4-bit counter plus some logical gates to create the sequence
  • a 555 IC in astable mode serving as a clock
  • a 555 IC in monostable mode triggered by the sensor, triggering the RF transmission

Would this work? Will I have a problem receiving the sequence with my arduino?

This is actually my first try in electronics, so any help will be appreciated. I am open to suggestions if my thinking above wouldn't work.

Thanks in advance!

Best Answer

It's a bit more complex than you think: -

enter image description here

You probably need to send a preamble of data first to lock the receiver into your transmission. Before the preamble is sent your receiver is trying to lock into any old noise and glitches coming thru the ether. Halfway along the horizontal in the picture above is where a transmitter starts sending a preamble - it might take several milliseconds for the receiver to "lock-in" - see the blue curve and note that after a short time the receiver is reproducing the data preamble.

This means you need to recognize the preamble and then at some point expect to receive a valid header byte - this can simply be an address that is expected i.e. 100 from sensor 1 and 200 from sensor 2 - the numbers don't matter just the fact that they are different and recognizable.

Then you transmit your data then you append an error check.

That's how a lot of devices will work. Without sending an error check byte(s) you cannot possibly know that what you have received is a reasonable representation of what you sent. You could repeat the data several times and compare numerically the sent data - if it's the same number, then some level of confidence can be gained.

If you want my advice - throw out the 555 ideas and use a small micro.