Skip to content

Software

CherenChin edited this page Apr 11, 2020 · 17 revisions

The Coding Language used for this system is C++ with the operating system as Linux on the Raspberry Pi. As it can be seen from the system diagram of the home page, the Raspberry Pi measures the generated voltage from the DC motor, adjusts the blade pitch accordingly using a PWM (Pulse-Width-Modulation) Proportional Controller and displays these information on the Linux Terminal.

Generated Voltage Measurement

As stated in Electronics, the ADS1015 is used to allow the Raspberry Pi to read analog signals. It has a programmable gain from 2/3x to 16x to amplify small signals and read them with higher precision.

A written C++ library for using the ADs1015 can be found on https://github.com/hallgrimur1471/Adafruit_ADS1X15_RPi. This library uses the wiringPi library to do the I2C communications. Following the single-ended example provided by the library, a script is written for reading the voltage generated in milliVolts (mV).

Blade Pitch PWM Proportional Controller

Clone this wiki locally