Showing posts with label Artificial Horizon. Show all posts
Showing posts with label Artificial Horizon. Show all posts

Wednesday, June 17, 2009

From this day on I am an Engineer

Today was the day I showed my Project in front of a board of professors from my faculty. Everything went as planned, no problems, my Artificial Horizon managed to keep the board interested.

That concludes 5 years of Faculty. Not very much to say, just that I have some new ideas I want to put into practice.

Until next time, Happy Holiday!

Sunday, May 3, 2009

Finally a concrete result.

I finished the hands-on part of my licence Project, I will let the video speak for itself:



Because of the problems I had with the PC/104 System, I had to construct my own Data Acquisition board. It reads the 3 voltages for the 3 corresponding axis and adjusts the Horizontal Sphere on screen through a serial link with the computer. All is well when it ends well!

Sunday, April 26, 2009

One step forward, two steps back

As it turns out, the Directx Application i made is too powerful for the embedded computer at my Faculty (PC/104 system). It turns out that the module containing the microprocessor has an integrated video card with no true 3D capabilities. I am confused, because the Spec Sheets tell otherwise and I quote:

Display:
Chipset: VIA VT8606 Twister chip with Integrated S3 Savage4 2D/3D/Video Accelerator
Memory Size: 8/16/32 MB frame buffer using system memory
One thing is for sure, the DirectX function CreateDevice fails when trying to create a Direct3D device, it only works with an emulated device only suitable for small tests. It doesn't even work in software mode.

Tomorrow I will talk to my attending teacher to try to find a solution.

Monday, April 20, 2009

DirectX Front-End finished

Today I finished the DirectX front end of my project. To be honest I should have thought of this in the first place.

First of all I can now display and simulate a real sphere with the artificial horizon on it, and I can rotate it pretty easily with rotation matrices from DirectX. Let me show you a picture and then comment on it:


Here you see a background PNG image file with transparency in the middle circle. Behind it is a sphere with a texture of an horizon wrapped around it.

Now, in DirectX or any other Graphics Engine API, the transformation of objects in a scene is done using Transformation matrices, for example: Translation, Scalling or Rotation. The last one is the one we are interested in, and since we normaly can move in 3-Dimensions, then it is normal that we have 3 kinds of Rotation Matrices, one for each axis. To combine the effect of any transformation matrices you just have to multiply them in the order you want them to take affect.

Therefore it is now standard arithmetics to convert the reading from the Accelerometer (3 Voltages for 3 axis of movement) to 3 Rotation Matrices which multiplyed give the relative position of the accelerometer board.

I now must add a CALIBRATE button to the scene, to remember the normal horizontal position, and implement an .ini file system for the hardware configuration. Wish me luck!

Monday, April 13, 2009

Agony and pain

During these last few days I began to write the computer frontend of my Artificial Horizon application, using MFC. It has proven to be the worst decision I made since the beginning of this project. I am using Visual Studio 2008 and MFC 8.0 and I thought that Microsoft had improved the stability of MFC applications, but I was wrong. It is incredibly buggy, and the IDE seems to work against the programmer. Every time I added a header file, I had to restart Visual Studio to update IntelliSense, if I deleted a simple editbox from the Resource View I had to manually delete all the references that were automatically added at creation and so on.

The PictureBox control of MFC only allows to display BITMAPS, and I need to be able to display PNG image files with transparency. After an extensive search on the net I learned that I could use CImage, which is an ATL template. It is capable of displaying PNG files in an MFC dialog. I easily wrote a test program, it worked fine at first glance, but after closer inspection I saw that the transparency did not extend to the picture beneath the first PNG, but only to the background color of the CImage control. Another dead end!!

Then I wrote a simple program in a Windows Forms project, which is normal Visual C++ combined with .NET. I managed to get the desired result from the use of it's PictureBox control, but the drivers for the PC/104 platform generate 240 errors at compile time...

I closed the programming session, before I exploded... After cooling of I found a possible solution, and that is to use DirectX.

I will make another post when I have some progress with DirectX.

Wednesday, March 25, 2009

Artificial Horizon Progress 1

Today was a crucial day for this project because I tested the accelerometer breakout-board at work with an oscilloscope to view the actual variations in voltage associated with the movement of the board.

Just a few days ago I finished the assembly of the board. I planned to use 4 springs attached at one end to the 4 corners of the PCB and at another end to a solid back piece, so as to move the board and then release it, to come back to its original position. This didn't work unfortunately, looks like I need some serious springs, and the trouble of finding them is just not worth it.

Let me show you a couple of photos of the finished board:

In this last photo you can see the connector with 8 pins and 6 cables and a 3 pin connector for the power supply (don't worry, only two pins are actually used)



I stole a 3.3 V voltage from the second pin from the left and placed it on the last pin which is the SLEEP pin, and as you guessed it is activated in 0, so I need to set it to 1 so I can get a reading out of the X, Y and Z pins.

I have left 2 pins unconnected, because I want to leave the accelerometer in its default range of 800mV/g and a maximum of ±1.5 G detected on any axis. Thanks to the reading I got today from the oscilloscope, this range of detection is perfect for my application.

I must admit that this type of sensor is truly amazing, at a level state, the X and Y axis are at mid-supply (i.e 1.6V) meaning no G is detected, while Z axis signals it is sensing 1G (i.e. 2.4V). If I turn the sensor up-right, the Y arrow on the PCB points down so the Y pin is at 2.4V, meaning 1G, which is correct, because it is sensing the natural attraction force of the earth. Now if I turn it up side down, the Y pin is at 0.6V meaning -1G(the arrow for the Y axis is pointing away from the earth)

Feeling pretty happy right now... I leave you with my messy desk:

Saturday, March 14, 2009

Shopping again

I went shopping for parts that help me mount and interface my PCB accelerometer to the PC/104 system from my Faculty.

So I bought :
  • 2 9x15 cm perforated test boards
  • 1 NSL 8 pin connector
  • 4 springs hacked from 4 identical pens
Here are some pictures:



The design will become apparent later on, as It is hard to describe it in words.

I must mention that I have not tested the accelerometer yet, I will do that as soon as I solder the parts enumerated above.

Thursday, March 5, 2009

First success and another challenge

I managed to finish the Etch a Sketch project. It has been a good learning trip for me, and I can not wait to start another project.

Today was a good day to pay tribute to international mail service, because I received an important package. My license project implies the use of an accelerometer, and after long searches on the Internet, I ordered the part from Sure Electronics, a company based in China. Well it came and can't wait to start fiddling with it.

Here is a picture of it:It's called 3-Axis low-g Accelerometer MMA7260 prototype PCB, and it measures the G forces on all 3 axis of orientation, it has analog outputs so I must use an ADC to convert the output voltages to useful digital data.

I will make another post to show you how I will mount this PCB onto a bigger control surface.

Wednesday, October 29, 2008

Faculty License project

"Simulation of an Artificial Horizon system necessary for aircraft piloting" This long and pompous title is the name of my License Project. More news to come after I finish my current Etch a Sketch project, all I can say is that it is going to prove quite a challenge...