Login
A   A   A  
welcome

 Album 

米Teen唔鐘意玩現成品,喜歡由零件開始砌。99次失敗唔係問題,最緊要係有1次成功!

米Teen總部設在聖公會白約翰會督中學506室,在午膳後和放學後集會。有興趣參與的同學,請與會長或導師聯絡。

米Teen專頁

506室內 2020-11-04 21:43:57
溫度 26℃ 濕度 95%
街景 2020-11-04 21:41:52
街景
5樓室外 2020-11-04 21:43:43
溫度 22℃ 濕度 95%
街景 2020-11-04 21:34:34
街景

「米缸」米Teen的智能魚缸

icon

Home>製作項目...>「米缸」米Teen的...

米Teen X 良師啟導計劃 -- 本校每年都有良師啟導計劃,老師會親自帶領個別學生像師徒般傳授知識。今年度(2019-2020)米Teen與良師啟導計劃合作,參與的學生負責設計及製作一個約6呎x1呎x1呎的電腦控制環境及監察的智能魚缸。整個製作都是由基本材料組成,成員可以學到DIY和各種技術,計劃內容包括有各種STEAM的元素。

智能魚缸

本計劃仍在進行中,以下內容會不斷更新。

規格(2020.4.7更新)

魚缸:外部量度84"x14"x17",用4分厚玻璃,內部容水量83"x13"x14"
水容量:~248L ~546磅重
底架:2"x2"一分厚鉛水角鐵、燒焊、上防鏽漆及半啞磁油
控制:各系統由獨立的微電腦控制
系統:餵食系統,恒溫系統,過濾系統,燈光系統,數據收集

組長

餵食系統:4C楊尚餘
恒溫系統:4C趙心怡
過濾系統:4C張喆熙 4D鍾卓林
生物化學:4C黃逸朗 4C張喆熙
外觀設計:5B鄧凱兒

工作進度

構思計劃
	2019.10-11月
焊製底架
	2019.12月-2020.1月 
訂造魚缸
	2020.1月
安裝喉管及過濾系統
	2020.2月-4月
恒溫系統
	2020.3月-4月
餵食系統
	2020.3月-4月        
...............
完成
	希望在7月完成
    受新冠肺炎疫情影響,本計劃未能按原定時間完成。

4C楊尚餘

Feeding Machine

Orginally there is two designs, both using stepper mottor to drive the device which is controlled by Arduino UNO.

  1. Plan A
  2. Original Design was inspried by the gashapon machine. After experiments, it was found that the fish food was stuck in the system due to design issues. Therefore, the design of the waterwheel was changed to a vertical design, and after repeated experiments, it was changed to the current Ferris wheel design. This design can avoid the problem of food jams and increase flexibility.

    初型扭蛋機設計 二代水車設計

    Revised design is similar to Ferris wheel with a total of 6 feeding containers. At specfic time, system will start the stepper motor to rate the Ferris Wheel 60 Degree, falling the food from the chamber to the tank.

    設計飼料倉格 三代飼料倉格設計 3D打印一個飼料倉格需要90分鐘 鐳射切割和3D打印的飼料倉格 三代摩天輪設計 方案一:類似摩天輪的設計

  3. Plan b (Developing)(Cancelled)
  4. Design inspired by conveyor belt. Using a rack with stepper motor to push the baffle to feed the fish. At specfic time, the programe with drop an amout of fish food then activate the motor to drop the food.

    方案二:初型活塞設計

  5. Plan X
  6. Progress was significantly affected by Covid-19, after serveral twitst and turns,a feasible solution. 3D Printed turntable have 8 grid, stepper with turn 45 degree every other day to feed the fish automatically.

    餵飼機機身設計 飼料倉格設計 使用餵飼機

  7. Plan Y
  8. Design go back to basic, inspried by gashapon machine. What is different with original is that exterior walls was change to interlock design, using combining design for the feeding chamber. The stepper motor will rotate 45 degree after a specfic period of time. Current setting is automatically feed every day. Working cycle is one week.

    Comparing this design with Plan X

    Plan Y take approximately 3 hours to print where Plan X takes 5 hours, with the new design it uses less material, making it cheaper then before. With the previous deisgn will require users to remove screws to add Fish food where as this design is more user friendly. With a simple lift of the acrylic cover, user can add food without the need of screwing and unscrewing.
    New design having higher fill density making it more durable then ever. In case of motor malfunction, new design can simply unplug the motor and replace with a new one. If the container was found broken or leaking, it can be print in 3 hour. If arcylic was found broken, it can be lasercut and ready to use in 15 minutes for both the top and the bottom.

    餵飼機機身設計 version Y 3D打印餵飼機 雷射切割組件 餵飼機

