Jump to content

- - - - -

Optical Joystick : = StickTracker = ( Opentrack, Vjoy, Sony, CL eye driver etc )

  • Please log in to reply
14 replies to this topic

#1 Guest_Doska_*


Posted 07 January 2019 - 01:46

To whom it may concern:


Here is a very simple application of existing hardware and software. 

Cheap, very good and works. ( Tested in game )

Actual full blown working prototype is in the pipeline.




Sony Camera.

CL eye driver.




Issues so far:


Plugging in cameras and starting software in correct order (get order right).

Opentrack can crash when "starting" tracking (reopen and works fine).


A graphic:


Attached File  Stick Tracker = cheap and brilliant.jpg   686.76KB   1 downloads



So far testing has shown both cameras can coexist and RoF will accept data from both instances of opentrack. etc.


i.e. I can look around AND waggle my control surfaces.


Other issues may arise, hopefully these will be mitigated.




PS. Building your own gimbal and stick may be challenging to some non DIY people. Help can be arranged.

  • 0

#2 Stumble

  • Member
  • Posts: 329
  • LocationAotearoa

Posted 07 January 2019 - 08:47

Hello... Dear sir,

Sounds like a very interesting idea! Like u say by avoiding having to change curves within RoF would make it great for BoX too.

Very interested to see how it works out!

Best of luck,
  • 0

Always remember you are unique!

Just like everyone else.

#3 Guest_Doska_*


Posted 07 January 2019 - 09:10

Good evening Mr Stumble.


The prototype stick has been created and have had it up and running.

Most issues ironed away. Wrinkle free as I type, even.


Flew the N11 around in a single player mission with no major issues.

Actual stick back on full up elevator is about 20 degrees from neutral stick.

This is pretty comfortable, not too low and not too high. ( Stick is 400mm.)


Stick to game response is super smooth, no glitches, no DZ, nothing.

It glides like a well oiled machine ( which it is).

All the smoothing normally applied to head tracking has been removed.

so it's operating on raw input.


It's pretty incredible, no potentiometers, no hall sensors and only one moving part.


It's the best.




PS. Had to swap the Camera and Led position as the original idea made the stick waaaaaay too quick. Had to tame it.

  • 0

#4 Guest_Doska_*


Posted 07 January 2019 - 10:57

For your amusement:


Attached File  Stick Tracker = cheap and brilliant 02.jpg   268.52KB   1 downloads


Attached File  image001.jpg   113.1KB   1 downloads


Attached File  image002.jpg   115.95KB   2 downloads


Attached File  image003.jpg   125.4KB   1 downloads


Attached File  image004.jpg   115.37KB   1 downloads


Works fine.

Took a while to understand how opentrack deals with things...

New IR led target to fabricate... (will try to make it tidy).

Other controls will be via now spare joystick MCU, too easy.


This set up is really good.

Not just "o.k."

It kicks bottom...IIDSSM. ( Work that one out ).



  • 0

#5 J2_Bidu

  • Posts: 1368

Posted 07 January 2019 - 11:27

This seems to be extremely clever.
  • 0

#6 Stumble

  • Member
  • Posts: 329
  • LocationAotearoa

Posted 07 January 2019 - 11:30

Looking good!!

So in the first post you showed the camera was attached to the stick and the LEDs were on the base but now it's the other way around. Have you worked out which way is best?

Also, how does RoF set the open track output to the plane controls?

Always amazes me how some people are very good at just getting our there and making things :) I've been trying to muck around with a bunch of electronic parts I've got with my Arduino but the summer sun is persuading me otherwise haha

  • 0

Always remember you are unique!

Just like everyone else.

#7 Guest_Doska_*


Posted 07 January 2019 - 12:06

Mr Stumble.


Leds on stick and camera on stand mean that the Y rotation and X rotation inputs will have the longest throw.

If you go the other way, which was my initial plan, you have to Y slide and X slide = having much too little throw.

( In the latter config you will get full elevator at about 5deg stick back... which is not optimal. and is wildly hair raising to fly.)


Or another way:


The way the angles work mean that rotation is best for "leds on stick" and provide the largest angle to output.


