Anda di halaman 1dari 43

University of Victoria Department of Electrical and Computer Engineering ELEC 499A DESIGN PROJECT

Automatic Fish Feeder Final Report

Submitted by: Patrick Audet paudet@uvic.ca Tomas Martin tlcmo@uvic.ca August 07, 2011

Submitted to: Amirali Baniasadi Ph. D. (Supervisor)

Automatic Fish Feeder Final Report

II

TABLE OF CONTENTS
1. Executive Summary..............................................................................................................1 2. Introduction...........................................................................................................................2 3. Market analysis.....................................................................................................................3 3.1 Product Definition.......................................................................................................3 3.2 Analysis of the pet products market.............................................................................3 3.3 Competing products.....................................................................................................4 4. Mechanical Design................................................................................................................5 4.1 Thermoelectric cooling devices Seebeck effect........................................................5 4.2 Thermoelectric cooling system design........................................................................6 4.3 TEC Calculations.........................................................................................................8 4.4 TEC selection criteria..................................................................................................9 4.5 TEC cooling system design.......................................................................................11 4.6 Housing and feeding system......................................................................................12 5. Electrical Design.................................................................................................................16 5.1 Component selection.................................................................................................16 5.1.1 LCD Display.................................................................................................16 5.1.2 Microcontroller.............................................................................................17 5.1.3 Stepper Motor...............................................................................................19 5.1.4 Motor Selection- Bipolar stacked (1 W/coil)................................................21 5.2 Power requirements...................................................................................................22 5.3 Microcontroller selection...........................................................................................22 5.4 Electrical schematics.................................................................................................24 5.5 Software.....................................................................................................................26 5.5.1 Main module:................................................................................................26 5.5.2 Set module:...................................................................................................26 5.5.3 Motor movement:..........................................................................................27 6. Product costs.......................................................................................................................28 6.1 Bill of Materials.........................................................................................................28 6.2 Total costs and expected selling price........................................................................29 7. Conclusions.........................................................................................................................30 3. 4. 30 30 2005

Patrick Audet / Tomas Martin

Automatic Fish Feeder Final Report 5. 6. 7. 8. 9. 30 30 30 30 30

III

8. Recommendations...............................................................................................................30 9. References...........................................................................................................................31 APPENDIX A..........................................................................................................................1

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

IV

LIST OF FIGURES
Figure 1:Household breakdown by pet type..............................................................................3 Figure 2:Automatic feeder types and prices (5).........................................................................4 Figure 3:Seebeck Voltage diagram (7).......................................................................................5 Figure 4:Thermocouples connected in series (10).....................................................................6 Figure 5:Schematic of a thermocouple (9).................................................................................6 Figure 6:Parameters used in mathematical equations (12)........................................................8 Figure 7:Performance of selected TEC (13) .............................................................................9 Figure 8:Tellurex TEC dimensions (13)..................................................................................10 Figure 9:Diagram of performance vs. Input power (8)............................................................10 Figure 10:TEC Cooling Overview...........................................................................................11 Figure 11:Picture of TEC Assembly........................................................................................11 Figure 12:Mechanical drawing................................................................................................13 Figure 13:Automatic fish feeder housing and heatsink assembly...........................................14 Figure 14:Automatic fish feeder - fully assembled..................................................................15 Figure 15:Structure of a transmissive LCD display (16).........................................................16 Figure 16:HD44780-based 2x16 character display .................................................................16 Figure 17:Unipolar motor structure (17)..................................................................................19 Figure 18:Bipolar motor structure (17)....................................................................................19 Figure 19:Bipolar motor structure (17)....................................................................................20 Patrick Audet / Tomas Martin 2005

Automatic Fish Feeder Final Report Figure 20:Stacked stepper specifications (Danaher Motion)...................................................21 Figure 21:BS2-SX Module schematic.....................................................................................23 Figure 22:Automatic fish feeder electrical block diagram...................................................24 Figure 23:Electrical Schematic................................................................................................25

LIST OF TABLES
Table 1:TEC Parameter Definitions...........................................................................................8 Table 2:Microcontroller characteristics (all prices in US$).....................................................18 Table 3:AFF Power requirements............................................................................................22 Table 4:TEC Input/Output requirements.................................................................................22 Table 5: AFF Prototype Material Costs................................................................................28

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

1.

EXECUTIVE SUMMARY

Pet ownership has been increasing at a steady pace in the last 20 years. In the US, after dogs and cats, the most popular pet is now the freshwater fish. More than 60% of households in the U.S. own a pet, and with pet ownership considered by many as an affordable luxury, it is not surprising to see that the total value of the pet industry approaching 35 Billion U.S. dollars (U.S. figures) The Automatic fish feeder (AFF) is a product that focuses on this market. Its purpose is to dispense frozen fish food into an aquarium, automatically, and for up to 14 days. This document provides a brief outlook on possibilities of the AFF in the market: It explores the total customer base, looks at competing products and the preferred distribution channels or points of sale. The mechanical design for a prototype unit, design and selection criteria for thermoelectric cooling, electrical component descriptions and complete electrical diagrams are also included in this document. The manufacturing cost is reviewed and compared to competitive products already on the market. Recommendations are made to improve the thermal insulation of the design, select a less complex microcontroller and lower cost through mass production.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

2.

INTRODUCTION

