Sunteți pe pagina 1din 42

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 01, 2005

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
8. Recommendations.............................................................................................................30
9. References.........................................................................................................................31
Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report III

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 IV

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
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

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. MARKET ANALYSIS
3.1 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
5%
32%
37%
4%
12%
1%
4% 5%
Bird
Cat
Dog
Equine
Freshwater Fish
Saltwater Fish
Reptile
Small Animal
Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 4

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.
$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 5
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 6
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: Schematic of a thermocouple (9)

Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 7

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 N-
type 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 8
4.3 TEC Calculations



Figure 6: Parameters used in mathematical equations (12)

Table 1: TEC Parameter Definitions
L =element height R =electrical resistivity
Tc =cold-side temperature N =number of couples
Qc =heat load K =thermal conductivity
I =applied current V =voltage
A =cross-sectional area S =Seebeck coefficient
Th =hot-side temperature


The basic equation for estimations on TEC performance:
( ) V T T
L
A
K
A
L
R I T I S N Q
C H C C

=
2
2
1
2 (Equ: 1)
This can be simplified to:
( )

+ =
A
L
R I T T S N Q
C H C
2 (Equ: 2)
Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 9
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 T
MAX
, Q
MAX
, I
MAX
or V
MAX
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 13
Figure 12: Mechanical drawing


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)

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.
1 Fr ont gl ass subst r at e
2 Ter mi nal
3 Segment el ect r ode
4 Common el ect r ode
5 Back gl ass subst r at e
6 Upper pol ar i zer
7 Or i ent at i on l ayer
8 seal ant
9 Li qui d cr yst al
10 Conduct i ng mat er i al
11 Seal ant
12 I nl et
13 Vi ewi ng Ar ea
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.
The chosen module is a 16-character by 2-
line, transmissive backlit LCD display.
Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 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 8051-
base 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 Price Ease of use Comments
8051-Based (ATMEL)
Software programming tools 0.00 Medium Freeware assembler and C compiler
available
Programming device Easy Included in Demo board
Demo Board 132.00 Easy AT89STK-08 Starter Kit
MCU (chip only - mass product) 2.47 AT89C51-33PI-ND (40 pin DIP) 4k Flash 32
I/O pins

Freescale MC68HCxx series
Software programming tools 499.00 Easy Metrowerks Codewarrior "basic". Freescale
proprietary undisclosed
Programming device 30.00 None available for DIP MCUs
Demo Board 30.00 Easy Lowest cost programmer/demo board -
includes SMT QFP MCU
MCU (chip only - mass product) 3.00 MC68HRC98J L3ECP (28-pin DIP)
MCU,128RAM,4K FLASH,A/D

Microchip PIC RISC MCU
Software programming tools 0.00 Medium Freeware assembler and C compiler
Programming device 199.00 Easy Public programming info: Multiple
programming circuits available
Demo Board 99.00 Easy Multiple sources, might not be needed
MCU (chip only - mass product) 1.65 SX28AC-DP+(16 pin DIP) / other models
available

Parallax PIC w/ BASIC
Software programming tools 0.00 Extremely easy Freeware basic tokenizer
Programming device Easy Included in demo board/ same as PIC
Demo Board 50.00 Easy BS2-SX OEM module
MCU (chip only - mass product) 12.00 SX28AC-DP+(16 pin DIP); No internal
memory for programs
EEPROM for MCU (required) 5.00 Required

Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 19
5.1.3 Stepper Motor
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: Unipolar motor 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

Bipolar Motors
Figure 18: Bipolar motor 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).

The drive circuitry for such a motor requires an H-bridge control circuit for each winding. An H-
bridge 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: AFF Power requirements
ELEMENT I V R POWER
TEC 8.00 12.00 ** 96.00
STEPPER 0.80 5.00 6.25 4.00
SOLENOID 1.00 12.00 ** 12.00
S.T. POWER 4.30 ** ** 46.00
LOGIC 0.30 5.00 N/A 1.50

