Wind Turbine


Saimon K

Area of Interest

Computer Science/Electrical Engineering


Trinity School


Incoming Senior

Milestone 1

Milestone 1

My main project is a wind turbine, but before I delved into that project I began with a proof of concept. For my first milestone, I started by creating a MintyBoost, a battery powered USB charger. Then, I modified this device so it could use a wind powered generator as the power source instead of double A batteries.

Figure 1: Completed MintyBoost

Figure 2: Soldered parts on PCB

Figure 3: MintyBoost front view

Initially, I created a MintyBoost using a PCB (printed circuit board), two double A battery holder, USB type A jack, power inductor, diodes, resistors, bypass capacitors, power supply capacitors, 8-pin socket, and 5V boost converter. I soldered all these parts onto the PCB.

Figure 4: Power inductor

Figure 5: Ceramic capacitors

Figure 6: Electrolytic capacitors

Two of the most important elements of this device are the power inductor and capacitor. The inductor stores electrical energy in magnetic form by creating a magnetic field where electricity wraps around its coil. It converts lower DC (direct current) voltages to higher ones, meaning it conducts best at lower frequencies, because of the boost converter setup. The capacitor stores energy in an electric field. It can store energy when the MintyBoost is working, and when it is off the capacitor can release the stored energy, serving as a temporary battery. Capacitors are necessary because they stabilize the output voltage by filtering out high frequency noise. As a result, the voltage is more clear and consistent.

I attached a schottky diode because it controls the flow of energy. A special quality of diodes is that energy can flow in only one direction. This way I can clearly differentiate between the input (power source) and output (item being charged). In particular, a schottky diode also maintains a specific voltage, acting as a pseudo voltage regulator.

The boost converter increases voltage while decreasing current.

I connected the red and black wires from the battery holder to the positive and negative poles on the PCB. Once I put the batteries in and plugged an iPhone charger into the MintyBoost, my iPhone was charging which shows the energy from the batteries is correctly being outputted.

After finishing the MintyBoost, I wanted to make use of a DC motor with blades. The motor would convert mechanical energy, fueled manually or ideally by the wind, into electrical energy.

At first, I soldered the red and black wires from the motor to those on a USB I cut open so I could plug it into the USB type A jack. I had hoped that the motor would charge the batteries. However, the motor started moving, which was a clear indication that the batteries were powering it. In order to test if the motor was giving any energy, I connected a multimeter to the input. A multimeter is an electronic measuring instrument that can measure voltage, current, and resistance. The batteries clearly sent out a voltage, and so did the motor once I turned the blades. The voltage from the motor was very small and negative, leading me to hypothesize that the outputted energy from the batteries overpowered that from the motor. In addition, I had overlooked the power of the schottky diode to regulate the direction of energy flow.

Figure 7: Motor with blades

Figure 8: Multimeter with batteries

Figure 9: Multimeter with motor

Afterwards, I made the motor my input by soldering its wires to the proper poles on the PCB. I took out the batteries so the motor would be the only source of energy. Then, when I plugged in my charger and spun the blades on the motor, I saw my phone charging. Also, when I connected the multimeter to the output, the motor gave off a steady 5V when operating at a reasonable speed which indicated that it was functioning properly.

My first milestone helped me learn more about the actual parts that would go into generating, storing, and efficiently releasing energy which relate to my main goal of creating a wind turbine. It was helpful working with a motor now because I’ll be using a larger one later on. I got more practice soldering which is always a positive. I also did a good deal of troubleshooting where I used the multimeter to isolate individual parts’ performances as I analyzed their specific functions in order to pinpoint the issue.

Starter Project

My starter project is the motion alarm system. The motion alarm is a small device that can detect motion and output noise, lights, and movement in turn. This project is modeled after Sparkfun’s “Circuit 3C: Motion Alarm.” (See the code from Sparkfun at the bottom) I enjoyed completing this project because I gained more insight on incorporating sensors with Arduino while creating a practical apparatus on a smaller scale.


How it works

The motion alarm includes an Arduino Uno, a distance sensor, a piezo buzzer, a servo, and LEDs (light-emitting diodes). Arduino Uno is a microcontroller board with input and output pins which can be extended to a breadboard in order to create a circuit with various functions. The distance sensor determines how close an object is. The piezo buzzer creates a beeping noise. The servo controls rotary motions in order to create precise movement.

Figure 1: Motion Sensor Top View

Figure 2: Motion Sensor Front View

Figure 3: Echo and Trigger Diagram (from RandomNerdTutorials)

Pins 11 and 12 connect to Echo and Trigger, respectively. Trigger is responsible for sending out a ping, and Echo receives it after the ping bounces off the nearest object. The motion sensor determines how close an object is by recording how long it takes for the ping to return. In the code, Trigger sends out an ultrasonic pulse and the pulseIn command incorporates Echo to find out how long it took the pulse to return. I used a simple equation with the sensor data: distance = speed * time. Therefore, if it takes longer for the ping to come back then the distance must be greater since the speed is a constant. The last two pins I used on the Uno were the VCC, which powers my system with 5V, and the Ground, which maintains the flow of electricity.

