RPM resolution?

Development & General Chat for the superb openxvario project.

Moderator: rainer

Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

Thanks again Karl.
I will read that again carefully and emulate it in my file system.
all good.

Thanks to all and apologies for the need for so much assistance.
But I/we got there in the end!

Jim.

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

Re: RPM resolution?

Post by jhsa »

The lesson we all take from this is:

DON'T GIVE UP..!!!

Stay healthy everybody..

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
User avatar
gastolectric
Posts: 46
Joined: Wed Jan 09, 2013 7:59 pm
Country: Australia

Re: A vario now working!

Post by gastolectric »

Endorphin wrote: Mon Apr 06, 2020 9:02 pm Greg,

I have managed to get a file compiled, uploaded and the openXsensor vario working!
Using BMP180 baro.

My only remaining dilemma is trying to figure out what I was doing wrong before!....................

Question:

How do I save this compiled file reliably for later use?
I might get a couple more arduino nano boards out and flash them while I have an functional file compiled. Label them and pack them away for later commissioning in a glider.
I seriously don't want to go through the hours, days, weeks to get another one working sometime in the future.

Jim.

Double post:
https://www.rcgroups.com/forums/showthr ... st44198053
That's fantastic Jim, well done mate

I employ a slightly simpler approach by simply using the "Save as" option in the File menu and name the file something like BMP180baro. This creates a folder with the same name and all the files that you have used to create the particular project are saved into this folder.

All you need to do in future is open this folder called BMP180baro and run the file called openXsensor.ino and this will give you the exact combination of all the files that you used in the successful project...

Have fun
Cheers
Greg
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: RPM resolution?

Post by ReSt »

I also use the "Save as" method to save the complete set of files that belong to a project.

BUT there is sometimes a little problem (at least with my version 1.8.0).

You can start the arduino ide either by clicking the arduiono.exe and it will open your last project. That's ok.
You can also double click to an *.ino file. That also starts the arduino ide. BUT now it uses the processor setup of the last opened project.
If the just opened project needs a different setup than the lastly opened project, you have the wrong settings in the tools setup.
Say you start the arduino IDE by double clicking the arduino exe. It opens a project that uses an arduino nano.
You close the IDE and double click a *.ino file of a different project that uses an STM32F... processor.
The Arduino IDE starts but the selected processor will be the arduino Nano.

Therefore I add some comment lines in front of the main ino file with the informations regarding the used processor.

Reinhard
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: A vario now working!

Post by Endorphin »

gastolectric wrote: Wed Apr 08, 2020 10:16 am ................................

I employ a slightly simpler approach by simply using the "Save as" option in the File menu and name the file something like BMP180baro. ......................

Greg
Greg,
My apologies for the late reply with thanks.
I have done this and recovered the file later. No problems.

I am about to compile another openXsensor file including a GPS sensor.
I am hoping that I can eventually use it as a lost model facility, by indicating the co-ordinates in my Taranis X9D-Plus transmitter.
Due to the fact that the vario works fine using the HUB protocol, I am assuming that the GPS might also work in that as well.
Time will tell.

Jim.

Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

stk500_getsync error notice.

Post by Endorphin »

This may not be the place to ask, but I am hoping someone can direct me to the best place.
I am being haunted by this error notice.
One both an old proven sketch and a new one. Both the same error notice.
I have done lots of searched, including watching the video from Painless360 here: https://www.youtube.com/watch?v=EEWE4PZL4TE

I have also tried burning the bootloader again.
Tried changing ports.
Tried different programmers.
I tried a new arduino nano board. Even tried a different computer.

All to no avail.

Anyone able to assist?
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: RPM resolution?

Post by kalle123 »

Jim, as always, you are very sparingly with information. :roll:

What are you doing there? What components, what sketch?

Just a rough guess (from oXs documentation)
* You must avoid having both GPS and USB connected at the same time because while uploading a program in Arduino, there will be conflicts between the signals sent by the 2 devices and programming will fail.
br KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

kalle123 wrote: Fri Apr 24, 2020 6:13 am Jim, as always, you are very sparingly with information. :roll:

