User:Kris Moreno/Project3

Project Preference
"When the pressure comes, preferences give way while convictions hold firm."

I don't have any preferences. I feel as though my criteria are based more on how challenging the role is. It doesn't have to fit into any particular profile; is it something that I've never done before, and is it something that I feel like I can really feel challenged and therefore fully engaged in? That's when the work gets to be the most fun.

Problem Statement
We are to create a system that allows us to attach various shrouds and measure their efficiency in regards to energy production via wind. The shrouds should be easy and quick to disconnect and the information on energy production needs to be accurate.

Week 1
The first week is the week we buy it, use it, break it, fix it, trash it, change it, mail - upgrade it. Then we charge it, point it, zoom it, press it, Snap it, work it, quick - erase it. Put simply, we will assess the current state of the project, identify goals and areas we can improve upon, and design our vision for the project. Once we have an idea of what the finish product should look like, we will buy the parts, break them down and modify them for our needs, fix the stuff we broke too much, and 'trash' (not use) the old stuff. After making our changes, we will look at our upgrades and make sure everything is correct. While doing this, we'll take pictures and videos to document our work.

Specifically the work that will be done is designing the structure, deciding on a fan / generator / motor to use and adapting it to this application, and fine tuning the circuitry / electronics / wizardry.

Week 2
This week I will get the circuit and code working. Do or don't, there is no try.

Week 1 Narrative
This week I brainstormed with the team on a way to make the shroud easily swappable. I suggested magnets since magnets are the best solution for every problem and it definitely made since in this application. Next it was time to decide how we were going to make the structure to hold the turbine and I suggested plexi glass. We scratched that idea since plexi glass is expensive but then we found scrap plexi glass in the back room. By using plexi glass, we can create a lighter weight device that will last longer and be aesthetically pleasing. Since this project will hopefully be used in many demonstrations to non-engineers, it'll capture their attention if it looks modern and 'finished'. Also going with the design, I suggested that we cut a hole in the front facing 'pillar' that supports the fan. The reasoning behind this is so that the excess air can freely pass through, lessing the force the structure feels from the air. With high speed winds, the air thats not directed into the fan will push the device back, nullifying any results obtained through testing since the distance will be changed. The hole also fits with our aerodynamic theme and will look awesome. As far as actual work, I went over the circuit design to understand the logic behind each wire and see where any mistakes could come from. I looked at the results the previous team was getting and it seems as if the resistance value being used in the code is off, and that they are only getting 5v max because they were using an analogue pin. On the Arduino Uno, the Analogue pins only support up to 5v, so a voltage divider would be needed to get an accurate voltage reading. There were 3 methods to detect current that I stumbled upon. Briefly, 1 was a current sensor, the other was dividing the voltage by the resistance of the entire circuit, and the last was measuring the current in a resistor by knowing the value of the resistor and the voltage. Seeing as how we don't have a set voltage, there would be a lot of guess work in figuring out the exact resistance in the circuit.

To combat this, I use the knowledge I gathered from the power wheel to detect current. Specifically, the monster moto shield has the ability to detected current sensor on pins A0 and A1. I went to find a monster moto shield but the only one I could find didn't have pins. after obtaining permission from Professor Forester, I went ahead and attached header pins to the monster motor shield since the input pin blocks were limited. Next I had to find a way to connect wires to the pins without soldering them directly on and decided to use the female to male pin adapters. I decided where the wires would go beforehand, then soldered the wires on the connects so that they would match up with the correct pin layout. Before doing this, I pulled the schematic and diagram of the monster moto shield from their website to see the circuit design and info on the board. It turns out that some of the pins the moto shield uses were currently being used by the previous teams code. I changed the pin layout for the LCD screen so that the moto shield and the LCD could be used at the same time. Then after changing the circuit, I had to edit the code so that the new pin layout matched with the code. Some key take away points are that you cant use digital pins 0 and 1 when you start the serial command in the code.

After testing each solder joint, connection joint (male to female adapter) and the wires for conductivity, I put everything back together and began trouble shooting the circuit. After many hours, everything worked as it should for the LCD screen and the monster moto shield. I switched the potentiometer for the LCD screen so that its longer and can be accessed from a box.

I also cut the inner circle for the piece that will sit in-between the magnet and the fan. And I finished cutting the base portion out of the scrap plexi glass.

Lastly for the week, I began researching CUDA powered Computational Fluid Dynamic simulators for one that will work with our design. OpenFOAM seems like a good choice and I tried installing it on windows but ran into some errors. Next week I'll try running it on Linux.

Week 2 Narrative
This week I read up some more on circuits and decided the voltage divider idea wasn't too hard to implement and that the resistance in the wires can accurately be measured using a multimeter. That resolved a few of my concerns early, and the temperature difference is negligible for our application since it won't be subjected to extreme temperature changes. After changing the resistors to meet a level the arduino can handle for a voltage divider (The Arduino Uno recommends less than 10k ohm resistance, but the lower you go, the more energy is wasted, so I settled for 12.5k based on the resistors I could find) we were able to get a more accurate number. The previous group used a resistance of 55k ohm resistance, which caused a lot of the current to be lost. The coding was the next big hurdle, and that was resolved by reading a ton of forums and message boards, joining a yahoo group to see how others tackled the problem, then doing the math involved to calculate the constant that would be used to produce a correct value of voltage.

