15 décembre 2009

Xmega bootloader new version

Here is a new version of the Xmega bootloader which works at 115200 bps and with the buggy versions of Xmega that have some problems to be self flashed. This version has been tested on Xmega192A3 and stk600. The serial connection use the pins PORTD2 and PORTD3 for the rx/tx. Connection speed must be set to 115200 with avr-dude.
Example of the command to use under linux to flash with avrdude (version 5.8):


avrdude -p x192a3 -P /dev/ttyUSB0 -c avr109 -b 115200 -U flash:w:test.hex


There is a temporisation at boot. After reset or cold start, the MCU waits 3 seconds max until it starts its application. There is no dedicated pin to set to enter flashing mode.
Source code and hex image:
bootloader_192a3_115200.zip

08 décembre 2009

A web site for RC@home

I am happy to announce the new web site dedicated to RC@home projects. You'll retrieve most information from this blog plus new ones. It is structured to provide a quick access to the various parts if you are interested to build your own radio. This blog will continue to provide regular news on the subject and related:

RC@home web site

25 novembre 2009

Old radio transmitter

A friend of my club (thanks Salvador) gave me his old Radios that he used years ago. They were made by Lextronic, a french electronic company. The company still exist, but the radio are not more sold. Simple, neat and strong.




11 novembre 2009

Bootloader Xmega


I received the prototype board (Stk600) for Atmel processor and started to play with it. The First step was to install a bootloader in the Xmega192a3.

Hum, that was more complex than I thought. Xmega world is still very new and I discover several problems: avrdude program (to flash the xmega) does not work under linux (pdi does not work), and bigger problem, the Xmega 192a3 has a bug which prevent its flash memory to be written directly.

So to workaround the "avrdude" problem on linux, I simply used XP and avr-studio 4.17. This is a recent version whcih support Xmega. Even if it not perfect, because the x192a3 is not yet in the compiler mcus list. But it is known in the uploader part of avr-studio.

Then for the second problem, I port on avr-studio (avr-gcc) the workaround from Atmel (application note 1008) which allows the flash to be self-written. Unfortunately, the workaround provided by Atmel was made for IAR (not avr-Gcc compiler) and was not a complete bootloader. So I had to port it and integrate in an existing bootloader port.

The first version I made did not work. Good opportunity to learn AVR assembly. So I redo and finally it worked ! Ouf , thanks to Atmel support which provided me this application note. My bootloader is here: bootloader Xmega 192a3.

The project files are included, and you need avr-studio v4.17 (free from Atmel). Serial port is port D and baud rate is 19200. See defines.h and compiler options before using. Once the bootloader has been installed, an application can be flashed with the command "avrdude -c avr109 -b 19200 ..." and other needed parameters.

25 octobre 2009

ATxmega




I received the new processor that may well be the basis of the next version of RCHome. It is an atXmega192A3. This processor looks very interesting for a radio transmitter because it has:
* 16 Kbyte SRAM, which gives more spaces for the core of the software,
* ADC 12bits (Analog to Digital) converter: for a best accuracy of stick inputs
* tqfp 64 package, is "smt" technology, but should be still reasonable to solder,
* has hardware support for quadratic encoders,
* many IO pins (switch, several rotary encoder, lcd, etc...)
* several timers
* 32 Mhz clock

But it has some drawbacks also:
* can't be programmed with ISP, need PDI and there is still no low cost PDI programmer
* programmatic interface a bit different from Atmega AVR
* requires most recent version of avr-gcc tools
* has still few concrete examples on how to use

Here is the adaptor board for the stk600, I should receive the stk600 soon.

22 septembre 2009

Schematic

The schematic of Rchv2 is available here. It's made with "Kicad" which is a nice open source for electronics, schematic and PCB.. See kicad home page to get it.
Thanks to Andreas Thorn for his help and contribution on this schematic.

13 septembre 2009

T12Z with Assan

Some pictures of the Assan X8D module installation in a Futaba T12Z. Lock switch and led are located on the same side than antenna. PPM signal, + and - are taken from the back of the middle board which carries the trainer connector.



23 août 2009

some thinking

