seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/senior …  · web...

27
Team Members: Chia-Hooi Lim Tom Nguyen Andrew Vogel

Upload: others

Post on 27-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Team Members:Chia-Hooi LimTom NguyenAndrew Vogel

Due Date: April 22, 1999

Page 2: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

PROBLEM STATEMENT.........................................................................................................................................................1

DESIGN OBJECTIVES.............................................................................................................................................................2

END-PRODUCT DESCRIPTION.............................................................................................................................................5

ASSUMPTIONS AND LIMITATIONS....................................................................................................................................5

TECHNICAL APPROACH.......................................................................................................................................................6

EVALUATION OF PROJECT SUCCESS.............................................................................................................................10

SUMMARY OF TESTING OF END PRODUCT.................................................................................................................10

RECOMMENDATIONS..........................................................................................................................................................11

FINAL BUDGETS....................................................................................................................................................................11

Item......................................................................................................................................................................................11

FINAL TIMELINE...................................................................................................................................................................12

GANTT CHART.........................................................................................................................................................................12

LESSONS LEARNED..............................................................................................................................................................14

TEAM PROJECT INFORMATION......................................................................................................................................14

TEAM MEMBERS......................................................................................................................................................................14PROJECT ADVISOR...................................................................................................................................................................15CLIENT INFORMATION.............................................................................................................................................................15

SUMMARY AND CONCLUSIONS........................................................................................................................................15

APPENDIX................................................................................................................................................................................16

MICROCONTROLLER PROGRAM...............................................................................................................................................16

ii

Page 3: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

FIGURE 1: BATTERY CHARACTERISTICS VERSUS TIME.............................................................................................................2FIGURE 2: FLOW CHART OF THE PREG-TONE............................................................................................................................2FIGURE 3: OLD DESIGN WAVE DIAGRAM FOR THE 1.2MS CYCLE OF POSITIVE PREGNANCY...............................................3FIGURE 4: OLD DESIGN WAVE DIAGRAM FOR THE 1.2MS CYCLE OF NEGATIVE PREGNANCY.............................................3FIGURE 5: OLD DESIGN WAVE DIAGRAM FOR THE 1.2MS CYCLE OF POSITIVE CONTACT...................................................3.FIGURE 6: OLD DESIGN WAVE DIAGRAM FOR THE 1.2MS CYCLE OF NEGATIVE CONTACT...............................................4FIGURE 7: NEW DESIGN WAVE DIAGRAM FOR THE FIRST 1.5MS OF THE 50MS CYCLE OF POSITIVE PREGNANCY............4FIGURE 8: NEW DESIGN WAVE DIAGRAM FOR THE FIRST 1.5MS OF THE 50MS CYCLE OF NEGATIVE PREGNANCY..........4FIGURE 9: NEW DESIGN WAVE DIAGRAM FOR THE FIRST 1.5MS OF THE 50MS CYCLE OF POSITIVE SKIN CONTACT.......4FIGURE 10: NEW DESIGN WAVE DIAGRAM FOR THE FIRST 1.5MS OF THE 50MS CYCLE OF NEGATIVE SKIN CONTACT. . .5FIGURE 11: ORIGINAL PREGTONE CIRCUIT DESIGN.................................................................................................................6FIGURE 12: NEW PREGTONE CIRCUIT DESIGN..........................................................................................................................7FIGURE 13: ORIGINAL PREGTONE..............................................................................................................................................7FIGURE 14: MAX756 CHIP AND SURROUNDING CIRCUITRY....................................................................................................8FIGURE 15: STEP-UP-POWER SCHEMATIC................................................................................................................................9FIGURE 16: POWER OUTPUT OF THE BATTERY VERSUS TIME...............................................................................................10FIGURE 17: BUDGET PLAN FOR PREG-TONE............................................................................................................................11

iii

Page 4: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

iv

Page 5: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

ABSTRACT

Farmers need a quick, safe, and accurate way of determining whether a hog or a sheep is pregnant. Farmers can use this information to identify feed-wasting non-producers or confirm pregnancy in animals purchased or sold, and consequently save money from an increase in overall efficiency. This unit is already in production and in the marketplace. Even so, there are still ways to reduce the manufacturing cost, to reduce the running cost, and to bring the design up to date.

