PDA

View Full Version : Discussion WiFly - A 2.4 Ghz TX & micro RX DIY project


KreAture
Feb 24, 2008, 10:29 AM
This was originally REX but since I abandoned 72/35 MHz in favour of 2.4 GHz I decided it really needs a new thread.

What the WiFly will be/have:
- 2.4 GHz auto-channel hopping using 2-way link-quality control
- 16 bit addressing
- 16 bit crc
- 16 bit channel accuracy (125 ns resolution)
- up to 10 channels
- plug-in TX module for Eclipse 7 / Optic 6 (Also easily connected to other models)
- Both regular and micro RX
- optional LCD display on TX-module showing frequency, address, link-quality and optionally telemetry from RX.

I've been working on it on my spare time for a bit so it is getting close to done. Attached is the TX module pcb pretty much done as well as a preliminary on the pinned version of the RX.

As for the code, my library for the nRF chip I am using is done and seems to cover all it needs to. Together with the already finished code for PWM decoding and LCD I am still only at 994 bytes of code. I am trying to use the ATmega48 so 4k will be maximum. This looks like it will not be a problem.

village_idiot
Feb 24, 2008, 11:20 AM
Is this going to be a DIY project available to all of us? Are you coding the AVR in C or assembler? Anything I can get that helps me learn about C and AVRs is good and I 'll build most of it.

It would be interesting if you could modify the code to use the magnetic actuators that many of the smallest models use for control. All I know about the subject is that they normally consume 2 IO lines to be able to get both directions, and that they use an audio frequency to generate the pulses for how far to move. Higher frequency offers more "ON" time which allows for greater movement.

blanchjd
Feb 24, 2008, 11:40 AM
This looks pretty cool. What 2.4Ghz radio module are you using?

KreAture
Feb 24, 2008, 12:12 PM
I am using the nRF2401 for this version. It offers a second rx channel for backup comms and an internal fifo for use in burst mode. This reduces the time-on-air sigificantly allowing lower power consumption. When it all works as expected, I will be reducing the power by allowing sleep/suspend mode on the radio inbetween transmissions.

As far as what type of project this will be, I am not 100% sure. The design is set up to load firmware via the LCD connector to avoid wasted I/O so I will be offering the firmware images. I don't think I will offer the source as china-companys have ruined my view on this aspect of sharing.

You will not have to modify any code. The first version of the RX will be a pinned one as it offers ease of testing. The next model will be a micro rx with actuator control and built in ESC's. Ideas on how many ESC's are needed would be welcome.
I was thinking of adding 3.
- One pwm controlled directly from channel 3.
- Two differentially pwm controlled from channel 3 but with duiff controled by ch 1 or 2.

Atleast 2 actuator outputs would be needed to allow rudder/elevator but i think of offering more if I have pinns available as this would allow for proportional outputs for ailerons.

The micro version RX will monitor the battery-voltage and relay this back to TX so you will always know how much battery is left.

rmteo
Feb 24, 2008, 01:12 PM
Will the system be limited to 1mW (0dBM) of the nRF2401?

village_idiot
Feb 24, 2008, 01:32 PM
The ripoff artists are really good at reversing the hex code to something that they can use. So if you release it, the potential to be ripped off is about equal no matter how the code is released. Sorry, but I am probably more cynical than you are... My theory is if it works well, and any part of the code is available in any form, it will be ripped off. Even if the code is "locked" in a chip (lock bits, keyloq, etc.) if they want it, they will be able to get it!

They odd part is that almost all of your code is available in chunks from many different places. PPM to serial is available in several different flavors at AVRFreaks, the code for the wireless comms and setup straight from the data sheets, and the code for serial to PWM for the servos available from AVRFreaks again (among other places). The hopping code may or may not be available from data sheets and might be the entire reason to pull your hex file apart. Of course if you can steal the fully integrated design, then it's a lot easier than chasing down all the parts to make it work. This last part is what I'm interested in so that I can learn to put all the parts together myself for use with different chips Like the IA4420/21) for a Plantraco compatible system on 900Mhz, yet at full power and with 8 channels.

