Page 1 of 1

OpenXsensor

Posted: 04 Jan 2020, 20:44
by Peter Balcombe
Has anyone else tried using the openXSensor library for Arduino type hardware to make bespoke telemetry sensors?
The openXsensor library is compatible with FrSky, Graupner & Jeti telemetry systems and can be used to make your own telemetry sensors units to monitor any combination of the following with the a small Arduino Pro Mini board and standard sensor hardware items:

Voltage (e.g. LiPo/individuals cells etc. via simple resistor dividers)
Current (e.g. Flight battery via Hall or very low resistance based sensors)
Altimeter/Variometer (via barometric pressure & temperature sensor)
GPS data (using standard commercial GPS antenna/module)
Airspeed (via pitot head & differential pressure sensor as used on say FrSky commercial units)
Motion (via 3 axis accelerometer/gyro and/or magnetometer)
Temperature (via thermistors)
RPM (via pulse generating sensor)
Flow (e.g. fuel via an impeller type pulse generating sensor)

Chris Bott did a couple of articles in RCM&E a few months ago & I have now successfully produced two different units.
One can measure 4S LiPo cell voltages, current up to 120A, plus Altimeter/Vario - the black unit.
The second does GPS & Altimeter/Vario - shown before heatshrink added. GPS is the square block at opposite end to the barometric sensor, both being above the small processor board.
Overall size of each unit is about 2” x 1” x 0.5” in old money.

The units are fairly easy to produce if you are handy with a small soldering iron & have a PC to run the Arduino software in order to compile & upload the required code to the processor board.

Re: OpenXsensor

Posted: 05 Jan 2020, 06:10
by Weds
Yes, I've made quite a few GPS/Varios for my Gliders, also a few current/voltage modules, Chris put a post on the OpenTx forum before it was put on RCM&E and I started making them from there.

Arduinos are clever little things, took me a while to get my head around the programing side, changing parameters to suit the module etc.

I started making my own because my Frsky GPS module took forever to lock onto a signal even when it open air. And I found their varios would lock up when in flight. And they are so cheap to produce.

I also tried to make a 3 axis accelerometer without any success, I could never get the configuration right.

Re: OpenXsensor

Posted: 05 Jan 2020, 10:12
by Peter Balcombe
Hi Weds,
Interesting that you had a problem with a 3 axis accelerometer.
Did you use a GY86 IMU unit?
It looks as if you need to assign the X_ACC, Y_ACC & Z_ACC to the TEST1-3 parameters, then fill the TEST parameters with LINEAR_ACC values. Were you already doing that?
If using a GY86 then you should note that it has an MS6311, so you may also need to disable this if you have another altimeter source operational.
Peter

Re: OpenXsensor

Posted: 08 Jan 2020, 11:49
by Weds
Hi Peter

The boards are GY-521, just looking on Ebay I see the GY-86 boards are around £20 ! Not sure what the difference is, my ones were only a couple of quid.. I remember having to put the board in 3 different axis and enter the figures in the config file but I could never get sensible results coming back to my Tx..

Re: OpenXsensor

Posted: 08 Jan 2020, 12:45
by Peter Balcombe
Weds,
I am awaiting a GY-86 from Banggood (£14).
The GY-86 also has a 3 axis magnetometer & is one of those specifically identified in the config files.
Yes, there is a calibration procedure which need offsets etc. fed back into config file.
Hopefully, mine will arrive by the end of Jan & can give it a whirl then to see if I have any problems.

Re: OpenXsensor

Posted: 08 Jan 2020, 13:26
by Weds
I've ordered one from Banggood too, see if I can make more sense with one of these.

Re: OpenXsensor

Posted: 08 Jan 2020, 15:57
by Peter Balcombe
Weds,
Just found (and now found a way around) a problem with the IDE failing to compile a sensor sketch which had the 1st Vario set to NO_BARO option to cater for use with an Rx equipped with built-in Altimeter/Vario.
(I was trying to use different sets of uniquely named config files for different sensor sketches).

Anyway, be warned that the IDE compiler doesn’t appear to like using other than the default config filenames with the 1st Vario set to NO_BARO & some other options.
(The OpenXsensor developers know of my issue, so maybe they will find a way to make it easier to link different config files to each senso sketch).