Problem Statement

The original Preg-Tone design has several problems. We identified four ways to reduce or completely eliminate four of these problems: the complexity of the circuit, the rate the power is consumed, manufacturing costs, and the cost of disposing of the Nickel-Cadmium batteries.

The original circuit uses five LM555 chips that are embedded in the design. The LM555 chips are timing chips that create delays and pulses for the design; however, they require at least two resistors and one capacitor per LM555 to create the delays and pulses. The additional components for the circuit make the circuit design more complex. If we solve this problem, the circuit will be much easier to understand, refine, and allow the solutions to the other problems to be more easily obtained.

The current design is using more power than our client desires. This is due to the LM555’s and the supporting circuit components. Also the circuit constantly cycles though it’s states once it is on. If we solve this problem, the users do not need to replace the batteries as often.

Companies are always looking for ways to reduce the manufacturing costs of their products. If we replace all five LM555 chips along with their resistors and capacitors, it will help our client to save money and in turn, will result in higher profit margins.

Currently our client has to pay for the disposal of the Nickel-Cadmium batteries used in the unit. This is an expensive cost to Renco due to environmental regulations. Therefore, we want to replace the Nickel-Cadmium batteries with more environmental-friendly batteries such as alkaline batteries, which the users can get and dispose of on their own. However, the alkaline batteries are not as stable as the Nickel-Cadmium batteries in their output voltage characteristic. The voltage output verses time for the two types of batteries is show in Figure 1.

1

Page 6: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 1: Battery Characteristics versus time

Design Objectives

This product must be usable by the farmer in a hog lot or some other farm area. To do this, the Preg-Tone unit must output a constant signal that can be easily heard in a noisy environment. It has been determined that 1000 Hz signal to indicate pregnancy works well. The unit also needs to output an intermittent tone to indicate contact with the skin of an animal so that correct readings may be obtained. Since the unit is usually carried on the hip of the farmer, the unit must weigh one pound or less. Also, the size should be 2 ¾” wide, 1 ¾” high, and 6” long or less. The functionality of the unit is shown in the state and the timing diagrams below (Figure 2 through Figure 10).

Figure 2: Flow chart of the Preg-tone

5V

1.25

Alkaline NiCad

3.0

Time

2

Page 7: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 3: Old Design Wave Diagram for the 1.2ms Cycle of Positive Pregnancy

Figure 4: Old Design Wave Diagram for the 1.2ms Cycle of Negative Pregnancy

Figure 5: Old Design Wave Diagram for the 1.2ms Cycle of Positive Contact

3

Page 8: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

.Figure 6: Old Design Wave Diagram for the 1.2ms Cycle of Negative Contact

Figure 7: New Design Wave Diagram for the First 1.5ms of the 50ms Cycle of Positive Pregnancy

Figure 8: New Design Wave Diagram for the First 1.5ms of the 50ms Cycle of Negative Pregnancy

Figure 9: New Design Wave Diagram for the First 1.5ms of the 50ms Cycle of Positive Skin Contact

4

Page 9: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 10: New Design Wave Diagram for the First 1.5ms of the 50ms Cycle of Negative Skin Contact

End-Product Description

The assembly code was written and debugged using the development kit that came with the Motorola 68HC05 family microcontroller. The 68HC05 family chip was able to provide all the functionality of the five LM555's in the old design. Thus, the circuit has four less parts, making it cheaper to manufacture. We were able to output a constant tone when the animal is determined pregnant, an intermittent tone when correct skin contact has been established, and no tone when the unit is on, but no testing is being done. It was decided to use a 500 Hz tone instead of 1000 Hz tone because it is believed that the resource chamber would amplify the sound enough to be heard even at the lower frequency. Unfortunately, there was not enough time to design and test the resonance chamber. The four Nickel-Cadmium batteries were eliminated and replaced by two alkaline batteries. A voltage step up chip (MAX756) was used to give the alkaline batteries a Nickel-Cadmium battery-like depletion characteristic. The elimination of the Nickel-Cadmium batteries removed the expensive cost (due to environmental regulations) to Renco for disposing the batteries. At this time, the battery life has not been tested, but has been estimated at seven to eight hours. If the battery life is not satisfactory, a third battery can be added to the design without changing the circuitry.

