1 of 44

Group 1

Zia McDonnold  | Kielan McMillan |​  Danielle Nastyn | Vergin Mansour

Unrestricted

Detection of Algae in Fish Tanks Using Optical Absorption

2 of 44

Administrative Introduction

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 2

3 of 44

Meet the Team

Zia McDonnold

Photonics Engineering Major​

Kielan McMillan 

Photonics Engineering Major​

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 3

Danielle Nastyn 

Electrical Engineering Major​

Vergin Mansour 

Computer Engineering Major

4 of 44

Motivation 

  • Complete degree requirements
  • Gain Experience in the following:
    • Project Management
    • Project Design
    • Project Documentation
    • Professional Presentation
  • Create an affordable and effective system that will monitor harmful environments in fish tanks

Photo Courtesy of "www.ucf.edu"

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 4

5 of 44

Algae Characteristics 

  • Single celled microscopic organisms that thrive in warm, nutrient rich, slow-moving waters
  • Algae can be detected through the amount of light that is absorption.  Using The Properties of Beer's Law and selecting the best wavelength of light as a source.
  • Cyanobacteria are a form of algae and contain a green pigment called Chlorophyll-a that plants use for photosynthesis 
  • 3 Cyanotoxins can be produced: 
    • Neurotoxin
    • Hepatotoxin
    • Dermatoxin   

Photos Courtesy of "pixels.com" "www.johanpaul.com", "Fondriest [3]", 

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 5

6 of 44

Project Goals

Basic Goals

  • Design and build an optical system that detects changes in light intensity through a moving water sample
    • Laser
    • Photodiodes
    • Focusing Lense
    • Beam-splitter
  • Design and code an easy-to-use touch enabled liquid crystal display
  • Design a functioning system under $1,000 USD

Advanced Goals

  • Design and build a gravity siphon to pull a continuous sample from the fish tank 
  • Integrate a thermal camera to detect temperature
  • Integrate a Wi-Fi Module 

Stretch Goals

  • Design and launch a mobile app user interface
  • Design and build a system to dispense corrective chemicals

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 6

7 of 44

Project Description

  • Microcontroller used to power, read and display outputs
  • Laser, lenses and photodiodes used to detect intensity shifts
  • Thermal Camera used to monitor temperature
  • Liquid Crystal Display and Wi-Fi module used to communicate with user
  • Gravity Siphon used to draw continuous water sample

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 7

Algae Detection System

8 of 44

Specifications

Component

Parameter

Design Specification 

Microcontroller

Complexity

Single Board System

Power supply 

US Standard wall outlet

Plugs into wall will need to give 9W

Optical Source 

Wavelength absorption sensitivity 

Compare absorption detection sensitivity for different algae concentrations for 450nm, 532nm, and 650nm wavelengths

Focusing Lens

Position

Compare absorption sensitivity without using focusing lens

Source Operation

Duration

Continuous wave ​

Housing

Dimension

Dimensions do not exceed 

12 in x 12 in x 12 in

Design

Cost

Production cost does not exceed $1,000

Thermal Camera

Temperature

Detects changes in temperature with 0.5% sensitivity

Liquid Crystal Display

User Interface

Simple seletions

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 8

9 of 44

Block Diagram

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 9

10 of 44

Overall Design

  • Microcontroller 
  • Power Supply
  • Liquid Crystal Display
  • Thermal Camera
  • Wi-Fi Module

Optical Hardware

  • Laser
  • Beamsplitter
  • Lens
  • Photodiodes

Basic Hardware

  • 3D Models
  • Siphon

Electrical Hardware

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 10

Software

  • LCD Interface
  • Microcontroller  Interface

11 of 44

Electrical Hardware Components�MicrocontrollerArduino Uno

Significant Design Specifications

    • 6 Analog and 14 Digital Input Pins
    • 5V Operating Voltage
    • 7V-12V Input Voltage 
    • Arduino (IDE) Integrated Development Environment
    • Extensive Online Community
    • Cost Effective

Photo Courtesy of content.arduino.cc

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 11

Waspmote

Raspberry Pi B

Arduino Uno

Microcontroller​

ATmega1281 

BCM2711

ATmega328​

Operating Voltage​

3.3V

