PDA

View Full Version : Introduction and new project



JackPott
12-06-2010, 01:23 PM
Hello!

Just thought I'd introduce myself, there are a few scattered simpit forums around but this one seems to be the home of all the UK peeps. There are some really inspiring builds on here, its great fun looking through them all.

I've recently started on my own project and I plan on documenting my pains as I progress so others can learn from my adventures. Not sure how yet, maybe some sort of blog.

Despite the wealth of information and interface kits out there (of which I am frequently referencing!) I have taken the decision to build everything from scratch. One of my major motivations for building a pit is to enhance my knowledge of electronics and PIC programming, so to that end i'm avoiding buying anything off the shelf.

Which plane? Well I'm going through the motions of learning to fly at the moment so I'm starting at the bottom and going for something GA based, but I'm not too interested in tying myself to a single aircraft so its a more generic pit. I don't have the space to covert a whole room into an airport, I also don't know how long any of this will take, so I'm making every item as a small discrete component. The avionics might not match any specific aircraft but will be tidy, well made, functional representations.

My two reasons for that are all aircraft (including choppers, excluding glass cockpit) have by and large the same instrumentation. That means I can freestand them on my desk, and reassemble them in different orders with relative ease. It also makes the build very manageable, as if I build a compass and then give up, I still have a working compass to enhance my simming.

Architecture wise I'm using PIC18's all round with CAN controllers built in, so every component will be aware of all the others in the system. The hosting PC will have a USB/CAN adapter and host app to receive the commands, and will forward them on to FSX using the FSUIPC SDK. It's also cheap as chips.

I haven't got anything to show for my work yet as I've literally just started breaking out the electronics (let alone the mechanics), but the first item I'm building is the COM and NAV radio electronics. Two six digit seven segment displays, dual concentric encoders and a swap button per unit, and two units in each enclosure.

What seemed a daunting task a few months ago has become clearer by the moment as my knowledge of the PIC, CAN and FSX interface capabilities grow. Breaking the project down into bite size chunks really helps!

I've already learnt a lot from lurking on these forums, so when I get to a point that there is something to document I look forward to passing some knowledge back.

Chris

Matt Olieman
12-06-2010, 01:50 PM
Hi Chris and welcome to MyCockpit. You'll find the site and it's members extremely helpful. I look forward to see your project grow.

If you can't find the answer here, just ask, someone will help you. :)

Good luck on your project.

Matt Olieman

Wendy
12-06-2010, 02:01 PM
Hey chris,

Welcome to the forum, I'm sure you will find a lot help here.

I would sure like to know more about your PIC and CAN interface. That is a complete different approach. I'm also building my radios with PIC18 and MAX display drivers but still don't know how to solve the USB interface.

Regards, Wendy

DaveC3
12-06-2010, 05:13 PM
Chris

You may want to check out http://cross-simulator.com/download.php they are making an interface to FS and X-plane that uses the Can Aerospace protocol. If you start your system using this protocol you can not only make your own devices but also use "Real" devices that use this protocol.

Good luck with you project.

Dave

MrProach
12-06-2010, 06:34 PM
Out of interest, why CAN? It is essentially an industrial bus and if you use it in not failure-critical or low EMI environment it loses its appeal very quickly.
It usually surfaces in projects where you have to interface to real-world CAN devices but why build a system from ground up based on CAN?
It is slow, has a large overhead, a royal pain to debug and has zero chance of finding somebody else's products that will "just work" when connected to your bus.

JackPott
12-06-2010, 07:18 PM
Hi Dave,

That link to the aero CAN is very interesting indeed. I did not know such a protocal already existed. Not only does it make total sense to comply to that, it looks like most of the PC App hard work has been done for me!

Proach: I picked CAN as I don't know any other way! RS232 is a bit dated, and would be tricky getting data from every device I make to the PC. With CAN I can just daisy chain new things on the end. RS485 crossed my mind but the addressless format of CAN appealed.