TOTAL 4.60 159.50

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

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 23
Figure 21: BS2-SX Module schematic

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: Automatic fish feeder electrical block diagram
B
a
s
i
c

S
t
a
m
p

2

S
X

O
E
M

(
M
i
c
r
o
c
o
n
t
r
o
l
l
e
r

m
o
d
u
l
e
)
H

B
r
i
d
g
e
I
/
O

b
u
f
f
e
r
s
L
C
D

M
o
d
u
l
e
1
2

V

D
C

P
o
w
e
r

s
u
p
p
l
y
H

B
r
i
d
g
e
I
n
p
u
t

s
w
i
t
c
h
e
s
V
.

R
e
g
.
T
E
C

u
n
i
t
T
E
C

u
n
i
t
T
E
C

u
n
i
t
T
E
C

u
n
i
t
S
t
a
c
k
e
d

s
t
e
p
p
e
r

M
o
t
o
r
F
a
n
F
a
n
1
2
V

D
.
C
.
5
V

D
.
C
.
C
O
N
T
R
O
L
F
e
e
d
i
n
g
m
e
c
h
a
n
i
s
m
B
a
s
i
c

S
t
a
m
p

2

S
X

O
E
M

(
M
i
c
r
o
c
o
n
t
r
o
l
l
e
r

m
o
d
u
l
e
)
H

B
r
i
d
g
e
I
/
O

b
u
f
f
e
r
s
L
C
D

M
o
d
u
l
e
1
2

V

D
C

P
o
w
e
r

s
u
p
p
l
y
H

B
r
i
d
g
e
I
n
p
u
t

s
w
i
t
c
h
e
s
V
.

R
e
g
.
T
E
C

u
n
i
t
T
E
C

u
n
i
t
T
E
C

u
n
i
t
T
E
C

u
n
i
t
S
t
a
c
k
e
d

s
t
e
p
p
e
r

M
o
t
o
r
F
a
n
F
a
n
1
2
V

D
.
C
.
5
V

D
.
C
.
C
O
N
T
R
O
L
F
e
e
d
i
n
g
m
e
c
h
a
n
i
s
m

Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 25
Figure 23: Electrical Schematic

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:
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
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
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 27
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

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:
** FEEDI NG **

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. PRODUCT COSTS
6.1 Bill of Materials
The total cost of components required to assemble the prototype board can be found in Table 5:

Table 5: AFF Prototype Material Costs
Part Description Amount Unit Cost Total Cost
ELECTRICAL
74LS05N Hex Inverter 2 0.69 $1.38
2N6124 PNP 4 1.49 $5.96
2N6121 NPN 4 1.49 $5.96
108-4100 4x10 Breadboard 1 13.08 $13.08
-- Metal film resistor 10k 20 0.24 $4.80
-- Metal film resistor 1k 5 0.24 $1.20
BS2SX Basic Stamp B2SX OEM 1 62.50 $62.50
529PB-ND Momentary SPDT 3 1.37 $4.11
LED 3mm LED 1 0.82 $0.82
1NS3xx Diode 5W T18 8 1.55 $12.40
-- Wire. etc. -- -- $10.00
SMT-75
2
Airpax stepper, 5V, 7.5deg 1 3.44 $3.44
LCD-107
2
2x24 Parallel LCD w/EL 1 5.00 $5.00
MC78M05BT 500mA, 5V Regulator 1 0.89 $0.89
-- 12V 3000RPM Fan 2 7.50 $15.00
PJ T-2
2
Thermo Electric cooler 4 18.38 $73.50

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

TOTAL COST $278.79
Prices per unit from Digikey Canada, AllElectronics.com
2
Patrick Audet / Tomas Martin 2005
Automatic Fish Feeder Final Report 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/microcontroller-
faq/8051/
(15) Internet FAQ Archives; Microcontroller FAQs, http://www.faqs.org/faqs/microcontroller-
faq/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}
' {$PBASI C 2. 5}

