Monday, May 25, 2015

Upgrading firmware to 3.1.5 (Cheerson custom Uart version)

I'm finally upgrading to ArduCopter v3.1.5. VinnieRC took the time to re-compile a custom Cheerson Uart version of v3.1.5. Now, Telemetry/Uart port works on this Cheerson APM_252_v2.0 Flight-Controller. I installed it from MissionPlanner v1.3.27. .

I like v3.1.5 because:
- The major v3.1.2 "randomly kill throttle in flight" bug is fixed (yes, I've experienced it)
- Terminal feature (for Diags, Troubleshooting, and Settings) is still in Code and works.
- The code is simpler than v3.2.x, and I think it runs better on the limited processor power of a little APM-based unit, without getting dangerous cpu "LongLoops" cycles. Reportedly, v3.2.x can over-burdened the limited APM with "staying stable in wind" calculations and altitude-control suffers. You can even keep your (processor intensive) detailed Logs recording enabled. I'm willing to give up v3.2's Position-Hold flight-mode, Spline-WayPoints, (and a few other little features) ... for a more stable, dependable, and easier to troubleshoot aircraft (at least for now).


I Reset Parameters to Default. I will add my custom parameters from a pre-written list, manually later.

These are some AC3.1.5-Defaults. However, some are different than v3.1.2-Defaults, so I thought I would list them here (since they are important to be set like this). I am using 915mhz radios, but no PowerModule yet.

AHRS_GPS_DELAY,2
AHRS_GPS_GAIN,1
AHRS_GPS_MINSATS,6
AHRS_GPS_USE,1
AHRS_ORIENTATION,0
ARMING_CHECK,1
COMPASS_EXTERNAL,0
COMPASS_ORIENT,0
COMPASS_USE,1
FENCE_ENABLE,0
FRAME,1
FS_GCS_ENABLE,0
FS_GPS_ENABLE,1
FS_THR_VALUE,975
GPS_HDOP_GOOD,200
PILOT_VELZ_MAX,250
THR_MAX,1000

I purposely reset my parameters to get a fresh copy of v3.1.5 defaults (and to not carry-over any depreciated params). The params and settings listed below will not really include any that are already correct as Default. I also don't plan to give explanations for each, so you can just search my blog for notes and definition of each.

I then did a complete calibration of all Mandatory Hardware (radio first). Compass calibration seems a bit different this time.

Set my Flight Modes:
1. Stabilize
2. Loiter
3. Alt-Hold
4. Drift
5. Land
6. Auto
... and in Extended Tuning, CH7=SuperSimple and CH8=RTL
(which I have on dedicated Taranis buttons)

Changed these non-Default parameters:

FLTMODE1,0
FLTMODE2,5
FLTMODE3,2
FLTMODE4,11
FLTMODE5,9
FLTMODE6,3
CH7_OPT,13
CH8_OPT,4

ANGLE_MAX,3000
FS_BATT_VOLTAGE,6
FS_THR_ENABLE,1
LAND_SPEED,30
LOG_BITMASK,958
MOT_SPIN_ARMED,0
RTL_ALT,2000
THR_MID,660
WP_YAW_BEHAVIOR,1

My starting PIDs, but also AC 3.1.5 Defaults


I guess it's ready for a test flight, THR_MID determination setting, Auto-Trim, etc.

I used the above params for the first test flight.

Parameter History:

After first test flight with above Default v3.1.5 params, I changed them to this. This few edits makes them the same as my last (working fine) v3.1.2 params.

Flight Session #21 used these. THR_MID,660. These don't work so good any more, so it must be the extra weight of the gimbal that is installed now.


Current Parameters:

On Flight Session #23 changed to these (below) Nova params that I got from Skywarka. They are the best yet and flew the Nova nicely (with gimbal). Also, the Mobius audio for the motors sounds better and more even. Logs and logging are still working fine. Final THR_MID for this weight is 670.

 

 
This is my Nova's current param changes list (over-rides any values above) as of July 11, 2015
COMPASS_EXTERNAL,1  (yes, external compass - my mod only)
COMPASS_ORIENT,2        (yaw compass 90 degrees - my mod only)
GPS_HDOP_GOOD,220     (extra buffer that effects final GPS accuracy very little)
RTL_ALT,4000         (don't want to RTL into the side of a tall structure on hilly terrain)
THR_MID,670                     (for All-Up-Weight of 1153 grams)
WPNAV_LOIT_SPEED,800
WPNAV_SPEED,700


 



51 comments:

  1. Thanks for your blog!

    I am totally new to this, and accidently upgraded my firmware in Mission Planner to whatever was the most updated version (I allowed it to automatically do this). Should I try installing 3.1.5 that you have listed here? Or can I find the original firmware somewhere?

    Thanks!

    ReplyDelete
    Replies
    1. Yes, it just does it with little warning doesn't it. If it flies fine (or you can tune it to) on v3.2.1, you are ok. You can't go back to original v3.1.2, but you don't want to anyway (there is a bug). Try v3.1.5 from Mission Planner if you want something "lighter". If you want Telemetry/Uart port to work on this Cheerson FC (for 3DR Telemetry radios or OSD) you will have to download and install custom-hex-compiled versions of either v3.1.5, v3.2, or v3.2.1.

      Delete
  2. Tesla, thanks for the response!

    I went ahead and installed the custom 3.1.5 that you link from VinnieRC. It seems to have loaded fine, and I also installed all your parameters above (I'm pretty sure I did it all correctly). I also went ahead and ordered a telemetry kit, now that I should be good to go for it :D

    I do have other problems... I have not flown the drone yet because I can't get the compass calibration to work. Perhaps I have a bad compass? Is it crucial to the compass calibration outdoors?

    ReplyDelete
    Replies
    1. Vinnie's v3.1.5 will work fine. You will like the capabilities that Telemetry radios give you. My recent compass calibration saga is here:

      http://quadcopter-robotics.blogspot.com/2015/05/compass-calibration-procedure.html

      Delete
  3. Weird, it seems that the compass is working now! It's too dark out to fly, but I'll try tomorrow.

    ReplyDelete
    Replies
    1. didn't your quad come with lights like ? lmfao

      Delete
  4. Will this work on the opensource version tot? Did a update to 3.1.5 but the quad is uncontrollable in loiter mode

    ReplyDelete
    Replies
    1. Yes, in fact ... this custom firmware is ONLY for APM v252 Flight-Controllers in Quanum Novas and Cheerson CX-20 (Open-Source version only).

      Your Loiter problem is likely something else. Try Defaulting your parameters and then do a full calibration of ALL Mandatory Hardware.

      http://quadcopter-robotics.blogspot.com/2015/02/quanum-nova-cx-20-with-apm-fc-pilot-tips.html

      And also, remove any extra payloads and vibrations.

      http://quadcopter-robotics.blogspot.com/2015/01/nova-flight-unstable-and-wod.html

      Delete
  5. Thanks i followed tour tutorial and the quad fly's a lot beter! I have 2 remaininf questions:

    1. Landing is very hard right now because the quad is very sensitive! Is there a way to change this?

    2. When i land the quad the motors keep spinning. Can i turn this off?

    Thanks! I really appreciate tour help!

    ReplyDelete
    Replies
    1. Glad to here it's working better.

      1. Try LAND_SPEED, 30

      2. Verify MOT_SPIN_ARMED,0 ... but sometimes, my Nova has same problem. Not sure why it fails to detect landing sometimes. Since throttle is already down to 0, I just flip on Stabilize to quickly stop motors. If you figure a better way, let me know.

      Delete
  6. Will your current PID work with the same gimbal (Eachine Light) and a GoPro or SJCAM SJ4000. Felt like my CX-20 is having random left/right yaw after putting on the gimbal.

    ReplyDelete
    Replies
    1. They do pretty good, but I still have slight yawing. If you figure it out, let me know. It's the weight and the wind I think ... it's just trying to fly stable at proper general heading and altitude (with the power it has). For perfect video, a 3D gimbal might be needed and likely on a slightly larger aircraft. Camera with Image Stabilization would also help.

      Delete
    2. Also, flying faster seems to help.

      Delete
    3. Yes I noticed the same thing. Moving at a faster speed reduces the yawing. Knowing that it significantly changes the CG, do I need to redo the Autotrim after putting things onto the aircraft (with everything loaded of course)? One more thing, I find the rubber balls that came with the Eachine Light gimbal are quite stiff as I still get a little jello in my video with props fully balanced.

      Delete
  7. Hi,

    are you able to dowload a logs by mavlink with this version ?
    im gettung the error "Error receiving log list" when click on Dowload Logs button.

    Regards
    Kris

    ReplyDelete
    Replies
    1. On this v3.1.5, I always just download logs from Terminal over USB.

      Delete
  8. so i crashed my quanum nova and currently contemplating about a hexa or octo. I gutted out the parts and ordered a new hexa and octo body (i have all motors and esc) but wanted to use the quanum apm for this set up. Can i use the 3.1.5 firmware and change the body to hexa or octo?

    ReplyDelete
    Replies
    1. You should be able to. VinnieRC said the only change to stock v3.1.5 to make it Cheerson/Quanum 3.1.5 ... is an edit to code that related to how the com-ports are handled (for telemetry port).

      Delete
    2. they also changed the esc you don't soldeer it no more its on a jack you can plug in not that I mind I love my cx 20 open source version but I did think the nova had more finished touches nice

      Delete
    3. I think the old ones had the ESC plug, while the new revisions are hard wired. I think they wanted to get rid of a point of failure (the ESC connector).

      Delete
  9. I have my telemetry soldered to the resistors for the USB on the TX/RX. Will Vinnies 3.1.5 Firmware still work for me? I am on some version of ardupilot now, I cant remember which, I know its not the stock 3.1.2 and things are working well, but i'd like to be on a known version as a friend is buying the quad from me.

    Any advice?

    ReplyDelete
    Replies
    1. I can't really say since I never did the resistor uart port hack. However, it's easy enough to load and try.

      Delete
  10. Wow! This is what I was looking for for the last few hours! Thanks!

    ReplyDelete
  11. i fairly new to all this, i ballsed my quad up a fair bit ago and it stayed put away for a while. just gave your instructions a shot and now im failing to arm it could anyone point me in a direction worth going hah cheers i have a quanum nova apm 2,52 v5.0 board

    ReplyDelete
    Replies
    1. Must do all calibrations, and MissionPlanner should say why it's not Arming. If GeoFence is on, switch it off for now.

      Delete
  12. hello please help me my cx20 bepping This happened to me while doing the transmitter calibration. The motors started spinning with the props on and I panicked and unplugged it during the calibration. This was my earlier times so I was really new to this
    i need the factory setting param... please help me
    roovigital@yahoo.com

    ReplyDelete
    Replies
    1. Yes, both bad things to do (leaving props on, removing USB cable without proper MP disconnect), but not you know. Have you tried re-connecting MP and calibrate radio properly? Try a full-reset and reload firmware. See section "Simplified Full Nova/CX-20 Setup" here:
      http://quadcopter-robotics.blogspot.com/2015/02/quanum-nova-cx-20-with-apm-fc-pilot-tips.html

      Delete
  13. Hello, thanks for compiling this custom 3.1.5 firmware. I first upgraded to 3.2.1, it seemed to fly ok with default parameters, but I did not test much. I decided to revert to this 3.1.5 firmware after reading many people seem to think this works better on the cx-20.

    I am trying to learn more about this drone so wanted to take a look at logs, it should be logging every flight by default, right?
    When I go to get DataFlash logs and click Download DataFlash Log via Mavlink it takes a little while at the getting list of log files screen then reports an error:
    Error:System.TimeoutException: Timeout on read - GetLogEntry
    at MissionPlanner.MAVLinkInterface.GetLogEntry(UInt16 startno, UInt16 endno) in C:\Users\michael\Source\Repos\MissionPlanner\Mavlink\MAVLinkInterface.cs:line 4149
    at MissionPlanner.MAVLinkInterface.GetLogList() in C:\Users\michael\Source\Repos\MissionPlanner\Mavlink\MAVLinkInterface.cs:line 4089
    at MissionPlanner.Log.LogDownloadMavLink.b__13_0() in C:\Users\michael\Source\Repos\MissionPlanner\Log\LogDownloadMavLink.cs:line 91

    My guess is that this has something to do with the custom compiled version since it is looking in a specific users directory. Is there any way to fix this?

    ReplyDelete
    Replies
    1. On v3.1.5 I use MP's Terminal to download logs via USB cable. No, that is just the MP program erroring-out.

      Delete
  14. A little to the description:
    First and foremost the qudcopter was crach.
    Then I put a little qudcopter corrected.
    Then quadcopter not listen very well. Flying was very difficult.
    Additionally, I do not flashing red LED. Only the orange LED flashes. Green LED flashes for a while. Then goes out. It was to establish a connection between the transmitter and quadcopter.
    After a while.
    I tried to connect it to a PC (Mission Planner). Upload firmware from this page http://quadcopter-robotics.blogspot.cz/2015/05/upgrading-firmware-to-315-cheerson.html. And finally, I have performed calibration (Wizard). In the part "Compass calibration" it wrote "error 99" in two rows. In the first row there are the values ​​changes when rotating quadcopter. In the "Verify current progress" is the first (Verify GPS) and the last line is red. The last (fourth) row when I arming transmitter turns green, and it's OK.
    When I disconnect quadcopter from PC.
    And when quadcopter connect to the battery. The red and green LED diods in front side of quadcopter doesn´t working. And the quadcopter still centered propeller. The transmitter can´t connect (connect).
    Have you any advice (tip).
    I apologize for my English.
    Thank you!

    ReplyDelete
    Replies
    1. Sounds like you might have some damage after that first crash. I would open it up and make sure everything is ok inside and Flight Controller is still mounted securely. Fully calibrate. I have several long detailed posts here on how to setup one from scratch.

      Delete
  15. OK thanks!
    I will check again the correct connection.
    Do you have by chance scheme of wiring (Cheerson CX-20)?

    Otherwise.
    After I connect to the Mission Planner. The green LED diod and orange LED diod for a few time are flashing. After a few times are off.
    On the board in CPU switch on blue diod and red diod (not in GPS).
    Next I open "wizard" of calibration.
    I mean that is OK.
    Only in the part "Compass calibration" it wrote "error 99" in two rows. In the first row there are the values ​​changes when rotating quadcopter.

    Next I disconnected Cheerson from the computer.
    And I do battery connection. LED diods ever flashed.
    And the engines still permanently centering.

    ReplyDelete
    Replies
    1. Sorry, didn't realize you had posted again.

      I have two Nova/CX-20's, but both of mine are versions without radios. Sound like you have RTF Model. This page should help:

      http://quadcopter-robotics.blogspot.com/2016/02/quanum-nova-cheerson-cx-20-open-source.html

      And as far as a complete build-up, I have made a couple of posts like this one over the years. Follow this and then this post above, and it should work-out any problems:

      http://quadcopter-robotics.blogspot.com/2015/01/nova-rebuild-apm-radio-setup-winter-2015.html

      Delete
  16. hola
    gracias por todos tus consejos de gran ayuda
    una pregunta es necesario actualizar a una ver superior mi cheerson acaba de llegar
    saludos

    ReplyDelete
    Replies
    1. You are welcome. I hope your Cheerson flies well for you. Please try to post in English next time.

      Delete
  17. Tesla thank you for this big load of information!

    I have a Quanum Nova APM 252_v5 with stock 3.1.2 fw
    As I had the well known 'no data flash' error I decided to disassemble and take a look inside my quad.
    Also as I have already added a 2d gimbal with sj4000 I am also going to add an eachine Tx + miniOSD.

    I would really appriciate if you could answer a a couple of question:
    1. about 'no dataflash' error do you thing upgrading to 3.1.5 would solve the problem?
    2. is it worthing going to 3.1.5 (my QN flies ok as is ) . As I am going to add OSD telemetry ,e.tc
    I must install 3.1.5 afterall or 3.1.2 may support the telemetry port?
    3. with all gimbal, tx and telemetry modules installed + sj4000 I think I have to do an autotune calibration , right?

    ReplyDelete
  18. 1. You could try it. Also, and full resets or reformats. However, I've never heard of anyone reviving dataflash. Once the soldered in flash memory is bad, it's bad.
    2. Yes, you can fly on v3.1.2, but it has the no-throttle bug which will surface eventually. But you will still have no dataflash, and I would not recommend building a quad without logging capability.
    3. Auto-Trim if not perfectly balanced, but not Auto-Tune. Default PIDs should be fine.

    Since it sounds like you need a new FC anyway ... I've seen pilots fit a PixHawk v2.4.8 in there, but PixRacer clone is much smaller.

    ReplyDelete
  19. BitManiac,
    Also, both v3.1.2 and v3.1.5 support Telemetry port. But on this particular FC, it must be the special Cheerson firmware version.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Hi Tesla.
    I am returning with new infos!
    I decided to remove the flash data chip from my APM252_v5 pcb
    and made this quick programmer :
    http://77.71.105.127/AtmelFlash/index_en.html

    I made a diy soic to dip adapter and soldered te suspicious at45db161 flash chip and trying to read/program it . NO SUCCESS!

    SO I SUSPECT A FAULTY FLASH (AT45DB161) CHIP!

    I happened to have a similar at45db041 chip in hand and trying to read/write it was successful , so there is no problem with adapter/programmer.

    I decided to solder the AT45DB041 chip instead on my faulty APM with no success! I don't know if this should work (4mbit vs 16mbit) , maybe fw detects chip id type (!?)

    ReplyDelete
    Replies
    1. Ambitious board-level repair project. Sorry it didn't work out. As you know, flash memory is fairly delicate. My guess is that the chip used here does not employ proper bad block reservation or wear leveling. It was worth a try since you apparently have good SMT/SMD micro-soldering stills. PixHawks are around $50 usd and flash is moved to SD-Card where it belongs.

      Delete
  22. Tesla my friend... Guess what?
    SUCCESS! I repaired the no dataflash issue with my APM252 V5 pcb.
    Changed the origirnal faulty flash chip(AT45DB161) with another flash-chip I had in my lab bin (AT45DB321) and now loggin is working! Check fotos with repaired pcb and testing via MP.

    https://www.dropbox.com/s/cwca4hr17oopbad/apm252_v5.jpg?dl=0

    https://www.dropbox.com/s/n5wgs6co2wsguo4/log_test.jpg?dl=0

    note: it seems -afterall- that the firmware automatically recognised the new type chip id and now i will have a 32mbit flash instead if the original 16Mbit...

    ReplyDelete
    Replies
    1. Wow. Good work and thanks for the clear/focused pics. Let us know if it programs-up and calibrates OK.

      Delete
    2. As I am on vacation this weekend I will check in a week.
      I think everything should work as this specific chip is for logginf only and has nothing to do with programming parameters, calibration data ,e.t.c. I will laet you know anyway.

      Delete
  23. how can I write a code to make my cheerson cx-20 collect and log meassurments such as (Ambient Signal Strength)?
    is it even possible ?
    is there a way that I can read the firmware code if I have an open source drone ?
    thank you guys for the info. this is a great forum. but I am a newbie.

    ReplyDelete
    Replies
    1. Not sure what radio or sensor (ie GPS) you want, but all logging can be configured in MissionPlanner. For real-time monitoring, you can use DroidPlanner on a laptop or Android tablet. With Taranis and FrSky X8R Receiver, you can get real-time RSSI. It's all here in my Blog (including logging config). Glad you like the Blog. Welcome to the hobby.

      Delete
    2. Oops, MissionPlanner on Windows laptop. DroidPlanner on Android tablet. Telemetry 915mhz radio (if in USA) is real nice, but not really needed for logging though, which was your original question.

      Delete
  24. I know this is old.
    I have a 2.52 v5.0 and it wont connect to mission planner at all
    I have tried all the firmware stuff with the vast software updater but still no luck. any help with how to connect it.

    ReplyDelete
  25. Some Mission Planner Tips here:
    https://quadcopter-robotics.blogspot.com/2015/02/quanum-nova-cx-20-with-apm-fc-pilot-tips.html

    Also, try new USB cable or different laptop. IIRC, Windows must detect FC before Mission Planner has any chance to. Hope this helps. I still have mine and it still works. Just not much time to fly these days.

    ReplyDelete

The stupid spammers have now forced me to approve each Comment before it appears (but I am usually pretty quick about it).