Arduino Forum

Using Arduino => Project Guidance => Topic started by: StrathyStudent on Jun 13, 2013, 11:24 am

Title: Remote Controlled Head - Will it work?!?
Post by: StrathyStudent on Jun 13, 2013, 11:24 am
Hello,

so I am looking at creating a remote control but am not sure if what I want to do is actually feasible or not.

I'm looking at using Free Track; a program that with the aid of LEDs can track head movement through the webcam, and taking this to control a remote servo to turn a foam head. Free Track can give its output as buttons on a keyboard or a virtual joystick (am leaning to using the joystick as it would seem better) and then using this as the input in the program to control the remote servo.

So my questions, is this possible and what would I need for this? My research so far is becoming a tad confusing with all the different stuff out there.

Thanks guys.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: Riva on Jun 13, 2013, 12:01 pm
A quick look at the FreeTrack handbook and probable option would be to create a simple PC program to read the joystick position and then send it's X/Y position down to an arduino over serial. The arduino would read the X/Y data and adjust servo positions accordingly.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: StrathyStudent on Jun 13, 2013, 12:58 pm
Any chance you would know where I could find such a sample code? This is a university project and I have been dropped in the deep end and the lecturers don't seem to know too much at times.

Thanks for that input tho, will deffo search up on that.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: PeterH on Jun 13, 2013, 02:00 pm
You'll need to write some code using the DirectInput API to read the joystick positions. To do that you'll need to use the DirectX SDK - it's bundled with some versions of Visual Studio, and also available separately. I seem to remember the SDK includes an example showing how to interface to a joystick.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: Riva on Jun 13, 2013, 03:48 pm
Not at work to check but I think under VB6 and maybe VS.NET you can also use the winmm.dll for reading joysticks.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: StrathyStudent on Jul 01, 2013, 12:16 pm
Thanks guys, I will try all of this out over the next two weeks and I will let you know of my results. If it helps I am looking at using the PPJoy joystick Emulator.

Again thanks.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: Riva on Jul 02, 2013, 04:45 pm
To use the freetrack software you need to wear a IR headset for the webcam to pick up the head orientation that then feeds a joystick emulator. What if you could use the arduino to read a headsets orientation using something like this (http://www.ebay.co.uk/itm/New-HMC5883L-Triple-Axis-Compass-Magnetometer-Sensor-Module-Power-Supply-3V-5V-/400519114918?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item5d40ccb0a6) or this (https://www.sparkfun.com/products/10530) and drive the servos, no PC needed.
Title: Re: Remote Controlled Head - Will it work?!?
Post by: radman on Jul 02, 2013, 05:23 pm
I hope you don't mind me deviating from your question a bit. Some years ago I saw a helmet which detected the wearer's head movements and transmitted them to a remote robot controlled head. Cameras on the robitic head then transmitted back what the robot could "see". The idea was that you could have a remote telepresence.

Rather than using a camera to detect head movement you might be better to go down the helmet route. You could either build your own montion sensing helmet or perhaps hack something like the Oculus Rift Virtual Reality Headset. I presume it already has an application interface of some sort. http://www.oculusvr.com/ (http://www.oculusvr.com/)

Unless there is a reason why you have to use a camera I think the helmet offers more posibilities.


Title: Re: Remote Controlled Head - Will it work?!?
Post by: StrathyStudent on Jul 05, 2013, 03:47 pm

To use the freetrack software you need to wear a IR headset for the webcam to pick up the head orientation that then feeds a joystick emulator. What if you could use the arduino to read a headsets orientation using something like this (http://www.ebay.co.uk/itm/New-HMC5883L-Triple-Axis-Compass-Magnetometer-Sensor-Module-Power-Supply-3V-5V-/400519114918?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item5d40ccb0a6) or this (https://www.sparkfun.com/products/10530) and drive the servos, no PC needed.


How do those work? They might just do what I want and be easier to use too! :D
Title: Re: Remote Controlled Head - Will it work?!?
Post by: Riva on Jul 06, 2013, 07:22 am
Here (http://vimeo.com/32898673) is a video demo of one working. You can pick an IMU9 up cheaply on eBay (http://www.ebay.co.uk/itm/9DOF-9axis-degree-of-freedom-IMU-sensor-ITG3200-ITG3205-ADXL345-HMC5883L-Module-/251132396500?pt=LH_DefaultDomain_0&hash=item3a78a843d4).