Skip to the content
PCBKitNew board
2 layers68.6 × 53.3 mmCPEG298 SMART MFC, the printed circuit board in 3D

SMART MFC IOT

Size
68.6 × 53.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
25
Nets
38
Pads
76
Tracks, vias
76, 0
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
1 Mar 2023
Updated
4 Sep 2023

Overview

CPEG298 SMART MFC is an open-source printed circuit board by MEarley, from the MEarley/Final-Project-CPEG298 repository on GitHub. It is a 2-layer board of 68.6 × 53.3 mm with 25 parts on 38 nets, routed with 76 tracks and 0 vias.

Its parts include 7 connectors, 6 resistors, 2 capacitors, 2 diodes and 1 IC. It belongs with the ESP8266 boards of this library.

README

README.md

Internet of Things Device for a Microbial Fuel Cell: IoT MFC

The purpose of this device is to measure the voltage and the surrounding environment of the said cell for research purposes.

Schematic of SMART MFC (KiCAD)

Screenshot

SMART MFC CAM

Front

Screenshot

Back

Screenshot

SMART MFC BOM

Screenshot

Arduino code

The entire Arduino sketch is divided into 3 main functions: setup(), loop(), and espData().

Note: There is also a very minor calculateVoltage() function. However, this is rather self-explanatory.

The setup() function begins by setting up the serial monitor and the ESP8266 to a baud rate of 9600. Using the ESP8266, it connects to the internet to access Adafruit IO using both usernames and passwords given by the user. After the ESP8266 has successfully connected to Adafruit, analog pins for the light sensor, soil moisture sensor, and voltage reader are set. In addition, the DHT20 is set up using the freely accessible library by Rob Tillaart.

Within the loop() function, the entire block of code repeats every ~5 seconds. This delay is due to the fact that Adafruit only allows a maximum of 30 uploads/minute for free. Using the analogRead() function from the Arduino library, the Arduino Uno collects data in relation to the light, soil moisture, and voltage levels. In addition, the DHT20 library is used to get the humidity and temperature values from the DHT20 sensor. After each reading, the data is transmitted through the ESP8266 to Adafruit where it can be graphically displayed. This loop() function also sets threshold values for the soil moisture level and the temperature values.

Within the espData() function, the given command and data are sent to the ESP8266 using Serial UART. After the data has been sent, the function waits for a response from the ESP8266. This leads to the function printing out the response within the Serial Monitor where it can be viewed for debugging purposes.

Libraries and Additional Sources

• Arduino.h

• Wire.h

• SoftwareSerial.h | Allows usage of two GPIO pins for a second UART

• DHT20.h | Allows for easier usage of the DHT20 ESP8266 Example program provided by Theo Fleck and Rick Martin DHT20 Demo code provided by library author Rob Tillaart

Adafruit Dashboard

Screenshot

Line Graphs

• Light Level | Displays the level of light over a given time interval time

• Soil Moisture Level | Displays the level of moisture in the soil over a given time interval time

• Voltage | Displays the voltage in millivolts of the MFC in a given time interval time

Circle Graphs

• Soil Moisture Level | Displays the current level of moisture within the soil with thresholds between 250 - 700

• Temperature | Displays the current temperature with a threshold between 20 - 55℃

Indicators

• Soil Moisture Level | Indicates when the current soil moisture level is over 250

• Temperature Level | Indicates when the current temperature is below 25℃

• Humidity Bar Graph | Displays current relative humidity

• Feed | Displays data messages between Adafruit and the ESP8266

Future Changes

In terms of redesign, the voltmeter on the reader still requires tweaking and is the only leading cause of concern. Its purpose in this project is to measure the produced voltage from a Microbial Fuel Cell, which in itself is like a battery having both a positive and negative node. The rise of concern comes from trying to read the amount of voltage produced by the said battery. The Microbial Fuel Cells, or MFC, that are being used in this report can range from 1 mV to 100 mV or more.

