2010-09-28

Mechanics....

Slowly but surely project is advancing. Updates here are not very frequent, be patient.

Here is the simplest of all gauge mechanics:



Just one servo, instrument face, some aluminium, plastic pipe and PCB board.
(Of course there is some other parts, glass and frame, but they come from actual scrapped instruments)

Multi pointer gauges are a little bit more challenging but not impossible.
Next I need to find 2mm aluminium sheet and then I can start milling and turning these parts.

2010-09-06

Argh!

I spent several days putting together altimeter, based on decommissioned real instrument. I took out the original mechanics (except gears turning 1000ft/10000ft needles), bellows etc. Installed 720 steps/revolution stepper motor to turn the axle.
Everything was ok, stepper motor was turning the needles as expected, just working fine.
Then I noticed some slack in gears, removed glass, needles and front plate.
Installed one spring I forgot to put back when putting instrument together.

And when I was reinstalling needles... the axle snapped! About 0.2mm diameter steel pin acting as axle broke! I am almost ready to buy altimeter from simkits... $400 or so...

I need a beer. Or three. Crap.

2010-08-27

Just a quick update.

Winter is coming. That means more time to put to this project...

My cockpit project has not been totally halted, even if it looks like it here.
I have been coding and fine tuning motor controls, designing the mechanics etc. Soon it will be time to start putting things together.

More info here soon.

2010-04-01

Soon the sauna will be ready and I will be back in business.
Simulator business, that is.

It is quite refreshing to do something totally different for a while, even if brain is still working on simulator project...

All I need to do is inner walls, ceiling and wait for electrician to connect all wires next week.
I have so many ideas for simulator project that I need to write them down.

And I need to start looking for someone who could write piece of code for extracting gauge values from Micro$oft FSX... People have been asking if this system would support it also.

Stay tuned, something new here in about two weeks.

2010-03-21

No progress in simulator front lately.

And the reason is another project: backyard sauna.
One week short of a decade in Texas without sauna. I want to go to sauna but first I need to build it.

Sauna should be ready in two weeks and I can get back to coding the simulator.

It is refreshing to do something totally different for a while.
This it how it looks like as of today.

I have not forgotten X-Plane during this sauna project, of course.
I just installed it one night to my linuxbox and boy it looks good. It is kinda funny feeling to turn graphics options to "Totally insane"-level and see it actually working.

2010-02-24

...and then back to actual simulator project.

I realised this project is getting quite big and complicated. I would need some kind of system to keep track on software changes.

Yes. I realised this after some unfortunate mishaps causing me to loose about week worth of coding. Doh!

I recommissioned one old PC I found in my "pile'o'junk" (well... actually there is several old PCs but this was the best of them) to a new career for version controlling and general storage.
Local Fry's electronics had 1TB Seagate disks for $89 so now it has plenty of space.

Took me whole weekend + two nights to get it up and running and now I have fully functioning Git-version control server with nightly backups to file server.
No more lost code here (I hope).

Server specs:
2.4GHz Pentium 4 from years past.
3GB RAM
1TB+80GB() Seagate Sata-disks
Scythe fans (extremely quiet)
Ubuntu 9.10 Linux OS
Git version control system
Samba providing file shares for Windblows-machines.
Webmin web-based system administration.

For those who are installing Git-server: when initialising repository (git --bare init), it does not give write permission to git-group. This causes "insufficient rights"-error message when pushing code to repo.
To fix this: cd to repository directory and do 'chmod -R g+ws *' and 'git repo-config core.sharedRepository true'

2010-02-08

One of these days...

I have been fighting with CAN integration for last three days (and nights).
I had perfectly working ethernet connection and perfectly working CAN connection but not at the same time.

The culprit was clock connection from enc28j60-chip to 18f2685 clock input.

I don't understand why (or how) it does not work but if I use enc28j60 clock out to get clock to 18f2685, CAN does not work.

They both use 25MHz clock. I have not measured what is the clock frequency coming out from enc-chip but I suspect it to be something else than 25MHz that goes in.

Anyway... Now it works! I can send UDP packet from PC to ethernet transceiver where it is translated to CAN packet and forwarded to instrument control board which, in turn, sends back a CAN packet (to transceiver) and transceiver forwards it to PC.

In this picture you see the ethernet-can-transceiver and two instrument control boards talking to each other.
I again started believing I will have a working airspeed indicator this weekend.
I still need to activate the servo control part in instrument control software...

Stay tuned, I will go to sleep now.

2010-02-06

La-La-Land...

Mailed 27-jan-2010. Next tracking entry: "International arrival 28-Jan-2010".
Then a whole week without any info where those boards were.
Yesterday I went to local post office to ask what the heck is going on.

Lady behind the desk told me to go to pickup point and ask them.

I went to said location, rang bell and after quite a long time someone opened the door.
I explained my problem, he said "I need to ask supervisor here, just a moment."

After a _very_ long moment, supervisor opened the door.
Very tall, old man with white Stetson, jeans, boots... Kind of cowboy outfit.

I explained him why I was there. He said he needs to go and check with computer.

