Arduino CAN Shield

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

Moderators: John Nicol, birkelbach

User avatar
davecove
Posts: 38
Joined: 06 Feb 2013, 18:11
Location: Houston, Tx

Re: Arduino CAN Shield

Post by davecove »

Also new at Mouser (yes, I got an email from them) is this 32-bit 84Mhz Arduino for those jobs where 8 bits just won't do. ($47 in small qty)

http://www.mouser.com/new/arduino/arduino-due
Dave
~~~~~~~~~~~~~~~~~~~~~~~
Flying should be easy.
WhereIsMyFlyingCar.info
User avatar
jeff54il
Posts: 229
Joined: 30 Nov 2011, 12:36
Location: Holon Israel

Re: Arduino CAN Shield

Post by jeff54il »

Some more boorish questions:
1. Would a 32 bit Arduino like this be able to be used as an autopilot (say)?
2. Is its built-in RAM enough for such an application, or can additional RAM be added?
3. How do these things deal with floating point numbers?
4. I can understand that IP67 would be required firewall forward. But would IP55 (say) be enough for avionics inside the cabin?

Jeffrey
Bring them home NOW :cry: :shock:
User avatar
davecove
Posts: 38
Joined: 06 Feb 2013, 18:11
Location: Houston, Tx

Re: Arduino CAN Shield

Post by davecove »

1. I would certainly think so.

2. It has 512K, all available to the developer's app. That is about the same amount of available RAM as a PC-XT and I know I could get an autopilot to fit on one of those. (I did speech recognition using a simulated neural net and a self-designed and hand tied-wrapped ISA card with a 12Mhz XT back in '90)

3. It is built around a ARM Cortex-M4, which has an FPU, so I am going to guess 'pretty darn well'

4. Probably, but the IP67s are so cheap, why not use them everywhere?

I also notice that this new Arduino Due has a CAN interface. http://www.engadget.com/2012/10/22/arduino-due/
Dave
~~~~~~~~~~~~~~~~~~~~~~~
Flying should be easy.
WhereIsMyFlyingCar.info
User avatar
John Nicol
Posts: 611
Joined: 23 Nov 2011, 12:17
Contact:

Re: Arduino CAN Shield

Post by John Nicol »

Just spoke with Chris Anderson of DIY Drones. Here is what he recommends:

https://pixhawk.ethz.ch/px4/modules/px4fmu
http://store.diydrones.com/APM_2_5_Asse ... mpwrkt.htm

Arduino and Arm and yes have autopilot capability.... in fact the px4 also has a CAN bus........

MakerPlane are resellers of DIY Drones gear, but I have never had an excuse to put any of their products up, so this could be an all-in-one solution for us if it works.

P.S. OK, I can also see that I need to get an avatar pic up if Jeffrey has done his!!!
-----
John Nicol
Founder, MakerPlane
User avatar
jeff54il
Posts: 229
Joined: 30 Nov 2011, 12:36
Location: Holon Israel

Re: Arduino CAN Shield

Post by jeff54il »

davecove wrote:2. It has 512K, all available to the developer's app. That is about the same amount of available RAM as a PC-XT and I know I could get an autopilot to fit on one of those. (I did speech recognition using a simulated neural net and a self-designed and hand tied-wrapped ISA card with a 12Mhz XT back in '90)
Without giving away any secrets about my age, I learned to program using punched cards in FORTRAN IV on a 16 bit IBM mainframe (512K RAM) that served the whole university.
davecove wrote:3. It is built around a ARM Cortex-M4, which has an FPU, so I am going to guess 'pretty darn well'?
I guess that being 32 bit the FPU is single precision - not good enough for doing GPS calculations. Also need some sort of library to do trig functions - maybe included in the FPU?
davecove wrote:4. Probably, but the IP67s are so cheap, why not use them everywhere?
The connectors are IP67 - The boxes are a whole new kettle of fish. Anybody interested in designing such things for homebuilt 3D printers?
davecove wrote:I also notice that this new Arduino Due has a CAN interface. http://www.engadget.com/2012/10/22/arduino-due/
As an outsider in this field it seems to me that this is the way to go.
Bring them home NOW :cry: :shock:
User avatar
jeff54il
Posts: 229
Joined: 30 Nov 2011, 12:36
Location: Holon Israel

Re: Arduino CAN Shield

Post by jeff54il »

John Nicol wrote:P.S. OK, I can also see that I need to get an avatar pic up if Jeffrey has done his!!!
Man :o it gives me a warm feeling in my tummy to be one-up on John. :lol:
BTW, The limit of 90 pixels in any direction and 6K seems to be a wee bit too small. John, could this be increased to (say) 150 pixels and 15K? Maybe a storage cost issue - as usual we need donations.
Bring them home NOW :cry: :shock:
User avatar
John Nicol
Posts: 611
Joined: 23 Nov 2011, 12:17
Contact:

Re: Arduino CAN Shield

Post by John Nicol »

Hi Jeffrey,

It was the default setting on the board, so I have just changed it to give people more room for avatars... the max size is now 20k and I increased the limit up to 200 x 200 px. (Always trying to deliver more than asked for.... :mrgreen: )

John
-----
John Nicol
Founder, MakerPlane
User avatar
jeff54il
Posts: 229
Joined: 30 Nov 2011, 12:36
Location: Holon Israel

Re: Arduino CAN Shield

Post by jeff54il »

Dat's bettuh 8-)
Bring them home NOW :cry: :shock:
User avatar
John Nicol
Posts: 611
Joined: 23 Nov 2011, 12:17
Contact:

Re: Arduino CAN Shield

Post by John Nicol »

Actually I think 200 is a bit big now..... I might change it to 150 instead....
-----
John Nicol
Founder, MakerPlane
birkelbach
Posts: 193
Joined: 04 Sep 2012, 14:42

Re: Arduino CAN Shield

Post by birkelbach »

The wind was blowing here in SE Texas pretty badly Saturday so I spent most of the day inside sitting in front of my computer working on CAN-FIX stuff (and trying out FlightGear, which is pretty cool by the way). I managed to get a pretty good structure built for the CAN-FIX Arduino Library. The code is on GitHub at...

https://github.com/birkelbach/CAN-FIX-ArduinoLib

It doesn't do a lot at the moment. It stores / retrieves its node number and bitrate from the EEPROM and can answer a few of the node specific messages. Mainly it'll send it's ID if asked, it'll change it's node number and bit rate as well. It started going pretty fast once I had the foundations in place. It shouldn't take long to turn this into a fully compliant CAN-FIX node.

I built another CAN shield and used it and an Arduino Uno that I had as my PC interface and put the new CAN-FIX stuff in that Leonardo. The CAN Bus / USB interface program runs MUCH better in the Uno than the Leonardo. Probably because of all the serial port communication that goes on inside the CAN/USB interface. Sine the Leonardo has to do all the USB protocol stuff itself instead of offloading it to another chip it makes the program much bigger and slower. It seems to run the CAN-FIX stuff just fine since there is not a lot of serial communication going on in there. The moral of the story is don't use a Leonardo for the USB/CAN interface, rather use an Uno or something else that has extra chip for the USB comms.
Phil Birkelbach
Waller, Texas
RV-7 727WB
www.myrv7.com
Post Reply