What's wrong with CANaerospace?

Discussion forum for the CAN-FIX protocol. This is a CANBus based communications protocol specifically suited for experimental aviation.

Moderators: John Nicol, birkelbach

Post Reply
samborambo
Posts: 3
Joined: 15 Aug 2013, 21:25

What's wrong with CANaerospace?

Post by samborambo »

I know I'm new here and don't want to start out with a critical post but...

Why develop CAN-FIX when there's a more mature open source protocol, CANaerospace, available? Obviously, a lot of hard work has gone into CAN-FIX but I suggest that those brilliant minds working on the specification could start on other things like EFIMS if we have a protocol spec ready to go.

CANaerospace has a specification ready to go, has been used in experimental aircraft already and can be developed if no-one's taking it any further (website hasn't had any news on CANaerospace since 2009).

Website here: http://www.canaerospace.net/canaerospace.html
Wikipedia Article: http://en.wikipedia.org/wiki/CANaerospace
v1.7 specification: http://www.stockflightsystems.com/tl_fi ... nas_17.pdf

There's even examples of single-engine IFR setups in the spec.

Sam.
User avatar
John Nicol
Posts: 611
Joined: 23 Nov 2011, 12:17
Contact:

Re: What's wrong with CANaerospace?

Post by John Nicol »

Hi samborambo,

Actually there has been a lot of discussion about that and I will let Phil talk to it!

Regards,
John
-----
John Nicol
Founder, MakerPlane
birkelbach
Posts: 193
Joined: 04 Sep 2012, 14:42

Re: What's wrong with CANaerospace?

Post by birkelbach »

First, let me say that there is nothing 'wrong' with CANAerospace. CA will work well in the environment for which it was designed. But, it was not designed for small homebuilt airplanes. This doesn't necessarily make it unsuitable for our use but it may make it less than optimal. I actually started this journey several years ago trying to implement CA in some of my designs but it frustrated me in a few areas.

I don't want to go into all the details in public because I don't want it to sound like a battle of the CAN buses. I have the utmost respect for Michael Stock and the work he has done. CA is a very flexible protocol. With it you can send the same parameter over the bus with different data types. This is a great feature if what you are after is flexibility. The problem with flexibility in a communication protocol is that it forces complexity at the end points. There are microcontrollers out there that cost less than $2 that are suitable for flap controllers, light flashers and the like. Forcing these devices to have to understand multiple data types for any information that they may be interested in, is more complex that perhaps it should be. If the mindset is on high end avionics then this is less of an issue but we are trying to integrate everything, and we are trying to make this something that a guy in his garage with a breadboard can experiment with.

CA also allows for multiple identifier distributions to exist on the bus at the same time. It would be up the end points to determine if the data that they are receiving is what they think it is. Again, very flexible. CAN-FIX doesn't allow any of this. CAN-FIX is a much more rigid protocol. Some don't like that but I think it will make it much easier to implement and reduce compatibility issues. There is only one way to send airspeed on CAN-FIX.

Obviously we could live with the above by further specifying that we only use these data types and come up with our own distribution by further specifying CA. I went down that road as well and CAN-FIX is basically the result of that. By the time we enforced the data types, units and distributions for our purposes we had what was essentially another protocol. So why not just call it that and give ourselves the freedom to change it further to meet our needs. That freedom led me to a couple more features.

I replaced the data type byte in CA with an index byte in CAN-FIX. This gave us the ability to have as many EGTs as we wanted (well up to 256) per engine. So we reduced the number of engines to two but you can have lots of cylinders. This was carried through to other parts of the protocol as well. Waypoints, VHF frequencies, switches and the like can now have many more individual items within them. The only requirement is that only a single CAN node can send any given identifier so all the EGTs on a single engine have to be measured and transmitted by the same node.

Another feature that we added was the idea of 'meta-data.' Information like V-speeds, rpm yellow arc ranges, measurement range, alarm set points, etc. are all contained and transmitted by the node that produces that data instead of being configuration information in the node that displays it. This makes the system a bit more plug and play. It doesn't eliminate these configurations but it means that you only have to do it in one node. If you order an engine monitoring device from a company that specializes in Rotax engines they might have a set of configurations pre loaded for your engine so that you don't have to configure anything on that device. When the display device is connected, this data is transmitted to it and all the red lines, yellow arcs and ranges will be set in the display automatically.

Another issue that we considered was compatibility with an existing project. Namely FIX (Flight Information eXchange). A fellow MakerPlaner (is that a word) spent many hours documenting and negotiating some communications specifications among vendors of equipment for home built airplanes. CAN-FIX (as the name would imply) is an attempt to be the CAN version of those specifications.

CA seems to be mature but I still can't figure out how to actually 'buy' anything for my airplane at Aircraft Spruce. To be fair you can't buy anything that talks CAN-FIX either but we do have libraries written for the Arduino and Python we also have quite a bit of work done on a C library and some example code for the AVR line of microcontrollers. We have a couple of guys working on implementing it for the PIC line of microcontrollers as well, and I am working on some C code. All of this is open source. There is also a bootloader for the ATMega328 microcontroller and software for downloading firmware to that bootloader. In a couple of years, I'm hoping that we'll have an EFIS display, airdata and engine measurement and several other auxiliary devices like lamp flashers, transponder interfaces and more that I haven't even thought of yet. Again, all open source. I think that open source concepts will accelerate adoption.

