An Innovative Farm Scale Biogas/Composting Facility for a Sustainable Medium Size Dairy Farm

Approach: The amount of energy related costs as a portion of the total farm operating cost can be as high as 29% and the continuing increase o f the real cost of energy related farm input has been one of the major factors impacting the cost of agricultural production. However, agricultural ha s the potential of replacing some of the purchased en ergy in the form of fossil fuels, commercial fertilizer and field production of animal feed with bioenergy and organic fertilizer from onsite renewable biomass such as animal manure in order to conomically and environmentally sustain it. The aim of this study was to develop an innovative en rgy efficient pilot scale anaerobic digester composting facility. Methodology: A solid/liquid manure separator farm scale anaerob ic digester and composting facility for a medium sized dairy farm w ere designed, constructed and tested. In order to make the anaerobic digestion economically viable un der Canadian climatic conditions, the design, installation and operation of the system were based on advantages gained from the digester as a component of the total farm management system. In addition to the biogas production, benefits related to manure handling and storage, environmental quali ty improvement through odor control and water pollution reduction, fertilizer recovery and water r cycling, were considered. Results: The layout of the farm was modified to provide solutions for four environmental problems related to: disposal of milkhouse wastes and overflow from the manure stora ge facility into the fire pond. The system possesses high energy conversion efficiency at rela tiv y low capital cost and reduced labour requirement and has indirect energy ramifications t hrough the production of organic fertilizer (compost) to replace expensive and energy consuming commercial fertilizer as well as the production of bioenergy (biogas) which will reduce the demand for energy. The overflow from the system (purified water) can be recycled for cleaning the b arn, thereby reducing the costs of water use and manure storage facilities on one hand and eliminati ng pollution problems associated with manure storage and disposal on the other hand. Conclusion: The use of dairy waste as a source of energy and fertilizer resulted in a saving of 6289 kg of ferti lizer at a cost of $17 925 annually and additional saving of $20 547 on energy use.


INTRODUCTION
The world population is growing and the demand for food is increasing rapidly (Isaac and Van Vuuren, 2009). To meet the ever increasing food demand, modern large scale farm operations have become dependent upon a prodigious consumption of energy derived mostly from fossil fuels. These sources of energy which we rely on for 80% of our needs are rapidly depleting and energy price and security of supply are affecting agricultural production cost worldwide (Shafiee and Topal, 2007).
The amount of energy related costs as a proportion of the total farm operating costs can be as high as 29% in areas where field crop production predominates. Thus, the increase in the real cost of energy and energy related inputs has been one of the major factors impacting the cost of the agricultural production (Nguyen et al., 2010;Bot, 2001).
However, agriculture has the potential for replacing some of the purchased energy in the form of fossil fuels, commercial fertilizer and field produced animal feed with bioenergy, organic fertilizer and animal feed from on-site renewable biomass in order to economically and environmentally sustain itself (Lunnan, 1997). Biogas production from biomass sources could be the manures from livestock and poultry operations Fig. 1. Fuels from these biomass materials could be used for space and water heating of farm houses and animal shelters, grain drying and as fuels for heating greenhouses, with their high energy demands in cold Canadian weather. The latter is particularly important if Canada is to reduce its imports of horticultural off-season crops. Recovery of organic fertilizers and animal feeds will not only reduce the operating costs of agricultural operations but will also help sustain the environment in which it operates and relies upon. While the energy, fertilizer and feed required to operate the farm sector are theoretically available in adequate quantities, it is yet the economics and management problems associated with the introduction of a new technology and matching the supply with the demand.
The main aim of this study was to develop an innovative, energy efficient pilot scale anaerobic digestion-composting facility capable of producing biogas (as an energy source) and compost (as organic fertilizer) from dairy manure while minimizing the pollution potential of these wastes. To overcome the economic difficulties usually associated with new technologies, the system must be treated as an integral part of the farm management scheme.

