CAN Interface crisis. Need your feedback

8 views
Skip to first unread message

Crashmatt

unread,
Dec 1, 2010, 9:30:34 AM12/1/10
to RC servo interface
To all potential users.

I am having a small crisis with the CAN interface system.
The latest modified code is very confusing and difficult to use.

UDB2/3 does not have the resources to do everything we want. Functions
must be moved to the CAN interface.

Moving the servo mixers has offloaded some resources but has caused a
communication mess.

I am now thinking that the UDB should only do IMU + gps + servo output
functions only.
The autopilot navigation and state machine will be in the interface
only.

This plan is still not so easy. Safely copying the IMU large data
types is a challenge.

We would also loose the autopilot independant failsafe device.
Realistically this was already lost anyway.

It looks like the last 2 weeks of code hacking effort will be lost. I
dont regret loosing this if it means a better final result. It does
mean a little more patience from users is required.

Any moral support or ideas would be appreciated.

Regards Matt



Message has been deleted

Adam Barrow

unread,
Dec 1, 2010, 9:50:53 AM12/1/10
to rc-servo-...@googlegroups.com
Matt,
could you elaborate when you say that the UDB2/3 doesn't have the resources to do everything we want? What is it that needs to be added to the UDB2/3 that is too much? From the things I was mostly looking to do, the CAN extensions (modules) would be offloading processing from the UDB, not the other way around.

Regards,
Adam Barrow

Peter Hollands

unread,
Dec 1, 2010, 9:55:39 AM12/1/10
to rc-servo-...@googlegroups.com
Perhaps we all need to refresh ourselves with the top down objectives of the project.

For me, my own objective was quite simple. Fly the Cularis, which includes 4 moving flight surfaces on the main wing, with beauty and sophistication ! (i.e. Do all the right mixing of the various surfaces on the aircraft for fast flight, slow flight, landing, and even inverted flight (change the camber).). Along the way, improve the algorithm by which MatrixPIlot effects a turn (this can be so so improved).

Best wishes, Pete

Crashmatt

unread,
Dec 1, 2010, 10:45:38 AM12/1/10
to RC servo interface
Thanks for the focus. I was loosing my way.

A plan
1. Cut back the first version to support only the basic functions.
Get this released.
2. Work on the advanced version once the basic version is properly
released.

One of the user requirements was to have permanent radio->servo
mixing.
If the mixing is on the UDB, it is lost if the CAN connection breaks.
Adding mixing to the interface means that pwOut telemetry and HILSIM
are incorrect. This is no great worry.

If everything is on the UDB we are tending to run out of RAM.
This limits us on adding more functinoality.
We have to live with this until the advanced version arrives.

Does this make sense?

Matt

On Dec 1, 3:55 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Perhaps we all need to refresh ourselves with the top down objectives of the
> project.
>
> For me, my own objective was quite simple. Fly the Cularis, which includes 4
> moving flight surfaces on the main wing, with beauty and sophistication !
> (i.e. Do all the right mixing of the various surfaces on the aircraft for
> fast flight, slow flight, landing, and even inverted flight (change the
> camber).). Along the way, improve the algorithm by which MatrixPIlot effects
> a turn (this can be so so improved).
>
> Best wishes, Pete
>

Adam Barrow

unread,
Dec 1, 2010, 11:02:27 AM12/1/10
to rc-servo-...@googlegroups.com
Matt,
that makes sense and seems like a reasonable plan. After step one, we may choose to revisit the limitations of the UDB2/3 (current stock) but let's get there first.

One important area I do see that is missing, is how can we help?

Thanks,
Adam Barrow

Peter Hollands

unread,
Dec 1, 2010, 11:53:23 AM12/1/10
to rc-servo-...@googlegroups.com
Matt,

I am keen on a simple, focussed effort ....

But would just like to brainstorm  a little further, the UDB as a sophisticated IMU for a moment as that an IMU is an obvious boundary around which one can define an interface.

What speed is the CANBus working at ? How much data can we send over per second ?

