Page 1 of 1

DEV r1553 - Minthrottle not setting correctly

Posted: Mon Aug 19, 2013 2:49 pm
by Geebles
Hi devs,

I've been experimenting with latest dev r1553 (https://code.google.com/p/multiwii/source/detail?r=1553) and have found an odd behaviour using a Crius AIOP V2 (Mega) (probably not specific to this board but I thought I'd mention it)

1. Calibrated ESCs to 1000 - 2000 externally
2. Flashed 'clear eeprom' to FC
3. Flashed with 'MINTHROTTLE 1150' and 'MAXTHROTTLE 1850'
4. Power up FC, GUI reports the values above
5. Using oscilloscope, when disarmed the waveform is ~20% ON (normal - looks like its at 'MINCOMMAND 1000')
6. When armed, oscilloscope reads ~1% ON! (not right, this is a very very low PWM output)
7. Increasing throttle until 90% reads on oscilloscope ~60% ON and then the motors come to life!! Before this the motors do not respond (SimonK FW)

I have checked and I have not enabled the 0 - 2000 PWM mode (EXT_MOTOR...) I've literally just checked the code out, set my board and flashed!

My code is here: https://dl.dropboxusercontent.com/u/2831810/MW2.2_r1553.zip

Any ideas? I'm fairly with it in terms of set up, but not enough to actually dig through the code and work out what is being set incorrectly in the registers/somewhere that is causing the PWM scale to be from 0-100%..

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Fri Aug 23, 2013 12:54 am
by Alexinparis
Hi,

5. Using oscilloscope, when disarmed the waveform is ~20% ON (normal - looks like its at 'MINCOMMAND 1000')

not really normal: disarmed means signal = 1000us => at 490Hz, the waveform should be around 50%
I would start investigation here

DEV r1553 - Minthrottle not setting correctly

Posted: Mon Sep 02, 2013 12:19 am
by doughboy
Not sure if I'm running into the same problem. I've had my quad on pre 2.2 software and everything works fine. I just upgraded to latest and now the motors don't turn on at all (it arms) with my throttle curve settings I used on 2.1 motors don't come on at all even at 100% throttle. If I reset to default, motor only comes on when throttle is pushed up halfway.

I then restored back to my old firmware and the quad works just fine. Motors turn on arm.

It looks like the throttle lookup table calculation may be ending up with values that are too low. The 2.1 code does not have this lookup table.

Any ideas what I need to do to fix this?

Thanks

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Mon Sep 02, 2013 7:13 am
by PatrikE
Clear Eeprom with the Arduino example sketch.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Mon Sep 02, 2013 9:27 pm
by doughboy
PatrikE wrote:Clear Eeprom with the Arduino example sketch.


I thought that clearing eeprom issue was resolved by adding the checksum.
anyway, I cleared it and it did not make any difference.

I tried the 2.2 release and everything works fine.
so something got messed up between 2.2 release and the current head revision.
2.2 default setting works great.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Tue Sep 03, 2013 6:31 pm
by doughboy
Alexinparis wrote:Hi,

5. Using oscilloscope, when disarmed the waveform is ~20% ON (normal - looks like its at 'MINCOMMAND 1000')

not really normal: disarmed means signal = 1000us => at 490Hz, the waveform should be around 50%
I would start investigation here


I agree with Geebles observation. It does look like the calculations resulted in throttle (or the motors calculation in mixTable) have way less value than it is supposed to. I had to push the throttle up to around 50% before the motors start to spin.

The 2.2 stable works fine. I tried to find what change could have caused this but there are too many changes in between.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Fri Sep 06, 2013 1:59 pm
by Geebles
doughboy wrote:
Alexinparis wrote:Hi,

5. Using oscilloscope, when disarmed the waveform is ~20% ON (normal - looks like its at 'MINCOMMAND 1000')

not really normal: disarmed means signal = 1000us => at 490Hz, the waveform should be around 50%
I would start investigation here


I agree with Geebles observation. It does look like the calculations resulted in throttle (or the motors calculation in mixTable) have way less value than it is supposed to. I had to push the throttle up to around 50% before the motors start to spin.

The 2.2 stable works fine. I tried to find what change could have caused this but there are too many changes in between.


That sounds exactly like what I was seeing, around that kind of throttle level before the motors would even start! I'll get the output of oscilloscope and put it here to show what I mean, you say its in the mixTable the error has changed? I'll try and look through the logic but it sounds like you have a better idea than I do! :P What hardware/config are you using?

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Fri Sep 06, 2013 5:27 pm
by doughboy
I tried to follow the code in the mix tables function, and I cannot see any problem. I did manual calculations etc and everything checks out.
so then I noticed on the MWGUI, the voltage is showing some funny value, so I started changing the value of VBAT_SCALE, and tried out a few different values and the vbat value started to get closer to the correct value, and finally, I ended up back to the original VBAT_SCALE value of 131! and now the vbat voltage is correct, and the quad arms and motor spins. I did not change any code from the case that worked and one that did not other than uploading the sketch a few more time due to trying out different VBAT_SCALE values!