What are you doing there? What components, what sketch?
.................
Sorry Karl. I am trying to flash (Upload another openXsensor to an arduino nano.
I am trying with the sketch that worked last time. BMP280 BARO.
Also trying with the same sketch with a GPS added.
And another with the Baro removed (NO_BARO) and the GPS added (YES).

Each of these sketches are compiling normally.

I will try to attach a compressed .tar.gz file.

I have tried uploading a nano board without the GPS connected.
Attachments
BMP280_GPS21042020.ini.tar.gz
(284.87 KiB) Downloaded 299 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: RPM resolution?

Post by kalle123 »

Jim, you are aware of this here!?

Image

And check/change your USB cable and use another USB port.

And if you see a problem like that, always try the 'blink' sketch in between to reassure.

br KH

PS. 'BMP280_GPS21042020.ini' compiles and uploads ok here ...
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

kalle123 wrote: Fri Apr 24, 2020 7:11 am Jim, you are aware of this here!?

Image.........................
I am aware of that and have had to use the old bootloader formerly. I also have tried the one above.
And check/change your USB cable and use another USB port...................
I have tried several USB cables and three computers.
And if you see a problem like that, always try the 'blink' sketch in between to reassure..................
Good tip! I will try and remember that. I'll give it a try now.

PS. 'BMP280_GPS21042020.ini' compiles and uploads ok here ...
That is reassuring for a start. Thanks again.

Jim.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

Endorphin wrote: Fri Apr 24, 2020 8:47 am
kalle123 wrote: Fri Apr 24, 2020 7:11 am Jim, you are aware of this here!?

Image.........................
I am aware of that and have had to use the old bootloader formerly. I also have tried the one above.
And check/change your USB cable and use another USB port...................
I have tried several USB cables and three computers.
And if you see a problem like that, always try the 'blink' sketch in between to reassure..................
Good tip! I will try and remember that. I'll give it a try now.

PS. 'BMP280_GPS21042020.ini' compiles and uploads ok here ...
That is reassuring for a start. Thanks again.

Jim.

Edit: I tried to upload "Blink".
I received the same error notification. Tried two cables, I will go through all the cables I have and try them all.
I have tried a new arduino nano board..........same result.
I somehow think they all cannot be faulty.
Something else not right.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: RPM resolution?

Post by kalle123 »

Jim, if you can not upload 'blink' there is definitely something wrong.

There are USB cables, which (from time to time and in conjunction with worn out USB connectors) can give trouble.

Also avoid USB hubs.

Get rid of those components. No use to keep them in the drawer.

Why don't you have some Unos around. More robust, don't have to solder to make tests. Cost only a few bucks. Think, I have 3 or 4 around here and if I kill one (happens to me also, but not often :) ) first thing I order spare!

It is always reassuring, when things work with the Uno. Then stepping to a Nano or Mini and there is a problem, I have to take a closer look with a watchmaker magnifying glass.

One thing in doing a trouble shooting, is to try to reduce the possible causes and eliminate one by one.

Good luck - KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

I will order some arduino Uno boards.
Thanks Karl.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

kalle123 wrote: Fri Apr 24, 2020 9:47 am Jim, if you can not upload 'blink' there is definitely something wrong.
.............................
Karl,

After a great many failed attempts using several boards, computers, cables etc. , I got a arduino nano out of the cupboard that has successfully uploaded with a spare openXsensor vario (for later use).
After some continued failures with this previously ok board, it finally accepted the "Blink" sketch successfully!
I don't know what was wrong.
New boards coming.

One step forward.

Jim.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

New nano and uno boards arrived.

Post by Endorphin »

I now am able to upload, connect and get a GPS to work fine. I am also able to get a vario working with a bit of tweaking of the sensitivity (yet to be fine tuned).
However, I am totally unable to get both working together.
There is a conflict around the respective 12C address's I am advised. I read instructions somewhere that the adafruit library for the BN-180 has to be downloaded and edited with the 12C address changed to xx76.
Then it says simply: I should "upload" it. But........it does not say how or where too.
R copter is assisting me over on this thread..........but he is very busy.
I am in no hurry, but sooner or later I need to learn what this address change is all about.
Meanwhile, I have some new boards to play with.
Progress happens.

Jim.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: RPM resolution?

Post by Kilrah »