I know CAN from its automotive use rather than its aero use, and contrary to saying it has a large overhead I understand it to be pretty fast if not light. Interfacing with other gear hasn't been factored in as I don't plan on using anything (other than perhaps a complete, isolated, end to end hardware and software product) with it. A closed network just for the things I build (although as a bonus, it may well now be Aero CAN compliant, see above)

You can get it onboard PICs for virtually no added cost, and it all hooks up on two wires. As I say, its the best solution I have as its the only idea I've had. That said I haven't prototyped it yet, but its such a simple protocal I don't foresee any major headaches?

MrProach
12-07-2010, 04:47 AM
I know CAN from its automotive use rather than its aero use...

Then you probably know what you are doing. My experience was not very rosy.

JackPott
12-12-2010, 07:01 PM
Hey chris,

I would sure like to know more about your PIC and CAN interface. That is a complete different approach. I'm also building my radios with PIC18 and MAX display drivers but still don't know how to solve the USB interface.


I thought I had already replied to this but I think its stuck in moderation, too many links!

There are off the shelf USB-CAN dongles available, using one of those was my plan. I've done the PIC code in C, so you just include a library which provides a couple of high level functions for sending CAN messages out to the bus. The PC app should then catch that and pass it on to the sim. Dave's link is very interesting but I will certainly use the AeroCAN message ID's where possible, but haven't decided if I will use the C++ library yet or write my own.

It might be helpful to know the actual structure of the radio. Each radio unit is discreet, so the PIC (PIC18F2480) only tracks one active and standby frequency. There is a button to swap the active and the standby, and a encoder to increase or decrease the standby as you would expect. It also checks for overflow etc. The display is driven using some transistor arrays and a 74HC4543 driver and this displays the frequencies inside the PIC (rather than reading them from the SIM). When a value changes or swap is pushed, the PIC transmits the new values to the CAN bus.

The PC can request the data from the PIC, ie at sim startup, but the radio unit itself doesnt read any info from the SIM. Its a one way link in that respect. I plan to make all of the controls similarly "one way". I figure it to be much simplier, the only drawback is if one was to start or load a flight mid air with the fuel cut offs in the wrong position, you would be in a spot of bother.

Wendy
12-13-2010, 02:42 AM
Thanks for the info Chris.


Regards, Wendy

Atomic_Sheep
12-13-2010, 11:58 PM
I recently found a blogging option on this forum which is where I'll be posting my cockpit build updates from now on. I was planning on starting my own website but I realised I didn't really want to waste time making one from scratch. I would end up spending more time maintaining it than building. So have a look at the blogging options on here. I think it should be sufficient for most purposes. Good luck with your build.

jackwall
12-26-2010, 07:00 AM
Well JackPott, I think I'll be just one of many many people who will be keen to see your updates, learn from your experience and get help from your updates with our own plans.

Wishing you the best,

jack

MrProach
01-06-2011, 08:27 PM
Hi JackPott, how is your CANbus project going? Have you had any network up and running yet?
Ironically, I have resurrected my CANbus design as well. The current project required connecting to 19 Boeing-style engine instruments and the only sensible interfacing option I could come up with was sticking a CAN module inside each of them and daisy-chaining them.

JackPott
01-13-2011, 12:37 PM
I'm not quite at the network stage yet. I had some more fundamental problems with the PIC (too much faith in the internal pull up resistors it seems) which I overcame last night. I now have a box with a knob on it that counts up and down... Network is the next step. I've narrowed down my choice of dongle to either the Lawicel or Roalan. The Roalan is a bit cheaper, and actually looks like it has a more robust driver/DLL set.

What are you using on the PC end of your network?

MrProach
01-13-2011, 03:06 PM
I use my own hardware on the PC end.
If you want to avoid writing CAN code on device side you can get hardware CAN I/O devices like MCP25020 etc.

JackPott
01-14-2011, 06:55 AM
I certainly don't want to get stuck in with the nitty gritty of transmission so I was planning to use a MCP2551 which looks pretty similar. Then I'm calling my message functions from ECAN.h (C18).

Not sure I'll have the interface up before I go on holiday next week so might be Feb before I get organised now. Excited, as once that's done I'll have a blueprint for other peripherals.