5V

5V​

Input Voltage (recommended)​

5V

5V

7V-12V​

Input Voltage (limits)​

7V

5V

6V-20V​

Digital I/O Pins​

8

8

14 ​

Analog Input Pins​

7

N/A

6​

DC Current per I/O Pin​

40mA

700mA

40 mA​

Temperature Range 

-30 ºC to +125 ºC 

0ºC to +50 ºC 

-40 ºC to +125 ºC 

Flash Memory​

128kB

SD Card

32 kB​

SRAM​

8kB

-

2 kB​

EEPROM​

4kB

N/A

1kB​

Clock Speed​

32.768kHz

700MHz

16 MHz​

Cost

Quote

$35

$23

12 of 44

Photo Courtesy of content.arduino.cc

12

ATmega328​

USB Bridge​

Power​

13 of 44

Photo Courtesy of amazon.com

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 13

Manufacturer 

Snark Pedal Power Supply 

FlickerStar 

Moog Minifooger 

Item Number 

SnarkSA1 

B07ZM46WKF 

MFoogerPwr 

Input Voltage Range 

100-120V AC �50-60Hz 

100-240V AC �50-60Hz 

100-120V AC �50-60Hz 

Output Voltage 

9V DC 

9V DC 

9V DC 

Output Amps 

400mA 

1000mA 

550mA 

Cost 

$12.99 

$10.98 

$19.99 

Significant Design Specifications

    • Input Voltage 100-240V
    • Output Voltage 9V
    • Inexpensive 

Electrical Hardware Components�Power Supply 

B07ZM46WKF

14 of 44

Photo Courtesy of microcontrollertutorials.com

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 14

Electrical Hardware Components

Liquid Crystal DisplayNX3224T024 

Liquid Crystal Display 

(LCD) 

Light Emitting Diode (LED) 

Organic Light Emitting Diode (OLED) 

Manufacturer 

Newhaven Display International 

Nextion

East Rising 

Adafruit Industries LLC 

Waveshare 

Manufacturer Product Number 

NHD-0420H1Z-FSW-GBW 

NX3224T024 

ER-TFT035-6 

MI-T35P6RGBF-AA (6432) 

14747 

Description 

Character LCD 

Touch LCD 

Touch LCD 

RGB LED  �Dot Matrix 

RGB OLED 

Viewing Area 

60mm x 28mm 

48.6mm x 

36.72mm 

50.56mm x 75.04mm 

385mm x 190mm 

26.86mm x 26.86mm 

Voltage Supply 

4.7V ~ 5.5V 

5V 

2.5V  ~ 3.3V 

5V 

3.3V ~ 5V 

Operating Temperature 

-20°C ~ 70°C 

-20°C ~ 60°C 

-20°C ~ 70°C 

-20°C ~ 60°C 

-30°C ~ 70°C 

Price 

$22.66 

$22.99 

$19.25 

$64.95 

$18.95 

Significant Design Specifications

    • Liquid Crystal Display
    • Operating Voltage of 5V
    • Touch Enabled
    • Nextion Editor
    • Extensive Online Community 

15 of 44

Wi-FiESP8266 ESP-01

Photo Courtesy of nurdspace.nl

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 15

Hardware Components

Items 

ESP8266 

ESP8285 

ESP32 

Manufacturer

MakerFocus

KeeYees

AITRIP

Peripheral Bus 

UART/SDIO/SPI/I2C/I2S/IR Remote Control 

UART/SDIO/SPI/I2C/I2S/IR Remote Control 

UART/SDIO/SPI/I2C/DAC/ADC/JTAG 

Operating Voltage 

3.0~3.6V 

2.7 V ~ 3.6 V 

2.3 V ~ 3.6 V 

Operating Current 

Average value: 80mA 

Average value: 80mA 

500mA 

Operating Temperature 

-40°C~125°C 

–40 °C ~ 85 °C 

-40°C~125°C 

Package Size 

48.4mm x 25.5mm 

15mm x 17.8mm 

54.6 mm x 27.94 mm 

WiFi Mode 

station/softAP/SoftAP+station 

Station/SoftAP/SoftAP+Station 

Simultaneous support for Infrastructure Station, SoftAP, and Promiscuous modes 

