Sunday, December 28, 2008

Project Video

Project Video

The project is finally over, above is a link to a video we showed during presentation. Our final report is also available to view. If you would like a copy just email us at mountainslide@gmail.com, berniej.rosario@yahoo.com, or fontanezje@msn.com

Thanks for viewing,

The NME Design Team

Friday, November 14, 2008

Pictures of "Future" Mount for Servo Controlling the Needle Valve





Pictures of R/C receiver connected to Propeller Demo Board to monitor Servo's Throttle Response





Lab Report for 11.08.2008

The N.M.E. design team continued working on mounting the final board onto the R/C car. In order for the circuit board to be properly placed without causing damage to the R/C car or itself it needed to be placed on an area away from the "hot spots" of the car and not be placed where there may be interruption of the moving mechanics in the car. In order for the circuit board to be protected from any debris or vibrations from the R/C car in motion, we placed the board into a black box that measured 3x2x1. With some minor modifications, the black box was an exact fit for the board to be safely held in. Some holes and cuts had to be done to the black box in order for wires of the LM34 and Thermocouple to come out. A hole also needed to be cut in the front of the black box to allow insertion of the USB drive to the datalogger.

We tried to do our first test run with our new circuit board mounted on the R/C car, but we discovered that our glow plug needed to be replaced.



Pictures of Servo Horn and Needle Valve Integration

Servo Horn with Cylinder Tap Attached




Needle Valve



Final Product Integration


Pictures of 1st Version of the Final Board







Thursday, November 13, 2008

Lab report for 11.07.2008

The N.M.E design team met to continue working on the printed circuit board. From previous testing we encountered a problem involving the datalogger and LM34 Temp. sensor. During the week, our group received the new components and tested them to our circuit. The new datalogger and LM34 operated successfully!


Once our N.M.E. design team completed that issue, we began applying epoxy to the designated areas of the R/C car where we were going to place the Thermocouple and LM34. Epoxy was applied around a hole that was drilled in the exhaust pipe where the thermocouple would be inserted. The LM34 needed to be placed on the head of the carburetor, so epoxy was applied near the bottom coil of the carburetor. Once the epoxy was applied it needed to sit for several hours so it can completely dry. The designated areas that the Thermocouple and LM34 were applied too were placed according to the temperature accuracy of those specific areas.


As we let the epoxy dry, we started modifying our .spin code. We needed to derive a code to monitor our servo controlling the R/C’s throttle response. We achieved this by using the ServoInput Object that uses one of a cog's counters to continuously poll an R/C servo control signal and store the pulse width in microseconds. On our board we set up 3 pin connections directly to the propeller chip to monitor the throttle response of the servo. For the throttle response to be correctly displayed on our datalogger, we had to connect one of the channels of the R/C’s receiver to be connected in series with a 10Kohm resistor to one of the pins of the propeller and of course the red wire to +5v and black to ground. First, we tested our code on a VGA monitor to make sure our board was properly monitoring the receiver’s throttle response. Once we saw that it was functioning correctly we revised the .spin code to record the throttle response to our datalogger. The range of the R/C’s throttle response (in decimal) was 800 to 1500 and 1200-1300 being in idle position.





Display of R/C receiver's throttle response (Full Throttle)


Display of R/C receiver's throttle response (Full Brake)


Display of R/C receiver's throttle response (Idle)



Picture below shows the area where epoxy was applied to hold the LM34 Temp. sensor on the bottom portion of the carburetor



Picture below shows the drilled portion of the exhaust pipe where the Thermocouple will be placed.



Picture below shows the finished product of the Thermocouple insertion into the exhaust pipe


Pictures below shows the carburetor dissassembled from R/C chassis (displayed from left to right)

Friday, November 7, 2008

Lab Report for 11.01.2008

The N.M.E. design team received the new (revised) printed circuit board during the week and continued working on soldering the microchips and components onto the board.

Once all the components were soldered to the board we tested our new printed circuit board and it operated successfully. Later on through testing, the datalogger became nonoperational due to unknown reasons. Also we discovered that our LM34 Temperature sensor was disfunctional. The LM34 temp. sensor became disfunctional due to a loose pin that was difficult to solder back together.

