Tag Archives: Embedded

Wind Turbine Analysis



For our final project for CS 59000: Embedded Systems, a partner and I implemented several tests on a small-scale wind turbine using the Texas Instruments MSP430 board. We use the Analog to Digital Converter (ADC) to gather information on voltage generated by the turbine and rotations per minute calculated with the help of an optical tachometer. We then send these values to a Java-based user interface to report in real-time on an attached computer.

For the final part of our project, we designed a wind turbine stand on springs that we can use, along with the MSP430, to measure accelerometer data from the wind turbine under stress. We also send the real-time data to the user interface on an attached computer.


Power Coefficient (Cp)

10ee302faa559afbeabbf9f6e403151a (Wiki link)

We measured the following characteristics of the wind turbine at LOW fan speed:

  • AT = 0.134614 m2
  • V3 = (2.101 m/sec)3 = 9.275
  • ρ = 1.2041 kg/m3 at 20°C (from Wikipedia)

The average voltage reported by our program at LOW fan speed was 2.304 volts. Resistance was set at 330 Ω.

Using these values, we found the power coefficient, Cp, to be:

Cp = 0.00929 or 0.01

Tip-Speed Ratio

(Wiki Link)

This part of the project required the use of the optical tachometer connected to the MSP430 board. The tachometer will output a high value when no blade blocks the beam, and a low value (close to zero) when a blade is in front. We read this information and convert the rate at which blades are passing in the beam to compute a rotations per minute (RPM) value.

The average RPM we measured at a given time was: 55 RPM

We measured the radius of a blade, and found R = 20.7 cm or 0.207 meters.

At LOW fan speed, the velocity of wind was recorded as V = 2.101 m/sec * 60 s= 126.06 m/min.

Using these values, we found the Tip-Speed Ratio to be:
λ = .567 rotations

Accelerometer Data


We constructed a special stand for the wind turbine that allows the turbine and MSP board to move in unison, while still being flexible to allow natural movement due to the wind.

For this part of the project, we modified the provided Java program to also display accelerometer data in the X- and Y-axes. We track and record this data in real-time, which gives some insight into how the wind turbine is moving as the speed and direction of wind changes.

Although we are not able to give a unit for these values, the magnitude of change can indicate what is happening in the physical system. For instance, when we see X values change from near-zero to negative, we know that stress is being placed in the wind turbine in the negative X direction (see diagram below — blue values represent negative readings).

Screen Shot 2013-01-24 at 12.12.48 AM

Arduino OBD-II Interface


For my CS 497 Spring 2011 course, I worked on an independent study project creating an Arduino-based OBD-II (vehicle onboard diagnostic) interface written in C.

First, I assembled an interface between an Arduino Uno and the ISO9141 bus that most vehicles prior to 2008 use. An open-source project called OBDuino describes how to assemble such an interface, available here. Second, I wrote software for the Arduino to poll information from the vehicle’s engine control unit (ECU), such as instantaneous information like RPM and vehicle speed, and also diagnostic feedback, and display it in real time on an attached LCD screen. Third, I added an Arduino data-logging shield to allow the capturing of long-term data from a vehicle in a spreadsheet-ready format.

Download the presentation I gave on this project.

Download the source code used for this project.

Update – 3/27/11

Since my last progress update, I have written software for the Arduino to:

  • Interface with my automobile’s ISO-9141 bus, and
  • Begin polling for parameter IDs (PIDs)

Before the Arduino can begin polling data from the automobile’s ECU, it must first establish a serial connection. The initialization sequence was adapted from ISO standard 9141-2:1994, available at the Engineering library. Once started, it sends address 0x33 to the ECU at 5-baud to “bit-bang” the ECU and establish a serial connection. The Arduino then switches into normal serial communication at 10.4kbps and waits for a return address of 0x55 from the ECU followed by two keywords. The Arduino sends back the inverse of the second keyword and, upon a response of 0xCC (the inverse of 0x33) from the ECU, the Arduino displays “Init. Success!” on its LCD screen. Initialization usually takes a few seconds to complete, and the connection must be re-initialized if the ECU is not polled for data within 5 seconds.

Screen shot 2011-03-27 at 11.12.07 PM


Displayed on the LCD screen above are instantaneous readings from the four PIDs currently polled by the Arduino. Clockwise from the top-left corner, these include:

  • Engine RPM
  • Vehicle speed
  • Mass airflow (MAF) sensor, which can be used to calculate instantaneous MPG
  • Engine coolant temperature

Values update every 200ms on the LCD. Polling for PIDs involves sending a byte-encoded message to the ECU requesting a value for a PID defined in the SAE J1979 standard. The ECU then responds with a byte-encoded value that the Arduino can decode and extract information from to display on screen. Currently, the system only polls for these four PIDs, but will be expanded to poll for several more.

Upcoming Tasks

In addition to adding more PIDs to poll, I will mainly be focusing on implementing a data logger shield to hold data captured by the Arduino and display in spreadsheet form on a computer.

The data logger shield sits on top of the Arduino unit, and uses pins not used by the LCD or serial communication. The shield also contains a real-time clock to add a timestamp next to data read from the ECU. Data is stored on a 2GB SD card.



The ability to log large amounts of data from a vehicle demonstrates the usefulness for this system to offer diagnostic capabilities with a high degree of precision and temporal resolution. Implementing and programming this data logger shield, as well as graphically displaying spreadsheet data, should consume the remainder of the time allotted for myproject.

Update – 4/12/11

I’ve added the data logging shield and a way to compute MPG from the MAF (mass air flow) and VSS (vehicle speed sensor) PIDs.

MPG = VSS * ( 1 / (MAF * .0889))

Here are some Excel graphs plotted from data over a 20 minute period (844 data points). Click for larger graphs.