#SELECT $STAMP
#CASE BS2
#ERROR " BS2e or gr eat er r equi r ed. "
#CASE BS2E, BS2SX
Sl ot CON 63
#CASE BS2P, BS2PE, BS2PX
Sl ot CON 127
#ENDSELECT

' def i nes var i abl es t o use i n t he pr ogr am
l cdchar VAR Byt e ' char act er t o be out put by t he LCD r out i ne
l cd_l ow VAR l cdchar . LOWNI B ' br eak up byt e f or 4 bi t l cd i nt er f ace
l cd_hi VAR l cdchar . HI GHNI B ' br eak up byt e f or 4 bi t l cd i nt er f ace
i dx VAR Byt e ' count er f or pr i nt out l oopi ng
hour s VAR Byt e ' hour s - t i me ( mai n l oop)
mi ns VAR Byt e ' count s mi nut es t o keep t i me ( mai n l oop)
f d_hour s VAR Byt e ' f eed t i me hour s
f d_mi ns VAR Byt e ' ' f eed t i me mi nut es
secs VAR Byt e ' seconds - t i me ( mai n l oop)
t mp VAR Byt e ' t empr ar y st or age f or cal cul at i ons
set st at e VAR Byt e ' cur r ent st at e t hat we ar e set t i ng

' I / O def i ni t i ons
' Thr ee push but t ons ( I N )
sw1 VAR I N0
sw2 VAR I N1
sw3 VAR I N2
' Mot or Cont r ol
mt out VAR OUTB
' LCD cont r ol l i nes
L_ENA VAR OUT13
L_RS VAR OUT14
L_NI BOUT VAR OUTC ' Ni bbl e f or out 8- out 11
L_RW VAR OUT12
' const ant s
debounce CON 200 ' 200 ms debounce
st pdl y CON 30 ' del ay bet ween st eps
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-2
st p1 CON %1001 ' st epper mot or h- br i dge combi nat i ons
st p2 CON %0101
st p3 CON %0110
st p4 CON %1010
mof f CON %1111 ' t ur n mot or of f
I ni t : ' Reset s Di r ect i on r egi st er s, mot or out put s t o 1 ( i . e. 0)

' pr ogr amt he I O di r ect i on r egi st er t o our needs
' i nput =0 out put =1
' 5432109876543210
DI RS = %1111111111111000
' - - - RDDDDREMot Swt

' r eset s out put s ( i nver t er buf f er s on mot or t r ansi st or s)
' 5432109876543210
OUTS = %0000000000111000 ' mot or out put l ow
' - - - RDDDDREMot Swt

' i ni t mot or
GOSUB f wd

' i ni t i al i ze LCD di spl ay
PAUSE 1000
L_RS=%0
L_RW=%0
L_ENA=%0
L_NI BOUT=%0011
GOSUB l cdout ' 1
PAUSE 6 ' wai t f or mor e t han 4. 1ms
L_NI BOUT=%0011
GOSUB l cdout ' 2
PAUSE 1 ' wai t f or mor e t han 100us
L_NI BOUT=%0011
GOSUB l cdout ' 3
L_NI BOUT=%0010 ' l ast i ni t ni bbl e t hi s i s a 8- bi t i nst r uct i on
GOSUB l cdout ' 4
L_NI BOUT=%0010 ' 001x: 0= 4bi t i nt er f ace
GOSUB l cdout ' 5a
L_NI BOUT=%1000 ' N=1( 2 l i nes) F=0 ( 5x8dot s)
GOSUB l cdout ' 5b
L_NI BOUT=%0000 ' Di spl ay on
GOSUB l cdout ' 6a
L_NI BOUT=%1111 ' 1DCB di spl ay, cur sor and bl i nk on=1/ of f =0
GOSUB l cdout ' 6b
L_NI BOUT=%0000 ' Di spl ay cl ear
GOSUB l cdout ' 7a
L_NI BOUT=%0001 ' =0001
GOSUB l cdout ' 7b
L_NI BOUT=%0000 ' Ent r y mode set
GOSUB l cdout ' 8a
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-3
L_NI BOUT=%0110 ' 0 1 I / D S cur sor behavi our and shi f t i ng
GOSUB l cdout ' 8b
L_RS=%1 ' we ar e assumi ng pr i nt i ng al l t i mes, no commands