Obviously I learn by taking things apart, but I haven't been able to get over the assembler "hump" yet, and still working on C.

KreAture
Feb 24, 2008, 03:41 PM
I learned ASM first. Then C/C++/Java etc.
Anway. I do not want to makje it easy for the people without any moral what-so-ever. I get PM's that simply ask/demand me to hand over stuff ready for manufacture. This really makes me mad.

I have been thinking of locking it down completely, but supplying pre-programmed MLF packages would be a pain. Much easier to allow everyone to flash the code into the chip of a finished board.

Yes, the system is limited to the nRF2401 chip. This is a first step. the nRF2401 has a very good baseline to build on and is readily available here. This is of major importance to me. No annoyance of designing for somehting I'd have to order from abroad.
Besides, if I wanted to make it bulkier to handle higher power it's not that hard even without a different chip. A small amp would handle that while cooking off quite a bit of power...

This setup is not intended for full scale. It is a indoor-ish type thing.
Small planes, confined space. Fiddling a tad with the output circuitry of the nRF can push it to around 4dBm though, not that I think I'll need to.

rmteo
Feb 24, 2008, 03:51 PM
You would also need an RF switch (DPDT) to add the power amp.

KreAture
Feb 24, 2008, 04:11 PM
Not necesarily. Depending on how the nRF is designed one can possibly design the amp so it is inert when the RF is not active. Only a single transistor is needed as the amp. (Look into class-e amplifiers.)

Anyway, this is a NON issue. It will be based on the nRF and it will use the power the nRF can deliver. I am designing it for short range and the goal is to make the ultra-small receiver with actuator control and built in ESC's. EOD.

I have designed the PCB for the TX so that it can be etched at home without special tools. It contains few links between upper and lower side and all are large to accomodate manual linking. The RX PCB will also be a tad larger than necessary to accomodate vias but so be it.

When done I will publish final PCB stencils.
If you were to line theese up with a pcb between, sandwiched between some glass to hold it and simply expose to sunlight for about 1 minute on each side you woulbe be ready to develop abd etch it. Not even a UV table is needed.

If this works well enough for a indoor system I will have smaller boards made professionally. This will shave weight off the receiver.

tclark
Feb 26, 2008, 01:08 PM
This looks to be an interesting project. I have been thinking of tinkering with some of the 2.4 GHz chips also, but you are much further along in playing with them. The Nordic transceiver is very cool, I like the 2nd receiver option. I see they also are integrating an 8051 core with their transceivers, which will make for a nice tiny solution. I don't think their parts are easily obtainable in the US though, at least not at the distributors I am used to dealing with. I have been leaning towards trying either the Cypress parts (same family used in the Spektrum radios), or the TI parts (they bought ChipCon).

If I interpret your PCB layout correctly, it looks like you are placing the microprocessor on one side of the board, and the radio chip on the other. Most reference designs I have seen for the 2.4 GHz stuff use a solid ground plane on the back side of the board. It will be interesting to see if your design has an impact on range. I'm not an RF guy, so I don't really know how critical the solid ground plane is. 2.4 GHz is way higher frequency than anything I have played with previously.

Keep up the good work, I am tuned in to see how things progress.

-Tracy

KreAture
Feb 26, 2008, 08:32 PM
Tracy, I am using ground planes both under the nRF chip and under the AVR. By stacking like this I just ensure that no routing will happen under the chips. I am hoping/betting this to give the lowest DIY interference.

Also note that I have a solid groundplane under most of the 2.4 GHz output all the way to the antenna connection.

village_idiot
Feb 26, 2008, 08:50 PM
Ground plane is heavy!

mcross
Mar 04, 2008, 07:27 AM
Hi KreAture,
I'm very interested in this for my micro jets. What kind of range are you expecting to have. I'd like about 150 meters but 100 would work, is that possible? Any idea when it'll be available?
Thanks,
Mike

KreAture
Mar 04, 2008, 11:58 AM
The specs for the nRF sais around 80 meters or so. I won't know till I test it though.