|Jul 06, 2012, 07:57 AM|
Quick and dirty, but here goes. Not really tested much etc. but should help a little
No need to tell me a little text, graph-color etc. should be changed.
(The new code for the Headtracker must also be used)
To calibrate magnetometer:
- Open Magnetometer_cal.exe
- Select com-port and press connect
- Press "Start plot"
- You must turn the magnetometer around to get a good max/min reading for all axis. In my case max is with the axis pointed towards north but pointed more or less down.
The difference between min and max reading should in the end be pretty close for all axis.
When you have the readings, open the code in Arduino IDE, go to the tab sensors.cpp and find this:
float mag0Max = 625;
float mag1Max = 625;
float mag2Max = 625;
float mag0Min = -625;
float mag1Min = -625;
float mag2Min = -625;
Copy the max/min readings from the GUI.
Let's take an example:
- would give:
float mag0Max = 703;
float mag1Max = 481;
float mag2Max = 962;
float mag0Min = -444;
float mag1Min = -481;
float mag2Min = -293;
This was a quick test, so the difference is not very similar here. - but you get the point.
|Jul 06, 2012, 09:34 AM|
But the magnetometer gain is calibrated automatic using a self test in the magnetometer, so it's only the offset that's necessary to calibrate.
It might be easier just to rotate the magnetometer 180 degrees and set the offset. It should give the same result. I'll write a bit more after my vacation
|Jul 06, 2012, 05:46 PM|
I only ordered my Arduino and sensor the other day, and the cub is still in build. Really looking forward to trying it!
|Jul 06, 2012, 06:00 PM|
It can also be used for stabilisation, auto-pilot etc.
|Jul 07, 2012, 11:46 AM|
I have a few projects I need to finish atm, but I would be fun to code an autopilot sooner or later.
|Jul 07, 2012, 05:57 PM|
But you are probably gonna need a bit more than just that.
Anyway, Ardupilot should be a great place to look if you want a ready-made system. If I'm ever gonna write an autopilot, it will probably just be for fun and not an official project.
|Jul 08, 2012, 06:31 PM|
I'll be on vacation for 2 weeks (I'm leaving in a couple of hours), hope you guys can help each other with basic questions.
Hopefully it will be pretty straight forward with the software etc.
Hope to see a few headtracker builds when i get back
|Jul 12, 2012, 03:23 AM|
Italy, Emilia-Romagna, Ferrara
Joined Sep 2003
First of all, congratulations to all.
I assembled the circuit.
I tested the circuit connected to the PC, Windows XP, everything was perfect.
I have set the magnetometer, as described.
I connected the hd to my Futaba T9C and nothing worked.
A few seconds later I touched the arduino, and I felt very hot, close to the USB port.
I pulled the plug Trainer.
After a bit 'of the second I connected the PC to change some value in the interface.
When connected, Windows XP has written something like: excessive voltage (or current, I can not remember) in USB HUB.
Then I smelled something burning and the Arduino is gone.
The computer no longer sees the arduino when connected.
The arduino, connecting it to the USB port, no LEDs will not light.
I reconnected the circuit shortly after the Futaba and the arduino has warmed up again.
My PC and interface, the head tracker could see perfectly.
I believe that the problem was on the jack to the Futaba Trainer, where I found 10.1V (3s lipo with 2 capacitors).
I have attached a few pictures taken of Futaba, I ask for confirmation if everything is correct.
I thank you in advance.
|Jul 12, 2012, 05:49 AM|
connection on Trainerplug looks okay to me.
maybe a short on the arduino vcc input?
and, don't connect HT to the Futaba and USB at the same time. Can cause problems.
My sensor board has arrived, so hopefully i will build mine in the next few days.
|Jul 12, 2012, 06:24 AM|
Denmark, Central Denmark Region, Tostrup
Joined Apr 2006
I don't know about connections on Trainerplug is ok, but i know it is OK to connect USB and F9 to DFHT on the same time, Dennis told me when he guided me by telephone and i did it when i adjusted center positions, ie. change a value and then click test HT settings, and see what the servo do, change the value a bit more and so on, when you hit the right value then click save HT settings.
|Jul 19, 2012, 08:49 AM|
Great work Dennis I just got my bits, put it together and it works !
It works fine, but only if I connect to PC USB with sensor boards -ve not connected, if it is a error message of USB not recognized. If -ve is removed and I plug it in its fine, then re-attach the -ve and arduino and GUI work fine.
When I plug it into my Turnigy 9 the same problem, it sends the voltage display of the Turnigy mad and the Turnigy shuts down But if I connect it with -ve ( sensor board ) off, then reconnect it the HT works fine ???
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Build Log||Diy osd (Arduino and opensource)||Dennis Frie||FPV Equipment||2416||Dec 11, 2014 03:00 PM|
|Discussion||PPM to PWM circuit for headtracker||38cjc38||DIY Electronics||18||Mar 04, 2011 07:43 AM|
|Question||Adding additional PPM inputs to a headtracker/module setup.||SebastianJ||FPV Talk||0||Aug 19, 2009 08:38 AM|
|Question||Adding additional PPM inputs to a headtracker.||SebastianJ||DIY Electronics||0||Aug 18, 2009 04:37 PM|