Security 

WPA/WPA2 

WPA/WPA2 

ECC/RSA 

Encryption 

WEP/TKIP/AES 

WEP/TKIP/AES 

AES 

Cost

$12.99 (4pcs)

$23.99 (5pcs)

$19.68 (3pcs)

Significant Design Specifications

    • Inexpensive
    • ESP8266
    • Input Voltage is 3.3V
    • Serial/UART Baude Rate 115200 bps
    • Wi-Fi Security modes are WPA and WPA2

16 of 44

Wi-FiESP8266

Photo Courtesy of nurdspace.nl

16

Hardware Components

17 of 44

Overall Design

  • Microcontroller 
  • Power Supply
  • Liquid Crystal Display
  • Thermal Camera
  • Wi-Fi Module

Optical Hardware

  • Laser
  • Beamsplitter
  • Lens
  • Photodiodes

Basic Hardware

  • 3D Models
  • Siphon

Electrical Hardware

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 17

Software

  • LCD Interface
  • Microcontroller  Interface

18 of 44

Optical Component Specifications

  • Light source
    • Collimated beam 
    • 450 nm peak wavelength
      •  532 nm and 650 nm calibration wavelengths
    • Optical power of no more than 5 mW

  • Beamsplitter
    • AR coated for visible light
    • Power split ratio of 50:50
    • 25.4 mm diameter
  • Focus lens
    • AR coated for visible light 
    • 25.4 mm < focal length < 40 mm
    • 25.4 mm diameter
    • Divergent light focusing

  • Photodiodes
    • Active area no less than 4 mm2
    • Sensitivity/ Responsivity of no less than 0.5 at 450 nm
    • Cost no more than $10

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 18

19 of 44

Laser Pointer  Comparison

Laser Pointer

Price

Peak Wavelength

Maximum Optical Power

Laser Class

Power Source

Big Laser Pointers 

$109

455 nm

2000 mW

IV

2 x 16340 Li-ion batteries

Amazon Store

$14.88

405 nm, 532 nm, 650 nm

5 mW

III

2 x AAA batteries

Alpec

$84.99

450 nm

5 mW

IIIA

2 x AAA batteries

  • Alpec laser pointer chosen for the following:
    • Preferred wavelength of 450 nm
    • Power source is common and easily obtainable

  • Amazon Laser pointers
    • Purchased for  preliminary testing due to similarity to Alpec laser
    • Currently repurposing the green and red-light laser pointers for additional sensitivity comparison testing 

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 19

20 of 44

Beamsplitter Comparison

Beamsplitter

Shape

Price

Split Ratio

AR Coating

Size

1

BSW10

Plate

$106.49

50:50

VIS 350 – 700 nm

25.4 mm diameter

2

BS013

Cube

$230.71

50:50

VIS 400 – 700 nm

1" x 1" x 1"

3

BSF2550

Wedge​​

$89.29

NA

NA

1.0" x 2.0"

4

BSW10R

Square plate

$125.34

50:50

VIS 350 – 700 nm

25 x 36 mm

  • 25.4 mm diameter allows for easy alignment 
  • Plate shape is more affordable than a cube beamsplitter
  • The wedge beamsplitter doesn't have a set power split ratio or AR coating

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 20

21 of 44

Lens Comparison

Lenses

Focal Length

Available Coating

Material

Price

1

LB1761-A

25.4 mm

(A)  400 – 700 nm

NBK-7

$40.21

2

LB1757-A

30 mm

(A)  400 – 700 nm

NBK-7

$39.38

3

LB1027-A

40 mm

(A)  400 – 700 nm

NBK-7

$38.27

  • Focal length is long enough for simple alignment allowing for desirable distance between components
  • More affordable lens with smaller focal length 
  • Focal length is short enough to reduce risk of optical distortion 
  • Lens size allows for simple alignment 
  • Bi-convex shape enables focusing of diverging beam 

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 21

22 of 44

Photodiode Comparison

list

Photodiodes

Price

Peak Wavelength  Sensitivity/ Responsivity

Active area

1

SD-076-12-12-011-Photodiode

$14.95

Undefined

2.9 mm2

2

MTD5052N

$7.46

525 nm

Undefined

3