Some more thought about what could be improved on most modern transmitters (including the nice new Robbe FX30):
* programming usability: Some functions you will never know what they are used for,
* no direct access to often used functions (on T12 you need to press 4 or 5times buttons just to change model),
* no global view on what's happening on a servo channel,
* limitations in switch cascading for timer function (on 12z you can't say stick high AND switch OFF = time start),
* can't have your own names for functions you like,
* lcd screen badly visible while flying, most have lcd below the stick median, no chance to look at it while flying without some gymnastic,
* simple way to tune model settings while flying,
* light and thin case for any style of pilot,
* talk when needed, useful for retransmission function: push a button and the radio will tell you the current receiver battery voltage, or give you an alarm when below some value, etc...
* a simple generic way to enter model settings with your own vocabulary

30 juillet 2009

RCHome Source code

The source code is now available on sourceforge under the rcopensource project, with GPLv2 license. You can view it, or retrieve it. To view it with web, go to gitweb.

To retrieve, you'll need "git". Once "git" installed on your computer, to get it in read-only mode do:
git clone git://rcopensource.git.sourceforge.net/gitroot/rcopensource

If you want to contribute to the project, you are more than welcome. The entire project can be retrieved with:
git clone ssh://@rcopensource.git.sourceforge.net/gitroot/rcopensource

Rcopensource project page is here: https://sourceforge.net/projects/rcopensource/develop

Read the file README and COMPILE before starting.

Have fun,
Olivier

28 juillet 2009

RC @ Home v2 software

The Hex image to flash and the PC gui application with examples is here. See README for more informations on how to flash and use.
The short howto build the TX is still here.
The sources (c++ , perl) will soon be available.

Features:

- 8 input ADC (sticks, pots),
- more than 8 switches input,
- 8 channels control,
- configurable input (analog, switch)
- configurable mixes,
- reverse, limit, subtrim, pulse
- model storage on SD Card
- configuration application on PC
- no lcd display,
- signal compatible PPM, O24RCPv1, RCHv2

18 juillet 2009

Using a Simulator for tests

As the transmitter can now generates a PPM signal, I can use it as a "ppm Joystick" to any sofware simulator that take USB-PPM cable as input. For instance crrcsim or Phoenix, which are 2 really good sims, the first one for glider, and Phoenix for helico/planes. For crrcsim, the USB-Futaba connector cable works well, and for Phoenix there is a specific USB cable for Futaba. One both cables, it just need to connect the ground and the PPM signal. Using a simulator program like that, it a very good test for the coder, as there is no intermediate which may fail and demonstrates pretty well response times, and test any kind of input combination.

14 juillet 2009

configuration file example

Configuration file for aerobatic glider with flap,snap and butterfly:

mcontrolmgr mcontrol=0 adc=0 calib_max=941 calib_min=76 calib_zero=504
mcontrolmgr mcontrol=1 adc=1 calib_max=898 calib_min=113 calib_zero=508
mcontrolmgr mcontrol=2 adc=2 calib_max=938 calib_min=76 calib_zero=475
mcontrolmgr mcontrol=3 adc=3 calib_max=979 calib_min=42 calib_zero=418
mcontrolmgr mswitch=5 pin=5 port=C
mcontrolmgr mswitch=6 pin=6 port=C
chanoutmgr chanout=0 cname=aileronG
chanoutmgr chanout=0 smix=0 straight sw=15 rev=0 rate=93 name=aileron inh=0 in1=0 offset=0
chanoutmgr chanout=0 smix=1 straight sw=6 rev=1 rate=23 name=snap inh=0 in1=2 offset=0
chanoutmgr chanout=0 smix=2 straight sw=15 rev=0 rate=-51 name=bfly inh=0 in1=1 offset=-198
chanoutmgr chanout=0 smix=9 fixcte sw=5 rev=1 name=flap inh=0 offset=162
chanoutmgr chanout=0 trans=3 reverse rev=1
chanoutmgr chanout=0 trans=4 chantrim offset=90
chanoutmgr chanout=0 trans=5 chanbounds max=1024
chanoutmgr chanout=1 cname=voletG
chanoutmgr chanout=1 smix=0 straight sw=15 rev=0 rate=40 name=aileron inh=0 in1=0 offset=0
chanoutmgr chanout=1 smix=1 straight sw=6 rev=1 rate=40 name=snap inh=0 in1=2 offset=0
chanoutmgr chanout=1 smix=2 straight sw=15 rev=0 rate=56 name=bfly inh=0 in1=1 offset=1024
chanoutmgr chanout=1 smix=9 fixcte sw=5 rev=1 name=flap inh=0 offset=269
chanoutmgr chanout=1 trans=3 reverse rev=1
chanoutmgr chanout=1 trans=4 chantrim offset=82
chanoutmgr chanout=1 trans=5 chanbounds max=1024
chanoutmgr chanout=2 cname=voletD
chanoutmgr chanout=2 smix=0 straight sw=15 rev=0 rate=30 name=aileron inh=0 in1=0 offset=0
chanoutmgr chanout=2 smix=1 straight sw=6 rev=1 rate=-40 name=snap inh=0 in1=2 offset=0
chanoutmgr chanout=2 smix=2 straight sw=15 rev=0 rate=-54 name=bfly inh=0 in1=1 offset=-303
chanoutmgr chanout=2 smix=9 fixcte sw=5 rev=1 name=flap inh=0 offset=-269
chanoutmgr chanout=2 trans=3 reverse rev=1
chanoutmgr chanout=2 trans=4 chantrim offset=-154
chanoutmgr chanout=2 trans=5 chanbounds max=1024
chanoutmgr chanout=3 cname=aileronD
chanoutmgr chanout=3 smix=0 straight sw=15 rev=0 rate=82 name=aileron inh=0 in1=0 offset=0
chanoutmgr chanout=3 smix=1 straight sw=6 rev=1 rate=-23 name=snap inh=0 in1=2 offset=0
chanoutmgr chanout=3 smix=2 straight sw=15 rev=0 rate=51 name=bfly inh=0 in1=1 offset=880
chanoutmgr chanout=3 smix=9 fixcte sw=5 rev=1 name=flap inh=0 offset=-198
chanoutmgr chanout=3 trans=3 reverse rev=1
chanoutmgr chanout=3 trans=4 chantrim offset=235
chanoutmgr chanout=3 trans=5 chanbounds max=1024
chanoutmgr chanout=4 cname=prof
chanoutmgr chanout=4 smix=2 straight sw=15 rev=0 rate=80 name=prof inh=0 in1=2 offset=0
chanoutmgr chanout=4 smix=6 straight sw=15 rev=0 rate=-19 name=bfly inh=0 in1=1 offset=-162
chanoutmgr chanout=4 trans=3 reverse rev=1
chanoutmgr chanout=4 trans=4 chantrim offset=-246
chanoutmgr chanout=4 trans=5 chanbounds max=1024
chanoutmgr chanout=5 cname=derive
chanoutmgr chanout=5 smix=2 straight sw=0 rev=0 rate=80 name=deri inh=0 in1=3 offset=0
chanoutmgr chanout=5 trans=3 reverse rev=0
chanoutmgr chanout=5 trans=4 chantrim offset=-18
chanoutmgr chanout=5 trans=5 chanbounds max=1024

Aerobatic glider and RCHv2

Yes.... that was the first flight with a more serious glider (jedi 4 home made), with 6 channels (2 ailerons + 2 flaps + elevator + rudder). The radio has been configured with several mixes and settings to work good enough for this model type. Here are some pictures, a video demo.



The gliders has 6 channels, and a Assan mini 6ch receiver. Ok, do not do like me, use a more long range receiver. The mini is supposed to be 500-800m range, which can be limited for big gliders. I did not fly very far, but did not had any problem with that configuration.

RCHv2 has been configured to make those mix working: butterfly (airbrake with flaps+ailerons), flaps (with flaps to ailerons), and snap flap (elevator to flaps & ailerons).


See this video foa a demo of those mix.
video

And also, I was lucky today. After 30 minutes fly, my receiver battery went below 3.2v ! The cells were too old obviously, my fault I should have replaced them. But I was very lucky to be able to bring back without damage the glider, with only 2 mm movement on one aileron and flap. Elevator was still working fortunately. And Assan receiver mini-6 worked still nicely even at a so low voltage, and *without* condensator. Well done Assan !

11 juillet 2009

The next goal is to fly an aerobatic glider (4 wing servos, 2.50m wing span) with the summer version of RCHv2.
Many changes and bug fixes have been done in the software. The USB-serial communication between PC and TX is very convenient, but can be a headache in some cases to debug. Hopefully, it now works pretty well, even with large model configuration.
The PC configuration now support names for Channel and smix/trans. Several parameters have been added to smix type "straight" such as offset, inhibit, switch, rate , etc... This smix "straight" is the most simple one, but already permit a lot of things, as the following mixes below.
The aerobatic glider (Jedi) is now ready to fly with those mixes (in addition to the aileron/elevator/rudder):

- flaps (with flaps to ailerons),
- snap flap (elevator to ailerons+flaps)
- butterfly with elevator compensation.

Flap and snap flap can be triggered by a switch. Only 2 switch are installed on the TX currently anyway.

To recap the possibilities of the RCHv2 radio, based on an Atmega 644:
- 8 analog channel
- 6 switches (or more)
- high number of "smix" or "trans" function can be configured. Right now the only limit is the SRAM more than the CPU,
- support various transmission types: PPM, O24RCPv1 (XBee), RCHv2,
- TX configuration through PC with a graphical user interface.

More on fly test soon.

28 juin 2009

Some screenshots of the PC appli

Here are some screenshots of the application running on the PC. The radio is connected to the PC through a serial/usb cable. Each change done within this interface is applied immediately to the radio. Each model configuration can be stored/retrieved, they are just plain ASCII files.


The first tab is for stick configuration, it allows to calibrate the stick and set various positions:


Next tab allows to configure channels (servos). Each channel(servo) is shown in a row with all its mixes and settings that have been configured. By clicking on a button, the configurable settings of the mix are shown. Each mix has its own settings, they depends on how the function has been implemented within the radio.


Each servo may have any number of "smix" and "trans" functions. A "smix" defines a mixer, that means that this function will simply add a value to the current servo position. Several "smix" will be added together, this can be used for instance to define Vtail, snap, or diff or any function that need to add or sub some input to the current servo position.


The "trans" type allows to transform the servo position. For instance to limit the course, or to reverse, to adapt the servo pulse, etc...



13 juin 2009

First flight with an airplane





Today, I flew an Acromaster with the radio RCHv2 (5 servos). It worked like a charm. No interferences, no problems at all. I used the new program interface I developped for PC for programming on the field. I was a bit afraid to bring a PC to the field, because of the screen brightness and the Sun. But a neetbook with good screen, like the Samsung NC10, it's ok and very usable. Even if the software interface is not tuned for high contrast (one more thing in the todo list), it is still readable and can be used to tune the settings at the field.
With the new radio, I found the plane more precise and accurate and more confortable than with my Futaba 12Z... Strange isn't it ? Probably the feeling is due to my happiness to fly with the radio and also may be 2.4Ghz transmission.

26 mai 2009

Very short howto build RCHv2

Withing few hours, provided you have the right components, you can build your own RC transmitter.

First, an important component is the transmission itself. Any module with PPM signal as input can be used. For its low cost, I choosed the Assan module (Hack version X8D) with Assan receivers. Cool price and so far works fine. It is powered with 5V.

The transmitter box is a very low cost transmitter such as those sold for RC simulator (FMS) http://www.flashrc.com/bmi/2637-gamepilot_boitier_simulateur_usb.html . Remove everything except the sticks and switches of course:

The micro processor is an Atmega 644 DIP, with the external crystal and 2*22nf condo. It must be flashed with the RCHv2 software:

Two small board are screwed in the plastic box, one for the micro-controller, the second one for the micro SDcard and the 5V power regulator. Do not forget the led also on the transmitter front.


One the right side, the UART plug to connect to the PC for the radio configuration (it's hidden on the picture between the protoboard):

Connect all the sticks, switches, the Assan module and SDcard board together:

And that's it, the last step will be to close the box and to configure the micro processor with the PC to set the mixers and settings:

Some more comments

Last week-end first flight was smooth, even more than expected. The RCHv2 behaves exactly as I expected, even if the Transmitter power was very close to the limit (LM317 to produce 5V with only 5cells Nimh).
The Assan module and the very small long range 4 channels receiver with a very short antenna (2cm) worked perfectly in the "Weasel" wing. No problem even when flying far from me (the wing is approx 90cm wing span) and even with the antenna transmitter pointing directly to the wing.
Nice pleasure to fly with this wing and your "own" transmitter :)

21 mai 2009

Home made RC for the summer and travels


Here is my new home made RC. It features 8 channels, a module 2.4Ghz Assan for transmission, configuration by PC, Micro SD 2GB, mixers, and settings fully configurable by the software.
The transmitter box and sticks comes from low cost transmitter (could have been a RC joystick).
The microprocessor is an AVR Atmega 644P, and the software is my own called RCHv2. My brand new flying wing "weasel" will be the beta tester. More to come soon...

18 mai 2009

More to come

I have been working hard on RCH recently. PC configuration through command line is working, model storage on SD card, and connection to PPM module.
Stay tune for more details of this transmitter hack soon.

29 avril 2009

New toy

AVR 1280, more flash, more SDRAM, and best of all more IOs .... This is the Arduino Mega. Cool...

26 avril 2009

Radio Parameters settings

All the configuration parameters can now be configured through a command line from the PC. Open a terminal window, and set a parameter.

The design I choose intend to leave as much as possible flexibility to program a model. There is no preassociation of functions or mixers to any channel. Each possible function however has to be predefined, and is part of the software in the radio. For someone who knows a bit of programming, it is easy to add a new function which will do whatever you want, and can be assigned to almost anything.

Functions are splitted in that way:
- controls settings (stick, switch): ADC number, calibration values, ...)
- channel settings: they are split in two subcategories:
-- sigma: this is mixers (differential, snap, etc...) anything that need to sum the input from various sources, but does really change the unit of a value,
-- gamma: transform the value: this is sub trim, min pulse, max pulse, reverse, etc...)