When you program a board in the arduino IDE that button is called Upload.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

Kilrah wrote: Wed May 20, 2020 5:03 am When you program a board in the arduino IDE that button is called Upload.
Yes, I do understand that. Thanks for the reply.
So, do I "upload" the adafruit library for the respective sensor(s) to the arduino first?
Then do the main sketch after?
It seems to me this last step would erase the first.
Correct?
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Connection diagram.

Post by Endorphin »

This is the circuit I have been using.
Does it appear to be correct?
Attachments
openXsensorGPSVario.pdf
(21.42 KiB) Downloaded 240 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: New nano and uno boards arrived.

Post by kalle123 »

Endorphin wrote: Wed May 20, 2020 4:17 am There is a conflict around the respective 12C address's I am advised. I read instructions somewhere that the adafruit library for the BN-180 has to be downloaded and edited with the 12C address changed to xx76.
The BN-180 communicates with TX RX, NOT over I2C bus! So why should you change an address?

There is no library for the BN-180.

br KH

PS. Jim, did you check the BN-180 GPS first, before starting with oXs? No, then do that first.

I don't remember, but you have a USB Uart?!

Then connect the BN-180 to the Uart (5V, GND, TX, RX), place the GPS, so it faces the sky, connect the Uart to the computer and start a terminal program. Connect the terminal program to the Uart and default baud rate 9600, you should see data coming in.

Like that

Image

If not, change RX <> TX and try again.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: New nano and uno boards arrived.

Post by Endorphin »

kalle123 wrote: Wed May 20, 2020 6:45 am
Endorphin wrote: Wed May 20, 2020 4:17 am There is a conflict around the respective 12C address's I am advised. I read instructions somewhere that the adafruit library for the BN-180 has to be downloaded and edited with the 12C address changed to xx76.
The BN-180 communicates with TX RX, NOT over I2C bus! So why should you change an address?..................
I honestly have no idea Karl. I just do what I am told!................. :mrgreen:
.......................
I don't remember, but you have a USB Uart?!.............
.......................No. I had to do a search to find out what that was.
Which one of these should I order?
https://www.banggood.com/search/usb-uart.html?from=nav

By the way, just to confirm: I have had the GPS working and sending accurate coords back to my Taranis X9D Plus.
Does that clarify anything?
Thanks for the reply.

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

Re: New nano and uno boards arrived.

Post by kalle123 »

Endorphin wrote: Wed May 20, 2020 9:51 am I have had the GPS working and sending accurate coords back to my Taranis X9D Plus.
Does that clarify anything?
Jim, so the BN-180 is ok, I assume?!

But then I don't understand, what you are doing with I2C address and Adafruit library??

I2C address and Adafruit lib has nothing to do with oXs in this regard with that BN-180 ...

br KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: New nano and uno boards arrived.

Post by Endorphin »

kalle123 wrote: Wed May 20, 2020 10:57 am ...............................
Jim, so the BN-180 is ok, I assume?!.................
It sure appears to be so.
I2C address and Adafruit lib has nothing to do with oXs in this regard with that BN-180 ...
br KH
Ok. Good. I can put that myth to rest then and look elsewhere.
Thanks again,

Jim.
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

GPS & Vario connections to arduino nano.

Post by Endorphin »

I meant to post this earlier.
Hopefully, someone will check it over for me to confirm I have drawn it correctly.
It just might assist some other newcomer to this arcane dark art to get started. When I started, I found it amazingly difficult to obtain the most simple facts around this project, like the connection circuit here.
This appears to be a common theme amongst the arduino fraternity, for some unknown reason.
Anyway, here it is.

Meanwhile, I am still unable to get both the GPS and the Vario operational on the same arduino nano board.
Maybe I should try uploading the sketch to the new arduino Uno that I have?
(Using different connections where applicable though).

Jim.
Attachments
openXsensorGPSVario.pdf
(21.42 KiB) Downloaded 225 times
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: RPM resolution?

Post by kalle123 »

Jim, one remark on the circuit, you posted.

My BMP 280 has a 662k voltage regulator on the shield, I run GPS and BMP on 5 V instead on 3.3V.

And you know, that, when the GPS is connected to the Nano, you can NOT flash the oXs code to the Nano?!

