Page 1 of 1

Hexacopter Atmega 328p and Camera Tilt

Posted: Tue May 07, 2013 12:51 am
by Stephan Oldenburg
Hi,

it's me again. :-)

Now I connected the camera tilt servo and activated in the sketch. The camera servo is digital and has a own BEC.
And the FC crashes again after a few seconds. :-(

It dosen't matter if the servo refesh rate is 50, 160 or 300 Hz.

I read somewhere in the net, that the 328p is not able to handle a hexacopter and the tilt servo (and I have a I²C-GPS).
In a other post is written it can handle it....

Is the 328p able to handle all that ?

Re: Hexacopter Atmega 328p and Camera Tilt

Posted: Tue May 07, 2013 9:26 am
by Alexinparis
It was not possible in the past.
But it is now possible in 2.2

Re: Hexacopter Atmega 328p and Camera Tilt

Posted: Tue May 07, 2013 9:54 am
by Hamburger
with too many features you are likely crashing the stack - out of memory at runtime.
To test, disable the acc and try again.

Re: Hexacopter Atmega 328p and Camera Tilt

Posted: Tue May 07, 2013 10:41 am
by alll
Damn, scary, so you compile, upload, all is working, and then after a while you get "out of memory" :shock:
How to quantify this?
manu

Re: Hexacopter Atmega 328p and Camera Tilt

Posted: Tue May 07, 2013 11:52 am
by Hamburger
I was tracking such errors about 18 months ago for first time, so I added some diagnostic help.
Enable DEBUG & some LCD or pseudo LCD and execute the F(ree memory). You want at least 100 bytes margin. Or simply wait for unexpected resets and become suspicious. In most cases I have had to witness and track down, the reset will occur right during/after initialization; not too much dynamic stuff going on in MWii fortunately.

Like I said earlier, you could simply disable some features and observe if problem goes away, Repeat with different features. Take your clues.