All these functions ensure that the values entries from the stick or switch, are computed for the channel.

Okay, there are still a lot of missing stuff in the software such as "names" for every function, control, switch. This will be added later on, if there is any interest.

Here is below a video showing the configuration of the sub-trim for elevator, and then followed by a rate change of the snap function.
Look carefully the servo courses.
video

25 mars 2009

Configuration

The software of RCHv2 is growing slowly by surely :) After many thoughts, I decided that the configuration of the mixers will be done through "xml" like commands. "xml" is a structured language to specify datas, very useful when datas start to be complex and a lot imbricated. And this is the case with the software of the radio, because I wanted it to be powerfull and generic enough to allow users to do powerfull mix without headaches. If I fail, then I will provide 'aspirin' to anyone who wants to build and use an RCH system :)

So, given that there is a lot to do to reach that objective, I am trying to proceed small steps by small steps, which is not always obvious. My next step is to allow the configuration of RCHv2 from a PC with an XML configuration file.
You should say "ok, but what's the benefit of that ? " answer is: to be able to provide almost any kind of parameters to the radio, thus to allow to program anything. You could argue that "xml" has a cost, and that it takes SRAM ressources as well as CPU. Answer: Yes that's not wrong, but I 'll give a try on an AVR8bits, and I am pretty sure that CPU resources will be very small, and that there will be still sufficient SRAM memory to proceed.
Once config from XML will work, it will be a great step forward.
I have also planned to add a second avr644P for LCD and keyboard handling.