As a result we ordered a new datalogger and 3 LM34 temp. sensors from Parallax.




Picture below shows the comparison of the new PCB (left) & the old PCB (right)
*We used both sides of the new PCB to have a quantity of 6 boards.*





Picture below shows our nonoperational LM34 Temp. Sensor
*The positive (red) wire is detached due to a loose pin*





B. Justin B. Rosario
N.M.E. Design Team

Saturday, November 1, 2008

Lab Report for 10.24.08

During the week our N.M.E. design team received our EXPRESS PCBs (Printed Circuit Boards) and components. We realized that the fitting holes for the pins of the datalogger, prop plug, servo control, servo monitor, and LM34 didn't correctly fit and were too small. So we had to revise the original .PCB file and reorder our board for correction.





B. Justin Rosario
N.M.E. Design Team

Friday, October 24, 2008

Video: Measuring current drawn from the GWS Pico Servo (in mA)







B. Justin Rosario
N.M.E. Design Team

Lab Report for 10.17.2008 & 10.19.2008

On 10.17.2008, the N.M.E. design team met up to continue working on the ongoing problem with the operation of the servo. The same day we ordered our ExpressPCB boards and necessary components from Digikey and Parallax. Before our team met up to continue working on the project we had a quick meeting with Dr. Ducharme to discuss our problems that we were having with the servo. During the quick meeting he gave us very useful tips and helpful guidelines to follow during our testing on the servo.

After the meeting we continued our progress on the coding for the servo. The original plan that our group followed was using and modifying the servo demos that we’ve downloaded from the Parallax Object Exchange in the past. We were following the code coming from the Servo32v3 and Servo4 objects. Of course the servo demos would activate our servo, but it wouldn’t function the way we desired. So our first attempts to revise the code didn’t work. We went back and forth from servo demo to servo demo to try and make our servo motor turn at our desired angles for at a certain period in time. So our second option was to embed our working (demo) servo code into our main program. We already knew our servo was activating properly, so we decided “hey, since the servos working, let’s just throw it into our main code and move on from there”. But heading in that route just made our problems even bigger.

Previously in our last weeks lab testing our group successfully initialized two new cogs to run in our main program; one for the ADC and the second for the datalogger. So seeing that the main program compiled successfully, we decided to make things a little bit easier. So we went ahead and initiated a new cog for the servo to operate in, that way we could have the servo code in its own environment; since we already knew that the main program compiled well. So our main goal of the day was to run the .spin program to activate our ADC, datalogger, and servo simultaneously. But going down that path didn’t go so well either. Our main problem that our group was encountering was that the datalogger and servo wouldn’t operate simultaneously. The ADC was working successfully the whole time. As we initialized the servo the datalogger wouldn’t respond, but when we deactivated the servo the datalogger worked fine. So we all knew that the actual datalogger and servo itself were working correctly. So it had to be the code. Our group made numerous attempts to modify our .spin code. We attempted to run the whole program off one main cog, run each program in separate cogs, and even rearranged the process flow of the code. But then again our several attempts at revising the code were a failure.

Before our group lab testing on 10.17.08 & 10.19.08, our group had a hunch that maybe the servo needs to operate off a different power supply rather than the power supply coming from the Propeller board. Because we noticed that each time the servo moved its position the green LED on the Propeller board would turn on and off in relation to the activity of the servo. In another words, it seemed like each time the servo moved from angle-to-angle it would reset the whole program. Possibly because we assumed that the servo might be drawing out too much current. According to research, the GWS Pico servo can reach up to a MAX of 500 milli-amperes. So we decided to go with our hunch and give it a try. During the middle of the week our group went to the lab and continued to make the impossible, possible. Previously the servo was drawing the 5 volts coming from the Propeller board. So we connected the positive (+) and ground wire to a different power supply running at 5 volts, but we left the signal (white) to PIN2 on the propeller chip. Unfortunately, we didn’t get any successful results. The servo was still doing the same thing it was doing previously.