MTD5052W

$7.46

523 nm

0.62 mm2

4

TME BPW21R VISHAY

$8.02

565 nm

7.5 mm2

  • TME photodiodes have a larger active area 
  • Has a defined peak wavelength with high sensitivity in the blue light range
  • Small and light weight
  • Large active area makes optical alignment simple

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 22

23 of 44

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 23

Optical Design

  • Laser pointer of 450 nm wavelength of average optical power of 2.4 mW transmits beam 5 cm to beamsplitter
  • Beamsplitter separates beam into an input beam and output beam 
  • Input beam travels 3.4 cm to photodiode 1
  • Output beam travels 4.4 cm to incident surface of water tube
  • Output beam travels 2.4 cm from the exiting surface of the water tube to the focusing lens
  • The focusing lens focuses the beam 3 cm away onto photodiode 2

24 of 44

Testing Optical System

  • ε for chlorophyll a in Hair algae is 1.261E+05 M-1*cm-1

  • The system will be tested using a sample of Hair algae.
  • The sample will be at a concentrations of 0.01, 0.05, and 5 grams per letter.
  • The equation for Beer's Law: 

Group 1

Fish Tank Assistant

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 24

25 of 44

Testing Optical System Continued

  • The Molar concentration (C) was gotten by first calculating the molar number (n): 
  • Then the Molar Concentration (C) was calculated:
  • Then the equations below can be used to get the transmitted from the Absorbed.

Group 1

Fish Tank Assistant

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 25

26 of 44

Expected Results of Optical System Testing 

Expected Data for 5g/L hair algae sample

Molar absorption coefficient 

1.261E+05 M-1*cm-1

Molar concentration 

0.0055959082718716 M

Optical Path length

2.5 cm

Expected Absorption 

29.7976%

Expected Transmittance

70.2024% 

Group 1

Fish Tank Assistant

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 26

27 of 44

Overall Design

  • Microcontroller 
  • Power Supply
  • Liquid Crystal Display
  • Thermal Camera
  • Wi-Fi Module

Optical Hardware

  • Laser
  • Beamsplitter
  • Lens
  • Photodiodes

Basic Hardware

  • 3D Models
  • Siphon

Electrical Hardware

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 27

Software

  • LCD Interface
  • Microcontroller  Interface

28 of 44

3D Printed Models and Water Tube

3D Printed Models:

  • All the brackets to hold optical parts down
    • Laser pointer holder
    • Lens mount and holder
    • Beamsplitter holder
    • Photodiode mount 
  • To make part of the water tubes for the siphon
    • The end caps

Hardware Components

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 28

Water tube for siphon will consist of:​

  • 6mm Fish tank tubing​
  • 3D Printed ends​
  • Optix Plexiglass walls put together with silicone ​

Siphon will be started using​

  • Siphon Bulb which creates a vacuum in the water tube

29 of 44

Overall Design

  • Microcontroller 
  • Power Supply
  • Liquid Crystal Display
  • Thermal Camera
  • Wi-Fi Module

Optical Hardware

  • Laser
  • Beamsplitter
  • Lens
  • Photodiodes

Basic Hardware

  • 3D Models
  • Siphon

Electrical Hardware

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 29

Software

  • Microcontroller coding and interface
  • LCD Interface

30 of 44

Requirements

Software Design & Components

Goals 

Description 

Main 

Program the microcontroller, sensors, and buttons to make sure the actual product is functional  

Advanced  

Have the machine operate through a touch LCD screen 

Stretch 

Build an app to control the product through smart devices and make it as user-friendly as possible. 

Zia McDonnold | Kielan McMillan | Danielle Nastyn | Vergin Mansour 30

31 of 44

Breakdown

Software Components

Software process

Power

ON

OFF

Controller/LCD

Sensor readings

Turning the system On/Off

I/O

Nextion

Touchscreen

APP (Stretch Goal)

Code

Notification

User preference and configuration

Testing Software

Reprogram

Test Functions

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 31

32 of 44

Code Planning

Software Design

Zia McDonnold | Kielan McMillan | Danielle Nastyn | Vergin Mansour 32

Skeleton Code

Nextion Code

Arduino --> LCD

Arduino --> Photodiodes