Companion animals bring positive health effects to their owners; most commonly cited effects are reduced levels of stress, depression, and even heart risk. (1) Mammals, especially dogs and cats, and birds have dominated the pet scene for a very long time. Many of these are domesticated while others, often considered novelty pets, are not. The popularity of aquariums has been slowly migrating from Europe and Asia to North America. New advances in low cost water filtration offer easy maintenance for novice enthusiast. Aquarium keeping is a popular hobby around the world. The predecessor of the modern aquarium was introduced in 1850 as a novel curiosity; since then, aquarium ownership has expanded as more sophisticated systems including lighting and filtration systems were developed to keep aquarium fish healthy. (2)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

3.
3.1

MARKET ANALYSIS

Product Definition
This device will dispense frozen fish food into an aquarium. It will be capable of dispensing frozen blocks of food at a several times a day at any desired time (all times are programmable). The device will use an array of thermoelectric coolers mounted onto a stainless steel cold plate to keep the product frozen without making any noise. A heat sink is mounted onto the hot side of the thermoelectric device. A low speed fan keeps the heat sink temperature low. The insulating container will feature a 14-turn rotating screw inside. The screw will accommodate 14 frozen blocks of food. Design goals Compact design capable of being mounted on top of a fish tank. Easy cleaning, cube loading and maintenance Device should be able to handle commercially available cubes of frozen food. Easy to program with at least three pushbuttons to set the time of day and feed times.

3.2

Analysis of the pet products market


Figure 1: Household breakdown by pet type According to the American Pet Product Manufacturers Association (APPMA), the U.S. pet products market was worth 34.4 billion U.S. dollars. 63% of U.S. households own a pet, up from 56% of households in 1998 (3) The number of households by pet type can be seen in Figure 1. An aquarist owns 10 to 12 fish on average.(3) Compared to dogs and cats, the biggest advantages of fish are the low cost of food, no expensive grooming, and the low maintenance required (no need to take the fish for walks like dogs) (4).
U.S. Percentage of households by pet type
4% 1% 12% 32% Bird Cat Dog Equine Freshwater Fish Saltwater Fish Reptile Small Animal 37% 4% 5% 5%

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

According to BusinessWeek, distribution of pet products is mainly done through small retailers. Big chain pet stores such as PetSmart (Petcetera in Canada) account for about 15% of total sales. Big department store chains like Zellers and Wal-Mart also offer fish feed and some accessories. (5)

3.3

Competing products
There is limited distribution of automatic feeders in Canada; automatic feeder selection is greater in the U.S. - mostly dominated by dry food feed feeders. Prices for automatic dry food fish feeders vary from US$14 up to $50 U.S. Note that all these products dispense dry food. Figure 2: Automatic feeder types and prices (5)

$25 U.S.

$50 U.S.

$14 U.S.

Other products include live shrimp hatcheries from dry cysts these hatcheries however are not automatic feeders.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

4.

MECHANICAL DESIGN

The most important component of the AFF is the thermoelectric cooling device (TEC). The arrangement and number of TECs will define the total power consumption and the overall cost of the Automatic fish feeder; Because of this, especial consideration is given to the design a operation of TECs in the following section. TEC devices are available in packages that can be directly soldered to a surface or in a ceramic sandwich style. TECs are semiconductor devices that provide cooling when current is passed though them. They make use of the Peltier effect, which states that if a current is passed through a material, a temperature differential will appear.

4.1

Thermoelectric cooling devices Seebeck effect


When two wires that are made from dissimilar metals are joined at both ends are heated a current begins to flow through the circuit. In 1812 Thomas Seebeck was the first person known to have made this discovery. The circuit can then be opened and a voltage can be measured at the terminals called the Seebeck Voltage. This voltage is a function of the martial the two metals are made from and the temperature of the junction. Any two dissimilar metals will produce this result. If the temperature difference is small the Seebeck voltage is linearly proportional to temperature. The resulting equation can be written as: eAB = T, where the Seebeck Coefficient is the constant of proportionality. (7) Figure 3: Seebeck Voltage diagram (7)

The Seebeck effect is what makes Thermoelectric cooling possible. The inverse of the Seebeck effect was discovered in 1834 by French watchmaker and physicist Jean Charles Athanase Peltier [3] Peltier discovered that by applying a voltage to the Seebeck circuit a temperature difference is created at the junctions. The result is a small heat pump that has become known as a thermoelectric cooler or Peltier cooler.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

4.2

Thermoelectric cooling system design


TECs manufactured today use many thermocouples in series. This arrangement allows meaningful amounts of heat to be transferred from the cold side of the device to a heat sink. Thermocouples are most commonly constructed of the semiconductors Bismuth and Telluride, which are heavily doped to create N-type or P-Type semiconductors; this means an excess of free electrons for N-type or lack of free electrons (excess holes) for P-type. The two types of semiconductors are then connected together and form a thermocouple. The resulting heat pump is able to cool devices below ambient temperatures. (8) Figure 4: Thermocouples connected in series (10)

Figure

5:

Figure 5:

Schematic of a thermocouple (9)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

Todays conventional cooling systems are made up of 3 basic parts: A compressor, condenser and evaporator. A pressurized refrigerant is allowed to expand and changes state from a liquid to a gas. During this stage energy in the form of heat is absorbed and results in a temperature drop. The compressor will then recompress the refrigerant. The heat generated by the compressor and absorbed in the evaporator is now expelled in the condenser. When comparing conventional cooling systems to TECs several analogies can be made. Electrons at the cold junction absorb heat as they move from the P-type (lower energy level) element to an Ntype element (higher energy level). The electrons are moved through the system by the power supply where the energy is released into a heat sink as the electrons move from the N-type element back to the P-type element. (8) Thermoelectric devices have no moving parts, produce no noise, are rugged and very reliable. Standard TECs are 40x40x4mm (length X width X height) or smaller. The industry standard mean time between failures is about 200,000 hours, which is more than 20 years for modules left in the cooling mode. (11) In order to choose a TEC three important specifications need to be stated. These are: The temperatures on the cold side, the temperature on the hot side and the amount of heat that must be moved by the device. The temperature difference across the TEC device is not the same as the measurable temperature difference between the cold and hot sides of the system. The methods of exchanging heat on the cold or hot side of the system are an important consideration in order to achieve a desired result. The efficiency of the heat exchanger depends on its unique characteristics. These represent a typical value for the heat sink operating temperature for the method used: Finned forced air heat sink: 10 to 15C above ambient air temperature Free convection heat sink: 20 to 40C above ambient air temperature Liquid exchangers: 2 to 5C above liquid temperature