After about 10 minutes he came back and told me my package being in a place what they call "The La-La-Land", that being US customs. When mail goes there, he told me, nobody knows where it is, how long it is there and what they do with it.
Then he gave me phonenumber where to call and ask.

I went home.
I picked up the mail from mailbox.
Hmm... Note from US Postal Services saying they tried to deliver something but I was not at home? Interesting...
Back to post office and just before I rang the bell I noticed note in a note saying: "Available for pick up 06-Feb-2010 8.30am". That was tomorrow. Darn.

Oh well... Home I go waiting for tomorrow...

Tomorrow (today) I went again back to post office, rang the bell and waited...
...
...
After a while door opens and lady says "I thought I heard someone is here. How may I help you?"
I gave her the note and off she went starting to dig piles of mail.
Digging another pile...
And another...
And another...
Finally she said "I am sorry but I can't find this. I need to ask the mailman who left this note."

I said "No hurry, that package has been lost for a week now...".

Indeed it was my order from PCB Pool. Now I have my protoboards:



After gathering required parts, I built one, powered it up and whadda'y'know! It works!


I can already see there is a problem with all the connectors and pin headers (not in place yet).
But with these I can test the whole system and continue to next step (whatever that is).

2010-02-04

Still no pcbs....

Instrument control board pcbs shipped 27-jan and since 28-jan they have been just sitting in New York. What is going on USPS?

Picture of the board I am waiting for:




In the meanwhile I have completed the breadboard test circuit for ethernet-can-transceiver:


This circuit has everything (I need) included: ethernet, can, serial (-to-usb) and bunch I/Os available.

While protopcbs were manufactured (still waiting for them to arrive!) I concentrated to coding and testing the connection between X-Plane 9 and eth-cab-transceiver.
Now X-Planes telemetry data can be seen on Linux-PCs (RS-232 to eth-CAN-transceiver) terminal window.

Project status as of today (03 january 2010):

Ethernet-can-transceiver:
- HW: Circuit completed on breadboard
- SW/Done: Ethernet , serial port (will be used to connect LCD later on),
- SW/ToDo: CAN-module testing with instrument control board.
- Schematics almost drawn

Endevice (instrument control board)
- HW: Waiting for prototype pcbs to arrive (Hello USPS!)
- SW/Done: Servo control , digital IO
- SW/ToDo: Stepper motor control, AD-conversion

Mechanics:
- Gauges: Design for own gauges ongoing
- ???

Overall design:
- TBD: Where to put the "brain"? Should instruments be smart or just dummy "tell'n'show"-devices? Should eth-CAN-transceiver be smart or just dummy data link?

Something to think for the weekend.

2010-01-19

Well.. whadda'y'know...

Howdy again

Sometimes things do go better than planned/hoped for.

I compiled CCS tcp/ip-stack and now it works.
It was that simple. I don't know what to say.

Now I need to integrate my can-module to it and start thinking the messaging from PC to end devices (gauges, instruments etc.)

Should the ethernet-can transceiver be just a dummy repeater or should it have some intelligence like buffering messages or doing error checking?

Oh yeah, now when this ethernet-thingy got done I have spent some time drawing the schematics and layout for "enddevice" pcb.
"Enddevice" is a small pcb that handles the actual instrument control. It receives/sends messages over CAN-bus to ethernet-can-transceiver (should I call it "ethernet-can"?).

Here is the drawing:



And the final (we'll see about that...) pcb layout:


The size of pcb is 36mm x 51mm. It fits nicely inside the gauge.
It could be smaller, or even tiny if I would use smd-components but there is no need for that.
At least for now...

Ah, and here is the ethernet-can-transceiver all powered up an ready to receive data over ethernet:


Stay tuned. I have feeling this project is starting to get shape now...

2010-01-07

Yeah, right...

18F2580 has 32kB of flash.
TCP/IP-stack requires 44kB. And that is without CAN-stuff.

Fortunately 18F2685 is pin-compatible with 18F2580 and it has 96kB of program memory.
I somehow managed to compile the sw and even the hw is working like a charm...

So now I have a working ethernet connection that responds to ping and sends UDP packets!

I could almost say "YeeHaw!". Almost. There is still lots to do.

My girlfriend came to see why I was so excited and her comment was: "Lots of blinking lights and no smoke, it is working?"...

Next I need to integrate CAN module to ethernet module but there is only one (just one?) problem: my working CAN module is coded with CCS C-compiler and ethernet module is coded with Microchip's C-compiler...
Either way I have to port one module to another system. If I do whole thing with CCS, it will be a huge task because TCP-module is about 50x the size of my CAN-module.
If I do it the other way, I have wasted $200 for CCS C-compiler I am not even using.

Let's see how it goes...

2010-01-02

Ethernet...

Oh yeah! Finally some progress after long nonproductive time...

I just finished putting together circuit for ethernet connection.
PIC 18F2580 with enc28j60 and pulsejack J0026D21BNL:
Power connected, no smoke. Let's see if PicKit recognizes it...

No more updates this time.