Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenLog at 500000 baud?
#1
To get my PID's tuned I got interested in using a Blackbox log with a tiny cheap OpenLog device. I couldn't get it to work well however, because I was using an old 2 GB SD card.

Now that I got a 32 GB SanDisk Extreme SD card I could finally get logs at 500 Hz if I set the serial port to 250000 baud, but at 1 kHz I still got a lot of missing information in the logs. Now it turns out that with the command line I can set the port to 500000 baud and get perfect logs at 1 kHz!

Is there anyone else here who has had the same experience? It bothers me that the 500000 (and 1000000) baud options are not available in the Betaflight interface, it goes straight to 1500000 baud and higher Confused

Going through the source code in GitHub I found out that the higher baud rates were added about a year ago: https://github.com/betaflight/betaflight...03149d22d3  and I (JoeriCapens on GitHub) made some comments there about the missing options. I'm curious if anyone else would find these useful?
[-] The following 1 user Likes L0stB1t's post:
  • Pavel_D
Reply
Login to remove this ad | Register Here
#2
How are you getting these logs lol?

Doesn't your flight controller have an on board black box logger? I never heard of having to do any of the things you're describing to get a black box log. Maybe I'm not really understanding what ur doing. Ur FC has an onboard SD slot for black box logs? Can't you just exctract thiese logs straight from betaflight?
'Ignore' is the route word of Ignorant. 
Reply
#3
No, my Eachine Trashcan with CrazyBee F4 fc doesn't have an SD card slot nor on-board flash chip. But it does have a spare uart so with just three wires and an OpenLog device (which is hardly bigger than a micro SD card) you can have blackbox logging.

Lots of info from Joshua Bardwell:
Reply
#4
Hi @L0stB1t,


I have the same quad as yours. I tried to turn on the log at 500000 baud and it only works good at 500 Hz.
When I turn on 1 kHz, the gyro log is not displayed (flat zero line only), but the accelerometer log is recorded good.
If I turn on 1,000,000 baud, then garbage is written to the log, and it is not read correctly at all.
Please tell me which of these two problems can be solved by replacing the SD card? And what could be the reason for the second problem?
Reply
#5
Hi Pavel

I never got 1m baud to work, indeed it only writes garbage. While the OpenLog processor supports the baud rate I guess it can't handle the data stream while performing the (fairly complicated) task of writing to the FAT filesystem on the SD card.

But 1 kHz logging at 500k baud worked perfectly for me. Sadly I lost my kwad quite a few moons ago (https://intofpv.com/t-lost-my-trashcan) so I never finished tuning it.

It is very important to use an SD card with low latency to get it working. On the chart at https://www.jeffgeerling.com/blog/2018/r...rison-2018 the ones with the highest 4k write speed are the best for OpenLog. Samsung Evo+ is not produced anymore so the Samsung Evo Plus 32GB or SanDisk Extreme 32GB are the best you can get. Don't buy anything larger because the OpenLog can't handle XC cards.
Reply
#6
I also lost mine, but then I found it

https://www.youtube.com/embed/yP_PD7Q2-t4?vq=hd1440
Reply
#7
L0stB1t,

I suppose that the problem with the 1M baud is not that it cannot write to the flash card at such a speed, because in this case the data should be written partially but correctly, but it is written continuously but garbage.
Perhaps the problem is that the logger does not understand that baud 1M is installed, since every time it overwritten the config file, and instead of 1,000,000 it puts 100,000 there, removes one sign. Most likely a program error.
Reply
#8
What you think about SanDisk Extreme Pro A1 32GB ?

Please look this chart: http://www.pidramble.com/wiki/benchmarks/microsd-cards
Reply
#9
(28-Oct-2020, 01:59 AM)Pavel_D Wrote: I also lost mine, but then I found it

https://www.youtube.com/embed/yP_PD7Q2-t4?vq=hd1440

Great Smile  I suggest to add a beeper to the Trashcan, it's a fiddly job to solder it in place but it makes the kwad a lot easier to find after a crash. Sadly the beeper didn't help me when my Trashcan wanted to swim Big Grin

(28-Oct-2020, 02:18 AM)Pavel_D Wrote: L0stB1t,

I suppose that the problem with the 1M baud is not that it cannot write to the flash card at such a speed, because in this case the data should be written partially but correctly, but it is written continuously but garbage.
Perhaps the problem is that the logger does not understand that baud 1M is installed, since every time it overwritten the config file, and instead of 1,000,000 it puts 100,000 there, removes one sign. Most likely a program error.

Yeah you could definitely be right, I also remember the config file changed itself when setting a bad option. In any case you don't really need 1M baud, 500k is enough to log at 1 kHz, and I never had the need to log any faster.

(28-Oct-2020, 02:22 AM)Pavel_D Wrote: What you think about SanDisk Extreme Pro A1 32GB ?

Please look this chart: http://www.pidramble.com/wiki/benchmarks/microsd-cards

Those numbers look great! I'd say go for it Wink
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help - OpenLog Blackbox romangpro 0 175 19-Feb-2022, 09:31 PM
Last Post: romangpro


Login to remove this ad | Register Here