If I was a wizard at software I would rebuild the "point tracker" to work with "camera on stick" with a simple X and Y output.

Only one led would be needed... ( I have yet to look and see if freetrack can be used. Hmmm it does have a one point tracker.)

and you would get the best resolution out of the camera. Instead of partial resolution. never mind.


The sophistication of this rig is applied simplicity over functionality.


There is no fat on this machine at all. It's excruciatingly lean... ahem.


For the record the MicroSoft 3d pro stick has an optical sensor but the stick itself is plastic cobblers.

and there is some talk of static build up and no drivers for later windows versions....


Attached File  Sidewinder_3D_Pro.jpg   147.62KB   1 downloads


Look a picture of it, and the "game port" d-sub connector which plugged into your sound card. Weird.






QUESTION: "how does RoF set the open track output to the plane controls?"


You install Vjoy. Which is a virtual joystick.




The tell opentrack to output to vjoy. ( Vjoy is to RoF a second joystick)


Open RoF and then assign control to any axis like you normally do.

( Click  waggle apply save etc )


For each instance of opentrack I have running I have different outputs.

Opentrack Stick to vjoy then to RoF stick  and Opentrack headtrack to freetrack protocol then to RoF POV.


Check the diagram. Hope this made things clearer.

  • 0

#8 J2_SteveF

  • Posts: 996
  • LocationLondon, UK

Posted 07 January 2019 - 14:42

While I applaud what you are doing.


If you are going to design and build your own gimbal. Adding a USB controller and Hall sensors, for a few dollars, will give you a more accurate control and only cost a few dollars and be more accurate than tracking with open track.

  • 0


#9 Guest_Doska_*


Posted 07 January 2019 - 22:14

Hello MrSteve.


To make that assertion you would have to know intimately both systems, from end to end.


I profess no such ultimate knowledge therefore I cannot say which is ultimately the best.


However I can compare both systems at my leisure.

Which I will do, you can be rest assured of that.


Both systems have advantages and disadvantages, there is that to remember.


Here is some light reading on the camera processor which is amusing:




some metrics:


8bits per pixle, 640 x 480 pixles, 75 hz framerate.


12 bits per sample, n hz sample rate. ( 16khz ?)


For two axis you need two ADC.