The IMU part of the UDB would approx. the following interface:-

Outputs from the IMU:-
Location:- 
Once per second or on a change of Origin:-
Origin Location: Lat, Long, Altitude, Week Number ( 3 * 32 bits + 16 bit)
Currently produced 40 times / second:-
IMUlocation.x, .y, , .z (Could be 3 * 16 bit words for 1 meter resolution
     or 3 * 32 bit words for better resolution (allow for landing))

IMUvelocity.x, .y, .z   ( 3* 16 or 3 * 32 bit depending on resolution)

Produced up to 4 times / second:-
GPS velocity over the ground (16 bits)
GPS Lat and Lon and Altitude ( 3* 32 bits)
HDOP Horizontal dilution of precision. (8 bits)
VDOP Vertical dilution of precision (8 bits)
SVS, satellites in view. (8 bit char)
Navigation Valid (True / False). (1 bit) ... probably change to IMU status (8 bits)

Orientation:-
40 times / second
Direction Cosine Matrix: ( 9 * 16 bit integer)
About 10 times / second
Magnetometer output (optional) ( 3 * 16 bit integer) (not necessarily required).

Downstream calculation:-
40 times / second
Current Wind estimation ( 3 * 16 bit integers)
Current Air speed estimation (3 * 16 bit integers)
Status of downstream calculations (is wind likely to be accurate etc).

Upstream .... let assume negligible for now.

On another thread of of interest:-
Also, do you know how much additional RAM you need for mixing on the UDB, i.e. is is just 200 bytes  500 byes or 2 Kilobytes ?

Best wishes, Pete

Crashmatt

unread,
Dec 1, 2010, 12:45:32 PM12/1/10
to RC servo interface
Pete,

CAN is set to 500kbps. It is about 50% efficient with overheads. Say
150bits per 8byte package.
Average is about 6bytes per package. Total capacity is about
23,000bytes/s.
We are likely to get 10k/s or 250bytes per servo cycle.

The entire contents of variables defined in libDCM.h can be
transferred in about 5ms.

We also have the problem of controlling access to those 32bit
variables.

Matt

On Dec 1, 5:53 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Matt,
>
> I am keen on a simple, focussed effort ....
>
> But would just like to brainstorm  a little further, the UDB as a
> sophisticated IMU for a moment as that an IMU is an obvious boundary around
> which one can define an interface.
>
> What speed is the CANBus working at ? How much data can we send over per
> second ?
>
> The IMU part of the UDB would approx. the following interface:-
>
> *Outputs from the IMU:-*

Crashmatt

unread,
Dec 1, 2010, 12:52:55 PM12/1/10
to RC servo interface
Pete,

The flexible mixer I wrote takes about 85bytes. It is horrible to
setup.

We could write a Cularis specific mixer which would use about 10bytes
of stack.

Any mixing from radio inputs to the servo outputs should be done on
the interface. How many radio channels do you have?

Matt

Peter Hollands

unread,
Dec 1, 2010, 12:57:36 PM12/1/10
to rc-servo-...@googlegroups.com
Matt,

7Channels.
I have a Spektrum DK 7 transmitter and an AR7000 receiver.

Best wishes, Pete

Crashmatt

unread,
Dec 1, 2010, 2:48:59 PM12/1/10
to RC servo interface
Pete,

This should be easy. The interface can do pre-mixing on the radio
inputs before they are sent to UDB.

Doing boosts is a little difficult with this arrangement.

The simple version is done but needs a tidy up. Now writing a Cularis
specific mixer for us.

Regards Matt

On Dec 1, 6:57 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Matt,
>
> 7Channels.
> I have a Spektrum DK 7 transmitter and an AR7000
> receive<http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM2710>
> r.
>
> Best wishes, Pete

Peter Hollands

unread,
Dec 1, 2010, 5:05:36 PM12/1/10
to rc-servo-...@googlegroups.com
Sounds great. Pete
Reply all
Reply to author
Forward
0 new messages