onsdag 7 september 2011

HeadTracker For Dummies

HeadTracker Based on MultiWii.
Updated 16-06-28 with  New links to source code.
Headtracker code based on v2.1
Headtracker code based on v2.4
Make your own headtracker.


Things you need:

Arduino PROMINI or MEGA
Gyro
Acc
MAG is optional
Easiest is to use any of the SensorBoards or All in one available in the project.
Find information how to connect to MWii.


Operation without MAG
Tilt the head sideways to rotate the camera..
Up & Down for Nick...
If you use a MAG just look to around...
Reset MagZero by resetting the arduino.

Setup....
In the HT-file:
Select What Pin you want to use as PPM out.
#define PPM_Out 10 // Any PWM_pin : 3, 5, 6, 9, 10, eller 11
10 is default.

#define NumCannels 2 // Number of Channels To Transmitter

What channels do you want to use the Controol on.
#define PanChannel   1 // TX-Channel to injekt PAN
#define NickChannel 2 // TX-Channel to injekt TILT

Amplifiers:
Adjust the Amplifiers to make the camera move natural.
Increase multipier untill it feels natural.
Adjust to get a natural feeling on PAN,TILT
Change between Positive & Negative to reverse direction on servos
PAN_AMPLIFIER 6 // Increase to make more sensitive
TILT_AMPLIFIER -5

If MAG is used, turning 20 degrees on the head will give full throw on the Pan servo.
Change the value to get a natural feeling.
COMPASS_AMPLIFIER 20

 

In Config.h
Adjust the endpoints and center in the Cam Stabilisation section.
#define TILT_PITCH_MIN 1020 //servo travel min, don't set it below 1020
#define TILT_PITCH_MAX 2000 //servo travel max, max value=2000
#define TILT_PITCH_MIDDLE 1500 //servo neutral value

#define TILT_ROLL_MIN 1020
#define TILT_ROLL_MAX 2000
#define TILT_ROLL_MIDDLE 1500


Connect to TX Trainerport:
My radio(TGY 9X) have 3,5mm stereoplugg as trainerport.
connect the centerpin to PPM_Out on the arduino and ground to inner "ring"

Connection diagrams can be found for most brands here.
http://www.mftech.de/buchsen_en.htm

Make a DIY StandaloneTransmitter.
It's possible to connect PPM_Out direct to a TX-module.
PPM_Out to ppm input on the TX-module.
+5V and ground.



On a FrSky Diy-module I soldered a sevocable then it's easy to connect it to the Arduino.
Everything must be connected to Common ground!

Arduino and sensors can be powered from a 5V source.
Modules is usually provided with 5V from the radio.
Then everything can use same battery.

This is how my JR TXmodule is connected.


If the module need higher voltage You must keep the common ground.
Otherwise it will not work.

"PreFlight" setup
A0 & A1 Works as servooutputs (Can be used at trimming)
The Pan/Tilt can be connected direct to A0 & A1 on your HeadTracker unit.

4 kommentarer:

Micke sa...

Hehe. super bra guide jag kommer garanterat med fler frågor när jag skaffat alla delar!

Jag är lite osäker på hur ACC ska kopplas ihop med arduino promini och WM+

Mvh Micke alias Bogieboy

Magatixa sa...

Thank you! Their designs are very good!! I made a video too: http://www.youtube.com/watch?v=9dHrsdDv5xw&list

Unknown sa...

Any chance of getting a copy of this multiwii head tracking

Patrik sa...

Hi I updated the download link and added the latest 2.4 version.