The amount of heat to be moved by the device is called the heat load (QC). The load is comprised of the amount of work needed complete the desired task; for example to cool an object or dehumidify air. The load must also take into account the parasitic load caused by losses to the surrounding environment. Environmental losses are made up of loss through insulation, condensation of water, formation of ice or conduction through wires. (8)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

4.3

TEC Calculations

Figure 6:

Parameters used in mathematical equations (12)

Table 1:
L = element height Tc = cold-side temperature Qc = heat load I = applied current A = cross-sectional area Th = hot-side temperature

TEC Parameter Definitions


R = electrical resistivity N = number of couples K = thermal conductivity V = voltage S = Seebeck coefficient

The basic equation for estimations on TEC performance:


L A QC = 2 N S I TC 1 2 I 2 R K ( TH TC ) V A L

(Equ: 1)

This can be simplified to:


L QC = 2 N S ( TH TC ) + I R A

(Equ: 2)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

4.4

TEC selection criteria


Because the actual differential equations are particularly unique for every system and have no closed-form solution equations 1 and 2 are meant to only show the basic idea behind the calculations. S, R and K are all temperature dependent and an assumption of constant properties can result in large errors. (12) To design a system using TECs manufacturing companies use powerful software to model the complete system at the expected operating temperatures.(8) For the purposes of creating a prototype a chart can be used to select a TEC that will operate in the desired range of expected temperatures. For a small enclosed space to be effectively cooled in a temperature range typically found on earth the Tellurex CZ1-1.4-127-1.14 was chosen. This device will easily operate from 20C to 30C for our application. The Tellurex TEC is made up of 127 thermocouples and will pump 40 watts of heat at 12 Volts with a current of 7 Amps. This should produce a 30C temperature drop across the TEC. (13) TEC manufactures provide a chart that helps in choosing an appropriate TEC. For the project decisions for the operating voltage, current, temperature difference and heat moved were all made from Figure 7. It is also possible to construct a similar graph using equations 1 or 2. Figure 7: Performance of selected TEC (13)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

10

The Basic dimensions of the Tellurex TEC are 44x40x3.3mm (LxWxH) and pictured below. Figure 8: Tellurex TEC dimensions (13)

When choosing a TEC it is important to consider the device performance vs. input power. The diagram below shows the relation ship between the two. Input power can be, Voltage (V), Current (I) or the product of the two, P=IV. The performance of the device can be stated as (Th-Tc), QC or a combination of these two parameters which is the case most of the time.

The terms TMAX , QMAX , IMAX or VMAX refer to the point where the curve peaks. Operating at or close to the peak of this curve is inefficient and devices should be designed to operate from 40% to 80% of maximum performance. (8)

Figure 9:

Diagram of performance vs. Input power (8)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

11

4.5

TEC cooling system design


The TEC cooling device used 4 TECs connected in a series cascade. This arrangement allows one TEC to be cooled by the TEC placed directly on top. The results of a series cascade are the lower TEC will perform closer to the expected performance regardless of deficiencies in the attached heatsink. Figure 10: TEC Cooling Overview

Figure 11: Picture of TEC Assembly

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

12

4.6

Housing and feeding system


The Design uses a coil to move the food to the dispensing hole. The food storage area is kept below freezing by the TEC cooling device. In the front compartment the controlling electronics and LCD display are housed. The housing has been constructed out of 11mm Plexiglas. The Plexiglas will provide substantial insulation for the refrigerated area and is much easier to work with than metal. For the prototype, the internal helical coil is made of brass due to limited supply of stainless steel rods. The coil on the final product will be made of stainless steel. Figure 12 is a diagram showing the principal mechanical components of the Automatic fish feeder. The Plexiglas feeder housing has an opening on the base to dispense the food into the tank (the food cubes fall into the tank). Two TECs are stacked together to obtain the required temperature difference (-10C) between the cold plate inside the feeder housing and the heat sink outside. 4 TEC units are used in total (two sets of stacked TECs). The TECs are firmly attached to both the stainless steel cold plate inside the tank and the heat sink to maximize the heat transfer and cooling efficiency (nylon screws are used to secure the cold plate to the heat sink). The gap between the cold plate and heat sinks is sealed with foam to prevent condensation around the TECs. To avoid transferring heat back to the cold plate nylon screws will be used to secure the cold plate to the heat sink. The stepper motor is mounted into the housing using nylon screws as well. Silicone is used to seal off the gap between the motor and Plexiglas isolating the inner chamber from the outside air. The lid of the cold chamber is connected to the 12V power supply as required by the TECs inside. A two-pins pressure socket mounted over the Plexiglas unit will connect to the heat sink assembly allowing for easy maintenance of the food area. The solvent used to glue the Plexiglas effectively welds the Plexiglas together; this is preferable to drilling holes into the Plexiglas, which may weaken the material and cause cracks to form in this area of higher mechanical stress. The holes for the LCD display and buttons are cut from the front faceplate before it is welded. The wall between of the electrical compartment is insulated to prevent condensation and improve the LCD operation. Adequate room was left to accommodate a thin layer of neoprene foam if needed.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report Figure 12: Mechanical drawing