Arduino program of the feeding machine

/*
 This program drives a 28BYJ-48 stepper motor to rotate the feeder.
*/
#include "stepper24byj.h"

// feed period (ms), 1 day
unsigned long feedPeriod = 86400000;

// the number of steps per revolution
// used by the library to calculate the delay time for each step (micro second)
// step_delay = 60L * 1000L * 1000L / stepsPerRevolution / stepperSpeed
const int stepsPerRevolution = 4096;

// rpm: rotations per minute (long) max.value=20 (found by experiment)
// There are 8 slots.
// It takes about 60/stepperSpeed/8 second to turn 1 slot
const long stepperSpeed = 8;

// steps for one slot
int stepsPerSlot=stepsPerRevolution/8;

// stepper moter red line = Vcc
// stepperPin=HIGH will drive the open collector LOW and current passes through the coil
int stepperPin1 = 8; // blue
int stepperPin2 = 9; // pink
int stepperPin3 = 10; // yellow
int stepperPin4 = 11; // orange

int microSwitch = 5; // if pressed, turn a little bit

unsigned long last_feed_time; // time stamp(ms) of last feed
unsigned long currentTime;
// This number will overflow (go back to zero) after approximately 50 days.

// initialize the stepper library
Stepper myStepper(stepsPerRevolution, stepperPin1, stepperPin2, stepperPin3, stepperPin4);

int switchStatus;

void setup() {
  pinMode(microSwitch,INPUT_PULLUP);
  myStepper.setSpeed(stepperSpeed); // set the speed of the motor RPMs
  myStepper.offpower();
  delay(5000);
  feed();
}

void loop() {
  switchStatus=digitalRead(microSwitch);
  // if pressed, turn a little bit
  if (switchStatus==LOW) {
    myStepper.step(48);
    myStepper.offpower();
    delay(500);
  } else {
    currentTime = millis();
    if ((currentTime - last_feed_time >= feedPeriod) || (currentTime<last_feed_time)) {
      feed();
    }
  }
}

void feed() {
    myStepper.step(stepsPerSlot);
    myStepper.offpower();
    last_feed_time=millis();
}

4C趙心怡

Heating system

Nichrome wires are used for the heating element of our fish tank. Nichrome(Cr20Ni80) is commonly used for making heating elements of electrical appliances because 1) nichrome has a high melting point, which prevents it from melting from the heat produced and 2) nichrome has a high resistivity and therefore a high resistance, which leads to faster generation of heat.

In order to maintain the water temperature of the fish tank, we need to compensate for heat loss into the surroundings by supplying an equivalent amount of heat to the water.

Calculation:
Heat loss is due to the difference between the temperature of the inner surface of glass (water temperature) and that of the outer surface of the glass (room temperature). It is calculated with the formula Q=U*A*ΔT. Q is the heat loss per second. U is thermal transmittance, which is the rate of heat transfer through matter. A is the size of the area in which heat loss occurs. ΔT is the temperature difference.

Since the optimal water temperature for fish is 24-27°C, we set the upper limit of water temperature as 27°C. And since the lowest temperature in Hong Kong is around 10°C, we set the lower limit of water temperature as 10°C. Therefore, the maximum temperature difference ΔT is 17°C.

U of glass= 4W/m2°C
U of plastic= 0.2W/m2°C

The 4 sides and the bottom of the tank are glass, while the top is covered by a plastic sheet.
Height of the tank=42cm
Length=214cm
Width=35cm
Area of the 4 sides and the bottom(glass)
= 0.42×0.35×2 + 2.14×0.42×2 + 2.14×0.35m2
= 2.84m2
Area of the top(plastic)
= 2.14×0.35 = 0.749m2
Maximum heat loss through glass
= 4×2.84×17W = 193W
Maximum heat loss through the plastic sheet
= 0.2×0.749×17W = 2.55W
Total maximum heat loss
= 193+2.55W = 195.55W

