Monday, September 2, 2013

Project Blimp-Bot

Project Blimp-bot

I am teaching a new design class this Fall and I wanted to come up with a relatively simple project to showcase the capabilities of the Arduino microprocessor. I have decided on a simple blimp-bot that uses a Ping sensor and a PID loop to maintain a specified altitude.

I started with a sketch...


The blimp will provide an upward buoyancy force that will equal the weight of most of the components and the upward force will be provided by a Syma S107 R/C helicopter. Why a Syma Helicopter? No real good reason other than the old standby - why not? - and the fact that I like the idea of showing how the Arduino can be used to provide IR control signals.

As I worked up the design of this project, I referred to the following

A Multi-Protocol Infrared Remote Library for the Arduino - Ken Shirriff
IR Sensor Overview - Adafruit
Reverse Engineering the Syma S107G IR Protocol - Kerry Wong
Improving the Beginner’s PID - Brett Beauregard

Task 1 - Create IR output from Arduino to control helicopter

I had used the Syma S107 a couple of years ago when I was teaching an Intro to Engineering Design class. This was a "reverse engineering" exercise with a number of specified tasks, such as:
  • Determine the maximum duration that the helicopter could hover in place on a single charge.
  • Determine the maximum duration that the helicopter could spin its rotors at maximum throttle.
  • Determine the maximum distance from the IR transmitter that the helicopter could be operated if the helicopter was flown:
    • in a narrow hallway
    • a large open space
    • in a dark room
    • outside in bright sunlight
    • outside in the shade
The tasks that relates to the project at hand was one in which the students used a simple IR detector hooked up to a digital oscilloscope to "read" the IR signal that was being sent to the helicopter from the remote. This was a great task because the students first saw that the remote was sending out what appeared to be a repeating pulse. As the students "zoomed in" on the signal by reducing the seconds/division setting they were able to see that each pulse was actually a series of pulses and that in turn, each of these pulses was composed of another set of pulses. The sketch below shows how the view of the IR signal changed as the sec/div parameter was reduced. Refer to Kerry Wong's blog post for a more detailed explanation.

  • Top plot - The IR remote sends out a repeating pattern of pulses whenever it is controlling the helicopter. The receiving circuit on the helicopter expects this type of signal-delay-signal-delay repeating pattern. The time between these pulses is 184 milliseconds.
  • Middle plot - Each pulse at 184 ms is actually a pulse burst that contains another series of pulses that form that actual IR command. These pulses have a structure where each pulse has a duration of 0.38 ms and the time between pulses is either 0.22 ms or 0.66 ms. The pattern of a 0.38 ms pulse and a 0.22 ms delay forms a digital "0" and the pattern of a 0.38 ms pulse and a 0.66 ms delay forms a digital "1". 
  • Bottom plot - Each 0.38 ms pulse is created from a 38 kHz carrier signal. The use of the 38 kHz carrier signal is an IR standard that is used in many types of IR communication protocols. 
Structure of IR signal from Syma remote control





















The IR command signal is comprised of a headed and 4 bytes of digital information. The header is an on-off pulse of of 2 ms each which is then followed by 32 pulses that can be resolved into 32 digital 1's and 0's which can be recognized as 32 bits of digital information which is more commonly referred to as 4 bytes. The figure below shows a graphical representation of the header and one byte of information.













So we find that the control signal provided by the remote contains "four channels" of information with each of the channels (or bytes) referring to one of the control commands for the helicopter: Left/Right, Forward/Reverse, Throttle and the trim for the internal gyroscope which is used to null out any rotation of the helicopter when the Left/Right control is in its neutral position.


















More to follow...

This is a short video of the IR remote detection circuit

No comments:

Post a Comment