ADC x and ADC Y. ( unless you switch between inputs...which is fine 'ish if you have a one high speed ADC)


Tracking software/modern CPU can process each video frame at leisure

and it is up to the dev to decide what is meaningful. In the case of one point,

it just locates it on the frame plane and creates X/Y co ordinates.

OR it can locate several points and/or then measure between them etc etc.

It's all a moot point when your processor is miles faster than your data flow.

Even a small 640 x 480 video feed.


and a question:


Do you really need all that resolution and update speed?

For realtime control of an airplane elevator I am pretty sure normal

human scanning and reaction time and pre computation is

mindbogglingly pedestrian.


Lets say 40 samples per second and maybe 4 bit.


You divide a used input, say 1/4 of a rotating shaft (90deg) by 16.

Therefore you will have 16 x 5.625deg points on the used part of the shaft.

Would this be enough to control an airplane elevator at normal

human speeds?  We can bang up the bit depth to 8 bit.

which is 90deg / 64 = 1.40625 angular resolution.


Every 1/40 of a second the elevator is updated with the latest shaft position to the closest 1.4 of a degree.


Still with me?


This may or may not be fine for the normal human experience.

I am picking it would be adequate...


So whats the deal then? Is bigger and faster actually better?


Is 192,000 samples per second at 24 bit actually required to derive meaning?

For simple things such as the position of our rotating shaft it is wildly too much I think.


90/576 = 0.15625 deg.


This is pretty much monitoring the stretch in the elevator control cables as they expand and contract due to temperature change.

Do you really need that much information? Is it a waste of energy? ( Low voltage samplers make this moot.)

( actually it is not but it still sounds impressive, It's just monitoring the shake in your control inputs... lets say after too much coffee.)


I could go on.


TL;DR... etc.



  • 0

#10 Guest_Doska_*


Posted 08 January 2019 - 09:44

Single point tracker for Opentrack has been found:




Works, who ever they are, they deserve a medal.


Attached File  Opentrack single point tracker.jpg   237.68KB   1 downloads


So the options:

Option A Camera on stick. The camera looks into the LED directly over the entire range of arc.

Option B LED's on stick. the leds turn away from the camera getting progressively worse over the entire range of arc.


Will try both.


Possibly will have a better solution to fiddle with using a frosted screen and a laser diode,

but type one prototype will be up and running before moving onto type two, naturally.


Also if Y is along the sensor, at 640 pixels, then I will gain max resolution of 340 each way.

compared with across at 480 which is a bit lower, at 240 each way, but this is fine for ailerons.

Portrait versus landscape if you will.


So far in game it all looks fine and flying with it is pleasant.




  • 0

#11 J2_SteveF

  • Posts: 996
  • LocationLondon, UK

Posted 08 January 2019 - 19:49

I've used Opentrack and Facetrack noir in the past and I've also used Leo Bodnar USB controllers to refurb old sticks and make button panels. I may not approach things so scientifically, but I like to think I have a practical mind.


You seem to have taken my comments to heart.


As I said I applaud the idea, it's one I have not seen before nor would have thought of, quite ingenious. :)


However I still maintain that a usb controller is the easier less complicated route especially if you've gone to all the trouble of designing and making a gimbal. Using a board would mean you would not need all the space your stick requires. Your design requires a certain amount of space below the stick limiting placement of the stick once complete.


If it was me I'd have gone with a controller and Hal effect, that was all I was trying to say. Would have reduced the size and space required and given you more placement options.


But more power to you for trying something different. Like I said I would not even have considered tracking to register axis.


Good luck with it

  • 0


#12 Guest_Doska_*


Posted 08 January 2019 - 21:08

Thank you for the good luck. S!


Diagram attached of system integration.


Attached File  System of control for the aircraft virtual 2019.jpg   231.05KB   4 downloads




  • 0

#13 arthursmedley

  • Posts: 809

Posted 08 January 2019 - 23:56


Bravo Doska!   You've invented John Logie Baird in short shorts :icon_e_salute:

  • 0

#14 Guest_Doska_*


Posted 09 January 2019 - 07:13

A quick and terse update:


Opentrack had major issues. ( I was bending it's mind of course...)


Had a very pleasant chat with the dev and they solved a point for me. Great person!


I have two instances of opentrack running. BUT they share the same .ini file.

So essentially, they both start with the same .ini file, which makes with the problems...


Dev made a suggestion which was simple and great. and now...


I can run two instances of OT and write custom .ini files to their respective ini folders.


This is magic.


Added a proper Led to the stick and things are looking swish.


Tried out the "smoothing" in OT and it's quite nice.

For general flying it removes jittery stick input and creates and nice response.


Also I have found that the stick actually has a non linear - falling rate response built in.

( it's all to do with sine waves, and it's quite groovy.) so it's quite tame at the extremes of throw. :- )




PS. I do not understand about this "short shorts" thing of which you speak? Is this some kind of western qualification of engineers?

  • 0

#15 Guest_Doska_*


Posted 10 January 2019 - 02:48

I am excited as I have over come a few major issues.


All is well, as long as the start up procedure is followed and

stop/restart procedure is followed correctly.


Some more pictures of the almost final design.

( No controls have been wired in yet, "blip" and MG trigger will be added.)


The soda pop can ballast has melted lead poured into it and the steel bar left in it.

Works very well and I will in the future make a nicer one. Turned brass? Or ornate

cast work? Maybe some steel carving? Like decorated firearm?


Attached File  IMG_0339.JPG   180.21KB   0 downloads


Attached File  IMG_0341.JPG   144.59KB   1 downloads


Attached File  IMG_0340.JPG   160.54KB   2 downloads


Attached File  IMG_0342.JPG   150.82KB   2 downloads


( I add the last pic of gimbal as it is a work of art i think, and think I will blue all steel parts. )




PS. It is good to use, smooth and and deft and for so little money it is extremely good value.

I hope that there are no hidden problems, this would cause anguish. So far.. so good.

  • 0

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users