Pan and tilt camera with basic headtracking and camera shutter based on Nunchuck, Arduino, and Xbee Pro 868

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 low

Airborne 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 D13

Well, 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.pde

I 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.

Views: 2834


3D Robotics
Comment by Chris Anderson on March 29, 2009 at 3:08pm
Sweet! Would love to see a video of how it works...
Comment by Reto on March 29, 2009 at 3:33pm
When I get some time this week, I'll set up some light so the camera sees what it has to film...
Comment by Reto on April 1, 2009 at 9:48am
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
Comment by John on April 2, 2009 at 7:51pm
Great, thanks for the "heads up"
Comment by John on May 2, 2009 at 12:07pm
Having trouble with pan_tilt.pde . Getting a NewSoftserial error. Any ideas?
Comment by Reto on May 2, 2009 at 1:37pm
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.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service