Since there will be further heat loss into the glass and heat loss due to the water circulatory system, extra energy needs to be supplied in order to fully compensate for heat loss. Therefore, taking the design of commercial products as reference, we decided to supply a total of 216W through 12 sets of nichrome heating wires each of diameter 0.5mm.

Calculation:
The resistance of each wire can be calculated with the formula R=ρL/A, where R is resistance, ρ is resistivity, L is the length of the wire and A is the cross-sectional area.
ρ of nichrome = 1.09×10-6Ωm
L of the wire = 1.5m
A of the wire = (0.0005/2)2π = 1.96×10-7m
Therefore, R= 8.32Ω
By measuring the resistance of the 1.5m nichrome wire with an ohmmeter, we obtained a result of 8Ω.
The power of each wire can be calculated with the formula P=V2/R, where P is power, V is voltage and R is resistance.
V=12V
R=8Ω
Therefore, P=18W
For 12 sets of wires, total P =18×12= 216W

The nichrome wires are each contained within a 1.5m long glass tube. However, the glass tube is in danger of cracking if the wire is heated to a great extent in a short time. Therefore, to ensure the safety of the heating system, we carried out an experiment in which a single 1.5 m nichrome wire of 0.5 mm diameter is heated, with a voltage of 12V. The wire was simply placed on a table under room temperature and pressure. Throughout the experiment, there were no abnormal signs and the surface of the glass was warm to the touch. The positive result shows that there is no danger of glass cracking and the system is safe to use.

The heating system makes use of proportional control. Proportional control is a control system technology based on a response in proportion to the difference between what is set as a desired process variable and the current value of the variable, which means that the greater the difference, the greater the response and the smaller the difference, the smaller the response. In our case, the power supplied to the heating element decreases as the water temperature approaches the desired temperature. This helps maintain a stable water temperature and ensure rapid response, which enhances accuracy. When the temperature of water exceeds the appropriate temperature, the system will be turned off to prevent overheating.

Nichrome wire in glass tube Sealing the end of a glass tube 1.5m heating tube Group of heating tubes

過濾系統

水泵一:HAILEA海利HX8860 130W 5800L/h 揚程4.1m
水泵一的流量為5800L/h,馬力太強,水流過猛,去水速度跟不上,不宜使用。
水泵二: HAILEA海利HX8830 45W 2900L/h 揚程2.3m
水泵二的流量實驗結果:13.2L/36.75s,約為1293L/h,適合使用。
電磁水閥 1吋DN25 DC12V (要選用長時間通電不發熱)
過濾箱一(頂層):平分水流的灑水蓋,過濾棉
過濾箱二(中層):活性碳
過濾箱三(底層,左):培養消化菌
過濾箱四(底層,右):打氣石(HAILEA ACO-9610 4出口 10Lit/min 0.015Mpa),水位監察器,水泵,12W定時紫外線殺菌燈
魚缸:水位監察器

過濾系統控制器

控制水泵及水閥的Arduino程式

/*
Circulation controller
Version 1
2020.5.25
Author: Matthew Li
Arduino UNO

This unit acts as a controller to monitor the water level sensors
and control the solenoid valve and the pump.
*/

#define DEBUGMODE false

// compulsory pump off duration (unit ms)
unsigned long PUMPOFFDURATION=20000; // 20 seconds
// compulsory valve off duration (unit ms)
unsigned long VALVEOFFDURATION=20000; // 20 seconds

// -----------------------------------------------------------------------

// fixed configurations

// Digital Input Pin for water level sensors
#define SENSORTOPPIN 11
#define SENSORBOTTOMPIN 10

// Digital Output Pin for status LEDs
#define SENSORTOPLEDPIN 9      // overflow indicator
#define SENSORBOTTOMLEDPIN 8   // running out of water indicator

// Digital Output Pin for solenoid valve and pump
#define PUMPPIN 7
#define SOLENOIDVALVEPIN 6

#define MONITORBAUDRATE 115200 // port Serial, pin 0 RX, 1 TX

// These numbers will overflow (go back to zero), after approximately 50 days.
unsigned long currentTime, pumpSuspendTime, valveSuspendTime;
int sensorTopVal, sensorBottomVal;

boolean pumpSuspend=false, valveSuspend=false;