Please comment, if you think what I am doing is stupid, obvious, or bad way, thanks in advance :)

03 mars 2009

Some Spectrum measurements

Last monday I had the opportunity with friends to do some measurements of spectrum on various 2.4Ghz modules.
The initial intention was to measure the difference between 2.4Ghz antennas, but the environment (in a shop) reveals that it was impossible.
So, no results about the antenna efficiency, but we could observe the spectrum of various transmitter. Thanks to flash-rc who makes this possible to test different transmitter from various vendors.
First, here is the spectrum print for the Xbee module that is used in some home made RC. You can see that the spectrum is not very sharp around the 2.46Ghz channel, and there are many harmonic around.



Then we tried Assan module. Very interesting. Its Spectrum is very sharp and neat. It uses DHSS technology with two channels simultaneously as Spectrum. It looks clean.





Then we tried several transmitter together to compare their Spectrum. The picture below shows Assan, Spektrum and Xbee. The Xbee transmit only on one single channel at a time.



Finally, we tried two Futaba transmitters simultaneously. On the picture you can see that they use the entire spectrum 2.4Ghz. They use the FHSS technology. Don't be afraid by this picture, the spectrum here is remanent and it does not mean that the radio continuously emit on all these channels at the same time.



In conclusion of all this, if I have to buy 2.4Ghz module, I would seriously investigate Assan as their Spectrum looks very clean, which make feel confident in it. But of course it is just one aspect. In addition, it looks that the DHSS technology is more suited to RC because it seems to be more robust against jamming. DHSS techology is based on CDMA, made for the Army for Missile guidance and comms. More info on DSS techno here. FHSS primarly purpose is communication crypting for army to prevent comms hijacking. [edit] But it looks that FHSS used by Futaba is not exactly same as FHSS used by the army. Subject is complex. There is an interesting thread about this on rcgroups

27 février 2009

Transmitter case alu prototype

The transmitter case is almost finished. This is a prototype made with alumininium and epoxy plate (printed ciruit plate). If someone is interested, I can explain in another post how I built it. From the initial drawing, there have been some changes, such as dimensions.
But it is close to what was designed with Styro , except the round corners.

Knob unders the sticks are use both as trims, and as input for the lcd interface. It is planned also to add encoding wheel.
Stick are those of a Futaba FC18 with their trims removed. Mechanical trims under the sticks have finally little use, so they have been replaced by kind of "auto-trim" or preferably what I call "obo" trim.

Sides where hands hold the radio, are rounded. It is more comfortable to hold the radio, and to move the hands near the stick.

This case is mainly for pilots who use inches on (pouces dessus).
The display is a classical graphical lcd 128x64 and it sits between the stick as there is not enough space above, due to the compacity of the case.

Overall weight of the case is reasonable and should be fine when electronic and batteries will be in.


To make a size comparison with the Futaba T12Z, the case is larger but less long, and thiner than the 12Z. It feels also very comfortable in hands compared to the 12Z.