Arduino --> Thermal Camera

Arduino--> Laser

Update Nextion Code

Include Libraries

    • Initialize sensors
    • Declare Nextion Objects

Program the layout

    • Text
    • numbers
    • buttons

Register a button object to the touch event list

Register a button object to the touch event list

For the

&Photodiode,

Register a button object to the touch event list

ThermalCam,�

Register a button object to the touch event list� &Laser,

Update Nextion Code

Pseudo Code

33 of 44

LCD screen

Using Nextion Program, we were able to simulate the interface on the LCD as well as program the different functions of the buttons.

Software Design

Draft Design to Final LCD design

Zia McDonnold | Kielan McMillan | Danielle Nastyn | Vergin Mansour 33

34 of 44

Requirements

Software Design & Components

Goals 

Description 

Main 

Program the microcontroller, sensors, and buttons to make sure the actual product is functional  

Advanced  

Have the machine operate through a touch LCD screen 

Stretch 

Build an app to control the product through smart devices and make it as user-friendly as possible. 

Zia McDonnold | Kielan McMillan | Danielle Nastyn | Vergin Mansour 34

35 of 44

Administrative Information

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 35

36 of 44

Budget and Financing

System Components

Budgeted Costs

Actual Costs

Optics

$175

$169.20

Electrical Hardware

$175

$92.94

Optical Hardware

$250

$215.12

Hardware

$40

$23.38

3D Printing Material

$30

$25

Housing & Water Tube

$75

$62.60

Test Components

$20

$8.32

Total Costs

$765

$583.58

Financing

Monetary Amounts

Total Personal Contributions

$583.58

Total Awards

$400

Final Personal Contributions

$183.58

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 36

37 of 44

Work Distribution 

System Design 

Danielle Nastyn:

  • PCB Design
  • Hardware Ordering 
  • Component Testing 
  • System Troubleshooting

Optical Design & System Housing

Kielan McMillan:

  • Optical design
  • Optics and Hardware ordering 
  • Budget and financing
  • 3D print designs

Zia  McDonnold:

  • Optical design 
  • Housing design
  • Custom water tube design
  • 3D printing 

System Software

Vergin Mansour

  • Coding
  • Component Calibration 
  • User interface on LCD
  • User interface through a notification App (Stretch Goal)

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 37

38 of 44

Design Issues

Optical Design Issues

  • Water tube optical path length of 6 mm not long enough for sensitive algae detection
  • Chosen photodiodes are not sensitive to red light  

Hardware Design Issues

  • Laser pointer overheats and loses optical power after 3 minutes of continuous operation 

Software Design Issues

  • Compiling errors
  • Must align the components to work correctly with the hardware components
  • Missing Libraries

Solutions

  • Design custom square water tube with internal optical path length of roughly 25.4 mm 
  • Borrow Second set of photodiodes from undergraduate optical lab

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 38

39 of 44

Developing Issues

Optical Design Issues

  • Thermal camera required more dynamic memory than our microchip can supply

           

Hardware Design Issues

  • Laser pointer overheats and loses optical power after 3 minutes of continuous operation 

Software Design Issues

  • Code worked perfectly as well as it compiled and verified then correctly was uploaded to the microchip successfully and printed the right values into the serial monitor, however when connecting the Nextion display the values are not changing in their respective place even though the code for the display is correct and was tested before and worked.

Microchip became faulty and had to switch the whole setup to a different microchip in the last second .

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 39

40 of 44

Project Progress: Update

  • Electrical components have been isolated and tested.
  • PCB has been designed and soldered for voltage regulation.
  • Gravity syphon has been designed and constructed.
  • Initial system testing has been completed.
  • Software design and code has been completed and successfully complied and printed the correct values for Test PhotoDiode, Control PhotoDiode, and light absorption as well as turning the laser on and updating the values constantly
  • LCD is having issues reading multiple values from the Arduino
  • Thermal Camera requires too much dynamic memory

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 40

41 of 44

Conclusion

Research

Design and building process

Implementation

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 41

42 of 44

Questions

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 42

43 of 44

Group 1

Fish Tank Assistant

Zia McDonnold | Kielan McMillan

Danielle Nastyn | Vergin Mansour 43

44 of 44

Software References