Assumptions and Limitations

Temperature: 0-120F. (-18 to 49 C) Operating Time: Approximately 7-8 hours for 2 Alkaline Batteries Weight: Less than 1 lb small enough to slip in your pocket Size: 5 x 2.5 x 2 inches Easy to hear tones and automatic low battery indication.

5

Page 10: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Technical Approach

To solve all the problems stated in the problem statement, several solutions are created. They are: replace all five LM555 chips with one Motorola 68HC05 family chip, replace four Nickel-Cadmium batteries with two alkaline batteries, and move speaker on top of the unit.

At the beginning, the LM555 timing chips (along with all their resistors and capacitors) are supposed to be replaced with one PIC chip (PIC 12C508). However, due to the fact that Dr. Carlson did not have the complete development kit for the PIC chip, a Motorola microcontroller unit (MCU) is used. The exact name for the chip is 68HC705J1A. Using the Motorola MCU, the circuit will become less complex. (Please compare the circuit design with LM555 timing chips in Figure 11 with the circuit design with the Motorola MCU in Figure 12 to see the differences.) In addition, it will reduce the manufacturing cost of the circuit (less components = less human effort = less cost) and will reduce the power consumption because we can programmed the Motorola MCU to be in “sleep” mode for a certain amount of time in each testing cycle.

Nickel-Cadmium batteries output a voltage of 1.2 volts per a battery and alkaline batteries output a voltage of 1.5 volts per a battery. The current design has a cutoff voltage of 4.1 volts and the new design has a cutoff voltage of 1.25 volts. Therefore, we can replace the four Nickel-Cadmium batteries (4.8 volts) with two alkaline batteries (3.0 volts). In addition, the problem with the alkaline battery output character described in the problem statement can be solved with a step-up voltage sub-circuit.

Figure 11: Original Pregtone Circuit Design

6

Page 11: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 12: New Pregtone Circuit Design

Currently the speaker is located on the side of the unit as shown in Figure 13. We want to put the speaker on top of the unit so that it will reduce the size of the unit.

Figure 13: Original Pregtone

In Figure 1, we see that the alkaline batteries have a problem with voltage retention. The alkaline batteries tend to decline gradually over time. On the other hand, the Nickel-Cadmium batteries remain constant for most of the time. To solve the problem created by the difference in these two power characteristics, a step-up-power chip was used. The chip we decided to use is the MAX756 chip from MAXIM (Figure 14).

7

Page 12: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 14: MAX756 Chip and Surrounding Circuitry

The batteries in the Preg-tone unit will supply between 1.25 volts and 3 volts to the MAX756. The MAX756 will give an output voltage between 4.8 volts and 5.2 volts. In the circuit the pin 2 must be connected low, otherwise the MAX756 will output 3 volts. Pin 1 is the shutdown-input pin. Pin 2 needs to be connected low so the output is 5 volts output. Pin 4 is low-battery detection output, pin 5 is low-batteries detection input, pin 8 is for the load from the source, and pin 6 is the output to the main Preg-tone circuitry. (Figure 15)

8

Page 13: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 15: Step-Up-Power Schematic

The step-up-power circuit will boost the voltage from an input voltage of 1.25 and above to approximately 5 volts output. If the input alkaline voltage goes below 1.25 volts, pin 5 will detect the change and the Preg-Tone unit will be shutdown. The end result of the alkaline batteries' characteristic becomes similar to the Nickel-Cadmium batteries' characteristic due to the step-up-power circuit (Figure 16).

9

Page 14: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Figure 16: Power Output of the Battery versus Time

Evaluation of Project Success

