OpenXsensor Configurator

Development & General Chat for the superb openxvario project.

Moderator: rainer

MaOb74
Posts: 2
Joined: Wed Jun 10, 2015 7:38 pm
Country: -

Re: OpenXsensor Configurator

Post by MaOb74 »

Hi,

are there any plans to make the configurator compatible with osx version 4.0?

BR, Martin

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

As far I know, Davx is working on it.
MaOb74
Posts: 2
Joined: Wed Jun 10, 2015 7:38 pm
Country: -

Re: OpenXsensor Configurator

Post by MaOb74 »

great, THX!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenXsensor Configurator

Post by jhsa »

rainer wrote:Hi Guys!
i haven't been active for quite some time on the oXs coding, but it's really good to see it still growing.
Even though i do not have the time for coding these days, i had an idea already quite some time ago, and maybe somebody wants to pick it up..

Most of the config is still done in the way of editing the config file manually or though the great configurator tool.

It would be a great feature to change this in a way to store all of the configurable values in the eeprom of the arduino and create some commands that could be received via the uplink or a serial connection to influence these. This would make it possible to change the config without having to reflash...

It could theoretically even be possible to add functionality to the transmitter to remotely configure the oXs.

Just an idea...

Cheers,

Rainer
I think Rainer at least deserves an answer right? After all there wouldn't be oXs without him as he created it? ;)
I personally think it is a great idea. It would be wonderful if we could use the confugurator without having to reflash the firmware. Just like the multiwii does.. Or did when I used it, haven't updated the fw on my tricopter for a couole years now as it flies well as it is ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

First some general considerations:
The current version of oXs provide quite many new functionalities.
I think it is not possible anymore to store all of them in the flash memory (certainly when debug option is activated).
Currently, this is not really a big issue because some functionalities can't be combined in the same code to be loaded in flash memory.

E.g. oXs supports now both Frsky and Multiplex telemetry protocols but not simultanously.
Working with "#define" in the config file activates or the Frsky protocol or the Multiplex protocol. This parameter (#define MULTIPLEX) is used by a precompiler in order to let generate the code for the selected protocol but not for both.
Therefore the generated code is shorter and it fit in the flash memory of the Arduino pro mini.

The fact that only the code really needed for the selected options is generated, let the code run faster because there are less tests to be performed at run time.


If you look more in details, there are 2 types of parameters in the config file.
Some are related to the hardware being used (speed of the arduino, which pins are used, how many voltages are measured, which sensors are connected...).
Those parameters are normally fixed when you solder the components to your device. There is no reason to change them afterwards. So why having them somewhere else than in the config.

There are some parameters that a user could like to change easily e.g. in order to experiment with other value (e.g. vario sensitivity).
OXs already support a PPM option that allows to let oXs reacts differently based on a signal sent by the Tx.
So, currently, you can in this way control the vario sensitivity, select which sensor send the vertical speed, reset the airspeed, control the compensation for the electronically compensated vario, select the sequence being played by the sequencer.
Do you see other parameters that should be controlled from the Tx? It would probably require adding a second channel connection with the RX.

I can also understand that a user want to change some parameters from a PC (e.g. when he calibrates the voltage dividers). Still, I am not convinced that uploading parameters directly via a serial connection would be easier than via the arduino IDE (and the config.h file). In both cases, it requires a PC and a device like a FTDI (= USB to serial link). It requires to have (and learn) one more program.

Please consider those comments as constructive. I am still ready to adapt oXs it is possible and useful.
Any suggestions are welcome.
Personally, I had plan plan to adapt the set up for the voltage in order to let the user directly enter the values for the resistors of the voltage divider (still keeping the possibility to add optionally an offset and a multiplier for scaling)

nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: OpenXsensor Configurator

Post by nigelsheffield »

I think the idea of just entering the resisitr values would work fine , like you say its only done once with no need to keep adjusting it.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenXsensor Configurator

Post by jhsa »

mstrens wrote:
If you look more in details, there are 2 types of parameters in the config file.
Some are related to the hardware being used (speed of the arduino, which pins are used, how many voltages are measured, which sensors are connected...).
Those parameters are normally fixed when you solder the components to your device. There is no reason to change them afterwards. So why having them somewhere else than in the config.
Because you might want to change the oXs to another aircraft and wouldn't need to reflash the arduino. Connect/add an extra sensor, and configure it using the configurator.. then just let the configurator store the new settings.. The same as with multiwii, no need to reflash the thing.. I personally find config files very overwhelming and hard to understand. Not very user friendly at all for people that can't code.


There are some parameters that a user could like to change easily e.g. in order to experiment with other value (e.g. vario sensitivity).
OXs already support a PPM option that allows to let oXs reacts differently based on a signal sent by the Tx.
So, currently, you can in this way control the vario sensitivity, select which sensor send the vertical speed, reset the airspeed, control the compensation for the electronically compensated vario, select the sequence being played by the sequencer.
Do you see other parameters that should be controlled from the Tx? It would probably require adding a second channel connection with the RX.
Not everybody has spare channels. :)
I can also understand that a user want to change some parameters from a PC (e.g. when he calibrates the voltage dividers). Still, I am not convinced that uploading parameters directly via a serial connection would be easier than via the arduino IDE (and the config.h file). In both cases, it requires a PC and a device like a FTDI (= USB to serial link).