BACKGROUND
Dairy waste: Dairy manure refers to the fecal (70%) and urinary (30%) excrements of dairy cattle. When beddings, rain, soil, hair, waste feed materials, milkhouse waste and washing water are added to manure, the term dairy waste is generally used (Shi et al., 1999). In terms of volume, dairy cows produce about 82.4 L of waste per 1 000 kg live weight per day. Generally, an average dairy cow will produce between 14.2 and 18.3 t of faces and urine per year (Loehr, 1984).
Waste resulting from dairy production can be detrimental to the environment and a hazard to the health and safety of humans and livestock (Arvanitoyannis and Kassaveti, 2008). Contamination of surface water can result from direct dumping of manure into streams and lakes, runoff from stockpiles, overflow from manure storages, surface runoff following application of manure on frozen and/or sloppy land, excessive application of manure when crops cannot fully utilize it, long term application of manure, direct access of cows to surface waters and direct adsorption of air-borne waste particles by nearby bodies of water (Dabrowski et al., 2002;Mawdsley et al., 1995). Ground water contamination may result from percolation after excessively high manure application and seepage from waste stabilization lagoons constructed on porous soils (Centner et al., 2006;Almasri and Kaluarachchi, 2004;Ghaly and Singh, 1991). Dairy manure is also a source of numerous pathogens that infect both human and livestock. Pathogens that are known to have been spread through animal manure include Salmonella, E. coli, Campylobacter, Leptospira, Cryptosporidium, Giardia and other parasitic bacteria and nematodes (Cliver, 2009;Albihn and Vinneras, 2007).
The biodegradation of organic components of waste by microbes exerts an oxygen demand leading to the depletion of the dissolved oxygen content of the contaminated water which eventually would no longer be able to support aquatic life and becomes septic and unpleasant in color and smell (Anderson and Quartermaine, 1998). Nitrogen in form of nitrate can be a source of problems to babies and young animals (Ellis et al., 1998). The lower acid content of infant intestinal tract often permits the growth of denitrifying bacteria which reduces the ingested nitrate into nitrite to be absorbed into the blood stream. Since nitrite has greater affinity for haemoglobin than oxygen, the later is displaced in the blood system denying the body of essential oxygen. Extreme cases of oxygen deprivation results in asphyxiation with the body of the victim turning blue, a phenomenon often referred to as "blue baby syndrome" or "methanoglobinemia" (Mishra and Patel, 2007;Ghaly and Singh, 1991).
Air pollution is another dairy manure problem. Under uncontrolled anaerobic conditions, biological breakdown of stored dairy manure takes place. Many volatile compounds and intermediates are produced which escape and cause odour problems (Melse and Timmerman, 2009).
More than fifty compounds consisting of acids, alcohols, amines, carbonlys, esthers, sulphides, mercaptans, nitrogen and other gases have been identified in air associated with anaerobic decomposition of animal waste (Dammgen and Hutchings, 2007). Ammonia, methane and hydrogen sulphides are produced in easily detectable amounts (Ni et al., 2000).
Dairy manure can be utilized for the production of value added products while reducing or eliminating environmental health problems.
The organic components of manure which determine its potential as a source of animal feed include: carbohydrates, crude protein, fat and gross energy are shown in Table 1 (El Jalil et al., 2001;El Boushy, 1991).   Dairy manure also include inorganic minerals including nitrogen, phosphorus, potassium and other macro and micro plant nutrients Table 2 that makes it attractive as a fertilizer (Kuligowski et al., 2010;Schroder, 2005;Oudendag and Luesink, 1998). In addition, dairy manure can be digested under anaerobic conditions for the production of biogas for use as a fuel and sludge for use as organic fertilizer (El-Mashad and Zhang, 2010;Batzias et al., 2005;Sarapatka, 1994).

