# Design options for a simple AVR (Arduino) based RF communication system

I am trying to build an AVR based, RF service calling system. It works like this: someone at the transmitter presses a button and the guy at the receiver get notified with the ID of the transmitter (imagine using this in a cafe to call the waitress, so there will be multiple transmitters with separate ID’s and 1 to 2 separate but identical receivers). Transmitter will have 2 buttons: one to call waitress, and another to get the bill. So essentially this will be one-way communication, and I guess it will be via serial to transmit different information – i.e. ID, call type (?). A range of 100m is more than practical.

I have been searching around on the subject for a while, and I am still not too sure which direction to take, as far as which RF band to use, and whether or not there requires a microcontroller on the transmitter side, which I want to avoid if possible for simplicity and battery saving (on the receiver side I will be using an AVR - with Arduino code-, because I need to drive some 7-segment LED’s to show the ID). My main concerns are reliability and cost.

I hope to be able to run the transmitter out of batteries (e.g. 3V coin batteries or AAA batteries) for about a year. Receivers will be connected to wall though.

I would be obliged if someone could offer some advice on the followings:

• As far as the RF band, my search for components at some local shops shows me that I can buy (build) the following transmitter/receiver modules: 2.4GHz (NRF24L01), 433MHz and 315MHz. I wanted to use the NRF24L01 with an AVR (can program for the AVR to sleep when not active to save battery, and communicate with the AVR at the receiver side via serial) for the simplicity and the wealth of info on the net, but the issue is that the cost is 4 fold compared to the other two. The other 2 modules are Chinese with limited documentation, and I am not too sure yet how to build the transmitter around them (with or without uC), but they are very cheap.

• In terms of reliability and noise/interference, which band is advisable?

• In the best scenario in my imagination, if it is easy to use a 433MHz or 315MHz module (for the price), preferably without a microcontroller, that will be great. Is this easy to achieve? I have seen some cheap garage door remotes based on these bands, with a few buttons on them and a coin battery that run for a year. They are very similar to my transmitter. I just don’t have some working schematic so I don’t know how they work, how they are supposed to be “programmed” to have different ID’s and to communicate with the AVR at the receiver side.

I hope to receive advice on which direction to take. Thanks in advance. Dave

• Coin cells and transmitters aren't a good combination. Transmitters need hundreds of milliamps when transmitting, coin cells provide in the order of 40mA. – Majenko Mar 12 '15 at 10:58
• If range is a need you should also concern with the output power of emitter and sensibility of receiver. – Pedro Quadros Mar 12 '15 at 12:33
• @Majenko: are you sure about that. I believe I have seen quite a lot of the combination, such as what Andy aka says below... – Dave Mar 13 '15 at 6:40

I did a job at 434MHz that used tiny 0.25mW transmitters and a tiny PIC. Battery life was good - over a year because the transmitter consumed virtually nothing for about 1 minute then woke up, transmitted its small payload and went back to sleep (about 50 ms up-time). There were about a hundred transmitters all monitoring the temperature of individual freezers - basically they were "alarms" to warn of impending defrost should one of the freezers become faulty. One central receiver.

Conceptually I don't see a difference - you have a bunch of transmitters all of which can randomly talk to a central receiver. Transmitter current consumption when transmitting was about 30mA (from memory - it was in the early 90s so my memory is not that great on this).

I got the transmitter modules from a UK company called Radiometrix - they were FM 434MHz devices.

Because of the potential for transmit collisions I would also recommend a display that all customers can see that tells them their request is being processed.

• @Dave: are you the person who posted a similar question at Sparkfun? If so, the reason I recommended you buy a few ultra cheap tablets and a PC was exactly for the reason Andy proposed. You're going to have customers pressing the buttons at the same time and the receiver will not get a valid signal due to no collision detection. WiFi would solve this, or you need some type of feedback mechanism, whether it's collision detection or the operator knowing thier message was received. – lyndon Mar 12 '15 at 16:12
• @lyndon: no I am not. Yes now I am aware of that potential problem. I remember reading somewhere that some guy found a clever way to implement it: each time the button is press, transmitter will transmit 4 identical, consecutive packages, in the hope that at least one will reach the receiver. That should solve the problem, shouln't it? – Dave Mar 13 '15 at 6:44
• @Andy aka: Andy, your answer is valuable. Here they sell the 433MHz module so I think I will go with it. Your suggestion about the display is a nice feature. I actually did think of some kind of an Acknowledgement LED on the transmitter (so less distraction for other customers compared to the common display). This however requires two-way communication and for that I think the NRF24L01 should come in handy. I think I am gonna build 2 separate prototypes with both the NRF24L01 and 433MHz and see how they fare. – Dave Mar 13 '15 at 6:51
• Two way comms saps battery life to death because your receiver always has to be listening for an acknowledge. Ok, you could anticipate when the ack is being returned and only keep the receiver powered during that timeslot. You could also sync all transmissions to their own transmit timeslot too with a receiver that looks for a sync transmission from the central unit. This can keep things tidy but, at the expense of battery life and complexity. – Andy aka Mar 13 '15 at 8:40
• I don't quite understand your idea on the sync, but yes, I envisage staying awake maybe a couple hundred ms at most for the ack. The common display is a cheaper option, but I think usability will be dependent on the particular settings of the shop, so I will keep it as the last resort. – Dave Mar 13 '15 at 9:25