13

FRONT VIEW

TOP VIEW

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

14

Figure 13:

Automatic fish feeder housing and heatsink assembly

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

15

Figure 14:

Automatic fish feeder - fully assembled

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

16

5.

ELECTRICAL DESIGN

The AFF is controlled by a programmable microcontroller; this is a necessity for a design that features an alphanumeric LCD display that interacts with the user. The design requires a stepper motor to control screw forward/backward motion precisely

5.1

Component selection

5.1.1 LCD Display The user interacts with the unit through a display/keyboard combination. A backlit LCD character display will be used at it offers effective communication of words at a minimal cost. An LCD works like a light valve Liquid crystals change lights polarization angle when subject to a voltage differential. Figure 15 shows the structure of an LCD display. Figure 15: Structure of a transmissive LCD display (16)
1 Front glass substrate 2 Terminal 3 Segment electrode 4 Common electrode 5 Back glass substrate 6 Upper polarizer 7 Orientation layer 8 sealant 9 Liquid crystal 10 Conducting material 11 Sealant 12 Inlet

All LCD character displays are sold as modules. The most common LCD controllers used in these modules are the Hitachi HD44780 and the Samsung KS0066 controllers. Figure 16: HD44780-based 2x16 character display The HD44780 controller is extensively used in the industry and features a 4-bit or 8-bit parallel interface. Documentation and sample code is provided for all microcontroller families. KS0066-based controllers offer both parallel and serial communications, however, LCD displays based on this controller are not very common. Prices for HD44780-based displays are lower and offer similar performance to those based on the KS0066.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report The chosen module is a 16-character by 2-line, transmissive backlit LCD display.

17

5.1.2 Microcontroller Four types of Microcontrollers will be analyzed here. These microcontroller types were chosen due to their low price, wide availability, and abundant support. All these microcontrollers are offered with multiple built-in devices, memory types and sizes. 8051-based Microcontrollers The 8051 is an 8 bit microcontroller originally developed by Intel in 1980. It is the world's most popular microcontroller core, made by many independent manufacturers. The 8051 is widely supported, with a a full range of free and commercial products available, its architecture matches control system problems (boolean logic). This microcontroller is also the one that is offered at the lowest cost, with multiple options integrated into the same chip. Due to its internal architecture, the 8051 is difficult to program in machine language. Most of the development products feature a C compiler. Development kits are priced from $50 to $100 U.S. (14) PIC Microcontroller The PIC microcontrollers were the first RISC microcontrollers. Although having few instructions (e.g. 33 instructions for the 16C5X line versus over 90 for the Intel 8048), the PIC line has a wealth of features included as part of the chip. The benefits of design simplicity are a very small chip, small pin count, and very low power consumption.(15) Unusually for microcontrollers, the Microchip PIC data books include complete documentation on how to program the chips -- information that other manufacturers do not disclose easily. Parallax offers PIC microcontrollers with a tokenized BASIC interpreter for fast development times 68xx series by Motorola The popular 68hc11 is a powerful 8-bit data, 16-bit address microcontroller from Motorola (the sole supplier) with an instruction set that is similar to the older 68xx parts (6801, 6805, 6809). The 68hc11 has a common memory architecture in which instructions, data, I/O, and timers all share the same memory space.(15) This microcontroller is widely used and extensively supported by Motorola. Machine programming is much easier than the 8051nad PIC, and it can also be programmed in C. The main characteristics of all microcontroller families can be seen in Table 2. From Table 2 we can conclude that the Basic stamp module is excellent for fast prototyping, but it is unsuitable for mass production due to its cost. Although Motorolas microcontroller is easy to program and use, the development costs are steep, it is single sourced and programming information is secret. The 8051base microcontrollers and the PIC microcontrollers are used widely and are fully documented with a great number of free development tools these two microcontrollers will be the most suitable for a commercial low-scale project.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

18

Table 2: Microcontroller characteristics (all prices in US$)


Device 8051-Based (ATMEL) Software programming tools Price Ease of use Comments Freeware assembler and C compiler available Included in Demo board AT89STK-08 Starter Kit AT89C51-33PI-ND (40 pin DIP) 4k Flash 32 I/O pins

0.00 Medium

Programming device Easy Demo Board 132.00 Easy MCU (chip only - mass product) 2.47

Freescale MC68HCxx series Software programming tools Programming device Demo Board MCU (chip only - mass product)

499.00 Easy 30.00 30.00 Easy 3.00

Metrowerks Codewarrior "basic". Freescale proprietary undisclosed None available for DIP MCUs Lowest cost programmer/demo board includes SMT QFP MCU MC68HRC98JL3ECP (28-pin DIP) MCU,128RAM,4K FLASH,A/D

Microchip PIC RISC MCU Software programming tools Programming device Demo Board MCU (chip only - mass product)

0.00 Medium 199.00 Easy 99.00 Easy 1.65

Freeware assembler and C compiler Public programming info: Multiple programming circuits available Multiple sources, might not be needed SX28AC-DP+ (16 pin DIP) / other models available

Parallax PIC w/ BASIC Software programming tools Programming device Demo Board MCU (chip only - mass product) EEPROM for MCU (required)

0.00 Extremely easy Easy 50.00 Easy 12.00 5.00

