New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
jhsa
Posts: 19220
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 11:52 am

mstrens wrote:
I can add a version number in the config.h file so it will be clear.
Good idea :)
So, I can also remove the file "version.oxs". This file was only used by the configurator but this program is not supported anymore.
And that is a shame.. The configurator was excellent :( maybe someone decides to pick up where it was left.. It was really a great tool.. I (and for sure many others that have no programming skills) hate the config. file. Very easy to miss a setting, extremely difficult to calibrate settings/values and I also find the assigning of the fields to send quite difficult to understand.. Yes, i have read the config help documentation completely last night..
The sequencer is also quite hard to understand. And I'm not a beginner with oXs. I use it since Rainer Started it.

The configurator just made things sooooo much easier.. Shame really :(
The oXs is still an excellent project :) and love it ;)

João

EDIT: can I still find the last version of oXs that works with the last configurator? i prefer to stick with that, even if I lose some functionality.. I don't use airspeed nor compensated vario anyway, so, i guess it is ok.. Shame that i won't be able to use the ACC, but you know. gain something, lose something else.. :)
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


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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 12:16 pm

Also, where can I find the recommended resistor values for the "Cells" voltage dividers?
If there are any, they could also be included in the Config_description file.. It would be a great start point and a great help for people that are not math oriented :)

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

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 12:25 pm

@Joao: If you are going to make custom boards the 328 is pretty small. You can place it on the opposite side as the divider resistors and have something pretty tiny especially if you don't add a ICSP programming header. I can advise you how to program the chips off board if you want to go that way.

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 12:54 pm

Thanks, I have no problem with programming the chips :) could also just flash the arduino bootloader and flash with IDE after.. There are also other ways of programming (one wire programming) that i use for programming the DIY Frsky Compatible receivers I build for myself.

I just think that a m328 is a waste of a good processor when you just need 2 or 3 pins out of 32 :(
I could use it on another receiver instead.. :)

João

But I'm interested in knowing how to program the chips off board anyway :D Thank you
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

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 1:34 pm

jhsa wrote: I just think that a m328 is a waste of a good processor when you just need 2 or 3 pins out of 32 :(
I could use it on another receiver instead.. :)

João

But I'm interested in knowing how to program the chips off board anyway :D Thank you
I agree but the chips are not expensive like in the old days. So although I feel the same as you I would use one if I only needed one pin to do a job that I couldn't easily do with discrete logic.

What I did was get a ZIF socket like one of these:

http://www.ebay.com/bhp/tqfp32-socket

And then wire up a header to connect to a USBASP programmer. You can still use the Arduino IDE to burn the bootloader if you are planning to add an ICSP header for serial programming your device later (I always include this on my boards so I can still change the executable once the chip is soldered) but if you want it super tiny you can burn the final hex in the ZIF socket and then solder the chip.


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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 1:47 pm

If you want it super tiny, just configure the bootloader to use one wire programming on a pin used to connect to something that can be disconnected.. Like a channel on a receiver :) No other sockets or headers needed. Just one pin that you already use, and GND.
I use AVRootloader, that is optimized by Midelic to flash the DIY Frsky_RX. In this case, we disconnect Channel 2 to program the receiver..

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

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 2:15 pm

I did not know there was a DIY Frsky_RX! I had heard about 1 wire programming but assumed that was something that was for another technology, not ATMEGA328 IC's. Clearly I am not able to keep up with the pace of things anymore. So this requires a different bootloader obviously. What about power? Doesn't the uP require power for it's oscillator? I am out of touch. Do you program your oXs this way as well?

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 2:40 pm

RightRudder wrote:I did not know there was a DIY Frsky_RX!
https://www.rcgroups.com/forums/showthr ... RX-Modules

Also here:

viewtopic.php?f=84&t=9625

This one has even a different method of programming. Over USB ;) :)
So this requires a different bootloader obviously.

Yes, you install the bootloader and then use a little utility to flash the .HEX file using single wire. Ahh you need a small simple circuit with a resistor connected to the FTDI adapter.
What about power? Doesn't the uP require power for it's oscillator?


Yes, but you have to connect the power to the chip a bit later. It is a simple process. have a look. All need info is here.

https://www.rcgroups.com/forums/showpos ... count=1782


Do you program your oXs this way as well?

Not yet. I have just recently got to know this. The bootloader can also be adapted for your needs (different pin, etc,) by someone that knows what he/she is doing. I don't :) ;)
But i can give it a go. Just have to make sure the same atmega pin used for the DIY RX channel 2, if not free, can at least be disconnected for programming. I'm not sure if this bootloader is smaller or bigger than the one from Arduino. oXs takes already quite a lot of flash space as far as I know..
I could get an arduino I use for testing all the time on my bread board, burn the bootloader, and try to flash the oXs with the utility.. If it works, it could be very good for small DIY oXs boards. Very easy to update the firmware.. No huge pin headers for programming :)
I will have a look at the pinout for the one Midelic adapted for flashing the receiver..