I think that your best bet is to start off with the technology used for remote automobile door locks and car starters. These are generally in the 433 & 315 MHz range.

There are specific limits as to how often any one device is permitted to transmit. You really have to check your country's specific permitted use.

There are many advantages to using this technology as the starting point.

1) Range is anywhere from great to excellent. I see systems marketed today that claim more than 1 km distance from transmitter to receiver.

2) Electronics is designed to operate from tiny 12 Vdc battery. This high battery voltage is what makes the long distance operation possible.

3) This technology is extremely inexpensive. Asian-made transmitters and receivers are very inexpensive.

4) It is extremely easy to marry your microcontroller to both the transmitters and receivers. You can also purchase transmitters with built-in microcontroller.

My company did something similar several decades ago but reversed - it was a nursery-call system for churches. We used an off-the-shelf car alarm system from Radio Shack that sent a digital message to a remote pager. We simply modified the encoding portion of the alarm system transmitter so that we could address any single pager out of a pool of perhaps 200 pagers.

Because we didn't have to modify the RF portion of the alarm system transmitter, the certification remained intact. This was a very low-cost way for our company to build these systems.

Radio Shack was extremely helpful when we designed this system - they made it possible for us to purchase hundreds of receive pagers from the company that built the alarm system for Radio Shack. Each pager had an internal DIP switch to set the receive code.

For What It's Worth, this old alarm system used a crystal-locked frequency in the 27 MHz CB radio band. Range was several km.

• Yes, I am taking this direction. I already did a prototype using some off the shelf 433MHz running off a CR2030 with unsatisfactory result. Even with some external wire antenna, the pair stop talking to each other after about 10m (30 ft) with a brick wall in between. Think I will be looking for some 12Vdc module that you mentioned – Dave Aug 21 '15 at 1:42

This application might be a really nice fit for Blue Tooth Low Energy.

BLE was designed from the start for extremely low power remotes like yours. You could use an AVR connected to one of the many BLE chips (lots from TI).

But you might want to consider using an already designed and built BLE module. These things are easy to use, very cheap (less than $10), run for years on a battery, and are ubiquitous. It is also possible that with your application you could just connect the buttons & battery directly to the module and use the pre-programmed software. You could have a prototype working in less than an hour. There are plenty of well designed and easy to use BLE shields for Arduino, but advantage of using BLE is that you can also use any modern cellphone or tablet to receive and display the transmissions from the remotes. You can get BLE capable phones with color touch screens for not much more than an Arduino+BLE shield. This might lead to a better user interface and much less development time. The only potential issue I can see is range. 100m is a little far for BLE using those little modules. If you really need that range, there are solutions. You try upgrading the antennas on the remotes and on the receivers. You could also add hubs around the space that receive the BLE messages and retransmit them on, say, a Wifi network. These could be as simple as a RaspberryPi with a cheap BLE dongle. If you do go with BLE, take a look at the broadcast advertising service. It simple (remotes just blindly send data at periodic intervals) and can send small amounts of data (like the state of a couple of buttons) extremely efficiently. • thanks for yet another option. I will definitely dig it. Right now with what I already have in mind, there maybe a couple of things to consider: 1) The 433Mhz module here is sold for just$1.5 so I think should be much cheaper than the BLE module 2) As you say: range. I need to keep the transmitter as compact as possible so antenna upgrage may or may not be very practical 3)ability to interact with smart devices is a plus. 4) Repeaters would add to the costs... I am not writing this off, but will dig further, thanks! – Dave Mar 13 '15 at 6:57