Re: OpenXsensor

Posted: 10 Jan 2020, 06:37
by Weds
Thanks for the info Peter.

Re: OpenXsensor

Posted: 13 Jan 2020, 15:58
by Peter Balcombe
Weds,
Another solution to the OpenXsensor NO_BARO issue is to use a different project file structure.
I was using the standard? system of having sketches & a libraries folder at the same directory level in an Arduino Projects folder.
A better setup for OpenXsensor is to have everything In an OpenXsensor folder, with individual clones of OpenXsensor for each project. Each project then has its own config files which have been tweaked to suit that project. The standard sketch can be run from within the project folder.
Uses 1.2MB disk space for each project, but works every time & no confusion with config setups ;)

By the way, I saw a couple of threads on the OpenXsensor forum which covered setting up MCU projects, including getting the correct g values.

Re: OpenXsensor

Posted: 14 Jan 2020, 15:37
by FrankS
I've made a few Varios to use with Multiplex M Link systems, work well, but my soldering skills aren't the best :oops: I bought a few of the boards to make some ammeter/varios but never got round to it. Must admit I find the OpenXsensor page a bit of a pain to navigate around.

Re: OpenXsensor

Posted: 14 Jan 2020, 15:57
by Peter Balcombe
Hi Frank,
When you say the OpenXsensor page, do you mean the various settings in the basic & advanced config files?
They now have an updated Configurator application that may help with that - apparently runs on Windows10 or Linux.
OpenXsensor was updated 2 months ago.

I bought some small PCBs from Chris Bott which help a lot with LiPo balance lead connections via potential dividers.
I made a 4S/5S LiPo, current & Altimeter unit, plus a couple of GPS units (one with Altimeter & one without) & am awaiting another small GPS (Beitian BN180) from China before I make a 4S LiPo, current & GPS unit to fit my E-Diamond which already has an Altimeter equipped Rx.

Re: OpenXsensor

Posted: 14 Jan 2020, 16:44
by Barry_Cole
All this seems a lot of hassle for not much return. What is wrong with the FrSky sensors??, I have not had any problems with them.

:o :o :o :o

BC

Re: OpenXsensor

Posted: 14 Jan 2020, 16:57
by Peter Balcombe
Nothing wrong with FrSky sensors Barry, but I can make a GPS sensor for just over a tenner & can make up units with my choice of sensing elements in one package rather than being limited to off the shelf units :)

Re: OpenXsensor

Posted: 17 Jan 2020, 19:14
by FrankS
Peter Balcombe wrote:
> Hi Frank,
> When you say the OpenXsensor page, do you mean the various settings in the
> basic & advanced config files?
> They now have an updated Configurator application that may help with that -
> apparently runs on Windows10 or Linux.
> OpenXsensor was updated 2 months ago.
>
>
No the actual webpage, maybe I am using the wrong one, but i find it almost as easy as the new Hobbyking one to find what you are actually looking for :oops: . Maybe I am on an old page, can you post a link to the page you are referring to.

Re: OpenXsensor

Posted: 23 Jan 2020, 08:37
by Peter Balcombe
Frank,
Try using the latest version of OpenXsensor with its conguration tool (runs on Mac orWindows10).
This provides a straightforward means of automatically generating the 2 configuration files needed for compilation.
All you need to do is to run the configuration tool, tick the required function boxes, then fill in function info such as voltage divider resistor values etc.
For Multiplex radio protocol there is a table to identify what info to put on each Tx display line.
The tool then creates the appropriate config files which are very short & easy to read as they don’t have all the notes & other options to wade through.

Note that if your temperature sensor requirement is within -40 to +125C, have a look at the simple 3 wire TO92 case Style TMP35 or TMP36 ones as these produce a calibrated linear voltage output which are easy to connect to an analogue voltage channel & access via the TMP1 or 2 value.

The latest OpenXsensor library can be found at https://github.com/openXsensor/openXsensor
Download the Zip file & then extract to your chosen location.
Drill down to the Configuration executable & run that. The generated config files are stored in the same folder as the executable by default, so just copy & paste into your project to replace the default ones.
The Configurator now also allows you to view the config files which have been generated.
Peter