Sevos not working

Here is the place for all your dsPic or autopilot questions.

Moderator: lukasz

Sevos not working

Postby marc » Thu May 20, 2010 9:45 am

Hi,

I'm configuring the Gluonpilot "from scratch" and I cannot control the servos neither from the transmitter of with the Gluonpilot itself (5V available and pulse=2,5mS)

What I did:

- "RC Input" : after configuration, the "burn" crashed systematically the Gluonconfigurator (laste version downloaded on 16/05). I found a workaround : upload the funjet.gcf configuration and it got to work.

- "servos" : "servo neutral ... manual mode..." is ticked, but the tick box is disabled and I cannot change this. The value for all the servos is "-1". Since the neutral value should be taken a startup, I tried to start in "manual", "stabilised"... mode but without success.

- GPS works and is locked (EB85 38400 Bauds). When exporting to .kml, I got the same kind of crash. See below.

Any Idea?

MArc

: See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Gluonpilot.ConfigurationFrame._button_datalog_kml_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Re: Sevos not working

Postby marc » Thu May 20, 2010 3:14 pm

Tom,

I found in the code I should hit the "Default" key...I feel a bit stupid... ;-)
Now, the servos are reseted to neutral position but still no control on them...
PPM pulse train is selected, ... I deselect it, reselect it, burn, reset.... still not working...

I tried several combinaison with also the write (for the channel selection (Roll, Pitch...AP)), then the Gluonconfigurator crashed... Below the trace...

Suddently it started to work only for the pitch (which is on channel 1) when the GluonPilot is in "Manual mode". it seems the Gluon stays in "Separate PWM" modes

The GluonPilot, crahed also some time when playin with the RC input configuration.... 3-4 times then it starts to work in a more stable way....

Any idea?

MArc







See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Gluonpilot.ConfigurationModel.ToAllConfig()
at Gluonpilot.Form1._btn_write_Click(Object sender, EventArgs e) in C:\Documents and Settings\Eigenaar\Mijn documenten\gluonpilot\Software\Gluonconfig\Gluonpilot\Form1.cs:line 93
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Gluonpilot
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Marc/Mes%20documents/mplab/gluonpilot/Software/Gluonconfig/Gluonpilot/bin/Debug/Gluonpilot.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Communication
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Marc/Mes%20documents/mplab/gluonpilot/Software/Gluonconfig/Gluonpilot/bin/Debug/Communication.DLL
----------------------------------------
Configuration
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Marc/Mes%20documents/mplab/gluonpilot/Software/Gluonconfig/Gluonpilot/bin/Debug/Configuration.DLL
----------------------------------------
SmartThreadPool
Assembly Version: 1.0.2235.39078
Win32 Version: 1.0.2235.39078
CodeBase: file:///C:/Documents%20and%20Settings/Marc/Mes%20documents/mplab/gluonpilot/Software/Gluonconfig/Gluonpilot/bin/Debug/SmartThreadPool.DLL
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Re: Sevos not working

Postby Tom » Thu May 20, 2010 5:44 pm

Hello Marc,

Glad to read you finally got some time to play with it :-)
Are you using the latest firmware & software?
You need to "write" to memory and then "burn" memory to flash.