Oh yes, calibrating the voltages in real time using the configurator would be way easier and faster than the config file in any IDE. Both cases require a PC, so why not making it much easier?
Something like the A1/A2 settings on the TX would be wonderful ;)
This could be extended to calibrate the current sensors also.. That was a pain on the back side with the config file as far as I remember.. It's wonderful that we have the configurator. Big improvement. Having it storing the data in the arduino's eeprom without having the touch the firmware would be the icing on top of the cake..

It requires to have (and learn) one more program.
Not really. the configurator is already there. do the configuration as you do now, but instead of writing everything to a config file, write it directly to the oXs eeprom. It saves having to burn the firmware..

Please consider those comments as constructive. I am still ready to adapt oXs it is possible and useful.
Any suggestions are welcome.
Personally, I had plan plan to adapt the set up for the voltage in order to let the user directly enter the values for the resistors of the voltage divider (still keeping the possibility to add optionally an offset and a multiplier for scaling)
Please note, I'm not criticising your work or the way the oXs works now. Not even close. I think you guys have been doing a great job with it. It's just amazing. And the configurator is a HUGE step towards oXs being user friendly.

Rainer had this idea so it would be easier for the user, that is what I understand. After all the more people that uses our projects, the happier we are, right?? :mrgreen:
And I do agree with him. It would make the oXs even better..

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

How do I run the Configurator in Linux Mint 17.2. I have extracted the files from the archive and when I attempt to run the program file nothing happens. I do not get any errors, messages, nothing. I can run the Arduino IDE and load the OpenVario .ino file so that part is working but that is all.

Is there an idiot's guide for this whole process, or can someone point me to a step by step guide for the this. I have read all the information that I can find, but I am still lost.

Dave
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

Suncoaster wrote: and when I attempt to run the program file nothing happens. I do not get any errors, messages, nothing.
Dave , you have java installed on your linux box?
What did you do, to run the program? Just click on the icon or run it from the command line?

Here is an example, to start it from the commandf line.
Bildschirmfoto41.png
By the way, we are talking about OXS_Configurator_v2.1_linux.tar.gz ?!

br
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

Did you follow the instructions in the archive file.
Requirements:

You need to have java installed:
- Windows:
Go to http://java.com/en/download/manual.jsp and look under Windows section.

- Debian, Ubuntu, etc.:
On the command line, type:
$ sudo apt-get install openjdk-7-jre
The openjdk-7-jre package contains just the Java Runtime Environment.

- Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.:
On the command line, type:
$ su -c "yum install java-1.7.0-openjdk"
The java-1.7.0-openjdk package contains just the Java Runtime Environment.

- Mac OSX:
Go to http://java.com/en/download/manual.jsp and look under Mac OSX section.

--------------------------------------------------------------------------------------------------

Installation:

Put the folder anywhere you want on your computer.