Freeware basic tokenizer Included in demo board/ same as PIC BS2-SX OEM module SX28AC-DP+ (16 pin DIP); No internal memory for programs Required

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report 5.1.3 Stepper Motor

19

A stepper motor is required to perform precise screw movements (in degrees) as the screw must move 360 exactly in each feeding operation. A stepper motor will also allow for forward/backward motion to prevent the product from freezing into the screw and housing. Stepper motors can be of two types: Permanent Magnet and Variable reluctance. Variable reluctance motors run freely when no current is applied while permanent magnet motors have a tendency to show some resistance to movement. Permanent magnet steppers are heavier but easier to manufacture; this explains their widespread use.

Unipolar motors Figure 17: structure (17) Unipolar stepping motors can be controlled using 6 wires and are usually wired as shown in Figure 17, with a center tap on each of two windings. The center taps of the windings are typically wired to the positive supply, and the two ends of each winding are alternately grounded to reverse the direction of the field provided by that winding Unipolar motor

Bipolar Motors Figure 18: structure (17) Bipolar motors are constructed just like unipolar motors, but the two windings are replace with a single winding and the center tap is eliminated. The motor itself is simpler but the drive circuitry needed to reverse the polarity of each pair of motor poles is more complex (See Figure 18). Bipolar motor

The drive circuitry for such a motor requires an H-bridge control circuit for each winding. An Hbridge allows the polarity of the power applied to each end of each winding to be controlled in dependently

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

20

Other types of stepper motors: Bifilar Motors Similar to the bipolar motor, but instead of winding each coil in the stator with a single wire, two wires are wound in parallel with each other. Motors with bifilar windings are always powered as either unipolar or bipolar motors. Multiphase Motors Multiphase motors are used in power/torque applications are very different from the unipolar/bipolar construction as seen in Figure 19. Figure 19: Bipolar motor structure (17)

Control of either one of these multiphase motors in either the Delta or Y configuration requires 1/2 of an H-bridge for each motor terminal. It is noteworthy that 5-phase motors have the potential of delivering more torque from a given package size because all or all but one of the motor windings are energized at every point in the drive cycle. Some 5-phase motors have high resolutions on the order of 0.72 degrees per step (500 steps per revolution).

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

21

5.1.4 Motor Selection- Bipolar stacked (1 W/coil) The Bipolar motor was selected due to its easy construction, widespread use and low price. A stacked bipolar motor was selected to allow for more even operation and greater angle control. A stacked bipolar is just two bipolar stepper motors stacked together with a common rotation axis allowing for standardization of parts and lower manufacturing costs. The selected motor electrical schematic can be seen on Figure 20.

Figure 20: Stacked stepper specifications (Danaher Motion)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

22

5.2

Power requirements
Table 3 shows the electrical power requirements for the AFF. TECs and Heatsink fans are connected directly to the 12V power supply, as they have builtin control elements.

Table 3:
ELEMENT TEC STEPPER SOLENOID S.T. POWER LOGIC TOTAL I V 8.00 0.80 1.00 4.30 0.30 4.60 12.00 5.00 12.00 ** 5.00

AFF Power requirements


R POWER ** 6.25 ** ** N/A 96.00 4.00 12.00 46.00 1.50 159.50

5.3

Microcontroller selection
The Input/Output requirements for the microcontroller can be found in Table 4: Table 4:
Component Pin requirements Inputs Stepper 0 Push buttons 3 LCD display Total 1 4 Outputs 4 0 11 15 2-coil bipolar stacked stepper Momentary contact type Hitachi-based; 7 outputs for 4-bit operation 19 Total I/O pins

TEC Input/Output requirements

The Basic Stamp 2SX OEM model was selected among the microcontrollers listed in Table 2. This is due to the very limited amount of resources available to build a single prototype. The Basic Stamp Module integrates a fully functional microcontroller board with programming, debugging and development tools for $50 US. The Basic Stamp does not have the required number of pins to control all functions unless the LCD is operated in 4-bit parallel mode. Figure 21 shows the schematic diagram for the BS2-SX module.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report Figure 21: BS2-SX Module schematic

23

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

24

5.4

Electrical schematics
A block diagram of the electrical design is shown in Figure 22 and detailed electrical schematics on Figure 23. Figure 22: TEC unit TEC unit Automatic fish feeder electrical block diagram Stacked stepper Motor Feeding mechanism

Fan

TEC unit

TEC unit

Fan

12 V DC Power supply

Basic Stamp 2 SX OEM (Microcontroller module)

V. Reg.

12V D.C. 5V D.C.

CONTROL

Patrick Audet / Tomas Martin

LCD Module

Input switches

I/O buffers

H Bridge

H Bridge

2005

Automatic Fish Feeder Final Report Figure 23: Electrical Schematic

Basic Stamp 2SX

25

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

26

5.5

Software
The prototype system can deliver one frozen food blocks per day at a preprogrammed time. The system runs a counter to derive a 1minute pulse which is used to run the real time clock (the clock returns to zero at midnight). Feeding times are stored on a table (feed time table- FTT), which the main loop checks constantly. During normal operation (not during programming), the 2x24 LCD will display: Standby HH:MM Software modules:

5.5.1 Main module: The main loop runs when the unit is not being programmed or not dispensing food. The main functions of the main loop are: 5.5.2 Set module: The main module calls the programming module when the 'SET' button is pressed. This module is the only module that interacts with the user. User programmable functions are: Administers the FTT Sets the time of day Forced feed Maintains a counter that is used to estimate the time (loop counter) Polls the buttons and enters programming loop if any of the buttons is pressed. Displays the time on the LCD display Controls feeding events - enters the feed module when feeding time occurs