All the members deemed the project a success. The basic functionality of the unit was captured on the 68HC05 family microcontroller. We were also able to change the power supply for the better, both in costs to Renco and the end user. Unfortunately we were not able to extend the functionality of the unit (such as making it turn off after so much time of disuse) or get the resonance chamber designed or built. This was due to time constraints.

The project was also a success in other ways. The project provided some good practical experience. The project provided an opportunity to use our skills on a real world application. We also gained some group communication, scheduling, and planning skills.

Summary of Testing of End Product

We are just recently got the program to work. Therefore, our final design has not been tested to our satisfaction. Since the program worked in all the simulation tests that we ran, we are assuming it will work out in the field, but this is not for certain. Also, since extensive testing has not been done, the battery life is not known. If the battery life is not long enough, we will have to implement the design with a three-battery power supply. Again, due to the step up-power circuit this will require not change

5V

1.25

Alkaline Step Up Pwr NiCad

3.0

Time

10

Page 15: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

in the design except for the battery compartment. Hopefully this testing will occur in the next two of weeks.

Recommendations

Since we just recently got the program to work, we might be able to do some testing in the next two of weeks. Even so, further testing will be needed because we will not be able to test the product in farm environment, the environment for which the product is intended to be used. In addition, the resonance chamber will also need to be researched, designed, and built. Now that the unit uses a microcontroller, more functionality can easily be added as new ideas for uses of this unit are thought of. One of the first such functions will be and should be the ability of the microcontroller to turn off the unit after so many minutes of disuse.

Final Budgets

Item Planned Human Actual Human Planned Cost Actual CostEffort Effort

Project Plan 35 35 0 0Starting the web 5 6 0 0Post Project Plan on web 10 11 0 0Learn Old Design (New) 40 150 0 0Draw Timing Diagram (New) Old Design 25 30 0 0 New Design 15 20 0 0Learn about PIC & 68HC05 36 45 0 0Draw Schematics 25 45 0 0Circuit Broad Design 30 60 Renco Supply Renco SupplyOutlook Design 35 45 0 0Create Poster 20 30 30 41.92Solder 5 40 0 Renco SupplyDesign Review Document 24 40 0 0Requirement Analsis 5 15 0 0Requirement Specification 5 15 0 0Learn Program PIC & 68HC05 20 50 0 0Program PIC & 68HC05 50 85 0 Renco SupplyTesting 126 80 0Improvement 0 0 0 0Final Report 20 55 0 0Final Presentation 30 30 20 0Total 561 887 50 41.92

Figure 17: Budget Plan for Preg-tone

11

Page 16: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Final Timeline

Gantt Chart

12

Page 17: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

13

Page 18: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Lessons Learned

How ultrasonic devices actually work Improved knowledge of LM555's Increased knowledge of assembly Languages Intricate of trouble shooting Team work

Team Project Information

Team Members

Name : Andrew Vogel (CprE) Address : 2210 Lincoln Way Ames, IA, 50011 Phone : (515) 292-9047 Fax : (515) 292-3841 (please attend to Andy) E-mail : [email protected] Homepage: http://www.public.iastate.edu/~apvogel/

Name : Tom Nguyen (EE) Address : 1510 Hawthorn CT. Ames, IA 50010 Phone : (515) 296-8389 E-mail : [email protected] Homepage: http://www.public.iastate.edu/~tnguyen/

Name : Chia-Hooi Lim (CprE) Addr : 263, N-Hyland #2 Ames, IA 50014 Phone : (515) 292-8322 E-mail : [email protected] Homepage: http://www.public.iastate.edu/~hooi/

14

Page 19: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Project Advisor

Name : Dr. D. CarlsonOffice : 372 DurhamPhone : (515) 294-1152Fax : (515)233-6921E-mail : [email protected]: http://class.ee.iastate.edu/FAC_ST~1/carlsonD.html

Client Information

Company : Renco CorporationAddress : 116 Third Ave. North Minneapolis, MN 55401Phone : (800) 359-8181Fax : (612) 333-9026E-mail : [email protected]: http://www.rencocorp.com/

Summary and Conclusions