Usage:
Double-click "OXS_Configurator.exe" on windows
"OXS_Configurator" on linux
"OXS_Configurator.app" on mac

--------------------------------------------------------------------------------------------------

Change log:

V2.1
- Supports the new features of OpenXsensor v2.x
- Small graphics changes

V2.0
- Supports OpenXsensor v2.x without the new features

v1.1
- Correction no vario compilation bug
- Extending voltage divider factor value to 99.99

Personally I have no experience with linux and I can't provide you more help about the configurator.
But in fact, use of the configurator is not mandatory. It is just an easy way in order to edit the file oXs_config.h
As alternative, you can just edit manually this file oXs_config.h with a text editor (like the text editor provided by Arduino IDE).
All explanations on the parameters is provided in the file oXs_config_description.h

If you describe exactly the configuration you need (which receiver do you use, which sensor do you connect to Arduino, which data do you want to send to tx, ...), I could also edit the oXs_config.h for you.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

There should not be an issue with OpenXsensor Configurator under linux.
Had it working under PCLinuxOS and now under Debian 8.1
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenXsensor Configurator

Post by jhsa »

mstrens wrote: But in fact, use of the configurator is not mandatory. It is just an easy way in order to edit the file oXs_config.h
As alternative, you can just edit manually this file oXs_config.h with a text editor (like the text editor provided by Arduino IDE).
It's mandatory for me now that it exists. Editing the config.h file can be really overwhelming even with the fantastic explanations. It's too much information together and I do have problems when setting up a oXs sensor. And I'm not new to it. It's just too much information in a small space. With the configurator you have only the relevant data in front of you and not all sorts of lines and symbols around the data you need to concentrate on. It's just a fantastic tool.
I even dare to say that having to edit the confi.h file put some people off building a sensor. It can be intimidating. It certainly was for me at the beginning..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

kalle123 wrote:There should not be an issue with OpenXsensor Configurator under linux.
Had it working under PCLinuxOS and now under Debian 8.1
I created a script file similar to the one you used on page 2 of this thread and it is now running. So that is a start.
mstrens wrote:Did you follow the instructions in the archive file.

Personally I have no experience with linux and I can't provide you more help about the configurator.
But in fact, use of the configurator is not mandatory. It is just an easy way in order to edit the file oXs_config.h
As alternative, you can just edit manually this file oXs_config.h with a text editor (like the text editor provided by Arduino IDE).
All explanations on the parameters is provided in the file oXs_config_description.h

If you describe exactly the configuration you need (which receiver do you use, which sensor do you connect to Arduino, which data do you want to send to tx, ...), I could also edit the oXs_config.h for you.
I followed the instructions in the archive file and loaded Java Runtime Environment and put the OXS_Configurator folder in my Arduino directory.

Initially I intend to just use the vario on a D6FR Rx, so I followed the build instructions for the Analog Climb rate with a 22k ohm resistor and a 1uf capacitor although the diagram shows a 15k ohm resistor. A config file for this simple usage would be appreciated, while I work my way through the rest of the requirements. What information do I need to enter under the Data sent tab before I press the Write Config button.

How do I get this configuration loaded to the Arduino, I loaded the openXsensor.ino file into the Arduino ide and tried a Verify/Compile and got the following errors.
errors.txt
(1.04 KiB) Downloaded 486 times
Where do I go from here.

Dave
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

First of all, let me ask a question. You can compile and flash a simple sketch like "BLINK" to that arduino without any faults?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

As kalle123, first check that you can compile and flash a simple sketch like "BLINK". If you can't, we can give you some links in order to get some help about this basic task.

If you can compile and flash such a basic skecth, then you should be able to compile openXsensor.
Please note that if you generate the oXs_config.h file with the configurator (version 2.1) you normally have to use openXsensor V2.5.
They are available here :
https://code.google.com/p/openxsensor/w ... _Downloads

It is better not to use the latest version of openXsensor (version 4) because this version contains some features that are not yet generated by configurator 2.1 (we are waiting for a new version of the configurator).