void setup() {
  pinMode(PUMPPIN, OUTPUT);
  pinMode(SOLENOIDVALVEPIN, OUTPUT);
  pinMode(SENSORTOPLEDPIN, OUTPUT);
  pinMode(SENSORBOTTOMLEDPIN, OUTPUT);
  
  digitalWrite(PUMPPIN,LOW);
  digitalWrite(SOLENOIDVALVEPIN,LOW);
  digitalWrite(SENSORTOPLEDPIN,HIGH); // LED off
  digitalWrite(SENSORBOTTOMLEDPIN,HIGH); // LED off

  pinMode(SENSORTOPPIN, INPUT);
  pinMode(SENSORBOTTOMPIN, INPUT);

  if (DEBUGMODE) {
    Serial.begin(MONITORBAUDRATE); // for debugging, use the serial monitor
    while (!Serial) ; // wait for serial port to connect. Needed for native USB port only. On both the Due and Zero, the Native port is connected directly to the microcontroller.
  }
} // end of setup()

// -----------------------------------------------------------------------

void loop() {
  if (DEBUGMODE) Serial.println();
  
  // read water level sensors
  sensorTopVal=digitalRead(SENSORTOPPIN);
  sensorBottomVal=digitalRead(SENSORBOTTOMPIN);
  if (DEBUGMODE) Serial.print("Overflow sensor: ");
  if (DEBUGMODE) Serial.println(sensorTopVal);
  if (DEBUGMODE) Serial.print("water level too low sensor: ");
  if (DEBUGMODE) Serial.println(sensorBottomVal);
  
  currentTime=millis(); // current timer
  
  if (sensorTopVal==LOW && sensorBottomVal==LOW) { // normal water level
    
    if (DEBUGMODE) Serial.println("Both sensor normal. Status checking.");
    if (DEBUGMODE) Serial.println(currentTime);
    if (DEBUGMODE) Serial.println(pumpSuspendTime);
    if (DEBUGMODE) Serial.println(valveSuspendTime);
      
    if (pumpSuspend && ((currentTime>PUMPOFFDURATION+pumpSuspendTime) || (currentTime< pumpSuspendTime))) {
      pumpSuspend=false;
      digitalWrite(SENSORBOTTOMLEDPIN,HIGH); // LED off
      digitalWrite(PUMPPIN,HIGH);
      if (DEBUGMODE) Serial.println("Reset -- Water level too low.");
    }

    if (valveSuspend && (currentTime>VALVEOFFDURATION+valveSuspendTime || currentTime< valveSuspendTime)) {
      valveSuspend=false;
      digitalWrite(SENSORTOPLEDPIN,HIGH); // LED off
      digitalWrite(SOLENOIDVALVEPIN,HIGH);
      if (DEBUGMODE) Serial.println("Reset -- Water overflow.");
    }

    if (!pumpSuspend && !valveSuspend) {
      digitalWrite(PUMPPIN,HIGH);
      digitalWrite(SOLENOIDVALVEPIN,HIGH);
      digitalWrite(SENSORBOTTOMLEDPIN,HIGH); // LED off
      digitalWrite(SENSORTOPLEDPIN,HIGH); // LED off
      if (DEBUGMODE) Serial.println("Both sensors normal. All errors cleared.");
    }
    
  } else if (sensorTopVal==LOW && sensorBottomVal==HIGH) { // water level too low
    digitalWrite(PUMPPIN,LOW);
    digitalWrite(SOLENOIDVALVEPIN,HIGH);
    digitalWrite(SENSORTOPLEDPIN,HIGH); // LED off
    digitalWrite(SENSORBOTTOMLEDPIN,LOW); // LED on
    pumpSuspend=true;
    pumpSuspendTime=millis();
    if (DEBUGMODE) Serial.print("Water level too low. ");
    if (DEBUGMODE) Serial.println(pumpSuspendTime);
    
  } else if (sensorTopVal==HIGH && sensorBottomVal==LOW) { // overflow
    digitalWrite(PUMPPIN,HIGH);
    digitalWrite(SOLENOIDVALVEPIN,LOW);
    digitalWrite(SENSORTOPLEDPIN,LOW); // LED on
    digitalWrite(SENSORBOTTOMLEDPIN,HIGH); // LED off
    valveSuspend=true;
    valveSuspendTime=millis();
    if (DEBUGMODE) Serial.print("Water overflow. ");
    if (DEBUGMODE) Serial.println(valveSuspendTime);
    
  } else { // both HIGH, abnormal, sensor error
    digitalWrite(PUMPPIN,LOW);
    digitalWrite(SOLENOIDVALVEPIN,LOW);
    digitalWrite(SENSORBOTTOMLEDPIN,LOW); // LED on
    pumpSuspend=true;
    pumpSuspendTime=millis();
    digitalWrite(SENSORTOPLEDPIN,LOW); // LED on
    valveSuspend=true;
    valveSuspendTime=millis();
    if (DEBUGMODE) Serial.println("Sensor error.");
  }

  delay(1000); // delay 1 second
} // end of main loop()