To test the code, I spun the fan by hand (Since I didn't have the leaf blower available at the time) and was able to detect voltage of less than 1 Volt. This was an improvement over the last groups test. To see how accurate it was, I connected a 9v battery to the connection between the fan and voltage divider to measure the voltage. The 9v battery had a voltage of 7.3v left (according to the multimeter) and the LCD displayed a voltage of 6.0 - 6.3 Volts. It's believe that the other volt is missing due to the load of the fan. The fan isn't spinning as fast as it does with just the 9v battery, so the voltage divider must be giving a accurate reading. After everything was working, my team and I presented our project.



To confirm this, more testing is needed in the coming weeks. Through testing, we can refine the code to be even more accurate. Our goal is to be accurate to within 0.1 Volts. Then we will start testing with the leaf blower to see how accurate it really is. We will connect the fan directly to a multimeter and use the fan at a set, predetermined location and speed. Once we get a reading from the multimeter, we will use our device to see if we get the same reading. If not, we will refine our code until we do.

Week 3 Narrative
This week I spent some time troubleshooting the circuit since it seems to have become disconnected. I also had to redo the code since I I was unable to find the copy that I saved to my computer. Extracting it from the Ardunio would require a way to get the Arduino to output it's machine langue and then reverse recompile it to assembly language / a C based higher level language. It was much easier to redo the code, and add the fixes by changing it from vout = vin * R1/(R1+R2) to vout = vin * R2(R1+R2). With the code and circuit now working, there only thing left to do is document it for the next group and integrate it with the other team members design.

Week 4 Narrative
This week was a big push to complete the project. Many hours were devoted to ensuring a quality job that would last for years. Sacrifices were made, devoting essential preparation time needed for Finals into completing this project. It is with great honor that I bestow upon HCC the finished Wind Turbine:

The code was fine tuned and completed. All the bugs and kinks worked out, Here is the finished code:

It took over 8 hours alone to transfer the circuit from the breadboard to hard, soldered copper. I decided to solder the pieces together for increased durability and to get the components to fit neatly inside the Arduino enclosure. Due to the nature of this task, I wanted to use different color wires for each connection on the LCD screen to avoid confusion. The soldered connections worked for the LCD screen for a few hours before random and illegible characters started being displayed on screen, right after I finished adding the voltage divider into the circuit. After many hours troubleshooting and looking over the code, I thought it had to be a short in the circuit. The first choice was to inspect every connection and I found a connection that became lose on a thin wire. I re-soldered that connection with the same color wire but the issue still wasn't fixed. Next I gently bent the pins on the LCD screen to allow more room and prevent the soldered joints from brushing up against each other. The issue still wasn't solved. It was at this point that I realized 3 of the wires I used (Purple, light gray, white) were of too small of a gauge to provide a lasting solder connection. They would simple break when heated up and since they were stranded wires, it was hard to get a great connection. Pieces would come off and the wire would only be attached by 1 thin strand. To ensure future long term reliability, I replaced all the lower gauge, stranded tin wires with thicker, solid copper wires. This immediately solved the issue and gave me more confidence in handling the LCD screen, especially when pushing the wires into the enclosure. The downside to replacing those wires is that I had to reuse some of the same colors, making it difficult to determine where they connect on the Arduino at first glance. Alot of time was spent resoldering the wires to the pin connectors that would go into the arduino since the pins were very close together and the soldered joints could touch. To help this issue, I modified the code to put the LCD output to different pins. By spacing them out, it made it less likely for the connections to touch.

Next, I had to decide on how to connect the fan to the circuit. I made a design matrix to choose between directly soldering it to the fan, using banana connectors, terminal connectors, alligator clips, or 9v battery connectors. Ultimately, I ended up using the 9v battery connectors because they allowed the fan to be swapped out easily in case it breaks. They also weren't as heavy or expensive as banana connectors, it was easier to connect than terminal connectors, and more secure than alligator clips. The 9v battery connectors allow for a tight, secure connection without any chance of short circuiting by brushing against other wires/metal and were the easiest of the group to disconnect and reconnect. They also happened to be the cheapest, which made our decision to use them very clear.

I also found a nice 9v connector to power the Arduino. Originally, we were just going to use the usb cable, but after searching around the workshop I found a 9v battery holder that had a switch. Several test were done to make sure it worked with the Arduino properly and I also researched online to ensure that 9V wouldn't damage the arduino (Since USB ports only provide ~5v).

I assisted Annoop in gluing the stand together. The first one we didn't let dry long enough before putting the weight of the fan on it so it started leaning backwards. To fix this, we had to take it apart, file / sand down the part we glued it at, and then re-glue it while applying pressure to make sure it didn't lean again.