If you plan to use a D6FR rx (with the Analog climb rate) the data send tab is not critical at all because it will not be used.
Using a 22k resistorinstead of a 15k is OK (the value of the resistor is not critical.
Please find here oXs_config.h file that I edited manually and that should work with openXsensor V2.5.
This version assume that you connected your 22 k resisto to arduino pin 3 (alternative is to use pin 11 but then the config file has to be edited accordingly)
/ OpenXsensor https://code.google.com/p/openxsensor/
// started by Rainer Schloßhan

//***********************************************************************************************************************
// Another file in this project (see oXs_config_description.h) provides detailed explanations on how to set up this file.
//***********************************************************************************************************************

#ifndef OXS_CONFIG_h
#define OXS_CONFIG_h

// --------- 1 - FrSky device ID when Sport protocol is used ---------
#define SENSOR_ID 0x1B

// --------- 2 - Serial data pin choice ---------
#define PIN_SERIALTX 4 // The pin which transmits the serial data to the FrSky telemetry receiver

// --------- 3 - PPM settings ---------
//#define PIN_PPM 2 // default is 2 but my own device use 3
#define PPM_MIN_100 980 // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100 1990 // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100

// --------- 4 - Vario settings ---------

// ***** 4.1 - Connecting 1 or 2 MS5611 barometric sensor *****
#define VARIO // set as comment if there is no vario
//#define VARIO2 // set as comment if there is no second vario

// ***** 4.2 - Sensitivity predefined by program *****
#define SENSITIVITY_MIN 50
#define SENSITIVITY_MAX 300
#define SENSITIVITY_MIN_AT 100
#define SENSITIVITY_MAX_AT 1000

// ***** 4.3 - Sensitivity adjusted from the TX *****
#define SENSITIVITY_MIN_AT_PPM 10 // sensitivity will be changed by OXS only when PPM signal is between the specified range enlarged by -5 / +5
#define SENSITIVITY_MAX_AT_PPM 40
#define SENSITIVITY_PPM_MIN 20 // common value for vario is 20
#define SENSITIVITY_PPM_MAX 100 // common value for vario is 100

// ***** 4.4 - Hysteresis parameter *****
#define VARIOHYSTERESIS 5

// ***** 4.5 - Vertical speeds calculations *****
#define VARIO_PRIMARY 0 // 0 means first ms5611, 1 means second ms5611 , 2 means vario based on vario 1 + compensation from airspeed
#define VARIO_SECONDARY 2 // 0 means first ms5611, 1 means second ms5611 , 2 means vario based on vario 1 + compensation from airspeed
#define SWITCH_VARIO_MIN_AT_PPM 10
#define SWITCH_VARIO_MAX_AT_PPM 90

// ***** 4.6 - Analog vertical speed *****
#define PIN_ANALOG_VSPEED 3
#define ANALOG_VSPEED_MIN -3
#define ANALOG_VSPEED_MAX 3

// --------- 5 - Airspeed settings ---------
//#define AIRSPEED MS4525

#define AIRSPEED_RESET_AT_PPM 100

#define COMPENSATION_MIN_AT_PPM 60
#define COMPENSATION_MAX_AT_PPM 90
#define COMPENSATION_PPM_MIN 80
#define COMPENSATION_PPM_MAX 140

// --------- 6 - Voltages & Current sensor settings ---------

// ***** 6.1 - Voltage Reference selection (VCC or 1.1V internal) *****
//#define USE_INTERNAL_REFERENCE

// ***** 6.2 - Voltages Analog Pins *****
//#define PIN_VOLTAGE_1 1
//#define PIN_VOLTAGE_2 2
//#define PIN_VOLTAGE_3 3
//#define PIN_VOLTAGE_4 1
//#define PIN_VOLTAGE_5 2
//#define PIN_VOLTAGE_6 3

// ***** 6.3 - Voltage measurements calibration parameters *****
//#define OFFSET_1 0
//#define MVOLT_PER_STEP_1 4.89
//#define OFFSET_2 0
//#define MVOLT_PER_STEP_2 10.1
//#define OFFSET_3 0
//#define MVOLT_PER_STEP_3 1
//#define OFFSET_4 0
//#define MVOLT_PER_STEP_4 1
//#define OFFSET_5 0
//#define MVOLT_PER_STEP_5 1
//#define OFFSET_6 0
//#define MVOLT_PER_STEP_6 1

// ***** 6.4 - Number of Lipo cells to measure (and transmit to Tx) *****
//#define NUMBEROFCELLS 3 // keep this line but set value to 0 (zero) if you do not want to transmit cell voltage.

// ***** 6.5 - Current sensor analog pin *****
//#define PIN_CURRENTSENSOR 3

// ***** 6.6 - Current sensor calibration parameters *****
#define OFFSET_CURRENT_STEPS 0
#define MAMP_PER_STEP 0.9775

// --------- 7 - RPM (rotations per minute) settings ---------
//#define MEASURE_RPM

// --------- 8 - Persistent memory settings ---------
//#define SAVE_TO_EEPROM
//#define PIN_PUSHBUTTON 2 // default is 10 but my own device is 2

// --------- 9 - Data to transmit ---------
// General set up to define which measurements are transmitted and how

#define SETUP_DATA_TO_SEND \
DEFAULTFIELD , VERTICAL_SPEED , 1 , 1 , 0

// --------- 10 - Reserved for developer. DEBUG must be activated here when we want to debug one or several functions in some other files. ---------
//#define DEBUG

#ifdef DEBUG
#include "HardwareSerial.h"
#endif

#endif// End define OXS_CONFIG_h

I recommend you to use the Arduino IDE version 1.0.5 (and not the latest 1.6.x version - some user reported issues with openXsensor and the latest Arduino versions - fix is prepared only for a new version of openxsensor).
1.0.5 version is still available here:
https://www.arduino.cc/en/Main/OldSoftw ... ases#1.0.x

I hope this will help you.
If you have more questions, just ask for.

Michel
davx
Posts: 210
Joined: Sun Sep 15, 2013 7:01 am
Country: -

Re: OpenXsensor Configurator

Post by davx »

Hi guys,

I'm actively working on the configurator (almost completely recoding it) and you'll see a new version soon ;)