l cdchar =0 ' pr i nt s wel come message
GOSUB set pos
i dx=wel cm_msg
GOSUB pr t _st r

PAUSE 1000 ' wai t s f or 5 seconds and goes t o st andby

st dby:
l cdchar =0 ' pr i nt s st andby
GOSUB set pos
i dx=st andby
GOSUB pr t _st r

st dbyl oop:
GOSUB pr i nt t i m' pr i nt s t i me on second l i ne
' det ect but t ons
FOR secs = 0 TO 5 ' seconds
PAUSE 980 ' 980ms del ay
I F ( sw1 | sw2 | sw3) THEN GOTO ui set ' j umps t o set up ui i f pr essed
NEXT

' updat e cl ock
mi ns=mi ns+1
I F mi ns>59 THEN
hour s=hour s+1
mi ns=0
ENDI F
I F hour s>23 THEN hour s=0

' checks f eed t i me
I F ( ( f d_hour s=hour s) & ( f d_mi ns=mi ns) ) THEN
GOSUB f eednow
GOTO st dby
ENDI F

GOTO st dbyl oop ' br anches back

' ****************************************
' *** UI SET user i nt er f ace t o set opt s ***
' ****************************************

ui set :
set st at e=0 ' Opt i on cur r ent l y bei ng set up = 0

t opui l oop:
GOSUB cl r s
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-4
LOOKUP set st at e, [ set _f eed, set _t i me, set _t emp, set _f eednow, set _end] , i dx
GOSUB set pos
GOSUB pr t _st r ' pr i nt message f or set st at e
PAUSE debounce
l up1:
I F ( sw1 | sw2 | sw3) =0 THEN GOTO l up1
set st at e=( set st at e- sw1+sw2)
I F set st at e>4 THEN set st at e=0
l cdchar =0 ' adj ust s posi t i on of message
I F sw3=0 THEN GOTO t opui l oop ' l oops nt i l set pr essed
I F set st at e=4 THEN GOTO st dby ' EXI TS TO STANDBY LOOP
I F set st at e=3 THEN GOSUB f eednow ' f eeds t he
I F set st at e=3 THEN GOTO ui set

I F set st at e=0 THEN ' set f eed
hour s=f d_hour s
mi ns=f d_mi ns
ENDI F

' set s opt i on ( = set s t i me)
l cdchar =64 ' but t on oper at i on t xt on 2nd l i ne
GOSUB set pos
i dx= set _t i m_msg
GOSUB pr t _st r
set _t i m_opt :
GOSUB pr i nt t i m' pr i nt s t i me t o be set
PAUSE debounce
l up2:
I F ( sw1 | sw2 | sw3) =0 THEN GOTO l up2
mi ns=mi ns+sw2
I F mi ns>59 THEN
hour s=hour s+1
mi ns=0
ENDI F
hour s=hour s+sw1
I F hour s>23 THEN
hour s=0
ENDI F
I F sw3=0 THEN GOTO set _t i m_opt ' l oops unt i l set pr essed

I F set st at e=0 THEN
f d_hour s=hour s
f d_mi ns=mi ns
ENDI F

GOSUB cl r s
i dx= set success
GOSUB pr t _st r ' pr i nt message f or set st at e
PAUSE 1000
GOTO ui set
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-5

' ****************************************
' *** Usef ul r out i nes ***
' ****************************************