That is, because when flashing the oXs code to the Nano from the Arduino IDE, this uses RX/TX on the Nano, but the GPS module also is 'speaking' with the Nano. That is a conflict!!

Here is a pic of my GPS modules. Take a close look and you'll see 4 pin connectors. I disengage the GPS from the Arduino, when flashing.

Image

You can find this info in 'oXs_config_description.h'

* !! IMPORTANT NOTE :
* Arduino Rx pin is used for 2 purposed: getting the data from the GPS and uploading the program into the Arduino (normally only to be done once) using a USB to serial adapter.
Sorry, if you know that already, but I am not up-to date, what you have on the workbench and what you did and are doing at the moment ...

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

Re: RPM resolution?

Post by kalle123 »

Hello Jim.

Especially for you.

1. Took an Uno and a BN-180, 3 jumper cables and a 10 k resistor

2. Wired as the diagram shows (but 5v, not 3.3V)

Image

3. Started Arduino IDE with oXs_v8.2.13

4. Deactivated in oXs_config_basic.h and oXs_config_advanced.h everything but GPS (NO_BARO, NO_VOLTAGE, NO_CURRENT ....... ONLY_GPS)

5. ADDED a line in oXs_config_advanced.h
#define DEBUG
just at the bottom. See pic below.

6. Compiled that in the Arduino IDE. No error. GOOD!

7. Disconneted the GPS from the Uno and connected the Uno with USB cable to the computer. See previous post!

8. Flashed the compiled oXs 'thing' to the Uno. No ERROR. ALSO GOOD!

9. Opened the terminal in the Arduino IDE and set terminal to 38400 baud.

10. Reconnected the GPS to the Uno and waited a moment. Maybe a minute or so ...

Image

Jim, it's not rocket science. And I had my young days (best days) a very long time ago. :(

br - KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

kalle123 wrote: Thu May 21, 2020 3:49 pm .....................................
2. Wired as the diagram shows (but 5v, not 3.3V).........................
Karl,

That is a good point, I will change that next time I try it.
You have gone to a lot of trouble to replicate what I have done, or should be doing..........thanks for that.
However.........
I have got each sensor working! (It appears I need to keep repeating this).
But not with both together.
And you know, that, when the GPS is connected to the Nano, you can NOT flash the oXs code to the Nano?!..........
I took note of that when you told me much earlier. Or someone else told me, I think it was you. But thanks for repeating it anyway.
However, all this not withstanding, it is not the problem.
Jim, it's not rocket science. And I had my young days (best days) a very long time ago. :(

br - KH
If your intent with the above comment is to humble or humiliate me here, please don't bother. I am already humiliated enough with this!................ :D

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

Re: RPM resolution?

Post by kalle123 »

Endorphin wrote: Thu May 21, 2020 10:13 pm I have got each sensor working! (It appears I need to keep repeating this).
But not with both together.
You have got each sensor working with openXsensor? Do I get that right, Jim?

You had the baro values on your Taranis and you had the GPS data on your Taranis?

And were are the pictures of that success??

Jim, such statements
I have got each sensor working!
make it very difficult for me to help.

You are writing a lot here in RPM resolution? (But we are not on RPM anymore ....) but you are very economical with information.

br KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

GPS & Vario combination problem

Post by Endorphin »

kalle123 wrote: Fri May 22, 2020 6:05 am
Endorphin wrote: Thu May 21, 2020 10:13 pm I have got each sensor working! (It appears I need to keep repeating this).
But not with both together.
You have got each sensor working with openXsensor? Do I get that right, Jim?
.........................
Yes, I do not know how to articulate this more clearly. I wrote this days ago:

"I now am able to upload, connect and get a GPS to work fine. I am also able to get a vario working with a bit of tweaking of the sensitivity (yet to be fine tuned).
However, I am totally unable to get both working together."

I will try again:
1.
I am able to take an arduino nano and upload an openXsensor sketch with the vario included. Then solder the baro connections from the baro (BMP-280 or BMP-180).I am then able to connect the board to my D8 receiver, turn on my Taranis X9D Plus, and then the vario works nicely.
openXsensor - no other sensor!

