This is finally the post for my headtracking system. I still have some tweaking ahead, but here is the present situation.It is based on following components:- Arduino compatible board (I use a spare ArduPilot board) in the airframe- Arduino compatible board on the ground (I use a Arduino Pro Mini from Sparkfun)

- Nunchuck Wii console handle

- 2 Xbee Pro Rf modems

- a camera on a pan and tilt system

- a cheapo digital camera hacked with a simple transistor shutter- some cables, some resistors, some plastic box to fit components in, etc.Ground headtracking unit features:

- basic headtracking using 2 accelerometers from the Nunchuck device (panning occurs while tilting head sideways; no rotational movement because no compass/gyro is implemented; I got used to this side movement which felt strange at first)- accelerometer data average for smoothing movements- accelerometer circuit on the head (fixed to a baseball cap)- 2 possible calibrations of the accelerometer unit (device or user)- Nunchuck handle in the hand for following specific actions when in autopilot:- front view with square button- bottom view with oval button- digital camera shutter with both buttons- two axis joystick trim to center camera position at will- visual (led) and audible (buzzer) feedback on handle actions- powered with a 2 cell 1000 mAh lipo- voltage monitoring with audible alarms (2 levels: 3.3v/cell and 3.1v/cell)- accelerometer data segregation to keep serial data rate very lowAirborne system includes:- 180 degrees camera pan- 90 degrees camera tilt (from front view to bottom view)- automatic front view after 10 seconds without headtracking data- digital camera shutter from ArduPilot digital pin D13Well, I think that's all for the features. I am sure there could be a lot of improvement in the code. I am no programmer, so I tried to do it and document it as best as I could.There are two code parts:- ground headtracker: head_track.pde- airborne system: pan_tilt.pdeI tried to record some video with my digital camera, but the light was so bad in my living room (in the evening), that I'll postpone posting a video. Instead, I added pictures into my gallery so you may check them out.this project is largely based on the code posted by Andrea Salvatore. Thanks Andrea for the nice How To.So I started using code written by others and modified it on the fly. If you recognize parts of your code, please don't be mad at me but send me a note instead, so I can duly acknowledge your contribution here and in the code. Thanks for your understanding.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Can't help you much on this since there is no NewSoftserial implementation neither int the pan_tilt.pde code posted here, nor in head_track.pde . If you added some NewSoftSerial instances and ports, you may have to check them out or post some details.
  • Having trouble with pan_tilt.pde . Getting a NewSoftserial error. Any ideas?
  • Great, thanks for the "heads up"
  • Video of the headtracking system. First video shot of my 6 years old son! Would be worse if I would have shot it...

    Find more videos like this on DIY Drones
  • When I get some time this week, I'll set up some light so the camera sees what it has to film...
  • 3D Robotics
    Sweet! Would love to see a video of how it works...
This reply was deleted.