Anaerobic digestion:
Anaerobic digestion is a complex microbiological process in which many different facultative and anaerobic microorganisms are involved in an interdependence (symbiosis) relationship (Ghaly and Echiegu, 1993). A three stage scheme Fig. 2 has been traditionally used to describe the anaerobic digestion process (Ghaly, 1989). In the first stage, one group of microbes hydrolyses, liquefies and ferments the complex organics to simpler, soluble compounds using extracellular enzymes excreted to the medium. In the second stage, the hydrolysed substrate can pass through the cell walls and be utilised by another group of microbes that are referred to as acid-formers (acidogenes) and consist of facultative and obligate anaerobic microbes. Some acidogenic microbes that have been isolated from anaerobic digesters include: Desulfobulbus spp., Desulfovibrio spp., Pseudomonas spp., Clostridium spp., Bacteroides spp., Ruminococcus spp., Peptococcus anaerobes, Bifidobacterium spp., Corynebacterium spp., Lactobacillus, Actinomyces, Staphylococcus and Escherichia coli (Zhao et al., 2008). Table 3 shows some of the organic acid-producing microbes along with the products formed. The predominant species are gram-negative, spore-forming bacilli which can produce acetic and butyric acids as well as carbon dioxide and hydrogen (Grady and Lim, 1980). The acid formers are usually fairly resilient and are better able to withstand sudden changes in temperature and pH than the other group of microbes (Meynell, 1978). They serve two important functions: (a) provide the food for the methane-formers and (b) utilise dissolved oxygen that is toxic to the 'methane-formers'. In the third stage, the methane-formers, (methanogens) convert the organic acids to methane. These are obligate anaerobes and as such dissolved oxygen (0.01 ppm) is toxic to them (Imlay, 2002).
Among the genus of methanogens are: Methanobacterium (a non spore-forming rod), Methanosarcina (a non spore-forming coccus in pockets of eight), Methanococcus (a nonspore-forming rod), Methanosarcina (a nonspore-forming coccus) and Methanobacillus (a spore-forming rod) (Marchesi et al., 2001). Table 4 shows some of the species of methanogens involved in anaerobic digestion.  Composting:  and Davis et al. (1991) defined composting as the artificially accelerated decomposition of heterogeneous organic matter by a mixed aerobic microbial population in a warm moist environment. The composting process involves a biochemical transformation of organic matter during which the insoluble substances are decomposed into water soluble components, which are subsequently metabolised by micro-organisms giving off carbon dioxide and water Levi-Minzi et al., 1992). During the composting process considerable reductions in volume and mass of the material occur. The composting process can be considered completed when the temperature of the mass has reached a peak and started to decline. According to Haug (1980), stabilization is sufficient when the rate of oxygen consumption is reduced to the point that anaerobic or odorous conditions are not produced to such an extent that they interfere with the storage and end use of the product.
The key to establishing an efficient composting process is in providing all the essential nutrients for the microorganisms as well as suitable environmental conditions. Temperature, pH, micronutrient balance, moisture aeration and residence time are among the factors affecting the quality of the compost (Makaly Biey et al., 2000). However, the temperature of the composting material is an indicator of the level of microbial activity, the higher the temperature, the higher the microbial activity in the composting mass .
According to , there are four distinct phases in the composting process Fig. 3. A mesophilic phase, (b) thermophilic phase, (c) temperature decline phase and (d) cellulose decomposition phase. The mesophilic phase is characterised by the presence of mesophilic organisms whereby the temperature of the composting material rises from the initial starting temperature to 35°C. In the second phase, thermophilic micro-organisms are predominant within a temperature range from of 45-70°C. The third phase is characterised by a temperature decline reaching the ambient temperature and is associated with an upsurge of actinomycetes and fungi. In the fourth stage of the process, the highcellulosic materials (such as paper and straw) are decomposed by fungi. Plant and animal pathogens and weed seed, are destroyed during the thermophilic phase (Rubio-Loza and Noyola, 2009;Forster-Carneiro et al., 2008;.

APPROACH TO FARM SUSTAINABILITY
The aim of this research was to make a medium size dairy farm economically and environmentally sustainable through: (a) development of an anaerobic digestion/composting facility that can convert the waste into biofuels and organic fertilizer and (b) elimination of existing environmental and safety problems associated with current waste disposal method.
In the existing farm layout Fig. 4, an underground PVC drainpipe (exiting the milking parlor) transported the milkhouse waste effluent under the west-facing main road to a ditch and finally to the main fire pond. Also, the existing solid manure storage facility has a manure pit spill-way that runs westward under the main roadway, across the grazing field and slowly turns northward and connects with the milkhouse waste drainage ditch. In the new farm layout Fig. 5, both the milkhouse waste drainage ditch and the manure pit waste drainage ditch were eliminated as both effluents have been incorporated into the integrated farm waste management system. Figure 6 shows the proposed anaerobic digestion/composting system as an integral part of the farm management system. A complete analyse of the solids produced on the farm and their uses are shown in Fig. 7. Instead of using the high solid manure (collected from the barn as it is) in the anaerobic digester, a solid-liquid separator was developed and used to separate the coarse solids from the liquid portion. The coarse solids, which are of no benefit to the anaerobic digestion process because of their long term digestibility (longer than the retention time of the digester), were composted and used on the farm as an organic fertilizer and the liquid was used in the anaerobic digester for production of biogas. Separating and composting the solids are steps towards achieving the economic and environmental sustainability of the farm through the production of value added products (biogas and compost), low ammonia emissions and complete recycling of water. The solids are sanitized (destruction of pathogenic microorganisms) through the composting process and the compost can be spread on land without risks of ammonia volatilization and spread of diseases. The length, width and height of the press liquid manure holding tank and the digester supernatant holding tank are 540, 540 and 360 cm, respectively. A 20 cm thickness steel reinforced concrete slab was poured on the top of four 25.4 cm thick steel reinforced foundation walls. A sump pit was constructed in the center of the floor (60 cm in length, 60 cm in width and 60 cm in depth). Four reinforced concrete walls of 122 cm height were poured above the floor. The top cover was made of 20 cm thick steel reinforced concrete. The outside and inside stud walls of the solid manure holding tank, press liquid holding tank and supernatant holding tank were constructed from 5x25 cm rough cut spruce lumber. The walls were covered with 10x20 cm painted steel panels that were glueseamed sealed and grommeted. Galvanized sheet metal screws were used to attach each panel to the wall studs. Upon completion of the walls, the structure was enclosed using farm-grade galvanized and painted roof steel panels (10x20 cm) that were glue-seamed sealed and grommeted. Galvanized sheet metal screws were used to attach each panel to the roof trusses.
Solid/Liquid Manure Separator: First, a laboratory scale solid-liquid manure separator was constructed of four components Fig. 9. The first component is the screw press auger which consisted of an aluminum shaft of 55 cm in length to which aluminum flight having a pitch of 5 cm was welded to a length of 47 cm. The second component is the screen which consisted of a plexiglass cylinder of 12 cm diameter, 91 cm length and a slot width of 1 mm. The third component is the mouthpiece (or pressed solids exit area) which was constructed of welded aluminum cone of 10 cm length and it has 4 hanging weights, each weighing 17.2 g. The fourth component is the drive system made of electric ¼ hp variable speed motor (115 Volt). The separator is supported by a steel base (38 cm in length and 20 cm in width). Experiments were carried out using the laboratory scale solid-liquid separator to establish the optimum design parameters for the field scale solid-liquid separator. The laboratory scale solid-liquid separator was used to establish the design parameters for a field scale solid-liquid separator.
The field scale solid-liquid separator and supporting structure Fig. 10 were constructed from 316 stainless steel.
The separator's total weight is approximately 550 kg and the total length is 207 cm. The separator was held on square legs with a height of 97.5 cm. It has a 5.3 hp (4kW) gear motor (dual voltage) and a 2 hp (0.15 kW) vibrator (dual voltage). The screen was made of a stainless steel cylinder with 26 cm diameter and a slot width of 1 mm. The screw press auger has a length of 80 cm and the flight pitch of 20 cm. The mouthpiece is 48.3 cm in length and has 4 hanging weights, each 1 kg. The electrical control pane l box was designed for outdoor use and manual operation. The power requirement is standard 220 volt 3-phase 60-Hz. The auger drive motor is fused with starter protection. The power consumption of the various components are: 3-5.5 kW for the gear motor is, 3-6 kW (8 hp) for the influent pump, 3-6 kW (8 hp) for the effluent pump and 3-6 kW (8 hp) for the agitator.
Anaerobic digester: The anaerobic digester was specially designed to produce biogas as a fuel, sludge for use as an organic fertilizer and a partially purified supernatant (clearwater) for cleaning the barn thereby eliminating the need for disposal. The size of the anaerobic digester and hydraulic retention time calculations are shown in Fig. 11. The position of the anaerobic digester within the foundation and the locations of the inlet, outlet, recirculation line and the sludge outlet are shown in Fig. 12.
The digester was constructed of plate steel of 1.27 and 0.78 cm thickness for the digester shell and plate steel of 0.78 cm and 0.94 cm for the bottom and top conical sections, respectively. The overall height of the digester is 884 cm and the digester diameter is 427 cm.
The digester is supported using four reinforced steel legs of 20.32 cm diameter, schedule 40 pipe of 274 cm in height. The length, width and height of the digester foundation were 660, 540 and 360 cm, respectively. A set of footings were poured using reinforced concrete. A steel reinforced, concrete slab of 40 cm thickness was poured on the top of four 25.4 cm thick steel reinforced foundation walls and four walls were poured above the floor.  6.500 Volatile suspended solids (g/L) 2.500 Fixed suspended solids (g/L) 4.000 Total COD (g/L) 16.09 Soluble COD (g/L) 4.720 Total kjeldahl nitrogen (g/L) 1.090 Ammonium nitrogen (g/L) 0.800 1 Each mean represents an average of five samples The walls of the anaerobic digester room were constructed of 5×25 cm rough cut spruce lumber and covered with 5×25 cm painted steel panels that were glue-seamed sealed and grommeted.
Galvanized sheet metal screws were used to attach each panel to the wall studs. The anaerobic digester was 10 m in height and the roof of this room was constructed on the top of 420 cm high walls. The roof was made of farm-grade glavanized and painted steel panels (5×25 cm) that were glue-seamed sealed and grommted. Galvanized sheet metal screws were used to attach each panel to the roof trusses.
Composting facility: The length and width of the compost facility were 2640 and 1230 cm, respectively. A slab floor of 20 cm thick steel reinforced concrete was poured on the top of four 25.4 cm thick steel reinforced walls. Four walls of 122 cm in height were poured above the floor to support the wood structure. The walls of the composting facility were constructed of 5×25 cm rough cut spruce lumber and covered with 10×20 cm painted steel panels that were glue-seamed sealed and grommeted. Galvanized sheet metal screws were used to attach each panel to the wall studs. The roof was made of farm-grade galvanized and painted steel panels 10×20 cm that were glue-seamed sealed and grommted. Galvanized sheet metal screws were used to attach each panel to the roof trusses.

TESTING METHODOLOGY
Start-up of anaerobic digester: The anaerobic digestion process requires an active population of a very selective type of microorganism which has a relatively slow growth rate and high sensitivity to changes in environmental conditions. The time required for active digestion to begin is reduced when sludge from a successfully operating digester is used as seed (Ghaly and Echigue, 1993). With seeding, a new digester can be in operation within a few weeks. Therefore, the anaerobic digester was started by adding 5000 L of actively digesting sewage sludge obtained from a commercial anaerobic digester operated at 35°C. This digester is a part of the treatment facilitie s at the Mill Cove Municipal Wastewater Treatment Plant located at Bedford, Nova Scotia, Canada. Table 5 shows the characteristics of the seed sludge. The addition of the seed sludge was followed by the addition of 5000 L of liquid dairy manure.
The digesters were left without further feeding for 48 h at an average environmental temperature of 25°C. The digester was then fed on a daily basis at a Hydraulic Retention Time (HRT) of 20 days. The startup period was concluded after a period of 30 days.

Composting operation:
The separated solids were mixed with fresh municipal solid waste compost (Miller Compost Corporation, Dartmouth, Nova Scotia) at a ratio of 1:10 (compost to solid manure). The C: N ratio and moisture content were adjusted to 30:1 and 60% using urea (CO (NH 2 ) 2 ) and water, respectively. The mixture was divided into windrows of 250 cm wide. The windrows were mixed with front loader once a day starting from the third day. The temperature was monitored on a daily basis for one month. Samples were taken from the windrows every five days for pH, C:N, moisture content, total carbon, TKN and solids analyses. The maturity of the final compost was evaluated by measuring the pH, CO 2 evolution, C: N ratio and germination index.

Sampling and analysis:
Following the initial start up period, monitoring of the biogas production and the effluent characteristics were started on day 30 (from the start). A steady state was construed to have been achieved when a uniform gas production and/or uniform effluent quality were achieved.
Liquid samples of the effluent were taken daily for solids, Chemical Oxygen Demand (COD), nitrogen and volatile fatty acid analyses. Gas samples were taken from the head space of the reactors using syringes for biogas analysis.
The solids and COD analyses were performed according to the procedures described in the Standard Methods for Examination of Water and Wastewater (APHA, 1985). The nitrogen analyses were performed using a Tecator Kjeltec Auto Analyzer (Model 1030, Tecator, Paris, France).
The individual volatile acids (C 2 -C 7 ) contained were determined using a Hewlett-Packard gas chromatograph (Model 5890 series II, Mississauga, Ontario, Canada) equipped with an HP 76734A automatic injector. Extraction of the VFA was carried out by acidifying 3.0 mL of each of the manure samples using 0.1 mL 30% sulphuric acid. The acidified samples were well mixed and centrifuged at 7000 rpm for 20 M. 2.0 mL of the supernatants were decanted and an equal amount of diethyl ether was added. The mixtures were well shaken and then centrifuged at 5000 rpm for 5 M to break down the emulsion layer. The upper layers which consisted of diethyl ether were removed for analysis. Volatile acids were, also, extracted from a volatile acid standard mixture (No 4-6975, SupelCo, Oakville, Ontario, Canada) using diethyl ether. The chromatograph was calibrated by injecting 1.0 mL of the extracted standard VFA mixture into the 25×0.2 mm capillary column of the liquid chromatograph whose film thickness is 0.33 mm. 1.0 mL of the extracted samples was injected into the column. A split ratio of 1:5 was applied. The column temperature was first maintained at 60°C for 3 M and then increased at a rate of 10°C min −1 until a temperature of 150°C was attained.
The column temperature was maintained at 150°C for 2 M. The injector was set at 180°C while the flame ionization detector was set at 250°C. The carrier gas was helium at a flow rate of 1.2 mL min −1 .
The composition of biogas was determined using a gas chromatograph (Model HP 5980A, Hewlett Packard, Mississauga, Ontario, Canada). Samples of 0.1mL were taken from the gas collected in the sampling tubes using a gas tight locked syringe. The samples were injected into 152.4×3.2 mm (6 in ×1/8 in) OD porapak Q stainless steel column of the gas chromatograph which is connected in a series bypass arrangement with a 152.4×3.2 mm OD molecular sieve 5 A 60180 stainless steel column. The switch valve of the gas chromatograph was adjusted to permit the molecular sieve column to store nitrogen, methane and carbon monoxide until the elution of the CO 2 , C 2 H 2 and C 6 H 6 through the porapak Q stainless steel column. The column was maintained at 45°C with helium as the carrier gas at 30 mL min −1 . The injector was set at 150°C while the thermal conductivity detector was set at 250°C.

RESULTS
Digester performance: The diurnal fluctuation in temperature, pH, COD, total solids, nitrogen, fatty acids are shown in Fig. 13.
Temperature and pH: the average ambient temperature was 21°C. The temperature of the digester room fluctuated between 14°C during the night and 28°C during the day. This was due to the variation of outdoor temperatures as shown in Fig. 13a. The minimum and maximum temperatures of the digester were 18 and 24°C, respectively. The digester temperature amplitude was 2°C. Relative to the room temperature, the digester minimum and maximum temperatures lagged 3 h behind those of the room temperature. This was due to the significant difference between the density of the air surrounding the digester and that of the liquid medium in the digester. The reactor pH was not affected by the fluctuation in reactor temperature and remained constant at 6.8.

COD:
The diurnal variations of the effluent total and soluble chemical oxygen demand (TCOD and SCOD) are presented in Fig. 13b. The TCOD cycle was approximately 12 h out of phase with the digester temperature. However, the SCOD cycle was only 4 h out of phase with the digester temperature. The influent TCOD and SCOD were 98.80 and 27.90 g L −1 and the effluent TCOD and SCOD were 37.64 and 3.66 g L −1 , respectively. The reduction in SCOD (87%) was higher than the reduction in TCOD (62%) indicating the conversion of the soluble organic matter to microbial cells.

Total solids:
The diurnal variations in the effluent total, volatile and fixed solids are shown in Fig. 13c. The fixed solids were in phase with the digester temperature but the total and volatile solids were out of phase with the digester temperature by 3 h. The influent total, volatile and fixed solids were 64.25, 50.26 and 13.99 g L −1 and the effluent total volatile and fixed solids were 23.3, 6.70 and 6.6 g L −1 , respectively.  Reductions of 63.74, 66.77 and 52.82% in the total, volatile and fixed solids were achieved, respectively. The reductions in the fixed solids could be due to the precipitation of some elements in the form of phosphate and samples.

Nitrogen:
The diurnal changes in the Total Kjeldhal Nitrogen (TKN) and ammonium nitrogen (NH 4 -N) are shown in Fig. 13d. The TKN on NH 4 -N were out of phase with the digester temperature by 8 and 14 days, respectively. The initial TKN and NH 4 -N in the influent were 5.84 and 1.75 g L −1 , respectively. The TKN was reduced to 3.2 (45% reduction) and the NH 4 -N was increased to 2.2 g L −1 (25.7% increase).

Volatile fatty acids:
The concentrations of Volatile Fatty Acids (VFAs) in the effluent samples taken during the steady state conditions are shown in Table 6. The indentified volatile acids include: acetic, propionic, iso-butyric, iso-valeric, valeric, iso-caproic, caproic and heptanoic acids. Among the VFAs, acetic acid had the highest concentration followed by propionic acid in both the raw manure (influent) and digester (effluent).
Biogas production: Figure 14 shows the daily biogas production from the start of the seeding of the digester. The biogas production rate rose steadily reaching a maximum value of 135.3 m 3 d -1 on day 9 and then remained fairly steady. There was no clearly noticeable Relationship between the diurnal temperature and the diurnal biogas production rate. The percentage of CH 4 varied from 69-73 % and that of CO 2 varied from 26-30 %. The other gases (N 2 , H 2 S) made approximately 1 %.
Composting performance: The initial and final values of temperature, moisture content, volatile solids, total carbon, TKN and C: N ratio as well as the values of the maturity and stability parameters (pH, CO 2 c/d and GI) are presented in Table 7.  Temperature: The initial temperature was 24°C which increased due to the heat produced by microbial activity to 39.1°C over 9 d and lasted 12 d before declining back to the ambient temperature Fig. 15. Mixing of the windrows caused fluctuation in the temperature. A temperature higher than 35°C (thermophelic stage) lasted for 19 d (from day 3 to day 22). Lag phases were clearly identified during the mesophelic and thermophilic phases.

Moisture content:
The initial moisture content of the mixture was adjusted to approximately 60 (60.66 % +/-1.27%). The final moisture content was 43.82 +/-1.17%. The reduction in moisture content was 27.76% this was due to the evaporation of water and loss of vapour due to mixing. Volatile solids: The initial volatile solids were 872 g VS kg -1 DM which was reduced to 507 g VS kg -1 DM by the end of the process. The reduction in volatile was 32.7%.

Total carbon:
The initial concentration of the total carbon was 437 g C kg -1 DM which decreased with time reacting 406 g C kg -1 DM. The reduction in total carbon was 7.1 %.

TKN:
The initial and final values of the TKN were 14.6 and 14.1 %, respectively. The TKN reduction was 3.4 %.
C: N ratio: The initial and finial C: N ratios were 29.9:1 and 26.2:1, respectively.

Maturity and stability:
The maturity and stability compost was evaluated by determining the pH, CO 2 evolution rate and the Germinate Index (GI) of the final product. The CO 2 is a good indication to determine the level of microbial activity and stability of compost. The germination index provides information about the phyto toxic organic substances. The lower the CO 2 evolution the more stable the compost. The pH was 5.8 which are within the optimum range of 5-7 for mature compost. The CO 2 c/d was 4.7 and the GI was 92% indicating a mature and stable final product.

DISCUSSION
The potential savings of energy and fertilizer use on the farm are presented in Table 8. The use of dairy waste as a source of fertilizer and energy allows a small scale dairy farm to replace about 6289 kg of commercial fertilizers annually, which leads to a cost savings of $17 925 annually in addition to annual savings of $20 547 on energy use. The digestion of manure produced about 49 275 m 3 of biogas per year, yielding approximately 342 461 kWh.

CONCLUSION
A solid liquid manure separator, a farm scale anaerobic digester and a composting facility for a medium size dairy farm were designed, constructed and tested. In order to make the system economically viable under Canadian climatic conditions, the design, installation and operation of the system were based on advantages gained from the digester and composting operation as a component of the total farm management system. In addition to the biogas production from the system, benefits related to manure handling and storage, environmental quality improvement through odour control and water pollution reduction, water recycling and production of organic fertilizer were considered. The developed solid-liquid separator is an efficient solids separation system for manure with high solids content.
The solids from the solid-liquid separator, have the optimal moisture content for long term storage plus a structure honeycombed with dispersed air pockets that will significantly stimulate the composting process. The digester design eliminates the agitation problem believed to be a major difficulty in the operation of mechanically mixed digesters especially with farm scale units. Mixing alone takes about 26 % of the total energy input to digester. It solves the sedimentation and sludge return problem which limits the performance of the anaerobic processes while producing concentrated animal feed and organic fertilizer. The digester design helps to maintain the concentration of methane producing bacteria in the system at higher level and in active state which eliminates the need for longer retention time and larger reactor volume, thereby reducing both the operating and capital costs.
It operates at low temperatures (20-25°C) thereby saving on energy required to heat the system. By using the liquid portion of the manure (which contains the dissolved solids) in the anaerobic digester a smaller digester was built thereby reducing the capital and operating costs. The indoor composting facility allowed a continuous production of high quality compost at a relatively low labour cost (926 tons annually). Using dairy manure as a source of energy and fertilizer resulted in a saving of $17 925 on fertilizers and $20 547 on energy use.