2. I am also able to take and arduino nano board (either the same one as above with the baro disconnected, or another new one), then upload a openXsensor sketch with the BN-180 GPS included in the sketch. When I connect this to a D series receiver as above, turn on my transmitter (same as above), power up the receiver with the openXsensor connected, after a short while, the telemetry finds the signal and the coordinates are displayed on my tx. screen. These coords correspond to the Google Earth indication for this location.

3. When I connect both the GPS and the baro to an arduino nano, uploaded with the openXsensor sketch as above). I then power up my Taranis (as above), connect the openXsensor to my "D" series receiver (as above) bound to the Taranis, then turn on power to it, either no sensor works or sometimes the vario works erratically and intermittently. This behaviour is difficult to explain as it is not in any way consistent.

If this is not clear enough Karl, then please don't bother responding; I am at a loss to know how to explain it better.
It is not of major importance to get both functions operational on the same board anyway. I will most likely just end up using the vario.
So, you will understand it is of minor importance.
Not worth straining friendships over. Definitely not worth that!
I can live with what I have got with this so far, if necessary.

And were are the pictures of that success??.....
I did not take any.
I will go back to my then working openXsensor sketch and first get it (the assembled openXsensor hardware unit) working again with the vario operational.
I can take pictures of my Taranis X9DPlus screen while it is working. I can also take a short video with sound of the vario working.

I will then get a second arduino nano board out, upload an openXsensor sketch to it with the GPS included. (BN-180). Then I will connect the GPS to the board and plug the assembled openXsensor to the D series receiver. I will then power up the Taranis X9D Plus tx. then power the receiver in the normal way. I will take it outside, and after some minutes, I expect the GPS coordinates to display in the telemetry page of my Taranis.
I will take pictures of this too.

Please don't bother replying until I have done this.

I sense that I am straining my welcome and I am sure you know what you are doing and also have a life already without trying to help me.
I appreciate all you help so far, even if it does not continue.

Jim, such statements I have got each sensor working!


I thought that this was an openXsensor thread? What other sensor would I, or could I, be taking about????
but you are very economical with information.
Apologies once again. (I should apologies for existing..........it so appears!).
I sure hope this submission is sufficiently explanatory.
If not, I will unsubscribe in consideration of our mutual sensibilities etc..

I've done my very best with this post Karl, I hope it meets with your required standard.
Jim.

Additional information.
Computer Operating System: Linux Mint 19.3
Arduino IDE version: 1: 8: 12
Boards used: Arduino nano clones.
Transmitter: Taranis X9D Plus running OpenTx version 2.2.3
Companion 2.2.3 installed in Linux Mint.
Last edited by Endorphin on Fri May 22, 2020 8:55 am, edited 1 time in total.
User avatar
kalle123
Posts: 905
Joined: Sat Mar 29, 2014 10:59 am
Country: -
Location: Moenchengladbach

Re: RPM resolution?

Post by kalle123 »

Understood Jim.

Then please post the working baro oXs (oXs_config_basic.h and oXs_config_description.h or the complete *.zip or ...)

and the working GPS oXs

and the NOT working baro + GPS

here.

I (and maybe mstrens) will have a look.

You could also try the #define DEBUG thing with the NOT working baro + GPS oXs yourself.

br KH
Endorphin
Posts: 167
Joined: Tue Jan 26, 2016 7:46 pm
Country: Australia

Re: RPM resolution?

Post by Endorphin »

kalle123 wrote: Fri May 22, 2020 8:53 am Understood Jim..............
Gee, that is a relief. I was almost ready to commit hari kari!
Then please post the working baro oXs (oXs_config_basic.h and oXs_config_description.h or the complete *.zip or ...)
and the working GPS oXs
and the NOT working baro + GPS.........................
I will get to that tomorrow, all things going to plan.
I have the files already, however, I want to make absolutely sure I post the correct one. I have saved so many over recent times, I could quite easily post the wrong one.
And with the way this exchange is developing..............that might result in a most unfavourable outcome!
I'm proceeding very carefully.
You could also try the #define DEBUG thing with the NOT working baro + GPS oXs yourself.
Ok. I will see if I can find that and do that. I probably should do that first.

Thanks for the reply.

Jim.

Post Reply

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