After our meeting with Dr. Ducharme, our group decided to start off on a clean slate with the servo. We discarded all the servo demo programs we were previously using and agreed to create our code from scratch, step-by-step. We wanted to work on the code for the servo “alone” before doing anything else (like running it with the main prog. simultaneously). Our group did our research and discovered that all servos operate by sending a pulse of variable width through the signal (control) wire. These pulses have ranges and they are: minimum pulse, maximum pulse, and repetition rate. The angle is determined by the duration of the pulse which is also known as Pulse Width Modulation. The period of the servo’s clock cycle is 20 milli-seconds. So what we had to do in order for the servo to stay at its turned angle was to send repetitive pulse signals through the signal wire. Also depending on the length of the pulse that was sent determines the increase in the motor turns. So in our code we initialized PIN2 as our output, because the signal (red) wire from the servo was connected to PIN2 on the propeller board. We calculated the delay when the servo should be on and off. So basically if the servo expects to see a pulse every 20 milli-seconds, we would turn the servo motor at an Xo angle for a Y amount of time, then leave it off for a Z amount of time so the servo can hold its position.

Our calculation we derived was:

  • The servo motor turned at Xo angle in Y amount of time

  • Then the servo motor held its position at Xo angle for a Z amount of time

  • We calculated the amount of time (delay) for Z by taking the difference of 20ms & Y.

Ex: 20ms – Y = Z

We would use this calculation in our code to get our desired angle on the servo. Since the pulse of variable width has a repetition rate, we simply just threw these delays into a loop so it would send pulse signals repeatedly in the program.

Once we got that working we attempted to try to run our servo simultaneously with our main .spin program and it did the same exact same thing as our previous attempts. So then we decided to go back to the drawing board and use another power supply, but this time we connected the red (+) wire to the different power supply at 5 volts and connected the ground (-) wire to the common ground of the Propeller board ( we did NOT do this in our previous attempt, we connected ground to the power supply). We compiled and ran the program. It was a success!

We measured the current drawing from the servo at each stroke. The range of current coming from the servo was a minimum of 200mA to a maximum of 500mA. That's a strong pico servo!


B. Justin Rosario

N.M.E. Design Team


Wednesday, October 22, 2008

How do servos work?

This article below was directly referenced and cited from:
"http://servocity.com/html/how_do_servos_work_.html"
Click Link to be directed to web page.

The purpose of this information is to give an overview of how servos operate and how to communicate with them. Though we have taken steps to assure the quality of information here, ServoCity makes no guarantees about the information presented. ServoCity cannot be held liable or accountable for any use or misuse of the provided information.


Servos are controlled by sending them a pulse of variable width. The control wire is used to send this pulse. The parameters for this pulse are that it has a minimum pulse, a maximum pulse, and a repetition rate. Given the rotation constraints of the servo, neutral is defined to be the position where the servo has exactly the same amount of potential rotation in the clockwise direction as it does in the counter clockwise direction. It is important to note that different servos will have different constraints on their rotation but they all have a neutral position, and that position is always around 1.5 milliseconds (ms).



The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse width Modulation. The servo expects to see a pulse every 20 ms. The length of the pulse will determine how far the motor turns. For example, a 1.5 ms pulse will make the motor turn to the 90 degree position (neutral position).

When these servos are commanded to move they will move to the position and hold that position. If an external force pushes against the servo while the servo is holding a position, the servo will resist from moving out of that position. The maximum amount of force the servo can exert is the torque rating of the servo. Servos will not hold their position forever though; the position pulse must be repeated to instruct the servo to stay in position.

When a pulse is sent to a servo that is less than 1.5 ms the servo rotates to a position and holds its output shaft some number of degrees counterclockwise from the neutral point. When the pulse is wider than 1.5 ms the opposite occurs. The minimal width and the maximum width of pulse that will command the servo to turn to a valid position are functions of each servo. Different brands, and even different servos of the same brand, will have different maximum and minimums. Generally the minimum pulse will be about 1 ms wide and the maximum pulse will be 2 ms wide.



Another parameter that varies from servo to servo is the turn rate. This is the time it takes from the servo to change from one position to another. The worst case turning time is when the servo is holding at the minimum rotation and it is commanded to go to maximum rotation. This can take several seconds on very high torque servos.