João

EDIT: This ´bootloader adapted for the DIY RX uses pin 8 of the arduino, so if it is being used for something else like a sequencer output, I should just make sure I can disconnect it. If it is free, and i don't use it for anything else, could just place a small 2 pin header, or maybe just solder a single wire :)
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

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 3:18 pm

Ahh. So the "1 wire" is a bit misleading. They are combining the RX/TX onto a single digital pin, but the device still needs to be powered for programming, so you need 3 wires in reality. It is a nice trick though. I always make sure the heat shrink has a small cut on each side of the board so I can just bend it back and connect my FTDI header if needed. So far that has been fine for my needs.

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Thu Jan 26, 2017 3:24 pm

Not 3 wire.. You have it connected inside the model, right? Just power the model when needed. So, just 1 wire and ground goes to the board from the programmer/FTDI. Ground you can connect everywhere, even on a receiver channel No need to remove the oXs from the model..

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

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Thu Jan 26, 2017 4:44 pm

Hi,

@mstrens
Do you have already plan to support temperature sensor built with a NTC in oXs 8?

BR
Xavier

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 5:24 pm

I assume you mean NTC thermistor? Why wouldn't you just use an LM35? it's only 1 extra wire and way easier to use.

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Thu Jan 26, 2017 6:36 pm

xavtronic wrote:Hi,

@mstrens
Do you have already plan to support temperature sensor built with a NTC in oXs 8?

BR
Xavier
When you want to measure a temperature you can use a sensor that converts the temperature into a voltage.
As oXs can measure voltages, it can be used to measure a temperature.
oXs allows you to convert the measured voltage from the sensor into a temperature (in degree Celsius or Farenheid) because you can configure a scaling and an offset parameter.
Still those 2 parameters are enough to perform the conversion mvolt>degree if your sensor makes a linear conversion from temperature to voltage.
There are several cheap IC's that can be used as sensor.
So I suggest to use an IC like TC1047A , TMP36GZ or LM35DZ that are available on aliexpress.com for about 1 euro.

If you use a NCT, the conversion temperature > Voltage is not linear as it would require to add a table in oXs in order to apply different scaling/offset parameters depending on the voltage (if you want some precision).

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Thu Jan 26, 2017 7:09 pm

Hi,

I know that oXs can read an voltage input and use an IC (already did it), but the maximal temperature is about 150°C and I will measure 250°C-300°C.

Sorry, I have perhaps write a too short question, I know how works a NTC. But I want to know if you plan to integrate possibility of table for NTC thermistor in the next Version. Or it is a simple way to do this in current version 7?
I have also imagine using a conversion in the TX (Taranis), but if we can do it in the sensor it would be better.

Xavier

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 7:59 pm

Maxim has some very nice cold junction compensated thermocouple interface IC's that use I2C to connect to uP. Very easy to use. I can't remember the part number right now but I have used them. They are accurate and easy to use.

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Thu Jan 26, 2017 9:00 pm

Here you go thermocouple interface with analog out. Connect to Ain and scale the result to 5mV/deg c

http://www.ebay.co.uk/itm/Precision-AD8 ... 2294350586

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Thu Jan 26, 2017 9:59 pm

I just had a look on internet and it seems that it is not required to implement a table in order to linearise the conversion of ctn voltage to temperature.
It just use some calculations based on some parameters.
I found different formula depending if the CTN is connected to Vcc or to gnd.

It does not seems complex to implement (about 20 lines of codes for a test version).

Do you have the reference of the CTN that you intend to use.
I expect that you whould like the best precision in the range 200-300 degree.
So I presume you should select a ctn having a resistor of about 10k in this range of temperature.

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Fri Jan 27, 2017 1:33 am

The device on the link that I posted gives a linear output over a 1000 deg.C range and wouldn't require anything different than the type of code used for the current sensor. Probably could even use that code and just rescale the units in TX?

This link has better information:
https://www.adafruit.com/product/1778

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Fri Jan 27, 2017 8:51 am

Hi,

@mstrens
I have in stock this reference : NTC 100k 1% 3950 (also used to my 3d printer).

I can send you one NTC if you will try it.

I found a simple library here. It will be for generic NTC (with beta, R) like your oXs code and not just fix to one NTC type.
https://github.com/panStamp/thermistor
http://garagelab.com/profiles/blogs/tut ... th-arduino (second part)

@RightRudder
Really interesting your adafruit link!

Xavier

PS: mstrens, I guess you speak french too (CTN ;-) )?

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Fri Jan 27, 2017 10:01 am

Ok, I will add this to oXs.
No need to get a NTC. Changes are easy when based on the links your provided (the same as those I had found yesterday).
The accuracy will probably not be optimal over the full range but I expect it will be good enough for your purpose.

