Pages: [1]   Go Down
Author Topic: Wireless Programming with RF (nRF24L01+)  (Read 1895 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Edit/Update April 22nd:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Restating my problem:

I am building a device which I have no way to physically interface with, once activated. It is very probable that I will be improving/modifying the software side of things, as time goes on. I want a way to change the code running on the Arduino.

Current setup I am considering:

a nRF24L01+ with a dedicated Arduino Pro Mini(a) for communication (this breakoutboard: http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53) and an additional Arduino Pro Mini(b) for logic.

Arduino a runs software which enables it to forward messages between Arduino b and RF module. Arduino b handles the rest of the logic.
The sketch on Arduino a would be permanent, and I could reprogram Arduino b via Arduino a.

Questions:

Well. Actually. I don't even know where to start. I plan on ordering the parts next week and start tinkering, but I would really apreceate some more feedback

a) Is this feasible?
b) Is there any other/better way of doing this?
c) How would you go about it - are there any similar projects you know of?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


this is my original post:

Is it possible to use the nRF24L01+ chip to send sketches to the arduino?

Using one of these breakout boards as the receiver:
http://www.sparkfun.com/products/691
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53&zenid=jpdvhl54i61124np272uj4ue62

And this here (in combination with one of the breakouts) as sender:
http://www.sparkfun.com/products/9019

I feel like I might need an additional controller to read the signal from the RF module and then output a serial signal to the Arduino. Ideally I would not want to use an additional controller. Is it possible?

I'd appreceate suggestions and comments

Thanks

p.
« Last Edit: April 22, 2012, 07:09:36 am by fkeel » Logged


Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


let me ask my question in a more specific way.

the nRF24L01+ connects to the Arduino, and is controlled by the Arduino via ISP. Is it theoretically possible to upload a sketch to that Arduino via that ISP connection?
Logged


Maryland, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, not sure how the nRF works but for it to act like an ICSP programmer, it would have to be able to suddenly become an SPI "master", there'd have to be some kind of GPIO output built into the nRF which can be tied to RESET.  Doubtful that this is feasible but I haven't read the datasheet for the chip yet.  I intend to use this for a project in the near future though.

If this chip can only communicate via SPI then you couldn't use it to do normal serial USART arduino bootloader-style programming, so that's out.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

nRF24L01+ only communicates as an SPI slave.  It has no master pin.  It also does not have available GPIO pins.

Nordic does have another module, the nRF24LE1F which according to its datasheet, can act as both an SPI slave or SPI master.  However I don't know anyone that sells a complete module with that IC on it.  Most of what you'll find are the 24L01+ ones.

Their nRF24LU1+ can also act as an SPI master and slave and also has USB built in, though I believe that's just a USB device, not host.

I have used the regular 24L01+ extensively in various projects.  They're quite fun to play with.
Logged

Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ok. so I want to build wireless re-programmable sensor nodes, and I really would like to use the 24L01 for the multiple pipes.

could I use the 24LO1+ to communicate with two ATmega328 simultaniously?

ATmega #1 just sits there most of the time, while ATmega #2 does all the logic of the sensor module.
Except when I send a specific command, which activates ATmega #1.
I then use the ATmega #1 to reprogramme ATmega #2 ?

Ahhh... I am way out of my water here. Does this make any sense?

Any other suggestions on how to create ~5 sensor nodes, which can communicate with each other as well as with a central hub and which I can remotely upload sketches to?

Logged


UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12520
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the end result which you're trying to achieve which you think will need wireless sketch uploads? I doubt that is feasible, but perhaps there is another way to achieve your end result.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok. so I want to build wireless re-programmable sensor nodes, and I really would like to use the 24L01 for the multiple pipes.

could I use the 24LO1+ to communicate with two ATmega328 simultaniously?

ATmega #1 just sits there most of the time, while ATmega #2 does all the logic of the sensor module.
Except when I send a specific command, which activates ATmega #1.
I then use the ATmega #1 to reprogramme ATmega #2 ?

Ahhh... I am way out of my water here. Does this make any sense?

Any other suggestions on how to create ~5 sensor nodes, which can communicate with each other as well as with a central hub and which I can remotely upload sketches to?

Sounds feasible.  You'd connect the rf24l01+ to the master atmega and connect that to the slave atmega via the hardware serial ports, and also connect a GPIO from the master to the slave atmega's reset pin. Then the master can reset the slave and program a new sketch into it, receiving the sketch via the rf24l01+.

You'd need to create a serial protocol so that the slave can send and receive messages via the rf24l01+ from the master atmega.
Logged


Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

this is the edit of my original post. just reposting instead you skipped my first post and went directly to the bottom.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Restating my problem:

I am building a device which I have no way to physically interface with, once activated. It is very probable that I will be improving/modifying the software side of things, as time goes on. I want a way to change the code running on the Arduino.

Current setup I am considering:

a nRF24L01+ with a dedicated Arduino Pro Mini(a) for communication (this breakoutboard: http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53) and an additional Arduino Pro Mini(b) for logic.

Arduino a runs software which enables it to forward messages between Arduino b and RF module. Arduino b handles the rest of the logic.
The sketch on Arduino a would be permanent, and I could reprogram Arduino b via Arduino a.

Questions:

Well. Actually. I don't even know where to start. I plan on ordering the parts next week and start tinkering, but I would really apreceate some more feedback

a) Is this feasible?
b) Is there any other/better way of doing this?
c) How would you go about it - are there any similar projects you know of?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

basically I am planning on doing what dhunt suggested. I just would really like some more opinions ....

Any comments or thoughts are highly apreceated

Cheers

p.
« Last Edit: April 22, 2012, 07:11:54 am by fkeel » Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Arduino b handles the rest of the logic.
The rest of the logic of reprogramming itself? When you reset Arduino b to get to the point where you can load the new code, how do you propose to get that code from the radio?
Logged

Offline Offline
God Member
*****
Karma: 2
Posts: 711
a, b = b, a+b
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

no, sry. that was imprecisely formulated.

Arduino A, forwards data between Arduino B and RF module. Arduino A also is fully in charge of reprogramming Arduino B.

Arduino B takes care of the logic such as, when to log information, when to send it, when to give feedback and all the other issues in regards with my actual application.

*

Is this feasible? As in, is this a problem someone with mediocre programming skills, but, lots of patience and enthusiasm can realistically solve within a couple of weeks?

p.
Logged


UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12520
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Is this feasible? As in, is this a problem someone with mediocre programming skills, but, lots of patience and enthusiasm can realistically solve within a couple of weeks?


It sounds feasible to me, although the combination of 'mediocre programming skills' plus 'within a couple of weeks' might be tricky.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: