PDA

View Full Version : Download Application Note R/C_Group_Tx_Rx_0001


tune by tito
Jun 08, 2008, 08:10 PM
This application note is about how to make a Transmitter and receiver with the Nordic nRF24L01 transceiver, an Atmel Avr microcontrollers “Atiny861v”, “Atiny44v” and three different software application notes: AVR319: Using the USI module for SPI communication, AVR136: Low-Jitter Multi-Channel Software PWM and Nordic nRF24L01 with Bascom-Avr.

What do you need to make this application note to work? If you buy my TX and RX board the only thing you need to buy is the assembled Transceiver MiRF nRF24L01 board from Sparkfun.com, also you need a high gain antenna; you can buy one from sparkfun.com or from digikey. You need two of this board to complete the kit and a Picco Z TX case, the board was made for this case because is very popular.

If you decide to make you own kit or reprogram mine, you will need to buy my TX and RX boards or make you own boards, two Transceiver MiRF nRF24L01 board, the antenna for the TX, the software to reprogram the AVR micros (AVR Studio ver. 4 from Atmel, $$free), AVR DRAGON debugger from Atmel about $49.00 from Digikey, for the debugging the Avr this the most economical option you be able to have. Also you need the application notes in PDF format and software; you get the first 2 application notes from Atmel web site and the other one from Bascom web site MCS Electronics @ www.mcselec.com.

Well this is the end I hope you have learn something today.
If you want buy my boards send me a private messages.
Best regards from Marcial Adorno

tune by tito
Jun 08, 2008, 09:37 PM
reloading more files

Application Note R/C_Group_Tx_Rx_0001
This application note is about how to make a Transmitter and receiver with the Nordic nRF24L01 transceiver, an Atmel Avr microcontrollers “Atiny861v”, “Atiny44v” and three different software application notes: AVR319: Using the USI module for SPI communication, AVR136: Low-Jitter Multi-Channel Software PWM and Nordic nRF24L01 with Bascom-Avr.


Features of the nRF24L01 include:
• Radio
�� Worldwide 2.4GHz ISM band operation
�� 126 RF channels, only 84 channels legal in U.S.A @ 1 MHz and 42 channels @ 2 MHz
�� Common RX and TX pins
�� GFSK modulation
�� 1 and 2Mbps air data rate
�� 1MHz non-overlapping channel spacing at 1Mbps
�� 2MHz non-overlapping channel spacing at 2Mbps
• Transmitter
�� Programmable output power: 0, -6, -12 or -18dBm
�� 11.3mA at 0dBm output power
• Receiver
�� Integrated channel filters
�� 12.3mA at 2Mbps
�� -82dBm sensitivity at 2Mbps
�� -85dBm sensitivity at 1Mbps
�� Programmable LNA gain
• RF Synthesizer
�� Fully integrated synthesizer
�� No external loop filer, VCO varactor diode or resonator
�� Accepts low cost ฑ60ppm 16MHz crystal
• Enhanced ShockBurst™
�� 1 to 32 bytes dynamic payload length
�� Automatic packet handling
�� Auto packet transaction handling
�� 6 data pipe MultiCeiver™ for 1:6 star networks
• Power Management
�� Integrated voltage regulator
�� 1.9 to 3.6V supply range
�� Idle modes with fast start-up times for advanced power management
�� 22uA Standby-I mode, 900nA power down mode
�� Max 1.5ms start-up from power down mode
�� Max 130us start-up from standby-I mode
• Host Interface
�� 4-pin hardware SPI
�� Max 8Mbps
�� 3 separate 32 bytes TX and RX FIFOs
Note: 3 separate FIFO for TX and 3 separate FIFO for RX: 32 bytes each FIFO = 96 bytes for TX and 96 bytes for RX = a total of 48 R/C digital channels with 16 bit resolution
�� 5V tolerant inputs
• Compact 20-pin 4x4mm QFN package




ATtiny24/44/84 Features: used for receiver

• High Performance, Low Power AVRฎ 8-Bit Microcontroller
• Advanced RISC Architecture
– 120 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
• Non-Volatile Program and Data Memories
– 2/4/8K Bytes of In-System Programmable Program Memory Flash
• Endurance: 10,000 Write/Erase Cycles
– 128/256/512 Bytes of In-System Programmable EEPROM
• Endurance: 100,000 Write/Erase Cycles
– 128/256/512 Bytes of Internal SRAM
– Data retention: 20 years at 85ฐC / 100 years at 25ฐC
– Programming Lock for Self-Programming Flash & EEPROM Data Security
• Peripheral Features
– One 8-Bit and One 16-Bit Timer/Counter with Two PWM Channels, Each
– 10-bit ADC
• 8 Single-Ended Channels
• 12 Differential ADC Channel Pairs with Programmable Gain (1x / 20x)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-Chip Analog Comparator
– Universal Serial Interface
• Special Microcontroller Features
– Debug WIRE On-chip Debug System, note: use to debug you program, only 3 wires needed: Vcc, Gnd and debugwire
– In-System Programmable via SPI Port
– Internal and External Interrupt Sources: Pin Change Interrupt on 12 Pins
– Low Power Idle, ADC Noise Reduction, Standby and Power-Down Modes
– Enhanced Power-on Reset Circuit
– Programmable Brown-Out Detection Circuit
– Internal Calibrated Oscillator
– On-Chip Temperature Sensor
• I/O and Packages
– Available in 20-Pin QFN/MLF & 14-Pin SOIC and PDIP
– Twelve Programmable I/O Lines
• Operating Voltage:
– 1.8 – 5.5V for ATtiny24V/44V/84V
– 2.7 – 5.5V for ATtiny24/44/84
• Speed Grade
– ATtiny24V/44V/84V
• 0 – 4 MHz @ 1.8 – 5.5V
• 0 – 10 MHz @ 2.7 – 5.5V
– ATtiny24/44/84
• 0 – 10 MHz @ 2.7 – 5.5V
• 0 – 20 MHz @ 4.5 – 5.5V
• Industrial Temperature Range: -40ฐC to +85ฐC
• Low Power Consumption
– Active Mode (1 MHz System Clock): 300 μA @ 1.8V
Power-down Mode: 0.1 μA @ 1.8V


ATtiny861/V Features: used for Transmitter

• High Performance, Low Power AVRฎ 8-Bit Microcontroller
• Advanced RISC Architecture
– 123 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
• Non-volatile Program and Data Memories
– 2/4/8K Byte of In-System Programmable Program Memory Flash
(ATtiny261/461/861)
Endurance: 10,000 Write/Erase Cycles
– 128/256/512 Bytes In-System Programmable EEPROM (ATtiny261/461/861)
Endurance: 100,000 Write/Erase Cycles
– 128/256/512 Bytes Internal SRAM (ATtiny261/461/861)
– Programming Lock for Self-Programming Flash Program and EEPROM Data
Security
• Peripheral Features
– 8/16-bit Timer/Counter with Prescaler and Two PWM Channels
– 8/10-bit High Speed Timer/Counter with Separate Prescaler
3 High Frequency PWM Outputs with Separate Output Compare Registers
Programmable Dead Time Generator
– Universal Serial Interface with Start Condition Detector
– 10-bit ADC
11 Single Ended Channels
16 Differential ADC Channel Pairs
15 Differential ADC Channel Pairs with Programmable Gain (1x, 8x, 20x, 32x)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
• Special Microcontroller Features
– DebugWIRE On-chip Debug System: note: use to debug you program only 3 wires needed: Vcc, Gnd and debugwire
– In-System Programmable via SPI Port
– External and Internal Interrupt Sources
– Low Power Idle, ADC Noise Reduction, and Power-down Modes
– Enhanced Power-on Reset Circuit
– Programmable Brown-out Detection Circuit
– Internal Calibrated Oscillator
• I/O and Packages
– 16 Programmable I/O Lines
– 20-pin PDIP, 20-pin SOIC and 32-pad MLF
• Operating Voltage:
– 1.8 - 5.5V for ATtiny261V/461V/861V
– 2.7 - 5.5V for ATtiny261/461/861
• Speed Grade:
– ATtiny261V/461V/861V: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V
– ATtiny261/461/861: 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
• Industrial Temperature Range
• Low Power Consumption
– Active Mode: 1 MHz, 1.8V: 380μA
– Power-down Mode: 0.1μA at 1.8V


What do you need to make this application note to work? If you get my TX and RX board the only thing you need to buy is the assembled Transceiver MiRF nRF24L01 board from Sparkfun.com, also you need a high gain antenna; you can buy one from sparkfun.com or from digikey. You need two of this board to complete the kit and a Picco Z TX case, the board was made for this case because is very popular.




If you decide to make you own kit or reprogram mine, you will need to get my TX and RX boards or make you own boards, two Transceiver MiRF nRF24L01 board, the antenna for the TX, the software to reprogram the AVR micros (AVR Studio ver. 4 from Atmel, $$free), AVR DRAGON debugger from Atmel about $49.00 from Digikey, for the debugging the Avr this the most economical option you be able to have. Also you need the application notes in PDF format and software; you get the first 2 application notes from Atmel web site and the other one from Bascom web site MCS Electronics @ www.mcselec.com (http://www.mcselec.com/).




Why an AVR microcontrollers a not a Picmicro or any other microcontroller?
First I do have over ten years experience with the Avr microcontrollers, also I do have experience with Intel 8051 micros especially the Silicon Lab type and Atmel type 8051 and Picmicros.
Second I do have more development tools for Avr than for any other microcontroller.
Third in 8 bit microcontrollers battlefield the Avr is far superior to other micros:
However not all micros are perfect and the Avr have his deficiencies like any other micro. These are the features I like about the Avr micros: In-System Programmable Flash linear memory, linear interrupts vectors, 1 MIPS per MHz, The AVR core combines a rich instruction set with 32 general purpose working registers, flexible timers, etc…

Why the Transceiver MiRF-v2 RP-SMA nRF24L01 board?
First the nRF24L01 is very very fast.
Second is easy to work with everything is included in the board: voltage regulator, reverse polarity SMA connector, easy pin layout for prototyping, etc…
Third is economical $20.00 plus tax from Sparkfun.com.

Photo #1 show the transmitter board in a Silverlit Picco Z Mini Micro RC Helicopter or the Air Hogs Havoc Heli transmitter plastic covers. I did not have a PLANTRACO transmitter when I made this board@ the time of design. However the Picco Z TX case is very popular choice. Also I did used some of the parts from the Picco Z TX like the leds and on off switch. The pc board mounts in the TX case mounting bolt arrangement of the Picco Z TX Board without modification. The only modifications made to the case are for the joystick, switches and charging cover.






The transmitter boards have ten inputs for analog to digital converters and switches, have a programming and debugging port, 5 volt voltage regulator, 10K ohms joystick for rudder and elevator or aileron, 2 x 5K ohms trim pots for the joy stick, on-off switch, leds for power on and for charging, a throttle potentiometer and a li-po battery charger @ this moment the battery charger is not working. The chip for the charger is a Maxim max8808 however this chip is very small to be soldered in the board the easy way!!!!!! I will be using a microchip MCP73833/4 or MCP73837/8 in 10-Lead MSOP package which will be easier to replace in case of burnout. Check photo #2.





The receiver boards have one Attiny44v, two Hex FET Mosfet Irlml2505, one Allegro MicroSystems A3901 dual full-bridge motor driver for the actuators, this driver can Output 400ma Current per Channel so you need to limit the amount of current passing thru you coils or actuators, the easy way of doing this is to solder one or two resistor in the holes of the actuators. At one side of the board you have six holes to mount the battery and motors and around the board many more holes for grounding. Next to the rear of the Attiny84v is the connector for the transceiver 8 pins, in the middle of the microcontroller to the right side of the board is the debug wire pin or hole. The yellow teardrop thing in the front of the board is a 1uf Tantalum capacitor I use this cap when I need lot of current moving around the board. Check photo #3



The complete board measure about 37mm and weight about 3.8 grams. Ceck photo #4. I do understand that the board is little to fatty also too big in dimension; however my intentions is to create a board that every body can work with and is easy to prototype with. Also I did made these boards to replace more heavy boards like the ones you will see in the next photos.



Photo #5 the upper board next to mine was from A Estes P40 Warhawk which I got from wal-mart before Cox came out with the 3 channel R/C version; these boards have one output for the actuators and a driver for the motor, is “AM” modulation 27.045 MHz and weight more than 15 grams. I made my board to replace these types of r/c receiver and transmitter boards. Look the next board.



Photo #6 board is from an Air Hog plane named the red dragon I think is made by Spin Master made in chin-chin country China. This board is “AM” modulation 27.145 MHz, the board weights more than 9 grams the way you see it in the photo, with the battery pack that came with the plane weights more than 22 grams and only have one channel; left or right in a bit-bang system, the plane have two coil for the actuator which make more noise than a rattle snake, the throttle is fix like about 60% to 75% throttle. I hope you understand my point of view why I made my board this way. Ok let stop the chi-Chad and get to work.


What you need to do to kick this pig and getting it working. First you need to choose between use one of my boards the way it is or if you want to customized more the software you way and second in which way you will customized the software to you needs.

Part 1
Let say you choose the first one; get my boards, now you will ask what is so especial about this boards that I have to buy one, well to start they come fully assembled in other words the only thing you need to do is buy and solder the transceiver board in the transmitter and the receiver board and modify the Picco Z transmitter case for the joystick, the throttle variable resistor or potentiometer and the switches for the battery charger and the fail save on-off selection, install the antenna, batteries and test you set-up before you burn something. Make sure you motor is connected correct, that include the diode and cap, also check you actuators coil are no getting to hot, if they do connect some resistor in the output of the A3901 motor driver to lower you current per channel. When you are happy (like Mr. Happy remember nobody is more happy than Mr. Happy) with you set up, you can go an try it in you plane (a cheap one first) and remember this is a work in development even if I did eliminate every bug in the code anything can happen, so double check you setup twice or more.

Part 2
So you decide to modify my board or make you own; if you take this route you will need the AVR Studio 4, the application notes software, PDF files for micros and transceiver, AVR Dragon debugger and you need to decide which language you want to develop the software “C”, Basic (Bascom AVR, Bascom 8051 or Pro-Basic for pic micros) and if you want shoot you self in the foot use assembly language. My software is completely written in “C” for the compiler “Code Vision AVR”, if you use the Bascom application note is written for the atmega8 which use the hardware SPI, is very easy to translate Bascom AVR to Bascom 8051, however this do not apply to any other Basic Compiler for microcontrollers each compiler is made different. Also you will need a development platform which might be my TX and RX boards, the AVR Dragon, STK500 or any other development tool for the microcontroller of you choice. @ One time Atmel send me an e-mail in which they price the STK500 and the AVR Dragon for less than $60.00 together from Digikey, I did buy one of these kits from Digikey, if I find the part number I will post it. The AVR Dragon(photo #7) is a complete development platform in which you have an ISP (in system programmer for low and high voltage) which supports all programming modes for the Atmel AVR device family. It also includes full emulation support for devices with 32kB or less Flash memory. AVR Dragon can be used with an external target board. However, the onboard prototype area, allow simple programming and debugging without any additional hardware besides strapping cables. AVR Dragon is powered by the USB cable, and can also source an external target with up to 300mA (from the VCC connector, 5V) when programming or debugging. If the target is already powered by an external power source, the AVR Dragon will adapt and level convert all signals between the target and the AVR Dragon. Note: If the target board is powered by external power source, no connection should be made between the VCC connector and the external board. AVR Dragon if fully supported by AVR Studio. This allows the AVR Dragon firmware to be easily updated to support new devices and protocols. When connecting the AVR Dragon, AVR Studio will automatically check the firmware and prompt the user if an updated firmware is available. In order to use the AVR Dragon it is required to install the AVR Studio and USB driver first. Please do not connect the AVR Dragon to the computer before running the USB Setup in order to follow this procedure described in Software and USB Setup. Next is a photo(#7) of the AVR Dragon with 40 pin ZIF I.C. socket.



In the next photo(#7) is the AVR Dragon connected to my receiver board.



You only need three lines to debug you AVR micro with the AVR Dragon VDD, GRND, DEBUGWIRE, that is only possible if the debug interface is enable, if the debug interface is disable you need to use the full six pin or cables for the ISP to enable the debug wire, Most AVR micros come with this interface enable if they have less than 32 kilo bytes of memory and 32 I/O pin or less, all the ATtiny family, ATmega48 to Atmega328, the new Atmega32_64C1_M1 with 32 pin I/O, if you AVR have 16 kilo bytes of memory and more than 32 pin I/O lets say 40 pins I/O to more than 100 pin I/O they use the JTAG (IEEE std. 1149.1 compliant) Interface. The AVR Dragon can debug with the included JTAG interface but only up to 32 kilo bytes of memory. If you need to debug more than 32 kilos of memory you will need the JTAGICEmkII which have no limitations also is used to debug AVR32 micros. Atmel have a new family of AVR 8 bit microcontrollers the XMEGA (atmega AVR turbocharged, supercharged and nitrocharged in one microcontroller) family.



Ok stop panicking, let’s install AVR studio 4, get the newest version of Studio 4 and WINAVR C compiler, also install the USB drivers, after you download AVR Studio 4 connect any development tool to you computer to see if need updating. Check photo #8 of AVR Studio with my project.



After you install Studio 4 and check for tools updates install WINAVR the C compiler which is free. If you look closely AVR Studio 4 is a very complete software development tool, the only thing you need is the debugger to be able to see any internal register(photo #9) from the microcontroller when you run you software, also you can simulate you Program with the build in simulator, however I constantly prefer the AVR Dragon debugger.
After you install all the software you need to create a project in Studio 4, go to the project menu selection and select Project Wizard(photo#10), if you have any previous project open Studio 4 will ask you to save the project files and will close the project, then will open a new window where you have three choices; first open a previous created projects, second open a file where you can look for a project made by another compiler like Bascom AVR or Code Vision AVR and the last one is create a new project from the ground up. The startup wizard are displayed every time you start AVR Studio 4. From within this dialog you can quickly reopen the latest used projects, change debug platform/device setup or create a new project. Just double-click on the wanted project and it will automatically open and restore to its last settings.
Select create a new project; a new dialog will appear where you can choose two options: Currently two project types are available listed in the project type list box. Atmel AVR Assembler and AVR GCC. The assembler (AVRASM2) are distributed with AVR Studio, but you have to download a GCC compiler to create and use an AVR GCC project. Projects can also be created by loading supported object files. File->Open file must be used to create such projects. Input the project name. Default the initial file will have the same name (ASM or C) and will be created, but this can be changed. A folder with the project name can be created, but this is not default selected. If project name and project type are ok, press next to select platform and device to simulate/emulate. You can also finish now, but then the debug platform and device must be selected when a debug session is started. Click finish when your selection is done. Also remember all debug sessions require that you load a debug object file that is supported by AVR Studio. Usually a debug file contains symbolic information which is not included in a "thinner" release file. The debug information enables AVR Studio to give extended possibilities when debugging, e.g. source file stepping and symbolic watches. Debug platform and device selection can be done by selecting debug->Select debug platform and device. All on-system debug platforms and devices are listed. When selecting a platform name, all supported devices for that platform are listed in black color, and unsupported are listed in gray. AVR Studio can be targeted towards the built-in AVR Simulator, or an AVR In-Circuit Emulator (bought separately). Check out device selection for how to select your debug platform and device. Independent of which debug platform is running, the AVR Studio environment will appear identical. When switching between debug platforms, all environment options are kept for the new platform. Some platforms have unique features, and new functionality/windows will appear. Although all debug platforms appear identical in the debug environment there will be small differences between them. A real-time emulator will be significantly faster than the simulator. An emulator will also allow debugging while the system is connected to the actual hardware environment, while the simulator only allow predefined stimulus to be applied. In the simulator, all registers are always potentially available to be displayed, which might not be the case with an emulator. While the AVR Studio User's Guide describes the general behavior of AVR Studio, these differences are thoroughly described in the platform's User Guide. The Status bars always indicate whether debugging is targeted at the AVR In-Circuit Emulator or the built-in AVR Simulator(photo# 11). The name of the actual device and debug platform is output on the lower status bar.

Now that we are set up with the software we can do some programming, now the software model I going to give you only have one channel, no Fail save or any other feature, just a simple software skeleton to get you in the air very fast. Remember my software was compiled with “Code Vision AVR” so you have to translate it to AVR GCC or Bascom AVR. With AVR GCC the translation is minimal rename some pin and I/O etc... with Bascom you have to setup the analog to digital converter, the timers and any other feature you want to include in you software for the transmitter board, for the receiver board you have to setup the PWM, the timers fail save etc…if you use the Atmega8 with Bascom you will be ok but if you use ATtiny861 or 44 you will need to use the software SPI from Bascom. Here is the skeleton for the Transmitter, receiver and supporting files.


Notes about the software for the transmitter and receiver, all my compiler files are fully commented:
#include <tiny861.h> // this include file is complier dependent, for AVR GCC you need to change it and include extra files:

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <avr/wdt.h>

#include <delay.h> // also this one, you need to create you delay code or check you compiler documentation for support

#include "spi_via_usi_driver.c" //File needed to be able to use the “USI” (universal serial interface) interface, the copy of the Transmitter and receiver are the same except in the I/O declaration and prescaler you need to use the correct one for each microcontroller, also remember this file use timer0 completely for the USI clock line.

// Pin change 0-15 interrupt service routine, when you push the joystick push button will create a interrupt and will take the microcontroller here; depending on the switch you have move battery enable or fail save enable the code below will execute according to the switches position and voltage polarities. You can use these interrupt for any fuction you want; like dual rates, etc...
interrupt [PCINT] void pin_change_isr(void) // Compiler dependant interrupt vector handler need to be changed for AVR GCC
{
if ((push_sw_1 == 0) && (Bat_Chg_sw == 0)) // if joystick push switch is equal 0(ground) and battery charger switch is equal 0 then the charger is on
{ // input you code here for what ever you want to do when the joystick push button is press on
Bat_Chg_En = 0;
}
else if ((push_sw_1 == 0) && (Bat_Chg_sw == 1)) // if joystick push switch is equal 0(ground) and battery charger switch is equal 1(vdd) then the charger is off
{
Bat_Chg_En = 1;
};
if ( push_sw_1 == 0 & Fail_save_en == 0) // fail save not implemented however you can do the same as the battery charger code, you can implement
{
__no_op(); // any thing when the button are depress or push
}
else {
__no_op();
};
}// end of interrupt vector

// External Interrupt 0 service routine, in this routine the Transceiver MiRF nRF24L01 board pull down the external interrupt request # 0 each time a interrupt is generated by nRF24L01 the microcontroller need to clear the interrupt flags or read the receiver pay load and clear the flags disable. This interrupt service routine is the same for the transmitter and the receiver the only different is that the transmitter clears the flags and the receiver read the transmitted pay load and then clears the flags. NRF24L01 have more interrupts which can trigger this External interrupt line, check the nRF24L01 PDF data sheet.

interrupt [EXT_INT0] void ext_int0_isr(void) //Compiler dependant interrupt vector handler need to be changed for AVR GCC

// Timer 1 overflow interrupt service routine, this routine will execute about every 18 to 20 milli seconds, however can be changed from 1 milli seconds to any time you wish, for the transmitter this routine control the repetition rate the transmitter send data to the receiver, for the receiver this routine control the speed of the software PWM, both ATtiny861 and 44 have a very powerful timer1.

interrupt [TIM1_OVF] void timer1_ovf_isr(void) //Compiler dependant interrupt vector handler need to be changed for AVR GCC to:
SIGNAL (SIG_TIMER1_OVF) // use this line of code for AVR GCC


// ADC interrupt service routine, will scan the ADC completely automatic from input #0 to #5
// with auto input scanning
interrupt [ADC_INT] void adc_isr(void) //Compiler dependant interrupt vector handler need to be changed for AVR GCC.

You need these two routines, they send data thru the “USI” or SPI interface, they are the same for the transmitter and receiver, check application note AVR319: Using the USI module for SPI communication for more information how to use these routines
W_usi_data( unsigned char byte_count) //Write register with USI

R_usi_data(unsigned char Command , unsigned char byte_count) //Read register with USI

This two file have been modified with all the define bytes and bits names of these two AVR microcontrollers; you only need this file if you are using Code Vision AVR compiler which do not include some bits names in the two original #include <tiny861.h> and #include <tiny44.h> files.
#include <tiny861.h> //this include file is complier dependent
#include <tiny44.h> //this include file is complier dependent

Well this is the end I hope you have learn something today.
If you want get my boards send me a private messages.
Best regards from Marcial Adorno

tune by tito
Apr 12, 2009, 01:28 AM
The pcb for this project was made with ExpressPCB;
http://www.expresspcb.com/

Photo #1 and 2 is for the TX which i do have two versions; one with single joystick and the other one with dual joystick. The dual joystick is the newer version.

Photo #3 and 4 are the RX board one for Actuators and the other for normal servo connectors, board #3 have three channels and board #4 have 5 channels plus one more "if the reset line" from Attiny84 is disable and is use as I/O pin. The pins of channels six are very handy for debuging the RX.

Photo #5 is for a multi-Actuator-motor RX which use a Silicon Lab C8051F330 QFN, this micro permit more freedom around the PCB with his ports pins assignments flexibility. the RX software have to be re-work for this micro to work properly.

Also a file with PCB layout and my custom components for ExpressPCB is included in a zip file.

Best regards tito

BushmanLA
Apr 12, 2009, 08:46 PM
Awesome.....

Ivan2280
Apr 13, 2009, 04:10 AM
Hello Marcial,great project!I have a question for you:
It is possible to make an adapter(module)to connect to a futaba radio?I am interested to use my futaba radio and conevrt it to 2,4ghz for small airplane and use your receiver.What you think?

tune by tito
Apr 13, 2009, 05:13 AM
Hello Marcial,great project!I have a question for you:
It is possible to make an adapter(module)to connect to a futaba radio?I am interested to use my futaba radio and conevrt it to 2,4ghz for small airplane and use your receiver.What you think?

Ivan2280 Yes can be done, you can use the 5-6 channel RX for that an use the servo connector as inputs for the ppm, remember to include a voltage regulator for 9 volts to 5 volts, also remember the Rf board only have 1mw very small amount for large distance, no more than 300 to 400 feets(100meters).
I'm making a new TX module for my 900MHz and 2.4MHz boards(check my blog)
also you can use "Assan" module;
http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=8354&Product_Name=X8D_2.4GHz_trainer_port_X8-hack_module_(PPM_Only)
Assan use the old version of this Nordic Tranceiver nRF24L01 which is nRF2401A check the data sheet i have included with this post.the Assan module have to be re-programmed with my firmware or my RX have to be re-program with Assan firmware which have to be decode from the Assan module!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

gobigkahuna
Apr 13, 2009, 07:28 AM
I'm looking for a board level 2.4 GHz transmitter that can be driven directly by a PC computer for a robotics project I'm working on. I'm using a Spektrum DX5i and EndurancePC interface at the moment, but a board level solution (rather than hacking apart the DX5i) would be better. Can I use your boards instead?

tune by tito
Apr 13, 2009, 02:17 PM
I'm looking for a board level 2.4 GHz transmitter that can be driven directly by a PC computer for a robotics project I'm working on. I'm using a Spektrum DX5i and EndurancePC interface at the moment, but a board level solution (rather than hacking apart the DX5i) would be better. Can I use your boards instead?

You can try, but I do recommend you use a Silicon Lab Board:
https://www.silabs.com/products/mcu/Pages/C8051F320DK.aspx
https://www.silabs.com/products/mcu/Pages/C8051F340DK.aspx
https://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F321_DC_UG.pdf
https://www.silabs.com/Support%20Documents/TechnicalDocs/ToolStick_F342_DC_UG.pdf
with usb to connect to the computer, you need to develop you Driver(USB) for the board also for the SparkFun Mirf Transceiver board, when you have this together then you can read any USB joystick with Windows API Macros.

@ this moment I will Suport only My Project, so you need to open a new thread and star developing!!!!!!!!
Good luck with project is very easy to do if you know what you doing.
Best regards tito

village_idiot
May 09, 2009, 12:34 PM
Not sure how I missed this, but I think I need to spend some time reading this thread.

tune by tito
May 09, 2009, 06:52 PM
:eek: :) :rolleyes: :cool: :D :confused: I going to make a new thread "Application Note R/C_Group_Tx_Rx_0002" for 900 MHz
Silicon Labs Ic Si4022 and Si4322, the thread will be @ the Indoors and micro models forums.
A sneak peek at the boards; I will make a board that can be use for Futaba and Jr Modules like Monolith.

http://www.rcgroups.com/forums/showpost.php?p=12205299&postcount=13

Best Regards tito

MikeSt
May 09, 2009, 10:47 PM
What's the practical limit (if any) for the number of channels for the transceiver chip ?

Is 6 channels possible?



Mike

tune by tito
May 10, 2009, 02:33 AM
What's the practical limit (if any) for the number of channels for the transceiver chip ?

Is 6 channels possible?



Mike

For the nRF24L01 can be unlimited due the Ic chip have a huge FIFO buffers 96 bytes for the receiver, 96 for the transmitter and 1 or 2 Mbps data transfer rate, the Si4022 and Si4322 only have a 64 bits or 8 bytes FIFO buffer good for four channels with Network ID, TX ID, RX ID, however you can send multiple packages streaming the information through the band with frequency hopping, one problem of the 900MHz band is the Bandwidth which is more narrow than the 2.4GHz band which determine the amount of channels you can have for frequency hopping and the data rate for maximum communication. The higher the data rate the fewer channels you will have because you have to increase the Bandwidth also. But is very possible to add channels up to 10 or more depending on you transmitter PPM output format!!!!!!!

Best regards tito

AleG
May 20, 2009, 05:43 AM
Wow, impressive.
Thanks a lot for taking the time to develop and publish it.

tune by tito
May 20, 2009, 11:57 AM
Application Note R/C_Group_Tx_Rx_900MHz (http://www.rcgroups.com/forums/showthread.php?t=1052295)
Second parts of this thread @ the Indoor and Micro Model
This application note is an extension of Application Note R/C_Group_Tx_Rx_0001, however this application note is for 900Mhz RF Band with Silicon Labs Si4022 Transmitter and Si4322 Receiver.
Best regards tito

MGeo
May 24, 2009, 07:41 AM
Very interesting. What is the effective range for this set-up?

tune by tito
May 24, 2009, 02:32 PM
Very interesting. What is the effective range for this set-up?
About 100 meters(300 feets) Plus or minus 100 feets, you should have the same range as the Park Zone Ember, Cessna 210 centurion, micro citabria.
best regards tito

obor
Jun 18, 2009, 04:00 AM
Very nice project, very interesting.
How much Flash and SRAM is available in the Tx ?

tune by tito
Jun 18, 2009, 12:27 PM
The TX have AVR Attiny861 which have 8kb and 512 bytes of ram and Eeprom, plenty for a nice TX with lots of Functions.
Best Regards Tito

obor
Jun 18, 2009, 12:55 PM
The TX have AVR Attiny861 which have 8kb and 512 bytes of ram and Eeprom, plenty for a nice TX with lots of Functions.
Best Regards Tito
8kb is a short for lot of functions in my view... especially when developped in C or C++... My current development for the project RCHome use about 30kb flash, and 3kb SRAM. I do not spend time to optimize assembly code, I'd prefer much add new features to the radio :)
cheers,
Olivier

tune by tito
Jun 18, 2009, 02:47 PM
If you look @ the TX is a very simple device 2 joy stick, 4 switches, etc...and the firmware is less than 3 kilobytes, every thing work with Interrupt. I do use the Code Vision for Avr which I think is the most efficient compiler for the AVR(I had test every compiler out there for the AVR) for less than $300.00 this compiler is a Steal compare to more expensive compiler and Free ones too, Check newers Atmel application notes where they use the IAR Embedded Workbench and WinAvr, you going to see a very huge difference how the Ram and Code is use by these compliers. After I did check all of them I did chose the Code Vision Avr because will give me the best speed and code space for the money. I think if you make a TX like Futaba C7 you will need about 32Kb or more of flash and for a 10CA you will need more than 64Kb of flash. Every thing depend what function you want in you System and the cost of such devices.
Best Regards Tito