Figure 4: Piezo Buzzer

The piezo buzzer is connected to ground for power and also pin 10 which is a PWM (pulse width modulation) pin that can control the amount of buzzing. PWM sends out a series of pulses which allows for a smooth stream of commands to be carried out while limiting the amount of current. Since Arduino can only send out 5V, PWM establishes a new average power by controlling the duty cycle, how long the set voltage is sent and how long there is no voltage.

Figure 5: Servo

The servo is connected to ground, 5V power, and pin 9 which controls the movement of the servo. PWM is useful because the series of pulses that it sends out allows for multiple motions to be triggered by the motor so the object attached above can continue moving.

The LEDs are controlled by pins 3, 5, and 6, which are all PWM pins. This way the alpha channel, or opacity, of each color can be controlled by a number between 0 and 255.

The resistors limit the current that goes to the LEDs. 

The longer, positive sides of the LEDs are controlled by these pins, and the shorter, negative sides of the LEDs are connected to ground in order to maintain the proper flow of electricity and avoid a short circuit.

In order to determine when to activate these colors, noises, and movements the code included if statements to control different scenarios. The distance was calculated by using the distance equation and setting speed as a constant and recording the time for the signals to be reflected back. The LED was supposed to be colored red if the distance was less than 10 inches, yellow between 10 and 20, and green when greater than 20. There would only be noise and movement for objects within 10 inches. I did not have a 4 pin RGB LED, so instead I used 3 different LEDs, a red, green, and blue one. It’s the same concept, but the only issue is that for yellow (between 10 and 20 inches), red and green flicker on at the same time because the colors are separated instead of combining different amounts to attain yellow.

I learned a great deal about using sensors with Arduino and also how to take specific data or inputs and create specialized outputs.

Motion Alarm Schematic

Image Source:
Code for Motion Alarm
#include                 //include the servo library
const int trigPin = 11; //connects to the trigger pin on the distance sensor
const int echoPin = 12; //connects to the echo pin on the distance sensor 
const int redPin = 3; //pin to control the red LED inside the RGB LED 
const int greenPin = 5; //pin to control the green LED inside the RGB LED const int bluePin = 6; //pin to control the blue LED inside the RGB LED 
const int buzzerPin = 10; //pin that will drive the buzzer float distance = 0; //stores the distance measured by the distance sensor Servo myservo; //create a servo object 

void setup() { 
Serial.begin (9600); //set up a serial connection with the computer 
pinMode(trigPin, OUTPUT); //the trigger pin will output pulses of electricity 
pinMode(echoPin, INPUT); //the echo pin will measure the duration of pulses coming back from the distance sensor //set the RGB LED pins to output 
pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); pinMode(buzzerPin, OUTPUT); //set the buzzer pin to output 
myservo.attach(9); //use pin 9 to control the servo 
void loop() { 
distance = getDistance(); //variable to store the distance measured by the sensor 
Serial.print(distance); //print the distance that was measured 
Serial.println(" in"); //print units after the distance 
if(distance <= 10){ //if the object is close 
//make the RGB LED red 
analogWrite(redPin, 255); 
analogWrite(greenPin, 0); 
analogWrite(bluePin, 0); 
//this code wiggles the servo and beeps the buzzer 
tone(buzzerPin, 272); //buzz the buzzer pin 
myservo.write(45); //move the servo to 45 degrees 
delay(100); //wait 100 milliseconds 
noTone(buzzerPin); //turn the buzzer off 
myservo.write(135); //move the servo to 135 degrees 
delay(100); //wait 100 milliseconds 
else if(10 < distance && distance < 20){ //if the object is a medium distance 
//make the RGB LED yellow 
analogWrite(redPin, 255); 
analogWrite(greenPin, 50); 
analogWrite(bluePin, 0); 
else{ //if the object is far away 
//make the RGB LED green 
analogWrite(redPin, 0); 
analogWrite(greenPin, 255); 
analogWrite(bluePin, 0); 
delay(50); //delay 50ms between each reading } 
//------------------FUNCTIONS------------------------------- //RETURNS THE DISTANCE MEASURED BY THE HC-SR04 DISTANCE SENSOR 
float getDistance() { 
float echoTime; //variable to store the time it takes for a ping to bounce off an object 
float calculatedDistance; //variable to store the distance calculated from the echo time 
//send out an ultrasonic pulse that's 10ms long 
digitalWrite(trigPin, HIGH); 
digitalWrite(trigPin, LOW); 
echoTime = pulseIn(echoPin, HIGH); //use the pulsein command to see how long it takes for the 
//pulse to bounce back to the sensor 
calculatedDistance = echoTime / 148.0; //calculate the distance of the object that reflected the pulse (half the bounce time multiplied by the speed of sound) 
return calculatedDistance; //send back the distance that was calculated 

Start typing and press Enter to search