If some day we discover that we are fighting a losing battle then ours can change with simple software modifications. The hardware is all the same and the software will be open source. Nothing lost other than we learned something and had a bit of fun.

I appreciate the sentiment of 'brilliant minds' (not sure that I qualify there) working on other things but keep in mind that we are working on these things. The specification is mature enough now that we can work on these things. I spent several hours yesterday pouring over data sheets of ADC's, PGA's and pressure sensors, in an attempt to come up with an airdata system design. Neil is continuing the development of the EFIS, and more people are getting involved every day. I'm sure there will be some tweaks along the way but we are getting pretty close.
Phil Birkelbach
Waller, Texas
RV-7 727WB
www.myrv7.com
samborambo
Posts: 3
Joined: 15 Aug 2013, 21:25

Re: What's wrong with CANaerospace?

Post by samborambo »

Hi Phil,

Thanks for taking the time to respond. You make compelling points for a more prescriptive protocol that CANAerospace and, as you say, if CAN-FIX shows limitations later on a firmware flash could fix that.

One potential pitfall with prescriptive protocols is not enough forethought at the project inception, limiting applications. Examples:

Are two engines enough? What if I build an electric or hybrid aircraft with 10 smaller electric motors driving propellers?
How do we treat a diesel hybrid generator?
Can I have multiple attitude/inertial measurement sensors spatially separate? (eg: one at each wing tip)
Can the protocol extend to manage mechanical condition assessment in real time? (eg: actuator or engine vibration, servo gear slop)

These are obviously rhetorical questions! I don't want to be an antagonist. However, this protocol is intended for 'experimental' aircraft. Allowing enough 'room' in the protocol mapping for future expansion without causing every device on the bus to upgrade will help make this protocol a success. It's a tough compromise between ensuring everything talks the same protocol reliably and efficiently while remaining open enough so as to not stifle innovation in experimental craft.

Great work on CAN-FIX, Phil. This is a project worth supporting. :)

Cheers,

Sam.
birkelbach
Posts: 193
Joined: 04 Sep 2012, 14:42

Re: What's wrong with CANaerospace?

Post by birkelbach »

samborambo wrote:Hi Phil,
One potential pitfall with prescriptive protocols is not enough forethought at the project inception, limiting applications. Examples:

Are two engines enough? What if I build an electric or hybrid aircraft with 10 smaller electric motors driving propellers?
I agree. That is why we are trying to put a lot of forethought into this, while at the same time trying to leave it just open enough to work. Simplicity is a driving factor here. I would say that simplicity is the "primary" driving factor and making the protocol more prescriptive makes it simpler. We also have the advantage that airplanes have been around a long time and we know what kind of information that we need to pass around. Yes, we are making some strides in technology that may change some of it but we'll still need airspeed, altitude, lat, long etc.

If you build an aircraft with more than two engines then you can use two buses. There was quite a bit of discussion on this and we decided that 99.999% of all homebuilts had two or fewer engines. If you need 10 small electric motors then we're a bit off the reservation. I don't expect this to be the 100% solution but I don't want to increase the complexity two or three fold to handle the 0.001% case either.
How do we treat a diesel hybrid generator?
Done. I think we have what is necessary in the protocol now. I think this is a real possibility so take a look and if we are missing something in this area let's find a place to fit it in.
Can I have multiple attitude/inertial measurement sensors spatially separate? (eg: one at each wing tip)
Of course. Again if you feel the need to have this level of redundancy then it makes sense to have multiple buses. Any EFIS should probably have at least two CAN ports on it.
Can the protocol extend to manage mechanical condition assessment in real time? (eg: actuator or engine vibration, servo gear slop)
I hadn't thought about engine vibration. I've never seen a vibration monitoring system that could really tell you much on a small IC engine but if it makes sense we can add it. It probably would make sense on and electric engine. Again I don't want to spend a bunch of time and complexity chasing the 0.001% use case, but if it's a matter of adding a parameter then let's do it. There are some generic and user defined parameters that can easily be used for this kind of data as well.

Some of this is the idea behind the "High Priority Node Alarms" group. Most of node alarms are device defined. My thinking was that each device would have an XML file associated with it that described it to the EFIS and/or configuration software. One of the things that would need to be defined in this file is what the individual node alarms would represent. Over time we'd probably develop some 'pseudo standards' in this regard and we could either include them in the spec or create a separate "best practices" document.

For things like servo slop, internal temperature and the like we need to have something different than one of the parameters. The pre-defined parameters are really associated with the airplane itself, airspeed, RPM, roll rate, etc. The internal temperatures and servo slop are more a description of the node, and we have that kind of message defined within the "node specific" message. It adds a bit of complexity but the XML file idea tends to move that complexity away from the smaller nodes and toward the more capable devices like EFIS and configuration computers. Neither of these is likely to be an 8bit uC with 2k of RAM. And this is only used in the cases when it's necessary. Most of the data can be sent on the bus without this. Some node specific information will be, and is pre-defined.
Great work on CAN-FIX, Phil. This is a project worth supporting. :)

Cheers,

Sam.
Thanks, I appreciate it.
Phil Birkelbach
Waller, Texas
RV-7 727WB
www.myrv7.com
Post Reply