When I have a version ready for testing I will post it (probably today).

ps: yes my mother language is french too.

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Fri Jan 27, 2017 1:26 pm

Here a version of oXs that should calculate the temperature using a NTC.
I did not (yet) put the new parameters and the description in the 2 oXs_config files but you can find some description starting at line 980 in the .ino file.

If this is not clear of if you do not get the expected result, just let me know.

Note : this has been added to the beta version 8 which should normally support Jeti protocol, an external ADC (to increase accuracy and support another airspeed sensor) and BMP280 baro sensor.
Attachments
openXsensor.rar
(228.45 KiB) Downloaded 78 times

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Fri Jan 27, 2017 4:40 pm

Hi,

Thank you!
You are faster than lucky luke! :-) I'll try it when I can (not this week-end, perhaps next week) and I say you the result.

Xavier

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Sat Jan 28, 2017 1:17 am

jhsa wrote:If you want it super tiny, just configure the bootloader to use one wire programming on a pin used to connect to something that can be disconnected.. Like a channel on a receiver :) No other sockets or headers needed. Just one pin that you already use, and GND.
I use AVRootloader, that is optimized by Midelic to flash the DIY Frsky_RX. In this case, we disconnect Channel 2 to program the receiver..

João
Just to get you guys know that I have just tested this on the breadboard and it worked. I have flashed the oXs hex file generated by the IDE using the 1 wire bootloader.. It is very fast flashing as well.
The only thing is that whatever is connected to digital pin 8 must be disconnected for programming. No big deal :)

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

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Mon Jan 30, 2017 7:33 am

Hi,

Just an off topic about the 1 wire bootloader.

Why don't use the TinySafeBoot ( http://jtxp.org/tech/tinysafeboot_en.htm ) ? I have already use it on attiny85 with success.
It is simple, but without a gui, you must use the command line. I have try it with Linux, but it will be work with Windows too.

You can choose if you will 2 ( RX & TX separate ) or 1 wire ( with this schematics it work https://static.rcgroups.net/forums/atta ... 0cable.jpg ), you can change and define the PIN's number used and some other settings.

I think you can also use the same S.Port connection wire with 1 wire bootloader option.

Xavier

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

Re: RE: Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Mon Jan 30, 2017 8:51 am

xavtronic wrote: It is simple, but without a gui, you must use the command line.
This is a very good reason for me not to use it. I don't like command line very much :) it tends to be quite complicated for peoole that are not very good with computers ;)
The AVRootloader can do all that you mentioned above I think. You can also configure the pins if you know how to. I don't, just used the same pin configured for my DIY Frsxky receiver. And that is a good pin :) so no change needed anyway. Oxs runs on a atmega328p not an Atiny. It would be nice if it did though :D

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

RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by RightRudder » Mon Jan 30, 2017 1:48 pm

João[/quote]
Just to get you guys know that I have just tested this on the breadboard and it worked. I have flashed the oXs hex file generated by the IDE using the 1 wire bootloader.. It is very fast flashing as well.
The only thing is that whatever is connected to digital pin 8 must be disconnected for programming. No big deal :)

João[/quote]

Where did you get the 1 wire bootloader code? As far as I know when you download the Arduino IDE it comes bundled with the optiboot bootloader. Is there a folder where you can put different bootloader options and then choose which one somewhere in the IDE when you go to burn the bootloader?

xavtronic
Posts: 10
Joined: Fri Aug 03, 2012 8:29 am
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by xavtronic » Mon Jan 30, 2017 5:30 pm

Hi

@RightRudder
It is two different bootloader.

TinySafeBoot : The one I use with ATtiny and ATmega and it work one Linux and Windows, command line.
(Link: http://jtxp.org/tech/tinysafeboot_en.htm )

AVRootloader : Work just with ATmega and on Windows (João reference)
(Link: https://github.com/damadmai/AVRootloader)

EDIT: I found the GUI interface for AVRootloader, it is AVRFreeLoader ( https://github.com/prof7bit/AVRFreeLoader ) and it will be work on all platform ( Windows, Linux, Mac ).


If you will more details, you can read both web pages and I can also help you (with TinySafeBoot), but perhaps we can open a new topic, to keep this oXs topic clean.

Xavier

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Tue Jan 31, 2017 5:12 pm

Is there a code for openxsensor to work at 8Mhz?? or does it have to be changed in the code somewhere?

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

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

Re: New beta version of openXsensor (=openXvario)

Post by mstrens » Tue Jan 31, 2017 6:42 pm

oXs uses automatically the CPU frequency that you select in the Arduino IDE (when you select the type of board).
So there is no need to define it in the config.h file.

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa » Tue Jan 31, 2017 7:52 pm

Thanks a lot..

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!!”