multiple wireless push buttons NRF24L01+

Discussion about wireless devices

multiple wireless push buttons NRF24L01+

Postby Rubo » Sun Oct 20, 2013 6:28 pm

Hi everyone,

I was referred here from the Arduino Forum, since I have some questions about the NRF24L01+ transceiver programming. What my collegue and me want to do, is to wirelessly connect up to six push buttons to my arduino. Right now we have a cable based solution, but we want to upgrade.

All we need to do is to recognize, when a button is pushed and which one it is of course. As far as I understand, there are two different possibilities:

A: use the module connected to the Arduino as a Multiceiver and listen to six different adresses (assigned to the buttons) until something happens.
B: use the module connected to the Arduino to only listen on one adress and have each button send a different code, when it gets pressed.

I would prefer version B, because it's more flexible but I can live with both.

What I'm looking for, is a tutorial that fits or maybe even code snippets. Most tutorials are connecting two or more Arduino boards, but we have just one board and some simple transmitters.

I guess it makes sense to have the push buttons modules powered on all the time in a low power state and wait for a button press. Or should it only get powered on, when the button is pressed and the circuit is closed?

Thank you very much in advance for some help!

PS: Of course I'm going to read through the tuts here, but I was wondering if anyone has done something similar...
Rubo
 
Posts: 4
Joined: Sat Oct 19, 2013 6:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby brennen » Mon Oct 21, 2013 12:10 pm

Rubo wrote:What I'm looking for, is a tutorial that fits or maybe even code snippets. Most tutorials are connecting two or more Arduino boards, but we have just one board and some simple transmitters.

I'm not sure if there are existing tutorials, but it wouldn't surprise me if there were.

Rubo wrote:I guess it makes sense to have the push buttons modules powered on all the time in a low power state and wait for a button press. Or should it only get powered on, when the button is pressed and the circuit is closed?

I would agree with this. Put the transmitting micro to sleep and then have a button press wake it up. You could also power down the L01+ while the micro was asleep, but you would have to wait for it to get powered up until you could send out your RF packet. As for the receivers, the easiest way to run them would be to have them powered up all the time. However, you could certainly devise a scheme such that they were only on for certain portions of a time period. The TX would need to know when they're listening, so the RX could send out a message to indicate it was up, or else the RX and TX could be time-synchronized to turn on at the same time to communicate.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby Rubo » Mon Oct 21, 2013 6:36 pm

hi brennen,

thanks for the advice. the receiver will be powered up all the time. right now we have a cable based solution which raises the potential of one of six pins, to let the controller identify which buzzer was pressed. we are now looking to combine both methods, so that we can use them simulatenously or switch to cables, if we need to.

my question is: can one arduino microcontroller handle the cable based solution and the wireless communication at the same time? in the end we need to send a signal to the computer when a buzzer is pressed. if the work load would be too much, my idea would be to hook up a second controller to the NRF module which handles the wireless communication and if a push buttons press is detected, raises the potential of the pin (which normally happens on the cable based solution). in that way, we could combine both methods...

does this idea make sense or is there a much simpler solution to that?
Rubo
 
Posts: 4
Joined: Sat Oct 19, 2013 6:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby brennen » Mon Oct 21, 2013 7:26 pm

I'm not sure if I'm reading your messages correctly, but you do know that the L01+ has to have a microcontroller connected to it in order for it to do anything at all, right? If you're doing a wireless link, you'll need an Arduino on both sides of the link. As far as bandwidth, what you're doing shouldn't be taxing at all on the Arduino.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby Rubo » Mon Oct 21, 2013 7:57 pm

sorry, i think i was not really clear with my message. on the push button side, maybe we combine the L01+ module with a simple microcontroller (not a complete boards) like an attiny since it only needs to transmit some simple data. on the receiving side we have an arduino board (micro or nano). my question is, if the arduino microcontroller is fast enough to handle the wireless communication as well as the cable based solution. the alternative would be, that we use a second microcontroller next to the arduino, which handles the wireless solution and lets the arduino controller know, when a button is pushed so that he can send a signal to the attached pc.

i hope it is clear what i'm aiming at :)
Rubo
 
Posts: 4
Joined: Sat Oct 19, 2013 6:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby brennen » Tue Oct 22, 2013 12:54 am

Yeah I can't see any reason that you could use both transmission methods with one microcontroller.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby Rubo » Tue Oct 22, 2013 9:53 am

brennen wrote:Yeah I can't see any reason that you could use both transmission methods with one microcontroller.


i guess you meant to say, that you can't see any reason why we shouldn't be able to have both solutions handled by one microcontroller. and would the ATmega328 really be powerful enough or should be buy an Arduino MEGA 2560 board?
Rubo
 
Posts: 4
Joined: Sat Oct 19, 2013 6:15 pm

Re: multiple wireless push buttons NRF24L01+

Postby brennen » Tue Oct 22, 2013 8:07 pm

Neither of those things should be very taxing (in my opinion), so I would probably go with the smaller and cheaper micro, as long as it had enough pins.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm


Return to Wireless

Who is online

Users browsing this forum: No registered users and 1 guest

cron