B. Justin Rosario
N.M.E. Design Team

Sunday, October 19, 2008

Google SketchUp

Today we used Google SketchUP, it is a 3D autocad program made by Google. We used the program to model a bracket that will be used to mount our GWS Pico Servo in position to adjust the needle valve on the RC car. After getting the dimensions of the of part we wanted our mounting bracket to attached to we modeled it in a 3d space.  After modeling the part we printed the model out and attached the paper sketch to the mounting  holes to check accuracy.  We then drew a servo model and found where and what hieght the servo needed to be at. Below are the individual components and them modeled together as well. 






Servo Comparisions



Below is a comparision of our old Parallax Futaba Continuous Rotation Servo (Right) & our new Parallax GWS Pico Servo. (Left)





B. Justin Rosario
N.M.E. Design Team







Lab Report for 10.10.2008, 10.12.2008, 10.14.2008, & 10.15.2008

The main purpose of the meetings held on Friday (10.10.2008) and Sunday (10.12.2008) was to complete a schematic of the N.M.E system and to work on a program to control the Pico-Servo. The secondary objective was to repair the RC car once again. (Programming portion is on separate post).


After working many hours on the design of the PCB and the components needed, we came up with a schematic of the N.M.E system along with a rough layout of the Printed Circuit Board (PCB). The schematic is composed of ; Prop-plug, EEPROM, Cold Junction Compensator, Op amp, Parallax Micro controller, Analog to Digital Converter, Voltage regulator circuit, Servo controls Datalogger and Thermocouple fig 1.1.

Fig 1.1 Schematic Pin-out


The next step was to design the PCB layout fig 1.2. The layout was obtained by following carefully the details from our schematic.





Fig 1.2 PCB Layout

This two drawings were then submitted to our advisor for revision. Our advisor's revision proved to be important, since a few errors were found and our component layout/organization skills are average. His revisions were used as a final documents fig1.3.


Fig 1.3 Final PCB Layout




Jorge E Fontanez

N.M.E. Design Team




-----------------------------------------------------------------------------------------------

On October 10th (Friday), the N.M.E. design team met up to continue working on the operation of the servo and the final draft of the Express PCB.

Our group encountered several problems while working on the servo. For our first attempt on the servo operation, we downloaded servo objects from the Propeller Object exchange on the propeller website. We used demo versions of the Servo32v3 & Servo4 objects. Both versions of the demo compiled successfully and made the servo move. We continuously tried interpreting and modifying the code, but it wouldn't give us our desired horn angles. (The horn is the piece attached to the top of the servo motor).

On October 14th & 15th, team member, Justin, tried individually working on the code of the servo. Progress was still unsuccessful.

In addition, we put the main code of the datalogger and ADC into two new seperate Cogs in the Propeller program so the devices may run efficiently. It makes the main PUB a lot simpler and more organized. The program compiled and operated successfully.

A major problem that occurred as we were working with the servo. Whenever we would add our servo program into the Propeller code, the datalogger would not function correctly. Whether we put the initiated servo program into a new cog or called it as a function, the servo would operate, but the datalogger was ignored. So trying to run the servo simultaneously with the ADC & datalogger was unsuccessful.