The user interface is designed to use a 2x24 alphanumeric display and three buttons. The interface is structured as hierarchical lists - the user navigates through the lists using the 'LEFT' and 'RIGHT' buttons, and selecting options using the 'SET' button. The values are changed using the 'LEFT' and 'RIGHT' buttons. New values take effect by pressing 'SET' (which also returns the user to 'Stand by' mode) The following options can be set in programming mode: TIME OF DAY: Used to set the time, (in 24-hour format) that the unit uses to control feed times. Internal clock mis estimated through a loop. During setup the LCD screen shows the following: TIME OF DAY <> (set) 00:00 +hrs +mins (set)

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report Where 00:00 is the current time that the user adjusts using the left button for hours and right button for minutes. The user sets the time by pressing set once the right time is displayed on the LCD screen. Once set, the unit will display the following message for 1 second: SETUP SUCCESSFUL

27

FEED TIME: Allows the user to set the time of day at which the unit will feed one block of frozen food. Further software improvements will permit multiple feed times per day. When setting feed time the LCD display shows: FEED TIME <> (set) 00:00 +hrs +mins (set) The 00:00 text changes with the desired feed time. The user adjusts the feed time using the left button for hours and right button for minutes just as with time of day. The user sets the time by pressing set once the right time is displayed on the LCD screen. Once set, the unit will the following message for 1 second: SETUP SUCCESSFUL SET TEMPERATURE: Will control the TEC current and therefore control the temperature. This option requires an analog input and thermistor. This function is not implemented in the current design. FEED NOW: Will activate the feeding mechanism immediately, dispensing one block of frozen food. The unit will display the following display while feeding: ** FEEDING ** EXIT SET MENU: Returns to Standby mode. And waits for the next programmed feeding event. 5.5.3 Motor movement: The motor movement modules move the motor for a single feed (360 rotation forward). The PLC generates the signals that control the two H-Bridges for the 2-unit-stacked stepper motor. The complete source code can be found in Appendix A

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

28

6.
6.1

PRODUCT COSTS

Bill of Materials
The total cost of components required to assemble the prototype board can be found in Table 5:

Table 5:
Part ELECTRICAL 74LS05N 2N6124 2N6121 108-4100 --BS2SX 529PB-ND LED 1NS3xx -SMT-75
2

AFF Prototype Material Costs


Amount 2 4 4 1 20 5 1 3 1 8 -1 1 1 2 4 Unit Cost 0.69 1.49 1.49 13.08 0.24 0.24 62.50 1.37 0.82 1.55 -3.44 5.00 0.89 7.50 18.38 Total Cost $1.38 $5.96 $5.96 $13.08 $4.80 $1.20 $62.50 $4.11 $0.82 $12.40 $10.00 $3.44 $5.00 $0.89 $15.00 $73.50

Description Hex Inverter PNP NPN 4x10 Breadboard Metal film resistor 10k Metal film resistor 1k Basic Stamp B2SX OEM Momentary SPDT 3mm LED Diode 5W T18 Wire. etc. Airpax stepper, 5V, 7.5deg 2x24 Parallel LCD w/EL 500mA, 5V Regulator 12V 3000RPM Fan
2

LCD-1072 MC78M05BT -PJT-2

Thermo Electric cooler

MECHANICAL ---Helical feeding screw Plexiglas Housing Heat sinks 2 4.38 $0.00 $50.00 $8.75 $278.79

TOTAL COST Prices per unit from Digikey Canada, AllElectronics.com2

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report Table 6:

29

6.2

Total costs and expected selling price


This is a unique product targeted at the enthusiast aquarist. There is no product in the market capable of automatically dispensing frozen food to an aquarium. This item should be sold as a novelty/luxury item. We believe the enthusiast aquarist will be willing to pay about $70 extra for the capability to handle frozen food. A luxury automatic fish feeder with similar characteristics to the AFF (without freezing capabilities) has a retail value of $65/US$50 (see Figure 2). Therefore, we believe the suggested retail price (MSRP) for this unit should be $130 as an absolute minimum. If mass production of the AFF is achieved the cost reduction can typically be one fifth of the prototype cost which is only $55. With a MSRP of $130, a profit of $75 per unit can not actually be expected; distribution costs, packaging and advertising costs will reduce the over all profit but not too the extent that the AFF would be an unattractive business venture.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

30

7.

CONCLUSIONS
Fish and aquariums are the world's largest hobby. Aquarists spend much more money in accessories and maintenance products than any other type of pet owner. The profits from aquarium related equipment exceeds that of any other pet type. This is a novelty/luxury product that can be sold to enthusiasts for much a higher price than current dry food automatic fish feeders. Manufacturing costs will have to be reduced to meet suggested price target The Automatic frozen food feeder depends on the availability of frozen food for fish. Current availability is very limited.

8.

RECOMMENDATIONS
The total cost should be reduced to $55 with mass production. From Table 2, more than 50% of the total cost is due to the TECs and BS2SX microcontroller. Cost reductions should be possible by targeting these areas. Replace the BS2SX-OEM module ($75) with a single-chip microcontroller and integrate this chip into the circuit. There are simpler microcontrollers available for less than $10US More efficient heat insulation on the feeding chamber to allow for smaller more efficient TECs. Add a door to the food chamber to reduce cold air loss and reduce cooling requirements. Add an extra LED and a LED/photodiode detector pair to sound an alarm when the system has run out of product.

Patrick Audet / Tomas Martin

2005

Automatic Fish Feeder Final Report

31

9.