The gluonconfig error is something I encountered before... it seems to be a bug in visual studio. ADoes a rebuild all (don't forget to close all you open edit windows) help? Are you using the downloaded precompiled version or a self-compiled one? Are you using the latest code?

Tom
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Sevos not working

Postby marc » Sun May 23, 2010 11:02 am

Hi Tom,

I use both precompiled versions (Gluonpilot v0.1 [Apr 10 2010 18:24:19, config: 220 bytes, logline: 60 bytes, double: 4 bytes])
I also do the "burn" & "write"...
The symptoms I have :
- only manual mode can drive all the servos (Delta + , motor)
- in stabilised mode, only the motor servo works (the GPS is not locked, it shouldn't be an issue?)
- only pitch, roll and motors work... the yaw servo doesn't work in any mode even when the blue bar is moving
- The fact that I had random crashes when playing with pitch, roll and that the channels blue bars were not very stable on the "RC input" screen were due to the fact the module was supplied via the USB...

Any idea?

MArc
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Re: Sevos not working

Postby Tom » Sun May 23, 2010 12:01 pm

Hi Marc,

- Using the graph or 3D screen, do pitch and roll have normal values? Maybe you didn't calibrate the sensors and therefor the pitch and roll are NaN? Try not holding the module upside down or at 90° pitch or roll, this version you are using might have a divide by zero in these cases. (fixed in later version)
- See previous point, gps lock doesn't matter
- It is normal that the yaw servo doesn't work since only 3 servos are used in the code... I'll just pass the manual value in the next version.
- So this issue is fixed? On my PC, the USB 5V is very stable...
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Sevos not working

Postby marc » Sun May 23, 2010 1:20 pm

Yes, pitch an roll have normal value when looking to the graph and are calibrated...
Is the vearion I use, the latest (see ref in previous post) or do I be beter to recompile the sources?

MArc
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Re: Sevos not working

Postby Tom » Sun May 23, 2010 1:34 pm

Stabilized mode = 1.5s (so your autopilot switch should be "in between" min and max). Is this the position you are using? The 2 extremes: 1ms and 2ms are manual (which is working) and navigation (which is still under development).

Pitch stabilization with your transmitter won't work because altitude hold is enabled in the code.

Try the hex file attached, this is the version I am using.
rtos_pilot.zip
(62.57 KiB) Downloaded 492 times
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Sevos not working

Postby marc » Tue May 25, 2010 7:21 pm

Hi Tom,

I burned the new firmware.

In manual mode, it seems ok for pitch & roll.

In assited mode, the system restarts several time (this time supplied with a LiPo), none of the servos goes to the neutral position (sensors are configured via the Gluon configurator, a "read" then a "use current" then a "write" should be enough?). The roll seems to be moving correctly when moving the board (even in neutral is NOK). The pitch starts to deviate from its starting position and goes to the end of course at startup time, then does strange moting when moving the board (eg going from one end postion to the other end position) and generate some crash of the board.

CU

MArc
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Re: Sevos not working

Postby Tom » Wed May 26, 2010 7:13 am

Hi Marc,

For calibrating the accelerometers:
- Press "use current", but change z-axis: the acceleration along the z-axis should be -1 when flat. The total acceleration should also be -1. So you should change the z-axis neutral acceleration to something of around 33000.

Then it should work :-)

I'll change the code so it handles these overflows in a better way.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Sevos not working

Postby marc » Sun May 30, 2010 1:21 pm

Hi Tom,

I flashed the new firmware, pitch and roll work in stabilized mode (only roll can be controlled from the transmitter)

I still experience a lot of "unexplained" crashes (eg when moving from Stabilised mode to Manual mode)... It is not always linked whith the absence of Lipo like I explained before... I need to have a tool to see what kind of reset (watchdog & trap) has been initiated... Would it possible to implement a way to display the Trap error code at reboot time?
Attached an example I did for your previous autopilot code version: the LED behaviour is different if there has been a Trap or not, and the Trap (stored in the EEPROM) is sent to the UART at reboot time.

I also have other suggestion (if I may....):
- the availibility of a transmitter should not defined at boot time... it should be in a thread: as soon as the transmitter is available and in manual mode, it can control the Gluonpilot... Its more logic... I also have the feeling that my receiver (Graupner R600) is not always "ready" before the PPM init task is started.
- the ControlConfig structure should contain also a SW version number. The purpose being to automatically erase and rewrite the whole structure in the EEPROM when it's structure has been changed (or even when the Firmware has been changed).

One more time : THANKS a lot for this wonderfull project (and it's open sources)!

MArc
Attachments
tom.7z
(1.94 KiB) Downloaded 464 times
marc
 
Posts: 21
Joined: Wed Nov 25, 2009 3:28 pm

Next

Return to Firmware

Who is online

Users browsing this forum: No registered users and 1 guest

cron