Definition and purpose of a Cog is described below:
(Referenced from Dr. Ducharme's Propeller Intro Power Point Presentation.)

-Each of the 8 microcontrollers is referred to as a Cog.
-The Cogs each have their own RAM for registers and program use (local variables)
-They share the same Main Memory using a common bus.
-They all have access to all the input/output pins P0-P31.

So currently we have 3 Cogs operating in our propeller chip. One Cog operates the main, second for the datalogger, and the third for the ADC.

Our group also purchased new set of wheels and other accessories for our R/C car.




B. Justin Rosario
N.M.E. Design Team

Thursday, October 9, 2008

Video Post: Servo Operation & Code







B. Justin Rosario
N.M.E. Design Team

Video Post: Test Drive #1 of "The N.M.E."




B. Justin Rosario
N.M.E. Design Team

Lab Report for 10.03.2008 & 10.05.2008

On October 3rd (Friday), the N.M.E. design had a meeting with Dr. Ducharme to discuss the progress on our senior Design project at 1:00p.m. After the meeting our team continued our work on campus at the Engineering 2 building in room 180. Due to our previous attempt at making our op-amp circuit for the K-type thermocouple, our goal that day was to start from scratch and use the necessary tools within the lab to rebuild our circuit. On the first attempt of building our op-amp circuit (on 09.28.2008) we were unsuccessful because we didn't have the right accessories. For example, we purchased a circuit board that had to have the components soldered to it and the solder tip that we were using was a little bit dull, but it was still fully functional. Our digital multi-meter was also giving us problems, because it would give us wrong readings. A major issue that we also came across during this attempt, was we were unable to get a hold of a 100-ohm potentiometer so we had to make use and create one out of several resistors to be equivalent to that value. With all these factors revolving around us we miscalculated the time it would take to get it finished. And yes, it did take longer than expected and at the end of the day the 1st attempt of our op-circuit for the thermocouple was unsuccessful. (Aside note: A Thermocouple creates a voltage of its own.)


So on this day we had a better chance to get things finished correctly in a timely manner, because we had the necessary equipment and materials that were needed. We had full- access to the soldering irons, breadboards, variety of different value resistors, power supply, and digital multi-meters. So our team continuted with the 2nd attempt of constructing the op-amp circuit for the thermocouple. We followed the schematics and pinouts according to the LT1025 and LT1050. Our first problem we encountered, was wiring the necessary components to the correct op-amp. This problem was fixed just by simply switching the op-amps to their designated side. A factor that made our team's process alot easier this time around was using a breadboard. By using the breadboard it was very easy to replace components and less time consuming to troubleshoot. The fact that we didn't need to solder anything on the 2nd attempt was a big help. As we were constructing our circuit we came across a problem that involved our LT1025 255k ohm feedback resistor. The voltage reading coming from the thermocouple would highly depend on the value we would substitute for our feedback resistor to the LT1025. We did numerous attempts of replacing different value resistors in the circuit. But even with the assigned 255k ohm resistor it would give us miscalculated values (temp./voltage) readings. We went ahead and kept lowering the resistor values until our voltage readings were finally correct. The resistor value that we replaced with the 255k ohm resistor was a 127k ohm resistor. The equation that we used to determine the thermocouple's temperature in relation to the voltage readings was 10 milliVolts per degress Celsius (10mV / oC). The constructed op-amp circuit for our Exhaust Gas Temperature Thermocouple was SUCCESSFUL.


On October 5th (Sunday), the N.M.E. design group met to start the schematics for our printed circuit board, Bill of Materials, and operation of the servo. Our team is using the expressPCB program which we downloaded from ExpressPCB.com to build our printed circuit board. Our printed circuit board will have the necessary components such as the Propeller chip, Op-amp circuit for the thermocouple, EEPROM, voltage regulator, Propeller plug, pins for the servo, LM34 temp. sensor, datalogger, and TV/RCA adapter, etc. All the necessary and required components like resistors, capacitors, etc. will be available in the final draft of the Bill of Materials.

We began operation testing on the servo. Rather than receiving the Futaba standard servo from Parallax, we ended up receiving the Futaba continuous rotational servo which was the wrong product we ordered. We decided that we needed a smaller scale servo in order for the servo to mount correctly in the R/C car. So in exchange, we called Parallax, they courteously resolved the problem and the outcome resulted in Parallax providing us with a complimentary GWS Pico servo at no charge. In the mean time our team has been working on the code for the servo. Until the GWS pico servo arrives we our currently testing with the standard servo from the R/C car. Our group is determing whether it is a better choice to have the servo operate by pulse-width or angles. So far we've accomplished movement of the servo by incrementing values in the code, but we're trying to figure out how we can reset the position in the designated angle by our demand.



Below is the comparison of our 1st (Top) & 2nd (Bottom) attempts of the op-amp circuit for the thermocouple



Below is the thermocouple bath we used to stabalize the thermcouple's temperature


Below is proof that as the thermoC. heat rises the voltage created from the thermoC. increases.





B. Justin Rosario

N.M.E. Design Team

Tuesday, September 30, 2008

Lab report for 09.22.2008 & 09.26.2008

On September 22 (Monday night), the N.M.E. design group met to continue working on the ADC problem that occurred from Sunday’s lab testing. The ADC wasn’t giving us the right reference voltages. We observed the voltages coming from channels 0 & 1 of the MCP 3208. The problem was solved. We assumed it was the wiring of the ADC to the Prop. Chip. We then rewired the circuit. The wire from the MCP 3208 that went to the VDD pin was changed to 5 Volts. The Ref & VDD are the same now. Near the end of lab testing we encountered complications that involved using our conversion factor equation to display our Temperature correctly from the ADC. The spin language didn’t like displaying Decimals onto the VGA, so we decided to change our decimal value to a fraction and it resulted in displaying the correct room temperature. Before ending the night, we added a running timer (we used a counter) and temperature display to the propeller program (.spin).

On September 26, the N.M.E design group met to work on the project. Our main concern was (1) to replace the bent driveshaft and verify there were no additional internal damage to the car, (2) to configure the Analog to Digital (A2D) converter to output temperature readings in decimal values and (3) to write a code for the Parallax Datalogger so that it effectively records data outputs from the A2D. We encountered datalogger problems. We switched the modes on the datalogger from SPI to UART mode. Logged onto the Parallax website and downloaded Paul’s USB object from the Propeller Object Exchange. We had a problem displaying the values in the txt. File coming from the datalogger. The problem was the program didn't like displaying the integer values directly on the screen (ex. vga.dec(Temp)), it would only like to display strings. We did a trial and error process by coding into the program to record data into our logger every second. We noticed that it would display our string characters into a .txt file onto the USB, but would reject our integer values. Trying to display the integer values directly, would display several ASCII characters (ex !@#$%^&). We did this process several times to pinpoint why the program wasn't doing exactly what we were telling it to do. We knew that it would record our string characters in the .txt, so we wanted to try to figure out a way to convert our integer values to a string. So we solved the problem by calling the NumToString PUB from Paul's USB Object Library. As soon as we did that, the problem was solved.


[1] The picture below is of the new driveshaft for the R/C car




[2] Picture below shows comparison of the new drive shaft (top) and the previous drive shaft (bottom). Note: the new driveshaft is thicker than previous drive shaft.





[3] Picture below shows our TV/VGA output of the current temperature and time counter within the code (.spin) of our program.




[4] Picture below shows proof that the running timer & temp. display are active and the timer is incrementing per 1 second.








Justin Rosario
N.M.E Design Team

Monday, September 29, 2008

Lab Report 9.28.2008 "Thermocouple Circuit"

On September 28, 2008 the N.M.E design team met to resume the next phase of the project. Our primary objective was to build a circuit for the Omega Nickel Chromium K Type Thermocouple. To construct this circuit we bought necessary components from Radio Shack along with the LTC1050 Precision Zero-Drift Operational amplifier and LTC1025 Thermocouple Cold Junction Compensator (fig. 1).

We were able to build the circuit, but unfortunately not as desired. Apparently we were missing two essential components, a bread board and a (1) 100Ω (ohm) potentiometer. We tried to contact many of the surrounding electronics stores, but had little success. Our next option was to improvise and use basic electronic techniques to construct a partial potentiometer.

Fig. 1
Components

Our solution was to take (2) 100Ω (ohm) resistors, set them parallel to each other and obtain a 50 Ω (ohm) resistance. We also had (5) 150 Ω (ohm) resistors and followed the same procedure in order to obtain a 75 Ω (ohm) resistance. And finally we set a (1) 100K Ω (ohm), (1) 20K Ω (ohm), (1) 4K Ω (ohm) and a (1) 2.2K Ω (ohm) resistor in series to obtain a 127K Ω(ohm) resistance. After soldering all the components to the board we began testing (fig. 2). The resistance at expected intervals were correct as well as the reference and input voltages. Unfortunately the desired output from the thermocouple was not obtained. We will purchase the necessary components prior to the next meeting and will try to solve this problem.

Fig.2
Board Prototype

Jorge E. Fontanez
N.M.E. Design Team