Archive for December, 2008

Successful bench test

Saturday, December 6th, 2008

After some tweaking with the Kalman filter I was able to get a decent response. I also started working on a Windows application that I will use to display IMU data in real time, dump the recording memory and play back recordings. The Artificial Horizon component from Tom’s web site came in very handy for the Windows application!

As you can see from the video the response if pretty good, some more tuning of the Kalman filter parameters is required. I started working on a Matlab model that will help me test adjustments a bit faster (it is also easier to quantify any improvements).

The Quadcopter parts are on order.

IMU board assembled

Saturday, December 6th, 2008

The boards have been received and ready for testing. The software is also coming together, I was able to find quite a few objects in the Propeller Object Exchange.

The following COGs are used (COG is a the 32-bit processing unit in the Propeller chip, there are a total of eight available)

  • [1 COG] Servo output using the Servo32v3 object.
  • [1 COG[ Servo input using the ServoInput object.
  • [2 COG] Floating point math using the Float32Full object.
  • [2 COG] Logger and high speed UART for real-time debugging. This is only used for testing, if more COGs are needed in the future it can be easily disabled.
  • [1 COG] ADC driver using the MCP3208 object. I had to make quite a few modifications on this one to get it to average samples between IMU updates.
  • [1 COG] The main loop with the IMU code, Kalman filters, PID loops etc. It executes every 20ms. For the Kalman filter I started with an implementation found in the object exchange but I had to make quite a few modifications to speed it up and get it to work using all three accelerometers.

Schematics and layout completed

Friday, December 5th, 2008

The schematics and layout of the boards has been completed. I decided to use ExpressPCB, they provide the schematics and layout software and their mini-board service is fairly cheap. The mini-board service is limited to a fixed size board of 3.8 x 2.5 inches, so I decided to fit both the IMU and OSD boards in the same fab. I decided to have two separate Propeller chips, one for the IMU and the motor/servo control and the other for the artificial horizon and OSD. They are connected using an I2C bus.

The IMU board consists of the following:

  • Controller: Spin Stamp board. This board includes 3.3V regulator, boot EEPROM and the Propeller chip. To avoid using an extra regulator for the ADC, IMU and EEPROM, I had to add one jumper wire to the Spin Stamp in order to get the 3.3V out on pin 24. The regulator is rated at 500mA so it can easily handle the load of the complete board. The servos are powered directly from the 5V input to the board.
  • IMU:The 5 DOF IMU from SparkFun is used, to save some space I was able to fit the ADC right under the IMU. The ADC should also help mechanically support the IMU.
  • ADC: The 12bit MCP3208 from Microchip is used, the ADC has a standard SPI interface.
  • Memory: The 24LC256 32KB EEPROM from Microchip. Not much memory but since it will only be used during development I did not want to compromise the size of the board. It should allow to store data for a few minutes.

The OSD is fairly simple and based on the HC-OSD, Terry was kind enough to also supply the Propeller driver code for the OSD. The OSD will communicate with the IMU using an I2C bus, spare pins are also routed to the connector for future expansion.

The layout is completed. The boards could be made a bit smaller but having a bit more space between components made the layout easier.

IMU Stabilized Quadcopter

Wednesday, December 3rd, 2008

This project started when I found out about the 5 DOF IMU from SparkFun. I always wanted to experiment with an IMU and Kalman filters so I decided to build an IMU based flight stabilizer. I also recently got in to FPV and was looking for the next platform after my EasyStar. A Quadcopter was the perfect platform, easy to build, can launch from my back yard and it should be able to carry a decent payload. Also developing the control hardware and software sounded like a nice challenge.

The same IMU stabilizer can also be used to stabilize my EasyStar, however I will first test it on the Quadcopter.

Of course this is not the first project of its kind (Tom’s site is worth mentioning) but none of the existing projects was exactly what I wanted to do. So my objectives for this project are:

  • Develop an IMU stabilization board using the SparkFun IMU, with enough processing power to run the Kalman filters, servo controller, PID loops and data logger.
  • Tuning PID loops in no fun without a data logger, so enough memory to record a few minutes of data at high speed will be required.
  • Spare I2C buses for interfacing with peripheral boards and maybe the EagleTree eLogger.
  • Video transmitter (I already have a 900MHz 500mW system, including a ground station).
  • Heli gyro for yaw control (the IMU can only be used to control roll and pitch).
  • EagleTree eLogger with GPS, OSD and altimeter sensor.
  • Spektrum AR7000 receiver.
  • A nice to have would be an artificial horizon on the OSD, one approach I am considering is designing an additional OSD that would only be used to generate the artificial horizon. The EagleTree OSD will be used for the display of all other information.
  • The IMU board will be based on the Propeller chip from Parallax. This device has eight cores and can operate at frequencies up to 80MHz with very little power consumption.