- Posts: 1386
Developing a universal module
- victzh
- Offline
PhracturedBlue wrote: I haven't looked at Midelic's code, but every Arduino solution I've seen (which uses our protocol code) has ended up significantly modifying it to run on Arduino. I don't understand why to be honest, as it means more work for everyone because bug fixes can't easily move between projects.
My reason is simpler and probably less excuse - historical. I wrote a small TX code handling sticks and radio for V202 protocol and THEN ported it to Deviation. Later I modified at least some parts of my code to make such ports easier - the stick range is -10000..10000 as it is in Deviation, but that's probably it. Arduino is C++ basic and I followed it in using nRF library (which is C++ class) and it would require to recode it as C pseudo-class. It's less convenient, so I did not went this way the first time.
I probably should take a look again and bring my Arduino code to Deviation as close as possible to facilitate the development (at least my own), but I never expected it to be useful more than one time (now it is 4th time I use this code and port every time to Devo ).
Please Log in or Create an account to join the conversation.
- blackmoon
- Offline
- Posts: 402
If you want to use telemetry, you should wire:
PA_EN to GDO0
LNA_EN to GDO2
Does the module's 1.2rev have those pins wired like that ?
Thank you.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
There will be more iterations of the board in the future (like the 1.3 board I've already designed and am waiting for delivery of). If there are specific design enhancements, feel free to raise them.midelic wrote: I was thinking long time about a multi protocol project...I wanted to make one ..happy I found this one...a little late...if I was here from the beginning...maybe I could suggest some changes .
For example power supply to each module.IMO it was better not be common but separate connected to a different pin of and avr(more powerful) by means of a transistor controllable the power on/off from software.(for example a command from avr open the gate of a transistor enabling powering the specific module).
Atm all modules are powered on/off at the same time ..which is not good imo.
As for your suggestion about controlling the power supply, the power consumption of these modules when in sleep mode is actually quite low. certainly low enough that it won't significantly affect battery longevity, so there is no need to power down a module from my perspective. The goal of this projects was to make it as easy to build as possible. I did that by using a single chip to do all functions. no extra resistors or transistors. Since I expect user to build this themselves, a primary design goal was to make it as simple as possible, and I don't think it can get much simpler than what I now have.
As for this:
If you reuse any of my code, I expect you to abide by my license and make the source freely available. Other than that, you are welcome to do what you like, but you will find maintainability to be much more challenging if you change the protocol stack. I'm not sure why bit-banging an interface is relevant. The SPI level code is in a different layer than the protocol layer. I'm using bit-banging for the X9D and it doesn't require any protocol change. I've also used the same stack on a non-interrupt driven system, so the protocol stack really has very few requirements. But I'm not going to convince you, and I'm not going try any harder than that.yes it 's true any porting from your code in arduino ends up changed...
One reason because of control.... I need to "feel" I can control the project in all aspects...
Second I use different pinout and bitbanging...free the avr programming pins for more flexibility , integration and compatibility with other systems.
Please Log in or Create an account to join the conversation.
- midelic
- Offline
- Posts: 174
You are right posting code is easy.....maintaing it and keeping up to date..is other game.
My intention is as soon as I received the PA/LNA cc2500 and test it sucesfully to open another thread on RCG....DIY Any TX/RX(RF) module ..something like that(for the moment FlySKy ,Hubsan,FRSKy_1/2 .......also RX except Hubsan....aso).....now that I have your permission explicitly...I'll use your code.
Thanks again!
About multi protocol module maybe consider using an Atmel chip with more pins.If using with a multi switch is good for protocol selection.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
As far a using more pins, We are already tasking the AVR at 8MHz to keep up. I don't think the one on the universal module can do anything else. The controller board (with all the protocol code) could easily have such a selection control though. The only reason I can think of that I'd need more than 14 pins is if I want to support more than 4 modules (actually probably more than 5, as we could squeeze one more in on the current ATTiny chip)
Please Log in or Create an account to join the conversation.
- nusbr
- Offline
- Posts: 43
I have a question about PCB connector P1.
I dont know where i can connect in the transmitter.
P1 Pinout
1: +5V
2: +3.3V
3: /Reset
4: Mosi
5: Miso
6: Sck
7: GND
8: chip select
How i can program Atmel in Transmitter?
Thanks and best regards
Bruno
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
You will need to connect TMS to the NCS pin, and TCK to the /RESET pin. You do not need to connect the 5V pin.
You'll program it by:
installing the included dfu file
copying the included hex file to your Tx (assume you already use Deviation and have formatted the flash drive) as 'avr.hex'
turn on the tx, and the screen should indicate that it is programming. If it fails, try turning the Tx off and then back on, it can take a few cycles to properly enter programming mode.
Now you can install a nightly build of Deviation and start testing the board.
You need your hardware.ini to look like:
enable-switch=A13
enable-cyrf6936=B12
has_pa-cyrf6936=1
enable-a7105=S1
has_pa-a7105=1
enable-cc2500=S3
has_pa-cc2500=1
enable-nrf24l01=S402
has_pa-nrf24l01=1
Note the pin order of the module (with the AVR facing skyward and 'P1' horizontal):
7 5 3 1
8 6 4 2
P1
Please Log in or Create an account to join the conversation.
- nusbr
- Offline
- Posts: 43
So i will solder them and Test it with the Hubsan X4. This is really a great project from you. Thanks for all
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
So far I've only done the connectivity table, But I took a page from Daryoon's approach and color-coded everything to make it easier to understand. I also included higher res images than are in the pdf:
bitbucket.org/PhracturedBlue/deviation/wiki/ModuleList
Note: These instructions are currently targeted for the Deviation nightlies only and are not suitable for Deviation 4.0.1. the reason is that the PA/LNA are now directly controlled where available to improve battery life, but those connections aren't supported in 4.0.1. I am considering doing a 4.0.2 release that supports PA/LNA control and fixes some of the critical 4.0.1 bugs, since it doesn't appear that Deviation 4.1 is around the corner.
I will start porting the actual installation instructions in the near future
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
PhracturedBlue wrote: FYI, I've started porting the Module install documentation into the Wiki
So far I've only done the connectivity table, But I took a page from Daryoon's approach and color-coded everything to make it easier to understand. I also included higher res images than are in the pdf:
bitbucket.org/PhracturedBlue/deviation/wiki/ModuleList
Note: These instructions are currently targeted for the Deviation nightlies only and are not suitable for Deviation 4.0.1. the reason is that the PA/LNA are now directly controlled where available to improve battery life, but those connections aren't supported in 4.0.1. I am considering doing a 4.0.2 release that supports PA/LNA control and fixes some of the critical 4.0.1 bugs, since it doesn't appear that Deviation 4.1 is around the corner.
I will start porting the actual installation instructions in the near future
Great job
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
I started to order RFchips ( www.ebay.com/itm/181091377178 + www.aliexpress.com/item/CC2500-PA-LNA-wi...-2-4G/359941652.html + www.ebay.com/itm/400611170500 ), pins ( www.ebay.com/itm/10pcs-2mm-40-Pin-Male-S...-Strip-/370506212713 ), cable ( www.ebay.com/itm/4Pcs-IPEX-UFL-RP-SMA-Fe...wandbid=321278066123 ) according to your wiki.
I plan to install in on my futur devo10 (so no CYRF6939 requiered). Maybe later, will also do another version for my devo7E
Actually only the V1.2 is available on order. Is the V1.3 on the way ?
I would prefer to program the ATTy with my USBASP. I take the hex file provided in the threads ?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
www.ebay.com/itm/CC2500-PA-LNA-SI4432-NR...&hash=item19d726245b
The only benefit is that you don't need to bug any pin headers if you use it (but you lose the U.FL antenna
The Aliexpress module you bought will work fine.
I STILL don't have my v1.3 boards, so I haven't verified the connections and don't want to release the boards. I hope they'll come this week, they seem to be traveling around the US in a circuitous route
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
PhracturedBlue wrote: Looks like you got all the right stuff. You do not need the 1.3 board for that layout. The 1.3 board adds support for this:
www.ebay.com/itm/CC2500-PA-LNA-SI4432-NR...&hash=item19d726245b
The only benefit is that you don't need to bug any pin headers if you use it (but you lose the U.FL antenna
The Aliexpress module you bought will work fine.
I STILL don't have my v1.3 boards, so I haven't verified the connections and don't want to release the boards. I hope they'll come this week, they seem to be traveling around the US in a circuitous route
I got also this version of the CC2500 (didn't use yet)... Wich one would you advise ?. When FrSky protocol will be maybe available ? (I am not sure, but I believed your managed to hack it completly ?)
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
Now with all my differents orders (200 bucks spended today outch ...), I will have everything not bedore 3 weeks, I guess
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
Since I'll have 3 boards, if anyone in the EU wants the extra 2 I'll be happy to share (once I have them) at no extra cost but the $3/board plus shipping (which should be around $1 for letter inside EU).
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- SeByDocKy
- Offline
- Posts: 1016
sbstnp wrote: Ordered v1.2 5 minutes ago. Will mount AliExpress CC2500 and NRF24L01 uFl module.
Since I'll have 3 boards, if anyone in the EU wants the extra 2 I'll be happy to share (once I have them) at no extra cost but the $3/board plus shipping (which should be around $1 for letter inside EU).
The same, I will have 1 available in EU (from FR). I will keep another one to eventually mod my devo 7E too
Please Log in or Create an account to join the conversation.
- jo-loom
- Offline
- Posts: 19
I will be glad to buy the non-needed PCBs from you.
If this will be possible and you are able to ship them to a German address please send me your bank details (or paypal account name) and the resulting total costs.
I will prepay - so there wont be any risk for you.
=> johannes.mueller (at) advantech-studios.com
Thanks a lot,
Johannes
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
I forgot to answer this:SeByDocKy wrote: PB,
I would prefer to program the ATTy with my USBASP. I take the hex file provided in the threads ?
If you want to program with a USBASP (which is what I also use), it will work fine, but either program it before installing it, or alternatively after installing the ATTiny but before installing any modules. The USBASP will (I'm pretty sure) program at 5V, but most of the modules are not tolerant to that voltage. I have programmed mine with the USBASP with the modules installed, but I do not recommend it, as you may damage them.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- Developing a universal module