#avr Logs

Nov 15 2017

#avr Calendar

05:51 AM limpkin is now known as limpkin_irc
08:05 AM nuxil: yay. my parts has arrived. atmega324p :D
08:06 AM nuxil: its soo big..
08:06 AM nuxil: i only messed with atinys before :D
08:11 AM _ami_: nuxil: nice, did you mean 328p?
08:11 AM _ami_: or 324p?
08:12 AM nuxil: 324p-20
08:12 AM nuxil: pu
08:12 AM _ami_: oh, never heard of them.
08:14 AM nuxil: but i have no programmer for it.. so 1st taks is to make one :D
08:38 AM pebble`_ is now known as pebble`
03:10 PM hetii: Hi :)
03:11 PM hetii: Do I need to implement pipes mechanism when use multiple nRF24L01 modules in the same network or should all of them have the same rx address and then by checking some payload data recognize with one sender transmit data?
03:13 PM LeoNerd: I don't usually bother with the pipes
03:14 PM LeoNerd: Depends on properties of the communication you want I suppose
03:15 PM LeoNerd: In my setup, I have one base station and several slave nodes. Messages are rare. Some messages have a multicast property to them, some are unicast
03:15 PM LeoNerd: So what I actually do is just use one frequency for all, and two addresses, one for slave->master, one for master->slave. So every slave node will receive every broadcast by the master, but my own internal framing will tell them whether to pay attention or not
03:17 PM hetii: LeoNerd, in my case I also will have one master and multiple slaves, I decide to use this libs https://github.com/kehribar/nrf24L01_plus/blob/master/tx_example/main.c
03:17 PM hetii: and now the addressing is not clear for me.
03:18 PM hetii: in the past when I use se8r01 modules I change last byte in address and was able to recognize transmitter by pipe
03:18 PM LeoNerd: Oh also, transmit pipelining is more awkward if you use multiple addrsses
03:19 PM LeoNerd: Yah; so in nRF24s you have one transmit address (but you just set that before you transmit a packet, so really you can transmit to whatever), and 5 receive addresses
03:19 PM LeoNerd: Pipe 0 has an address, pipe 1 has an adress; those are all arbitrary bytes. To save memory the chip only remembers the final byte of the addresses of the other pipes, reusing the first bytes of pipe 1
03:20 PM LeoNerd: One thing I /could/ do (but I don't) is to use one address for all the slaves to receive broadcasts, and one address on them each to receive unicast messages
03:21 PM LeoNerd: I don't, because my system is actually a mixed nRF24 radio + RS-485 wired bus system, and I need the packets themselves to identify properly over RS-485, so I just reuse the same code for both and ignore the fancier addressing abilities of nRF
03:22 PM hetii: ok but is there any reason to play with pipes? for eg what happen when multiple transsmiter will send packet to the same receiver address?
03:22 PM hetii: by using pipes do I avoid collision ?
03:26 PM LeoNerd: No, the pipes aren't a radio collision mechanism, they're a local CPU mechnaism
03:26 PM hetii: By "and 5 receive addresses" you mean totally different one or just unique the last byte ?
03:27 PM LeoNerd: Multiple transmitters on the same (or even adjacent) radio channels will still collide
03:27 PM hetii: I see
03:29 PM LeoNerd: The addressing mechanism lets you reduce local CPU time on slave stations if you have lots of slaves and lots of unicast messages. it means the CPUs don't have to wake up except for a packet to their own address
03:30 PM LeoNerd: The idea behind multiple pipes just lets you have multiple addresses, in case for some reason you needed more. E.g. my suggestion with unicast + broadcast above
03:35 PM hetii: LeoNerd, How about the tricks to get better performance of those modules? I read about additional cap soldered in power legs as well about 10K pullup on CSN line and reducing speed to 250kbps
03:36 PM hetii: also not clear about maximum power on se8r01 there is possible to set +5dbm in nrf24 datasheet I read about max 0dbm but on some forums there was some notice that some of them support also +5dbm
03:37 PM hetii: so how it is from your experience?
03:37 PM LeoNerd: You verymuch need the 10µF cap on there. The chip tends to crash without it
03:37 PM LeoNerd: I'm surprised it doesn't come with one on the board
03:37 PM LeoNerd: The pullup really doesn't matter, that's just up to your circuit design
03:38 PM LeoNerd: "Better performance" is a vague term. What performance metric are you trying to improve?
03:38 PM hetii: general range and radio stability
03:39 PM LeoNerd: For range you want the radio as loud as possible and the bitrate slow
03:39 PM hetii: LeoNerd, my boards: https://photos.app.goo.gl/zzc9b1Pb0Aw9tM133
03:40 PM LeoNerd: Which is prettymuch exactly opposite to what I do, to preserve battery life
03:40 PM hetii: my units are powered from main AC so I don`t care much about power consumption
03:45 PM hetii: Also I read somewhere that having a small delay like 20ms on receiver side so when checking RX_DR register also make this radio more stable
03:46 PM hetii: at the end I probably will use interrupt before check this registry to don`t lose frames in that 20ms delays
03:46 PM hetii: if that make sense of course
03:46 PM LeoNerd: I don't know what that delay is about; I haven't added one to mine
03:48 PM hetii: I see, ok will test it :)
03:49 PM hetii: in your case all slaves receive some data from master?
03:49 PM hetii: so is that means that all of them have unique rx address ?
03:56 PM LeoNerd: No, as far as the nRF is concerned every slave has the /same/ address
03:56 PM LeoNerd: Every slave receives every message sent on radio. My own sub-framing protocol inside that message then identifies whether it should pay attention or ignore it
03:58 PM LeoNerd: So every slave does have its own ID, but the nRF radio module doesn't concern itself with that
04:01 PM hetii: what about master? have also the same receive address as slaves and use that framing to know where should take action?
04:01 PM LeoNerd: No, as I said there's two addresses I use
04:02 PM LeoNerd: <LeoNerd> So what I actually do is just use one frequency for all, and two addresses, one for slave->master, one for master->slave. So every slave node will receive every broadcast by the master, but my own internal framing will tell them whether to pay attention or not
04:03 PM hetii: yhym
04:03 PM hetii: ok need to play more with my radios then :)
04:03 PM hetii: thx for tips
04:03 PM LeoNerd: These radios are what I wrote https://metacpan.org/pod/Device::Chip::nRF24L01P for
04:03 PM LeoNerd: and actually in turn had to write the Bus Pirate stuff, and allsorts
08:53 PM day__ is now known as daey