IR Syma S107G Heli Control with Arduino/Processing

IMG_3793.jpg
My Current Setup of the SymaS107G controlled with Arduino and a few IR LEDs

Getting a lot of inspiration from the internet (Kerry Wong , Procrastineering, and many others) I decided that I would want to take on the project of controlling a Syma s107 helicopter (15$ on Amazon) using a computer and Arduino.

I had discovered the Arduino code Keegan from Neave Engineering used to control the Syma from the Arduino’s serial monitor, using a set of characters to indicate throttle, yaw, and pitch. The code was written to make an IR led blink using an already interpreted 32 bit protocol that was decoded by the community.

Screen Shot 2016-07-18 at 8.34.17 PM.png
GUI written in Processing

While I found that the controlling the Heli through Serial Monitor works OK, I wanted a GUI. I wrote the GUI in Processing (this was my first time writing in Processing, so it took quite a while).

Problems

I discovered that the range of my IR led set up was very lackluster, and perhaps I am just using a resistor with too large of a resistance. Whenever the heli would go slightly out of range, it would fall straight from the sky.A source of the range problem could also be due to the fact that the IR is mounted on a stationary breadboard. When controlling a helicopter, one often points the remote (and hence the IR led) at the heli, and the remote is constantly moving. Perhaps I need to get help from someone to point the breadboard at the heli and maintain line of sight. If the lack of line of sight, turns out to be the problem, perhaps I’ll have to mount the board to a servo and have the servo follow the motion of the helicopter using computer vision? Not sure how that will work out.

Screen Shot 2016-07-21 at 2.45.46 PM.png
CSV Output example, and graph

Next Steps…

I guess the eventual goal of this project is to automate particular paths the Heli takes using computer vision, so I had the idea of generating a CSV file of the inputs I have given based on time. This is learning/training data, and eventually I can create an algorithm  based on the training data I have collected through manual control. I have very little experience with Computer Vision so I this will be a great learning experience for me.

Right now, I have what is called an Open Loop system, where the computer is sending signals, but has no idea how it is actually reacting to the environment. I am working towards closing this loop, and having the computer send controls, based on what it sees. This way, the heli can be instructed to perform complex maneuvers as it is a closed loop system.

Let me know if I can help in any way, or if you have any suggestions for me.

Code Used:

If any of these links don’t work, please let me know.

Processing GUI 

Arduino Sketch (mainly from Neave Engineering)

Inspiration/Sources:

http://www.jedibowler.com/2013/02/28/controlling-a-syma-s107g-with-an-xbox-360-controller/

http://abarry.org/s107g-helicopter-control-via-arduino/

http://procrastineering.blogspot.com/2011/11/computer-controlling-syma-helicopter.html

http://www.kerrywong.com/2012/08/27/reverse-engineering-the-syma-s107g-ir-protocol/

http://www.cs.ru.ac.za/research/g09C0298/AutoPilotThesis.pdf

http://c3p0.ou.edu/IRL/Theses/Meyer-MS.pdf

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s