REFERENCES
(1) Hynes, Angela, Natural Health; Mar2005, Vol. 35 Issue 3, p72, 6p, 10c, 2bw (2) http://en.wikipedia.org/wiki/Pet (3) American pet product manufacturing Association (APPMA); Statistics page, http://www.appma.org/press_industrytrends.asp (4) Alderman, Lesley; Money Magazine; Sep94, Vol. 23 Issue 9, p154, 1/4p, 1c (5) Business Week; 9/23/2002 Issue 3800, p128, 1p, 1 graph, 3c (6) Petsmart; http://www.petsmart.com (fish fish feeder section) (7) Omega, Thermoelement Material-T30-Z, http://www.omegaeng.nl/temperature/z/pdf/z021-032.pdf (8) Steinbrecher, Tillmann; The Heat sink guide, http://www.heatsinkguide.com/content.php? content=peltierinfo.shtml (8) http://www.melcor.com/handbook.html (10) http://www.digit-life.com/articles/peltiercoolers/ (11) http://www.electracool.com/basics.htm (12) TE Technology, Inc.; http://www.tetech.com/techinfo/#1 (13) Tellurex Corporation; http://www.tellurex.com/cz1-1.4-127-1.14cm.html (14) Internet FAQ Archives; 8051 Microcontroller, www.faqs.org/faqs/microcontrollerfaq/8051/ (15) Internet FAQ Archives; Microcontroller FAQs, http://www.faqs.org/faqs/microcontrollerfaq/primer/ (16) http://www.displaytech-us.com/pdf/ol_lcd/LCDConstruction.PDF (17) Douglas, Jones (Ph.D.); Control of Stepping Motors (18) A Tutorial, http://www.cs.uiowa.edu/~jones/step/types.html

Patrick Audet / Tomas Martin

2005

APPENDIX A Automatic Fish Feeder Final Report A-1

APPENDIX A
AFF Software for BSX2-OEM

' {$STAMP BS2sx} ' {$PBASIC 2.5} #SELECT $STAMP #CASE BS2 #ERROR "BS2e or greater required." #CASE BS2E, BS2SX Slot CON 63 #CASE BS2P, BS2PE, BS2PX Slot CON 127 #ENDSELECT ' defines variables to use in the program lcdchar VAR Byte ' character to be output by the LCD routine lcd_low VAR lcdchar.LOWNIB ' break up byte for 4 bit lcd interface lcd_hi VAR lcdchar.HIGHNIB ' break up byte for 4 bit lcd interface idx VAR Byte ' counter for printout looping hours VAR Byte ' hours - time (main loop) mins VAR Byte ' counts minutes to keep time (main loop) fd_hours VAR Byte ' feed time hours fd_mins VAR Byte ' ' feed time minutes secs VAR Byte ' seconds - time (main loop) tmp VAR Byte ' temprary storage for calculations setstate VAR Byte ' current state that we are setting ' I/O definitions ' Three push buttons ( IN ) sw1 VAR IN0 sw2 VAR IN1 sw3 VAR IN2 ' Motor Control mtout VAR OUTB ' LCD control lines L_ENA VAR OUT13 L_RS VAR OUT14 L_NIBOUT VAR OUTC ' Nibble for out8-out11

APPENDIX A Automatic Fish Feeder Final Report A-2


L_RW VAR OUT12 ' constants debounce CON 200 ' 200 ms debounce stpdly CON 30 ' delay between steps stp1 CON %1001 ' stepper motor h-bridge combinations stp2 CON %0101 stp3 CON %0110 stp4 CON %1010 moff CON %1111 ' turn motor off Init: ' Resets Direction registers, motor outputs to 1 (i.e. 0) ' program the IO direction register to our needs ' input=0 output=1 ' 5432109876543210 DIRS = %1111111111111000 ' ---RDDDDREMotSwt ' resets outputs (inverter buffers on motor transistors) ' 5432109876543210 OUTS = %0000000000111000 ' motor output low ' ---RDDDDREMotSwt 'init motor GOSUB fwd ' initialize LCD display PAUSE 1000 L_RS=%0 L_RW=%0 L_ENA=%0 L_NIBOUT=%0011 GOSUB lcdout '1 PAUSE 6 ' wait for more than 4.1ms L_NIBOUT=%0011 GOSUB lcdout '2 PAUSE 1 ' wait for more than 100us L_NIBOUT=%0011 GOSUB lcdout '3 L_NIBOUT=%0010 ' last init nibble this is a 8-bit instruction GOSUB lcdout '4 L_NIBOUT=%0010 ' 001x:0= 4bit interface GOSUB lcdout '5a L_NIBOUT=%1000 ' N=1(2 lines) F=0 (5x8dots) GOSUB lcdout '5b

APPENDIX A Automatic Fish Feeder Final Report A-3


L_NIBOUT=%0000 ' GOSUB lcdout '6a L_NIBOUT=%1111 ' GOSUB lcdout '6b L_NIBOUT=%0000 ' GOSUB lcdout '7a L_NIBOUT=%0001 ' GOSUB lcdout '7b L_NIBOUT=%0000 ' GOSUB lcdout '8a L_NIBOUT=%0110 ' GOSUB lcdout '8b L_RS=%1 ' we are Display on 1DCB display, cursor and blink on=1/off=0 Display clear =0001 Entry mode set 0 1 I/D S cursor behaviour and shifting assuming printing all times, no commands

lcdchar=0 ' prints welcome message GOSUB setpos idx=welcm_msg GOSUB prt_str PAUSE 1000 ' waits for 5 seconds and goes to standby