Don't expect too much from this one, it will be a compatibility thing, but the others should come faster !

Rainer suggestion is very nice but as mstrens pointed out, it could be problematic, and I personally have some configurator priorities for the moment.

As always, please be patient and you will be rewarded :D (I hope at least)

Bye.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenXsensor Configurator

Post by jhsa »

Thanks davx ;)
About Rainer's idea being problematic, doesn't Multiwii work the same way and is not problematic?
As far I can remember (haven't used it for a while) it can gather the data from the sensors and we can watch it in real time, then we can adjust the settings and just write them to the eeprom. The changes have effect immediately. Not need to reflash. It saves loads of time when setting up a model (in this case).
I never had a problem with it, maybe that's why I don't understand why it would be problematic with oXs. As far as I understand multiwii is a bit more complicated as far as code is concerned, right? ;) :)

But anyway, thank you very much for the configurator. It's an invaluable tool for us people that get overwhelmed/intimidated by a config.h file with all its hieroglyphs :)
It makes life much more easier and user friendly which open source stuff tend not to.. :)
Rainer's idea would take the user friendly thing to a higher level, and I'm sure it would be very much welcome among the people that use the configurator.
Thanks again

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

mstrens wrote:As kalle123, first check that you can compile and flash a simple sketch like "BLINK". If you can't, we can give you some links in order to get some help about this basic task.

I installed Arduino 1.0.5 and compiled both the simple sketch "BLINK" and also openXsensor. I have used openXsensor V2.5

Please find here oXs_config.h file that I edited manually and that should work with openXsensor V2.5.
This version assume that you connected your 22 k resisto to arduino pin 3 (alternative is to use pin 11 but then the config file has to be edited accordingly)

Thank you for the oXs_config.h file.

Michel
I noticed in the openXsensor folder there are two "ino" files openXsensor and openXvario, which one should I use. Once the file has compiled I assume that I use the IDE to install the sketch. Is there a document you can point me to that will cover this process.