控制水泵及水閥的設計

控制水泵及水閥的線路 異常水位探測 水泵及水閥的控制方法 魚缸內的浮球開關 去水管 過濾箱四 水泵及SSR(輸出端加varistor保護)

Distribution of holes: to make water flow in a certain rate and to clear suspended particles in all directions.

Function of overflow tube: to let excess water flow out and to control the amount of water in tank.

HX8860水流太猛 HX8830水流適合 製作過濾系統的入水喉管 製作過濾系統的分隔層 吸水管

LED照明

頂部的左邊和右邊各安裝4條LED燈條。LED和水面之間放置磨沙的膠片使光線散射。魚缸正面的左右兩邊分別安裝一個PIR(Passive infrared) sensor。當有人接近魚缸,LED就會用10秒淡入至最光。每當感應有人移動,LED會延長照明多60秒。若60秒後沒有人移動,LED就會用10秒淡出至熄滅。

控制LED的線路

開關LED燈條的線路 接駁兩個PIR sensors的線路

100cm Red LED燈條 1.34-1.56A
100cm Green LED燈條 1.39-1.43A
100cm Blue LED燈條 1.47-1.51A
100cm White LED燈條 1.48-1.59A

將PIR sensor的敏感度調較至最高,感應到移動的訊號則調較至最短(約5秒),實際的LED照明時間是由Arduino程式控制。


4C黃逸朗

硝化細菌

  1. 氮循環
  2. 硝化細菌在氮循環中扮演很重要的角色,負責把泥土中對生物有毒的氨硝化至可以繼續讓植物吸收氮的硝酸鹽。而在我們的「米缸」中,魚缸裏的魚排出的糞便中也含有對生物有毒的銨。因此我們使用硝化細菌來令氨轉變硝酸鹽,而被植物吸收。

  3. 使用方式
  4. 直接使用,每100L水加90ml細菌,每日一次。

  5. pH值對硝化作用的影響
  6. pH值會影響水中分子性氨(NH3)與離子性銨(NH4+)的濃度平衡,其中只有分子態氨能用於硝化作用。在總氨量一定狀況下,pH值越高,氨濃度比例越高。因此用於硝化作用的反應基質濃度越高,硝化速率越有利。換言之,硝化作用在中性或鹼性環境遠比在酸性環境中更能快速進行。此外,pH值會直接影響硝化酵素的活性,通常最適pH值約為7.5~8.2之間,依溫度不同而有所差異。由於硝化作用中會產生硝酸,造成水質酸化,會使pH降低,影響硝化作用。

  7. 溫度對硝化作用的影響
  8. 溫度主要會催化硝化反應的酵素活性,最適溫度約在35~40℃之間(28~32℃為「米缸」使用的細菌建議溫度),但還需視溶氧濃度取得一最高效率平衡。一般以不超過30℃,不低於20℃為較佳區間。

魚缸製作過程

切割角鐵 固定角度,預備燒焊 清理焊渣 上防鏽漆及半啞磁油 上防鏽漆及半啞磁油 魚缸底架的木板修邊 噴油 底板開去水喉位 鑽孔固定魚缸支架 鑽孔固定魚缸支架 初次入水測試 測試電動去水閥 安裝水管 安裝水管 測試整體的水流循環

welcome

 Album 

米Teen唔鐘意玩現成品,喜歡由零件開始砌。99次失敗唔係問題,最緊要係有1次成功!

米Teen總部設在聖公會白約翰會督中學506室,在午膳後和放學後集會。有興趣參與的同學,請與會長或導師聯絡。

米Teen專頁

506室內 2020-11-04 21:43:57
溫度 26℃ 濕度 95%
街景 2020-11-04 21:41:52
街景
5樓室外 2020-11-04 21:43:43
溫度 22℃ 濕度 95%
街景 2020-11-04 21:34:34
街景
 ⇧