This project was an overall success. We gained a lot of practical experience. We learned how to take ideas and knowledge and apply them to solve problems and design real world applications. We learned a lot about circuit design, testing, trouble shooting, assembly language, and available packaged chips. We also learned about working as a team: working around people's schedules, communicating with each other, and other practical social work skills. We hope this product can be used to make farmers more successful in their animal production.

We also believe a word of thanks is due at this time. We would like to first of all thank our advisor Dr. David Carlson who has been a big help to us during the whole year. We would like to thank Renco Corporation for giving us with a project. Also we would like to thank them for providing us with all the materials and parts. Dr. Jacobson also deserves a word of thanks for helping us debug our 68HC05 simulator problem.

15

Page 20: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

Appendix

Microcontroller Program

; *** NOTE *** ; - This program is not completed yet.; - This program is tested, and was discovered not getting correct input.; - Thought it might be a pin problem and Dr. Carlson is asked to rewired; for us.; - Each instruction cycles takes about 2.27 us.

speakerOUT equ 3 ; pin 3 of portalowPower equ 0 ; pin 0 of portaprobeIN equ 3 ; pin 3 of portbprobeOUT equ 2 ; pin 2 portb

org romstart: lda #$0C ; 00001100 ; bit 0(input A - pin 18) detect low power ; bit 2(output A - pin 16) parallel with pin 15 ; bit 3(output A - pin 15) output to the speaker sta ddra ; Store AccumulatorA in portA direction register lda #$07 ; XX000111 ; bit 3(input B - pin 5) input from the receiver ; bit 2(output B - pin 6) output to the probe ; bit 1&0(outpu B - pin 3&2) Related to pin 4

sta ddrb ; Store AccumulatorA in portB direction register lda #$0C ; 00001100 (Initialize of Port A) ; bit 2 is 1 ; bit 3 is 0 sta porta ; Store AccumulatorA in portA register lda #$07 ; XX000111 (Initialize of Port B) ; bit 2 is 0 ; bit 1 is 0 ; bit 0 is 0 sta portb ; Store AccumulatorA in portB register

initCON: ldx #$FA ; 250

; SEND A PULSE; - send a pulse to the probepulse: bclr probeOut,portb ; Set probeOut nop ; 2 cc delay bset probeOut,portb ; Clear probeOut decx ; 3 cc delay cpx 0 ; 2 cc delay beq sdelay ; 3 cc delay

; DELAY 200us lda #$B ; 11 - Delay Accumulator A (2 cc)

16

Page 21: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

delay1: deca ; Decrement A (3 cc) cmp 0 ; Compare Accumulator A with 0 (2 cc) bne delay1 ; branch if not equal (3 cc)

; CHECK FOR PREGNANCY FOR 100usdelay2: lda portb ; Load Accumulator A with portB (2 cc) and #$08 ; (3cc) beq pregnant ; If the signal is 0, the pig is PREGNANT!(3 cc)

lda portb and #$08 beq pregnant

lda portb and #$08 beq pregnant

lda portb and #$08 beq pregnant

lda portb and #$08 beq pregnant

jmp npreg ; Not pregnant

; PREGNANT! SOUND THE SPEAKER FOR 10 mspregnant: lda #$6E ; 240

bset speakerOut,porta ; Set speakerOut (5 cc)delay3: nop deca cmp 0 bne delay3

bclr speakerOut,porta ; Clear speakerOut (5 cc) lda #$CEdelay8: nop nop nop nop deca cmp 0 bne delay8 jmp pulse

; bclr speakerOut,porta ; Set speakerOut (5 cc)

; NOT PREGNANTnpreg: lda #$F0 ; 240delay4: deca ; 3 cc delay nop ; 2 cc delay nop nop

17

Page 22: seniord.ece.iastate.eduseniord.ece.iastate.edu/projects/archive/may9911/Senior …  · Web viewItem 11. Final Timeline 12. Gantt Chart 12. Lessons Learned 14. Team Project Information

nop nop cmp 0 ; 2 cc delay bne delay4 ; 3 cc delay jmp pulse ; Go back to the beginning

; SHORT DELAYsdelay: ldx #$FA jmp delay2

org $7fC dw start dw start

18