Thanks for all your help.

Dave
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

The oXs_config.h setup I give you in a previous post has to be used with openXsensor version 2.5 (and not with openxvario). You can download this version from this link:
https://code.google.com/p/openxsensor/w ... _Downloads

Once it it download, you must unzip the files and put all of them in a folder of you choice.
It is important to put all files (.ino, .h, . cpp) inside a folder named openXsensor (just like there are in the archive).
So, you should have only one .ino file in a folder openXsensor.

Once the files are copied, you can just doubbel clik on the file named openXsensor.ino.
This should open the arduino IDE with several tabs.
Select then the tab named oXs_config.h and replace his content by the code I put a few post here above.

Check in the menu tools from IDE, that you have the right board: in the submenu board manager, select an item like Arduino pro mini 5 volt 16 mhz (not sure on the exact denomination).
Then if you try to compile, it should be ok. If not let me know what are the error messages.

Check then in the menu tools from IDE that you have the rigth programmer. I presume you use a "USBasp".
You should then be able to upload the compiled program in the Arduino.
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

When I attempt to upload the sketch I receive the message avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc. :cry: I have a feeling that I need to do something to have the program recognise my usb device. A lsusb command displays Bus 004 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter. How do I define this device to the Arduino program :?

Your help has been much appreciated.

Dave
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

Suncoaster wrote:When I attempt to upload the sketch I receive the message avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc. :cry: I have a feeling that I need to do something to have the program recognise my usb device. A lsusb command displays Bus 004 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter. How do I define this device to the Arduino program :?

Your help has been much appreciated.

Dave
Hi Dave. Could you try to answer that simple question please?

First of all, let me ask a question. You can compile and flash a simple sketch like "BLINK" to that arduino without any faults?

To help, I have to know, if there is a general problem between your arduino IDE and the arduino ... A simple YES or NO will do ;)

br
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

Think, the answer is NO!

I am using those adapters
Bus 002 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
or
Bus 002 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

First one is a CP2102 and the second is a FTDI. Both work fine.

One thing: For using those adapters, the LINUX user has to be member of group "tty"

Put those arduinos away for a moment. Dave, do you know, what a loop back test is? (Just google for it!)

Connect the adapter to your computer and have RX connected to TX
usb-to-ttl-adapter-testing-4.jpg
Now use a serial terminal to send data to the adapter and receive that data from the adapter. Just do a data loop! I use programs like moserial or gtkterm under linux for that. This simple procedure has to work, before starting with flashing arduinos!

Hope, this helps a little ;)
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

Here a loop back test I just did ...
Bildschirmfoto42.png
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

... and one more, Dave.

Please post a picture of or link to your "QinHeng Electronics HL-340 USB-Serial adapter" adapter.

And what Arduinos are you using?

How do you connect the adapter to the Arduino? Please add a simple drawing or picture!

(Could it be, that you are using a USB to RS232 adapter on an Arduino pro mini instead of a USB to TTL adapter .... And how did you connect that thing :?: :?: :?: :?: )
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

kalle123 wrote:... and one more, Dave.

Please post a picture of or link to your "QinHeng Electronics HL-340 USB-Serial adapter" adapter.

And what Arduinos are you using?

How do you connect the adapter to the Arduino? Please add a simple drawing or picture!

(Could it be, that you are using a USB to RS232 adapter on an Arduino pro mini instead of a USB to TTL adapter .... And how did you connect that thing :?: :?: :?: :?: )
Sorry I have not responded earlier but I have been away from my computer all day. These are the devices I am using.

Arduino
device1.jpg
USB device
device2.jpg
Connection via inserting pins into the appropriate holes ensuring ground inserted into ground. I was not a member of the tty group, I am now. I have not been able to upload anything to the arduino, I have only been able to compile sketches. I will try the loopback test later this morning, I have just got home and it is way past my bedtime.

Dave
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

It seems that you USB device can generate signalfor 3.3 volt and for 5 volt. I presume that your arduino is running at 5 volt. In this case, it would be better to set your USB switch on 5 volt.
Still, this does not probably explain the issue.