f eednow: ' pr i nt s message and r ot at es f or war d 360
GOSUB cl r s
i dx= f eedi ng
GOSUB pr t _st r
GOSUB f wd
RETURN

pr i nt t i m: ' pr i nt s t he t i me ( f r omhour s: mi ns)
l cdchar =64 ' set s posi t i on second l i ne
GOSUB set pos
t mp=( hour s/ 10) ' f or masci i char ( hour s 1st di gi t )
l cdchar =t mp+48
GOSUB pr t _char
t mp=( hour s- ( t mp*10) ) ' f or masci i char ( hour s 2nd di gi t )
l cdchar =t mp+48
GOSUB pr t _char
l cdchar =%00111010 ' col on
GOSUB pr t _char
t mp=( mi ns/ 10) ' f or masci i char ( hour s 1st di gi t )
l cdchar =t mp+48
GOSUB pr t _char
t mp=( mi ns- ( t mp*10) ) ' f or masci i char ( hour s 2nd di gi t )
l cdchar =t mp+48
GOSUB pr t _char
RETURN

cl r s: ' cl ear s t he LCD scr een
l cdchar =%00000001 ' cl ear s t he scr een
L_RS=%0 ' command
GOSUB pr t _char
l cdchar =%00000000 ' posi t i on zer o
GOSUB set pos
RETURN

pr t _st r : ' pr i nt s a zer o- t er mi nat ed st r i ng on t he LCD l ocat ed at i dx
READ i dx, l cdchar
i dx=i dx+1
I F l cdchar =0 THEN RETURN
L_NI BOUT= l cd_hi
GOSUB l cdout
L_NI BOUT= l cd_l ow
GOSUB l cdout
GOTO pr t _st r

pr t _char : ' out put s a byt e t o t he LCD
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-6
L_NI BOUT= l cd_hi
GOSUB l cdout
L_NI BOUT= l cd_l ow
GOSUB l cdout
RETURN

l cdout : ' 4bi t t r ansf er t o l cd r out i ne
PAUSE 1
L_ENA=%1
PAUSE 1
L_ENA=%0
RETURN

set pos: ' set s t he posi t i on of t he next char act er t o be pr i nt ed LCD
L_RS=%0 ' Changes mode t o command
L_NI BOUT= %0000 ' r et ur n home
GOSUB l cdout
L_NI BOUT= %0010
GOSUB l cdout
' move t o desi r ed pos
L_NI BOUT= ( l cd_hi | 8)
GOSUB l cdout
L_NI BOUT= l cd_l ow
GOSUB l cdout
L_RS=%1 ' And back t o dat a
RETURN

f wd: ' moves t he mot or 360deg f wd ( f eedi ng mot i on)
FOR t mp=0 TO 12
mt out = st p1
PAUSE st pdl y
mt out = st p2
PAUSE st pdl y
mt out = st p3
PAUSE st pdl y
mt out = st p4
PAUSE st pdl y
NEXT
mt out = mof f ' t ur ns of f cur r ent t o coi l s
RETURN

' Messages
' 1 2
' 123456789012345678901234
wel cm_msg DATA " ** GUPPY LUV **" , 0
st andby DATA " STANDBY - ( Pr ess t o set ) " , 0
set _t i me DATA " TI ME OF DAY <> ( set ) " , 0
set _f eed DATA " FEED TI ME <> ( set ) " , 0
set _t emp DATA " SET TEMPERATURE <> ( set ) " , 0
set _f eednow DATA " FEED NOW " , 0
Patrick Audet / Tomas Martin 2005
APPENDIX A Automatic Fish Feeder Final Report A-7
set _end DATA " Exi t set menu " , 0
set _t i m_msg DATA " +hr s +mi ns ( set ) " , 0
set success DATA " SETUP SUCCESSFUL " , 0
f eedi ng DATA " ** FEEDI NG ** " , 0
Patrick Audet / Tomas Martin 2005

S-ar putea să vă placă și