I'm guessing there might be an issue with storing or reading conf values from eeprom that is causing all this. perhaps the throttle lookup table is not storing or getting the right value from eeprom. But I don't see how that can be because the code uses checksum to verify the data read from eeprom. maybe that checksum verification code is allowing bad data to pass as good.

anyway, I got my quad flying again using the latest code.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Fri Sep 06, 2013 9:51 pm
by Pat1300
Are you sure that you are using MultiwiiConf from 2.2, not MultiwiiConf from 2.1 ??
I got exactly same issue when using MultiwiiConf 2.1 with FW Multiwii 2.2 : some values, like minThrottle, were overwritten by uninitialized values from MultiwiiConf 2.1...

Patrick

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Fri Sep 06, 2013 10:39 pm
by doughboy
hmm, I am using MW conf from 2.2 release (compiled), not the shared one (source only).
I did say that 2.2 release FW I did not have any problem, only on shared.

if mismatched gui and fw will cause problem, perhaps there should be a check in gui if the fw matches.
but if that is the case, I shouldn't be able to get my quad to work still using the 2.2 release gui and shared fw, but yet I did.
perhaps the 2.2 gui has that problem you described as well.

I guess it's still a good idea to make sure the gui and fw match. I'll test later using the shared gui.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Sat Sep 07, 2013 1:04 am
by doughboy
ok, Patrick, you got the correct answer.

The MultiWiiConf_shared MUST be used when using MultiWii_shared firmware!!

this is what I posted in the vbat thread

ok, I ran into this issue, as well as the throttle issue.
and as others pointed out, the MW GUI is the problem.
If you are using code in shared, you must use the Gui from shared, as that has the page that allows you to set the VBATSCALE, MINTHrOTTLE, etc. Without this, I think they just get a value of 0 (more so if you cleared the eeprom).
As an example, with the throttle problem, when I arm, I have to push throttle to halfway before motors starts to spin.
I have also seen when I arm, the low battery warning alarm sounds right away, even when my battery is fully charged!

resetting in gui will only work if you are using the shared version of gui, not the 2.2 release gui.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Sat Sep 07, 2013 6:06 pm
by Alexinparis
doughboy wrote:ok, Patrick, you got the correct answer.

The MultiWiiConf_shared MUST be used when using MultiWii_shared firmware!!

this is what I posted in the vbat thread

ok, I ran into this issue, as well as the throttle issue.
and as others pointed out, the MW GUI is the problem.
If you are using code in shared, you must use the Gui from shared, as that has the page that allows you to set the VBATSCALE, MINTHrOTTLE, etc. Without this, I think they just get a value of 0 (more so if you cleared the eeprom).
As an example, with the throttle problem, when I arm, I have to push throttle to halfway before motors starts to spin.
I have also seen when I arm, the low battery warning alarm sounds right away, even when my battery is fully charged!

resetting in gui will only work if you are using the shared version of gui, not the 2.2 release gui.


Ok, nice to see you solved your problem.

some complement:
MW GUI is retroactive: with MW GUI 2.2 dev, you can control a 2.2 FC

but, with MW GUI 2.2 you can't control fully a 2.2 dev FC
the reset button will work, but everytime you hit on write button, things like minthrottle will get weird values.

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Sun Sep 08, 2013 4:32 pm
by Benik3
I have the same problem, but I'm not able to find, where to get the GUI 2.2 dev which will work with the dev MultiWii :/

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Sun Sep 08, 2013 4:57 pm
by -ralf-
Benik3 wrote:I have the same problem, but I'm not able to find, where to get the GUI 2.2 dev which will work with the dev MultiWii :/

It's part of this archive

http://code.google.com/p/multiwii/downloads/detail?name=MultiWii_dev_2013_08_23_r1555.zip&can=2&q=

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Sun Sep 08, 2013 7:47 pm
by Benik3
I got it, thanks :)
BTW x64 app doesn't work for me, 32bit yes (I have Windows 7 HP x64)...

Re: DEV r1553 - Minthrottle not setting correctly

Posted: Mon Sep 09, 2013 3:51 am
by doughboy
processing 2.0 has disabled 64 bit support for serial library. If you really want 64 bit, you can use processing 1.5. I believe you need to find and install 64 bit rxtx dll for 64 bit to work in processing 1.5.