When you plug the USB into the PC (even when the USB is not connected to the Arduino) you should get a new COM port available on you PC. As long this is not the case, it means that you have an issue with a driver (or your usb device).
Once you can see the additional COM port on your pc, you have to select it in the Arduino IDE (menu "Tools", submenu "Port") ; only then, you can try to upload the sketch in the Arduino.

Please note that if you just put the header pins of the USB into the holes of the Arduino, you can get bad contacts. so it could be that you have to try several times before getting a good upload.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: OpenXsensor Configurator

Post by kalle123 »

OK. That is a USB to TTL adapter. That is fine.

I would propose those following steps:

#1 Plug in that USB adapter and do a "dmesg" from the command line/terminal
That is, what I see here, when I plug in my CP2102 adapter.
[ 4531.956018] usb 2-1: new full-speed USB device number 3 using uhci_hcd
[ 4532.117896] usb 2-1: New USB device found, idVendor=10c4, idProduct=ea60
[ 4532.117901] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4532.117904] usb 2-1: Product: ELV USB-Modul UM2102
[ 4532.117906] usb 2-1: Manufacturer: Silicon Labs
[ 4532.117909] usb 2-1: SerialNumber: EEOFFM0CFSSBFDEX
[ 4533.190880] usbcore: registered new interface driver usbserial
[ 4533.190896] usbcore: registered new interface driver usbserial_generic
[ 4533.190908] usbserial: USB Serial support registered for generic
[ 4533.223858] usbcore: registered new interface driver cp210x
[ 4533.223883] usbserial: USB Serial support registered for cp210x
[ 4533.223913] cp210x 2-1:1.0: cp210x converter detected
[ 4533.332027] usb 2-1: reset full-speed USB device number 3 using uhci_hcd
[ 4533.479002] usb 2-1: cp210x converter now attached to ttyUSB0 <------ !!
That looks fine here ....

If that is NOT clean and you get errors, you can stop here for a moment....

#2 Next aim should be the loop back test. If that is working, then

#3 Compile and flash a SIMPLE sketch like "BLINK" onto the arduino

Rest then should be a piece of cake :D
Suncoaster
Posts: 313
Joined: Thu Dec 29, 2011 10:18 am
Country: Australia
Location: Cooloola Cove, Australia

Re: OpenXsensor Configurator

Post by Suncoaster »

Success, :) I think. The upload finished without errors, I have installed it in an Easy Glider Pro connected to the A2 port, and when power is applied to the Rx I get a red light on the Arduino and a green light on the sensor. I assume that at least I have power, now to sort out the telemetry settings on my Sky9x. Can you suggest some values to start with. I will set the vario source to A2 and set sensitivity to 40 to start with, what else do I need to set.

Thanks for your patience and help. :D

Dave
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OpenXsensor Configurator

Post by mstrens »

Fine,
The 2 lights say that the devices are powered on.
I suggest that you keep the oXs settings given in the config file here above.
This means that sensitivity will be 50 (setup is in #define SENSITIVITY_MIN 50) which is a common value.
The voltage generated by oXs (on the capacitor) should be about 1.6 volt (1/2 of 3.2) when vertical speed is zero and should vary from 0 volt up to 3.2 volt when vertical speed varies from -3 m/sec up to + 3m/sec.
This voltage can probably be displayed directly on your Tx and should generate vario tone if you select A2 as vario source.
This should work.

Please note that if you are using a D serie Rx, the vario signal would probably be more accurate if you transmit the vertical speed in a digital form (instead of the analog form).
To achieve this, you have to follow the instruction from this link.
https://code.google.com/p/openxsensor/w ... uild_Vario
As explained, you just have to connect the Arduino pin 4 to the receiver pin rx (when using a D serie receiver). Then there is no need anymore to connect arduino pin 3 to receiver pin A2.
On tx side you just have to select another vario source (vspd = vertical speed, I presume)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenXsensor Configurator

Post by jhsa »

I think he is using a D6FR. This receiver doesn't have a digital port. Only A2 and A1 that is connected by default to the receiver supply.
Therefore he is using A2 for the vario.
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”