Building a cheap portable artificial horizon.

Hi,
I would like to build an artificial horizon with arduino.
I need it to be able to display on a cheap portable lcd screen like the ones on ebay.
This would have to be able to show pitch and roll.
I think the best solution would be to use the arduino-tvout library wich makes it very easy to display lines and circles on a display.
http://code.google.com/p/arduino-tvout/
It really doesn't have to look nice either so graphics is not a problem.
Also for the sensor i could get the 9dof sensor (although i think even a 2axes sensor would work but i have no problem getting the 9dof).
I am posting here in order to get opinions about my project (is it possible,tips,more info i need).
Happy to hear you r thoughts ,
Thanks and best regards.

Project is very well doable, but it depends on your experience with programming and electronics.
Depending where you got the sensors and the TV out shield you can probably download sample code that will do 90% of your goal. Only step is probably to integrate these and add your "visual art" over it.

If there are problems let us know..

Is this to be used in a moving vehicle/vessel, or just static? For static use you just need a dual axis accelerometer - or a plumb line. To solve it in a moving system is much harder and you probably want to start by looking at home the autonomous drones do it - they often use Arduino clones with the required sensors integrated, and their hardware and software might be a good starting point for your project.

PeterH:
Is this to be used in a moving vehicle/vessel, or just static? For static use you just need a dual axis accelerometer - or a plumb line. To solve it in a moving system is much harder and you probably want to start by looking at home the autonomous drones do it - they often use Arduino clones with the required sensors integrated, and their hardware and software might be a good starting point for your project.

Hi,
Thanks for the answers,
This will be for a moving vehicle(glider).
The way autonomous drones do it is by sending data over the air and then processing it on a computer.
Any way, would you say something like the mpu-6050 from sparkfun will do the job?
Best Regards.

robtillaart:
Project is very well doable, but it depends on your experience with programming and electronics.
Depending where you got the sensors and the TV out shield you can probably download sample code that will do 90% of your goal. Only step is probably to integrate these and add your "visual art" over it.

If there are problems let us know..

Hi,
Well i dont have much experience with programming and electronics but i do understand the basics of programing
and arduino.
I do hope most of my code will come from sample codes and i hope the visual art wont be a problem.
As for the visual art i am hoping to make it simple as possible something like a line within a circle (the roll will change the angle and the pitch will move the line up or down).
I will very much appreciate any help i would get.
Thanks and best regards.

mryeelim:
The way autonomous drones do it is by sending data over the air and then processing it on a computer.

That seems unlikely. Firstly because it would introduce a substantial latency into the solution which would make control very much harder. Secondly because the result would not be 'autonomous'. Thirdly because the open source Arduino implementation very plainly runs on the drone.

For an Arduino implementation I'd take the dedicated Arduino clones used for drones, and use the drone software as the basis for the sensor handling and analysis. Obviously the part of the drone code dealing with the closed loop control stuff would be redundant. Instead of that, you would provide the graphics output, or send the orientation data to a device that did the graphics output. Any reason you can't simply send this to a PC to do the display side? If you definitely need to send it directly to a screen I guess you would need something like the video experimenters shield, although mating this to a drone board might not be easy.

I am sorry for the misunderstanding i ment that some drone boards support a ground stations which usually displays a virtual horizon
of course the board it self does all the processing.
my issue with using these boards is that they are expensive.
for example the ardupilot is a minimum of 170$ and that is the cheapest board i have come across.
that is why i would just like to use an arduino with a sensor and the tvout as a computer is not an option(has to be standalone very portable).
and so my question is which sensor is recommended for this kind of use?

You could try something like UAV Development Board v3, or get separate accelerometer and gyro breakout boards - which would still set you back £60 or so on top of the Arduino and anything else you need for the video output.

Why does 'standalone very portable' rule out a laptop or tablet?

Again the unit needs to be low cost, just the board is 100£ and the pickit is also expensive
The unit has to be able to display on a mini lcd as it is intended for use inside a glider aircraft.
Thanks for your advise but i am going to use an arduino board with an external sensor.
So i would be happy to hear advise on the programing(not sure if i need to use some kind of filter).
Thanks and best regards.

Well, the separate breakout boards are still going to set you back £60 or so.

For the software, I suggest you look at the algorithms used in the Arduplane project.

Hi,
After some time testing things look ok on the ground!
I am using the MPU-6050 and the arduino tv-out library.
I am calculating x and y using the kalman filter which i have found on github.
My problem is when testing in flight almost nothing happens ,the y axes responds a bit but also not much.
I think that this is related to the g force on the senors but i am not sure.
Does anybody have an opinion?

If you are still working on this project,,, Have you gone to the EnvenSense web site (www.invensense.com) to checkout the datasheet and info on the 6050? Also, while there, you might want to read up on the 'Embedded MotionApps Platform'.

Have you consulted the datasheet of the MPU-6050 to see what output you can expect from it?

Referring back to your original post, I don't know why you are using the tv-out library, when the usual GLCD libraries such as u8glib have provision to draw lines and circles.

mryeelim:
Hi,
After some time testing things look ok on the ground!
I am using the MPU-6050 and the arduino tv-out library.
I am calculating x and y using the kalman filter which i have found on github.
My problem is when testing in flight almost nothing happens ,the y axes responds a bit but also not much.
I think that this is related to the g force on the senors but i am not sure.
Does anybody have an opinion?

Hello,
Are you still working on this project ? I did create an artificial Horizon based on the BNO080 of Bosch, with readout on a TFT screen. Working well on my hobby table, but in flight the roll and pitch will indicate no movement. So I'm in exactly the same situation as you in your message of 9/3/2013.
Did you solve this issue ?