2
\$\begingroup\$

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!

\$\endgroup\$
  • \$\begingroup\$ What are the sensors? \$\endgroup\$ – Leon Heller Apr 4 '14 at 10:31
  • \$\begingroup\$ IR sensors, but I suppose it doesn't really matter, they are on-off switches as far as I'm concerned \$\endgroup\$ – parakmiakos Apr 4 '14 at 10:33
  • \$\begingroup\$ You do realize that "Arduinos" aren't the only microcontroller implementations in existence, right? If you can work with them you can surely set up a $1 ATtiny at the transmitting end. It'll be much more feasible than trying to cobble something together with 555 timers. \$\endgroup\$ – Matti Virkkunen Apr 4 '14 at 16:58
3
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ I had not thought of the noise on the receiver. I would have hoped that (ideally) no transmission = LOW on the receiver. What kind of micro would you suggest? \$\endgroup\$ – parakmiakos Apr 4 '14 at 10:42
  • \$\begingroup\$ Probably a PIC but that's my preference - virtually any small micro would do the job - any are capable of bit-bashing data rates up to beyond what is reasonable for your Tx and Rx devices. \$\endgroup\$ – Andy aka Apr 4 '14 at 10:50
  • \$\begingroup\$ Thanks. I don't have any experience using microcontrollers. Would I be able to use it for sending my sequence along with any necessary header/checksum data? There's this library for arduino : airspayce.com/mikem/arduino/VirtualWire/index.html would I be able to conform to this kind of transmission protocols? \$\endgroup\$ – parakmiakos Apr 4 '14 at 11:02
  • \$\begingroup\$ I'm no expert on arduino but for a micro it would do what you ask (virtually all of them). Sorry I can't assist on arduinos. \$\endgroup\$ – Andy aka Apr 4 '14 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.