Tuesday, October 20, 2009

Colmar my love

Postez de la servici!!

Acest servici imi mananca ficatii, in principal pentru ca s-a mutat locatia unde o sa invat cu spor Javascript. Ma aflu in pitorescul oras Colmar, aflat la 70 km de Strasbourg. Daca as fi turist as iubi orasul asta, cu cartierul Mica Venetie si casele de lemn aflate la tot pasul, dar nu sunt turist, sunt ucenic la o sucursala mica, cautatoare de suspans si trairi intense. Ma scol la 6:30, iau tramvaiul, apoi trenul si timp de juma de ora ascult muzica (asta cand imi aduc aminte sa imi iau Ipodul cu mine). Intr-un final ajung si ma pun pe invatat. Seara plec acasa iar cu trenul, iar cu tramvaiul...

Proiectul pe care lucrez este in colaborare cu Alcatel, noi trebuie sa construim interfata cu utilizatorul pentru 2 tipuri de telefoane de birou Bussiness Class ale lui Alcatel, utilizand controale Dojo si niste widgeturi facute de echipa pana acum. Nu am mai vazut amestecul asta de tehnologii in viata mea, este o adevarata aventura sa urmaresti procesul de apelare si afisare a unui widget pe ecran. It's murder I tell you!

Sper sa nu mai par asa inmarmurit in fata ecranului prea multa vreme si sa accept ca nu am ce face si ca trebuie sa invat cat mai bine tehnologiile astea, mai ales ca mai am un coleg cu mine care este coleg si de master. E mai simplu el asa, dar azi imi raspunse la cateva intrebari destul de avansate, si e doar de o luna aici, deci asta inseamna ca se poate si mai bine!!!!

Abia astept weekendul!

Tuesday, October 13, 2009

Punct si de la Capat

Bun. E timpul sa intorc o foaie din viata mea. S-au schimbat multe in ultima vreme, nici nu stiu de unde sa incep.

M-am casatorit, sunt fericit, am terminat facultatea, acum sunt la master in Strasbourg, lucrez pe programare web, dintre toate domeniile din lume, s-a gasit loc pentru mine numai pe programare web. Ma doare, dar nu am incotro. Mie dor sa imi ard degetele cu pistolul de lipit, sau sa programez un PIC.

Poate cand ma voi intoarce in tara, pana atunci trebuie sa invat niste tehnologii foarte bizare si inutile luate individual. Asta e parerea mea despre toata latura asta a programarii. Sunt 1001 tehnologii si limbaje care luate individual nu reusesc sa rezolve scopul proiectului, trebuie combinate cu altele ca sa se ajunga la un rezultat acceptabil. Aici in Franta se pune enorm de mult accent pe programarea WEB, WEB 2.0. Aproape toate conferintele, forumurile de studenti, sau ce e si mai grav, aproape toate firmele de programare din zona recruteaza personal special pentru programare web, aplicatii intranet si extranet, ERP.

Mai este Alcatel de exemplu care mai face un tip de embedded, dar este o firma atat de exclusivista, incat e foarte greu de ajuns in randul lor. Mai raman firmele care doresc "maimute" cu 10 degete daca este posibil, si firmele care fac bani din satisfacerea cerintelor firmelor mai mari. La asta din urma am ajuns eu, Actimage Consulting se numeste are traditie de 20 de ani, si a avut destula incredere in franceza mea minimala incat sa ma ia ca apprenti(ucenic). Sper sa incep lucrul peste o saptamana. Don't ask!!!! Stiu... sunt aici de o luna si abia peste o saptamana incep lucrul. Nu stiu cum avanseaza francezii astia, dar sunt mai lenesi ca noi!

Cat despre tehnologia embedded, nu ma dau batut, dar pentru o vreme trebuie sa ma conformez imprejurarilor. Intre timp mi-a venit alta idee, plimbandu-ma pe strada, am observat ca in urechile a 7 din 10 tineri sau bussiness-man stau casti de Ipod Touch sau Iphone. Pana la urma tot "embeddded applications" se numesc aplicatiile capabile sa ruleze pe IphoneOS. Ipod Touch am deja, imi mai trebuie un Mac. Eh aici e problema, costa cat un rinichi pe piata neagra.

Era sa uit, degeaba dau o caruta de bani pe hardware, imi mai trebuie o idee! Ceva care nu s-a mai facut, ceva tot pe interfatarea intre user si internet.

Am asistat recent la un forum al dezvoltatorilor, unde la un Keynote pe la mijlocul zilei, Pannel-ul format din 5 oameni de afaceri, ziaristi, profesori a fost intrebat cati din ei au un Iphone. In secunda urmatoare sincronizati perfect si-au scos toti Iphone-urile. Daaamn! Urmatoarea intrebare fireasca a fost daca considera Iphone-ul viitorul web-ului? Majoritatea din ei au raspuns mai pe langa subiect, dat fiind faptul ca si intebare era gresit formulata. Pana la un ziarist, care a corectat intrebarea si a spus clar ca Iphone-ul este doar o fereastra catre internet, si ca nu are cum sa intruchipeze viitorul internetului, poate doar sa prevesteasca implicarea din ce in ce mai mare a internetului in viata noastra.

Si da! imi e dor de tara, de parinti, de mancare, de mici, mamaliga, si gratarele improvizate te miri unde. Sper sa gasesc tara intr-o stare economica mai buna cand ma voi intoarce.

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.

Monday, February 16, 2009

At last some news

It has been a while since my last post, mainly because I have been very busy with school and stuff, but know I finished most of my school duties and I can now focus on my personal projects.

Needless to say, I had a lot of time to think about new projects, and some of them seem interesting, but first things first, I have to finish what I have started a few months ago and that is my Etch a Sketch embedded clone.

Las time I wrote in this blog, the hardware part was finished, all that was left was the software, both the embedded software and the computer software. Let me specify that I have worked on this project in my spare time(very limited indeed) and some things have changed, my previous post has now become veryyy obsolete, and as a lesson learned, I will reframe myself from posting code until it is working 100%.

The main changes are as follows:
  • OpenGL was not needed for this project
  • I used Visual C# to write the computer frontend
  • The embedded software now waits for a request for data from the computer, acquires the data from the 2 potentiometers, and sends it back to the computer software, this repeats several times a second
I have learned some important lessons in hardware design like how to arrange wires as to not interfere with each other. This is important because the approach I used in my last software design was to send data through the wire only when the data read was different that the last reading. In theory this sounded perfect, the simulator worked perfect, but as I was told again and again, a simulator never replaces the real thing. In real world operation the data read was very gettered, and oscillated between several very close values, and ended up that the hardware was sending data very often, the exact thing I was trying to avoid.

I will begin work again to finish this project and to move on to another. In order to consider this project finished, I have to implement an error detection system on the computer side to ensure that the data read from the hardware is formated correctly. At the moment the software sometimes goes nuts and displays strange lines as a result of bad input.