stdby: lcdchar=0 ' prints standby GOSUB setpos idx=standby GOSUB prt_str stdbyloop: GOSUB printtim ' prints time on second line ' detect buttons FOR secs = 0 TO 5 ' seconds PAUSE 980 ' 980ms delay IF (sw1 | sw2 | sw3) THEN GOTO uiset 'jumps to setup ui if pressed NEXT ' update clock mins=mins+1 IF mins>59 THEN hours=hours+1 mins=0 ENDIF IF hours>23 THEN hours=0 ' checks feed time

APPENDIX A Automatic Fish Feeder Final Report A-4


IF ((fd_hours=hours) & (fd_mins=mins)) THEN GOSUB feednow GOTO stdby ENDIF GOTO stdbyloop ' branches back '**************************************** '*** UISET user interface to set opts *** '**************************************** uiset: setstate=0 'Option currently being set up = 0 topuiloop: GOSUB clrs LOOKUP setstate,[set_feed, set_time, set_temp, set_feednow, set_end],idx GOSUB setpos GOSUB prt_str ' print message for setstate PAUSE debounce lup1: IF (sw1 | sw2 | sw3)=0 THEN GOTO lup1 setstate=(setstate-sw1+sw2) IF setstate>4 THEN setstate=0 lcdchar=0 ' adjusts position of message IF sw3=0 THEN GOTO topuiloop 'loops ntil set pressed IF setstate=4 THEN GOTO stdby ' EXITS TO STANDBY LOOP IF setstate=3 THEN GOSUB feednow ' feeds the IF setstate=3 THEN GOTO uiset IF setstate=0 THEN hours=fd_hours mins=fd_mins ENDIF 'set feed

' sets option (= sets time) lcdchar=64 ' button operation txt on 2nd line GOSUB setpos idx= set_tim_msg GOSUB prt_str set_tim_opt: GOSUB printtim ' prints time to be set PAUSE debounce lup2:

APPENDIX A Automatic Fish Feeder Final Report A-5


IF (sw1 | sw2 | sw3)=0 THEN GOTO lup2 mins=mins+sw2 IF mins>59 THEN hours=hours+1 mins=0 ENDIF hours=hours+sw1 IF hours>23 THEN hours=0 ENDIF IF sw3=0 THEN GOTO set_tim_opt 'loops until set pressed IF setstate=0 THEN fd_hours=hours fd_mins=mins ENDIF GOSUB clrs idx= setsuccess GOSUB prt_str ' print message for setstate PAUSE 1000 GOTO uiset '**************************************** '*** Useful routines *** '**************************************** feednow: ' prints message and rotates forward 360 GOSUB clrs idx= feeding GOSUB prt_str GOSUB fwd RETURN printtim: ' prints the time (from hours:mins) lcdchar=64 ' sets position second line GOSUB setpos tmp=(hours/10) ' form ascii char (hours 1st digit) lcdchar=tmp+48 GOSUB prt_char tmp=(hours-(tmp*10))' form ascii char (hours 2nd digit) lcdchar=tmp+48 GOSUB prt_char lcdchar=%00111010 ' colon

APPENDIX A Automatic Fish Feeder Final Report A-6


GOSUB prt_char tmp=(mins/10) ' form ascii char (hours 1st digit) lcdchar=tmp+48 GOSUB prt_char tmp=(mins-(tmp*10)) ' form ascii char (hours 2nd digit) lcdchar=tmp+48 GOSUB prt_char RETURN clrs: 'clears the LCD screen lcdchar=%00000001 'clears the screen L_RS=%0 ' command GOSUB prt_char lcdchar=%00000000 'position zero GOSUB setpos RETURN prt_str: 'prints a zero-terminated string on the LCD located at idx READ idx, lcdchar idx=idx+1 IF lcdchar=0 THEN RETURN L_NIBOUT= lcd_hi GOSUB lcdout L_NIBOUT= lcd_low GOSUB lcdout GOTO prt_str prt_char: 'outputs a byte to the LCD L_NIBOUT= lcd_hi GOSUB lcdout L_NIBOUT= lcd_low GOSUB lcdout RETURN lcdout: '4bit transfer to lcd routine PAUSE 1 L_ENA=%1 PAUSE 1 L_ENA=%0 RETURN setpos: ' sets the position of the next character to be printed LCD L_RS=%0 ' Changes mode to command L_NIBOUT= %0000 ' return home

APPENDIX A Automatic Fish Feeder Final Report A-7


GOSUB lcdout L_NIBOUT= %0010 GOSUB lcdout ' move to desired pos L_NIBOUT= (lcd_hi | 8) GOSUB lcdout L_NIBOUT= lcd_low GOSUB lcdout L_RS=%1 ' And back to data RETURN fwd: 'moves the motor 360deg fwd (feeding motion) FOR tmp=0 TO 12 mtout= stp1 PAUSE stpdly mtout= stp2 PAUSE stpdly mtout= stp3 PAUSE stpdly mtout= stp4 PAUSE stpdly NEXT mtout= moff ' turns off current to coils RETURN 'Messages ' ' welcm_msg standby set_time set_feed set_temp set_feednow set_end set_tim_msg setsuccess feeding

DATA DATA DATA DATA DATA DATA DATA DATA DATA DATA

1 2 123456789012345678901234 " ** GUPPY LUV **",0 "STANDBY - (Press to set)",0 "TIME OF DAY <> (set)",0 "FEED TIME <> (set)",0 "SET TEMPERATURE <> (set)",0 "FEED NOW ",0 "Exit set menu ",0 " +hrs +mins (set)",0 " SETUP SUCCESSFUL ",0 " ** FEEDING ** ",0