Hi,
Anyway, i have a few questions about it… hopefully you guys can help me out…
-
I’m interfacing it with a AVR Atmega128. I’m designing my board for the mega128 using eagleCAD. My Question is, how should i mount the mirf on this board?? Sure i use right angle headers and have it stand perpendicular to the board?? To the header pins provide enough support?? Basically, what’s the best way to attach this bad boy to aboard??
-
I don’t know too much about antenna theory so, are there any considerations i should take given that i will be moutning this board onto another PCB (the one i design using eagle)?
-
As far as the interface goes. What do you guys recommended? Should i just connect the mirf to General I/O pins and make my own little serial interface… or should i connected it to a Serial port on the micro controller (USART)??
-
when operating in the shock burst mode. With either clocking in data for TX or clocking out data for recieve… do you have to keep a precise timing?? for example, do i have to insure that my clock signal to the board is consistent?? like does it always have to be 5KHz or 10 Khz… or turing transmission can it be varied… basically what am i asking is am i gonna have to use timed interrupts to make sure i clock data in and out consistently?
-
Last, do you guys know where i could go to just learn about antennas in general?? i never took an antennas class… i wish i could… but you cna only take so many classes before you graduate
-
The datasheet shows an example of 10Kbpsfor clockign data in and out in shock burst mode… can i go faster??? it seems like you can go as fast as 1Mbps… could i clock at say… 900kbps??
as i said before… i plan to run this badboy in the shock burst mode…
thanks.
OH yeah… on more question…
how would having this bad boyencased in ABS plastic or acrylic work out???
First and foremost, I have both the MiRF and the MiRF-v2 boards, and unless you have already purchased the MiRF, I would definitely recommend the MiRF-v2 board.
-
I’m sure somebody will have a better answer for this question than me, but from what I’ve read, most antennas perform better mounted vertically, so I would probably recommend some right-angle headers to attach the MiRF to your main board. I think SparkFun recommends this on their write-up for the MiRF board, also.
-
None that I know of, but I never took any antenna classes either 8) .
-
The best way to do this is to use the built-in SPI port if your AVR has one (I’m not familiar with AVR micros). There is an appnote on the Nordic site that shows how to convert the nRF2401’s one-wire data interface to a two-wire SPI version. It only requires a couple of resistors and is very simple.
-
Definitely use the Shockburst mode as it will save you time and effort. You don’t have to keep any particular clock frequency as long as you don’t exceed the maximum frequency stated in the datasheet. However, if you use SPI, it will handle it for you automatically, freeing up your micro to do other stuff.
-
Google searches will always do you well. You could try Amazon, too. Once again, I’m sure there are others with better knowledge of this than me.
-
You can certainly go faster than 10kbps. 900 kbps will work just fine, as will 1 Mbps (but not faster than that). Just as an aside, the MiRF-v2 with the nRF24L01 has a real SPI interface that can handle up to 8 Mbps, and the chip can transmit at 2 Mbps, double the capacity of the nRF2401.
-
As with anything wireless, if you mount the antenna inside something, you’ll decrease your potential distance. This is another reason I like the MiRF-v2 as you can get it with a coaxial connector that you can connect to an external antenna.
Hope all this helps.
yes, you have helped me a lot… as a matter of a fact… i think i might go with the V2 then… hell i don’t even have to level shift anymore because it accepts V as a power supply input… sweet deal… i’m gonna have read the data sheet later though… just to make sure i can work with it…
the AVR does have SPI bus capabilities
however i’m gonna have to keep doing research before i make a decision
Is there a coax cable that goes with this??
can yo ueven use one?
So how exactly would i mount this thing off a box?
I’m also going to have a 5V regulator on board… will that be good to power this thing??
yes, you have helped me a lot… as a matter of a fact… i think i might go with the V2 then… hell i don’t even have to level shift anymore because it accepts V as a power supply input… sweet deal… i’m gonna have read the data sheet later though… just to make sure i can work with it…
The V2 also only takes 3.3V as VCC, so be careful with that.
Is there a coax cable that goes with this?? can yo ueven use one?
If you want to use a coax cable with it, you’d have to find an antenna that you can panel mount to your box and connect the cable between the board and the antenna. Otherwise, you’d just cut a hole in the side of your box and attach the antenna to the board through it (you’d obviously have to mount your board very close to that side of the box).
So how exactly would i mount this thing off a box?
If you’re talking about the antenna, see above. If you’re talking about the board, you’ll need some threaded standoffs and screws that attach to them. Glue the standoffs to your box and screw your mother board onto the standoffs. Then attach your MiRF via headers to the motherboard.
I’m also going to have a 5V regulator on board… will that be good to power this thing??
You CANNOT power the nRF24L01 OR the nRF2401 with 5V, only with 3.3V. If your AVR will run on 3.3V, you can simplify your circuit and only use a 3.3V regulator. Otherwise, you will have to have separate 5V AND 3.3V regulators. Make sure that if you do that, you don't run the 3.3V in series with the 5V. Connect the input of each regulator to your main power source (like a 9V wall-wart, for example).
The sparkfun board says it has a regulator on it thatwill drop it to 3.3V
Is it possible to use one system for both RX and TX
I want to set up 3 units… unit 1,2, an 3,
what i want is unit 1 to communicate with 2, and 3 bi directionally (two way communication)… i don’t need unit 2 and 3 to talk to each other… cna tha be done with only 1 antenna system per unit?
As far the 5V situation… so… it woudln’t be a good idea to have the 5V regulator output… go into the sirm board that has a 3.3V regulator in it? i have to use 5V cause i have other stuff that runs on 5V…
my system can take a 9V wall mount supply… or 9V battery
I think i may stick with V1… the power supply situation works out better… i don’t need a lot of range either… i just hope the plastic doesn’t reduce it too much (I don’t wnat to be reduced by more than half)
V1 doesn’t have an onboard regulator… os i cna feed the 3.3V directly from the regulator I will have on my PCB
The sparkfun board says it has a regulator on it thatwill drop it to 3.3V
Must have missed that in the spec. My fault. I normally keep 5V and 3.3V supplies around so I just assumed the v2 was like the v1 and powered it via 3.3V.
Is it possible to use one system for both RX and TX
Yes, you simply toggle the PRIM_RX bit in the v2 to change from TX to RX mode and back. I forget how to do it with the v1 as I don’t use it anymore.
what i want is unit 1 to communicate with 2, and 3 bi directionally (two way communication)… i don’t need unit 2 and 3 to talk to each other… cna tha be done with only 1 antenna system per unit?
I’m sure you could do this somehow, and once again I’m no RF expert (I’m a digital kind of guy). You will likely require some extra components to multiplex the antenna between your 2 and 3 units. I personally would probably just get an antenna per chip, but that comes down to a money/time thing.
As far the 5V situation… so… it woudln’t be a good idea to have the 5V regulator output… go into the sirm board that has a 3.3V regulator in it? i have to use 5V cause i have other stuff that runs on 5V…
Nah, by all means use the regulator. It should also work fine in the reverse direction, as most 5V gear will sense a high input at around 2.5 to 3V. Therefore, your microcontroller should be able to get correct low and high triggers from your 24L01 or 2401 at 3.3V without level transition in the upward direction (3.3V → 5V).
I think i may stick with V1… the power supply situation works out better… i don’t need a lot of range either… i just hope the plastic doesn’t reduce it too much (I don’t wnat to be reduced by more than half)
V1 doesn’t have an onboard regulator… os i cna feed the 3.3V directly from the regulator I will have on my PCB
Once again, ignore my comment about having to have a separate 3.3V regulator. Since the v2 board has one on it, there really isn’t much reason for you not to get that one that I can think of (if anything, debugging a v2 is exponentially easier than a v1 because you can read the v2’s internal registers - not so with the v1). Also, the MiRF-v2 with the coax connector (SKU RF-MiRF-v2-RPSMA) is the cheapest of all the MiRFs at $15.
Thanks, i’ll keep reading datasheets and think about this
Wow 7.7 inch antenna?? lol
which antenna would you recommened? the bigger one or the smaller ones??
i’d preffer smaller… but should i go with the bigger one?
I’m talking about the RP SMA antennas
I would probably recommend reading up on antennas a little before you make your choice. As far as SparkFun’s antennas, they should all work reasonably well, and since you said you didn’t need much range, I would just go with the one that’s either the cheapest or best suits your own personal size needs.
This shold be my last set of questions before i decide to dive in
what do you recommend? Shockburst mode, or enhanced shock burst? I’m thinking of going enhanced, it seems like something i would like to have… unless there is something i should be aware of?
The SPI system on the AVR can only send 8 bits at a time. Is that okay? say i want to send 10 bytes of payload at a time in shock burst mode. Would it be okay to send a byte, then pause, then send another byte then pause… etc… etc… so long as the CSN pin is pulled low and i’m in TX mode?
just to make sure, It shuld be okay to take the 9V inputm run it through my 5V regulator, and then pass that 5V into the chip/antenna module right?? because the module cannot take 9V, but it could take 5V… are we sure it’s okay to chain regulators like that?
The CSN pin, when pulled high, does that tri state the MISO pin on the RF chip? and does it shut down the SPI? because i want to have more than on device on th SPI Bus… so long as CSN is high, i can talk to other devices via their Slave select pins right?.. that’s the hwole point of the SPI bus right?
As far as antennas go, they tend to have a rating… for exmaple… 5dBi … what exactly is ment by dBi?
I appreciate it Soooooo much that you’re answering all these questions… people like you ar a live saver… i really appreciate it… i feel soooo much more confident in getting this thing to work now…
I’m pleased that you organized your questions in one post this time instead of 3 or 4 :lol: .
-
I haven’t really done much experimentation with enhanced shockburst, but overall it seems to be the way to go. All the projects I’ve worked with so far are relatively simple and short-distance, so no error-checking is necessary. Also, enhanced shockburst is a bit more complicated and harder to debug.
-
Yes, you should use 8 bit mode. You simply keep the CSN input of the 24L01 chip low for the entire time that you are sending contiguous data as you mention. And, yes, you are correct that as long as your CSN is low, you can wait as long as you want between byte transmissions AS LONG AS your SPI clock doesn’t keep running.
-
As I noted before, it is generally not a wise decision to chain regulators. If you do indeed decide to do it this way, I would definitely recommend putting a pretty decent sized capacitor (like 100 uF) as close to the VCC input of the MiRF as possible to cut out noise. This cap would go between VCC and ground, obviously.
-
As far as I can find in the datasheet, MOSI (not MISO, which is an input) will go to Hi-Z (aka tri-state) when the chip is not sending anything on its bus. MISO, being an input, is technically always Hi-Z. I personally have this on my SPI bus on a Philips LPC2148 with a couple of other devices and it plays very nicely.
-
That is generally the gain of the antenna (dBi stands for decibels isotropic…you can look it up on google for more in-depth info). Higher gains mean just that, they provide a signal gain which allows your signal to go further and be stronger in general. Be careful choosing antennas, however, as the MiRF breakout board is made to go with monopole (aka single-ended) antennas, as it has the impedance matching network.
I personally enjoy helping people, but on this part in particular. When I was doing development with it, very few people on here had any experience with the 24L01 as it was a new part, so I sort of had to waste time making tons of mistakes along the way. I also posted C language include files on here that you can use for reference (search for nRF24L01.h or nRF24L01.c to find the post they’re in). You are free to use them if you’d like, but you have to define 3 or 4 functions of your own to work with my library. It’s also very well-commented.
okay,
so if chaining is bad… is there a way i could drop the 9V or 12V down to something like 6V, so I can stick the 6V into the board of the wireless module???
perhaps using Zener diodes??? the only issues is… Zeners can only handle 2 watts of power… but i guess thta’s not a big issue since this device is pretty low power…
You could certainly try that route (most Zener circuits also use a current-limiting resistor - just google for power supply circuits using Zeners and you should find a bunch).
If it comes down to it, you could always just put a low pass filter (one resistor and one capacitor - the resistor will need a decent power rating though) inline after the 5V regulator (I’ve seen this done on chips that have a common analog and digital input).
You could also try to find a lower voltage wall-wart. Heck, you could just get a regulated 5VDC wall-wart that would eliminate the need for a 5V regulator chip all together. This would also allow you to easily power your 3.3V regulator on the MiRF.
If none of those work, you could still use the capacitor across the inputs to your MiRF. It would probably help to put another smaller ceramic cap (like .1uF or 1uF) in parallel to the big electrolytic one to help more with higher frequency nasties.