At first, I attempted to read the voltage directly using analogRead(). However, the voltage could not be read due to the voltage being too small. After further research, I came to the conclusion of two possible solutions.

Solution #1 is an op-amp with a high gain. However, with a capped supply voltage of 5V and a high range of 1-100+ mV, deciding an appropriate gain may be tricky. This would also require additional wiring and spacing for the PCB layout.

While Solution #1 has a more hardware approach, Solution #2 approaches the problem through the software and proved to be more successful to an extent. Solution #2 is what is seen in the current design: the calculateVoltage() function. This function changes the reference voltage from the default 5V to 1,1V. This allows me to measure the number of millivolts directly from the MFC. While experimenting with a standalone program and an empty Arduino board, this solution works fine. However, in practice, there are further complications. After connecting the MFC’s positive voltage to its corresponding analog pin and its negative terminal to GND, the introduction of this power source causes interference within the other sensors: most notably, the soil moisture sensor. Both the soil moisture sensor and voltmeter begin producing the wrong results at an extreme degree. My assumption is that the amount of noise generated in GND by the other components on the board is too much for the millivolts reader. To improve this design, I would first need to learn how to reduce/diminish the cause of this disruption.

Parts

25
QtyValueFootprintReferences
51000Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R3, R4, R5, R6
4MountingHole_3.2mmArduino_MountingHole:MountingHole_3.2mmMH1, MH2, MH3, MH4
3LOGOLOGOG***, G***, G***
12000Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
1AnalogConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ3
1CCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC2
1C_Polarized_USCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC1
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_VerticalJ2
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ4
1ESP8266-01ESP8266-01_ESP-01:XCVR_ESP8266-01_ESP-01U1
1LightOPL_Connector:HW4-2.0J7
1PowerConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1
1SoilOPL_Connector:HW4-2.0J5
1Soil MoistureLED_THT:LED_D5.0mmD1
1TempOPL_Connector:HW4-2.0J6
1TemperatureLED_THT:LED_D5.0mmD2

Questions

How big is the CPEG298 SMART MFC PCB?

It measures 68.6 × 53.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the CPEG298 SMART MFC use?

25 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the CPEG298 SMART MFC KiCad files?

From the MEarley/Final-Project-CPEG298 repository on GitHub, at the commit this page was made from: the board is CPEG298_SMART-MFC/CPEG298_SMART-MFC.kicad_pcb and its schematic CPEG298_SMART-MFC/CPEG298_SMART-MFC.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the CPEG298 SMART MFC design in my own project?

Its repository states no licence, so its author keeps all rights: ask MEarley before reusing the design.

Similar boards

  • 2 layers159.5 × 30 mmType f, the printed circuit board in 3D

    Type f

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    25 parts3kApache-2.0
  • 2 layers113.5 × 95.1 mmSweep high, the printed circuit board in 3D

    Sweep high

    davidphilipbarr/Sweep

    Sweep - a small promicro based keyboard inspired by the Ferris.

    25 parts2.1k
  • 2 layers58.4 × 114.3 mmPicoPedal, the printed circuit board in 3D

    PicoPedal

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    25 parts915
  • 2 layers54 × 15 mmXyp gpib, the printed circuit board in 3D

    Xyp gpib

    xyphro/UsbGpib

    Versatile, cheap and portable USB to GPIB converter (USBTMC class based)

    25 parts690MIT
  • 2 layers50 × 76 mmVoron 0, the printed circuit board in 3D

    Voron 0

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    25 parts397Apache-2.0
  • 2 layers237.5 × 102.9 mmStorage, the printed circuit board in 3D

    Storage

    jes/scamp-cpu

    A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.

    25 parts301Unlicense
  • 2 layers43.3 × 21 mmNanoS3 Carrier, the printed circuit board in 3D

    NanoS3 Carrier

    UnexpectedMaker/esp32s3

    Assorted files for my ESP32-S3 development boards

    25 parts296