V 1.1 Wi-Fi Aquaponic Kit

Transcription

V 1.1Wi-Fi Aquaponic KitSCLSDASCLHum ENCO2 ENCond ENpH ENAquaponics KitD.O. ENAtlasScientificTemp ENDatasheetSDAGNDSDA teBlueWhiteGNDTXDissolved UART SwitchConductivityOptional

Atlas Scientific does not make consumer electronics.This equipment is intended for electrical engineers. If you are not familiarwith electrical engineering or embedded systems programing, this productmay not be for you.SCLSDASCLHum ENCO2 ENCond ENpH ENAquaponics KitD.O. ENAtlasScientificTemp ENThis device was developed and tested using a Windows computer. It was nottested on Mac, Atlas Scientific does not know if these instructions arecompatible with a Mac system.SDAGNDSDA st and water splash proof)WhiteBlueGNDTXRXIP64Dissolved 2C/UART SwitchConductivity

Operating principleThe Wi-Fi Aquaponics kit has been designed to provide the engineer with a simple way ofremotely monitoring and controlling an aquaponics system's chemistry. Sensor datais uploaded to ThingSpeak , a free, cloud-based data acquisition and visualizationplatform. The Wi-Fi Aquaponics kit has also been designed to be easily modified by theengineer. Feel free to change the sensors or functionality of the device to meet yourspecific needs.OverviewCPUThe Wi-Fi Aquaponics kit is controlled using an Adafruit HUZZAH32 as its CPU.The HUZZAH is programmed using the Arduino IDE and uses an onboard ESP32 as itsWi-Fi transmitter. Adafruit HUZZAH32 datasheet.SDA SCL3VGNDRXTXSensor portsThe Wi-Fi Aquaponics kit PCB has 7 sensor ports. Three of the ports are electricallyisolated. The isolated ports are marked pH, Dissolved Oxygen, and Conductivity. Theisolated ports are needed to take noise-free electrochemical readings. Because the sensingelement of a temperature sensor is never in direct contact with the water, electrical isolationis not needed for temperature sensing.SDASCLSCLHum ENCO2 ENCond ENpH ENTemp ENAtlasScientificAquaponics KitD.O. ENPort 5 and 6 are marked Humidity and CO2. The terminal block marked Port 7 has beendesigned to connect one or more dosing pumps to the device. However, the port couldalso be used to connect a gas sensor.SDAGNDVCCI2C/UART d OxygenWhiteBluepHHumidityConductivity

PCBSDASCLSCLHum ENCO2 ENCond ENpH END.O. ENAtlasScientificAquaponics KitTemp ENThe overall design of the PCB is quite simple. The CPU is powered and programmedthrough the panel-mount USB connector. The CPUs USB pin supplies the board's powerbus with 5V.SDAGNDVCCI2C/UART d OxygenWhiteBluepHHumidityConductivitySDASCLHum ENCO2 ENTemp ENCond END.O. ENpH ENEach of the six main sensor ports have an enable pin, which must be set correctly to powerthe sensor. The enable pins are found here:The first three pins (pH, D.O and Cond) must be set low to power on the sensors.While the Temp, CO2 and Hum pins must be set high to power on the sensors.Truth tablePinStateSensor PowerpH ENLOWOND.O. ENLOWONCond ENLOWONTemp ENHIGHONCO2 ENHIGHONHum ENHIGHONSensor port 7 (the terminal block) does nothave an enable pin and can not be turned off.

On Board I2C/UART SwitchThe PCB has a built in protocol toggler which can be used to switch each of the sensorsbetween I2C/UART he EZO circuit in UART eBlueWhiteEZOBluedPlace an EZO circuit ontothe I2C/UART switch pins.I2C/UART eBlueRTDWhiteI2C/UART SwitchCO2WhiteI2C/UART Switch.is now in I2C mode.Data protocolThe CPU communicates with all peripheral sensors using the I2C data protocol. All datalines are directly connected to the CPUs I2C port. Using a different data protocol with thisDissolved OxygenDissolved OxygenpHisTemperaturepH encircuit boardnot possible.It is important to keep in mind that all Atlas Scientific components default to UART mode.When adding a new Atlas Scientific component to the kit, it must first be put into I2Cmode. Refer to the component's datasheet for instructions on how to switch it over, or usethe on board protocol toggler mentioned above.5Copyright Atlas Scientific LLC

Adding more of the samesensor or component typeSDASCLSCLHum ENCO2 ENCond ENpH ENAquaponics KitD.O. ENAtlasScientificTemp ENAdding additional components of the same type, such as an additional pH or conductivitysensor, is not hard to do. As mentioned above, you must set the device to I2C mode, andyou must make sure that its I2C address is not the same as the already existing component.SDAGNDVCCI2C/UART SwitchWhiteRXGNDTXRXGNDTXRTDBlueBlueWhiteCO2EZOI2C Address99 (0x63)I2C Address100 (0x64)VCCGNDTXRXGNDTXRXVCCGNDTXRXGNDTXRXDissolved C Address102 (0x66)I2C Address99 (0x63)Conflicting I2C AddressThis table lists the default I2C address of components commonly added to this kit.DeviceI2C AddressDeviceI2C AddressDeviceI2C AddressEZO pH99 (0x63)EZO EC100 (0x64)EZO CO2105 (0x69)EZO ORP98 (0x62)EZO RTD102 (0x66)EZO HUM111 (0x6F)EZO DO97 (0x61)EZO PMP103 (0x67)EZO PMP-L109 (0x6D)6Copyright Atlas Scientific LLC

Dosing pumpSCLHum ENSCLSDACO2 ENCond ENTemp END.O. ENAtlasScientificAquaponics KitpH ENAn optional external dosing pump can be added to the Wi-Fi Aquaponics kit.Using the SGL-PMP-BX is the simplest way to add on a dosing pump.SDAGNDSDA yDissolved OxygenpHBlueI2C/UARTSwitchConductivitySCLSDASCLHum ENCO2 ENTemp ENCond END.O. ENficpH ENA stand-alone EZO-PMP can be used instead of the expansion pump kit; however, youmust manually put the pump in I2C mode and remove the data cable connector.SDAGNDSDA SCLVCC3V7GNDCopyright Atlas Scientific LLCRXTX CHPD

Uploading sensor datato the cloudThe Atlas-Scientific Wi-Fi hydroponics kit has been designed to upload sensor data toThingSpeak , a free, cloud-based data acquisition and visualization platform. You will berequired to set up a free account with ThingSpeak to upload and visualize the data. Witha free account, you can upload data once every 15 seconds. A paid account lets youupload data once per-second; look here for more info about various ThingSpeak services.Atlas Scientific has no business relationship with ThingSpeak ; we just like how it works.If you want to use a different service, modify the device as you see fit.Setting up your Wi-Fi kitStep 1Connect Co2 sensor moduleThe CO2 sensor module has been removed to protect it during transport. Before youbegin setting up the aquaponics kit, plug it back into position.CO2sensor moduleWarning:Do not mix up sensor modules as each is calibrated to a specific EZO-CO2 device.8Copyright Atlas Scientific LLC

Step 2Setup a ThingSpeak AccountBecause the sensor data is stored / viewed on ThingSpeak, you will needto setup a ThingSpeak account. Create your ThingSpeak account by clicking HERE.Step 3Create a ChannelYour data is uploaded to ThingSpeak through a ‘Channel.’ Select New Channel9Copyright Atlas Scientific LLC

Fill out the highlighted boxes. (Be sure to click on the checkboxes to enable fields 2 – 6)For reference, this is what we entered.NameField 1Field 2Field 3Field 4Field 5Field 6Atlas SensorspHDO (mg/L)Temp ( C)EC ( μS/cm)Humidity (%)CO2 (ppm)Scroll to the bottom of the page and click Save Channel.10Copyright Atlas Scientific LLC

Step 4Get ThingSpeak API keysAfter you saved your channel settings, you will be redirected to your channel page.Click on API keys.Be sure to save your Channel ID and Write API Key we are going to need these, in thenext few steps.11Copyright Atlas Scientific LLC

Step 5AMake sure your Arduino IDE libraries are up to dateMake sure you have the correct path for the Esp32 LibraryIn the IDE, go to File PreferencesLocate the Additional Boards Manager URLS text box.Make sure this URL is in the /arduino-esp32/gh-pages/package esp32 index.jsonClick OK.12Copyright Atlas Scientific LLC

BUpdate the Esp32 boardIn the IDE, go to Tools Board Boards ManagerIn the search bar of the Boards Manager, lookup esp32.Update to the most recent version if you don’t already have it.(Version 1.0.5 in not the most recent version)13Copyright Atlas Scientific LLC

CDownload the ThingSpeak library for ArduinoClick HERE to download the latest version of the ThingSpeak library.Don’t unzip it!Import the .ZIP file into your Arduino IDE.To import the .ZIP file go to Sketch Include Library Add .ZIP LibraryDAdd the EZO I2C LibraryTo download the Ezo I2c library file, click HERE.Don’t unzip it!Import the .ZIP file to your Arduino IDE.To import the .ZIP file go to Sketch Include Library Add .ZIP Library14Copyright Atlas Scientific LLC

Step 6AFlash the Hydroponics meter with the correct codeSelect, open and adjust the code you want to use for your Wi-Fi KitFile Examples EZO I2C lib-master Examples IOT kits aquaponics kit15Copyright Atlas Scientific LLC

BFill in your Wi-Fi / ThingSpeak credentialsFill in your Wi-Fi name and Password, along with the Channel ID and Write API Key to thecode. (see step 3)CSetting up your pumpIf you do not have a pump attached, you can just skip this part. The code is ratherself explanatory. You set what parameters will trigger the pump to engage.16Copyright Atlas Scientific LLC

Step 7ASetting up the HUZZAH boardSet the target CPU to flashTools Board ESP32 Arduino Adafruit Esp32 Feather17Copyright Atlas Scientific LLC

BAdjust CPU SettingsMake sure the CPU settings on the Adafruit HUZZAH32 are correct.To adjust the CPU settings, click Tools.For reference, this is what Atlas Scientific set the CPU settings to.(your options may not be exactly the same, just try and match them as closely as possible.)18Copyright Atlas Scientific LLC

Step 8See the readingsOpen your Arduino serial monitor.(You must have the serial monitor set to the com port from the Adafruit HUZZAH32)Set to carriage return and 9600 baud.The Wi-Fi Aquaponics Meter will always attempt to connect to ThingSpeak on bootup.19Copyright Atlas Scientific LLC

If it cannot connect to your Wi-Fi you will see this:Entering the poll command will stop the Wi-Fi Aquaponics Meter from uploading thereadings to thingspeak, while you debug your Wifi problems.20Copyright Atlas Scientific LLC

Step 9Sensor CalibrationAtlas Scientific created a list of calibration commands that are built into the library.Type in help to see a list of commands.AThe poll commandSend the command poll; This will let you see the readings once per second and it will stopuploading to ThingSpeak while you calibrate.21Copyright Atlas Scientific LLC

BCalibrate pHWhen calibrating pH, you must always calibrate to pH 7 first.Remove the soaker bottle and rinse off the pH probe. Remove the top of the pH7.00 calibration solution pouch. Place the pH probe inside the pouch and let the probe sitin the calibration solution until the readings stabilize. This will take about 1 – 2 mins.AfterCalibration1 2 5ph:cal,mid,7UnstabilizedOnce the readings have stabilized,issue the Mid point calibrationcommand. ph:cal,mid,7StabilizedAfter 20 mins, the calibration solution inside anopen pouch is no longer considered accurate.SendDispose of the unused solution, after calibration.Rinse off the probe and repeat this process for both pH 4.00 and pH 10.00.CCalibrate ConductivityWhen calibrating Conductivity, you must always calibrate a dry probe first.Make sure that the probe is dry before issuing this command, ec:cal,dry22Copyright Atlas Scientific LLC

“Cal,dry”12,880µS12,880µS12,880µSOnce the dry calibration has been completed,placethe probe12,880µSinto a smallcup of the12,880µS calibration solution. Shake the probe to make sure you do not have trappedair bubbles in the sensing area. You should see readings that are off by 1 – 40% fromthe stated value of the calibration solution. Wait for readings to stabilize.12,880μS12,880μS7,728µS 7,728µS– 18,032µS– 18,032µS 0.00µS 0.00µScheck probe connection,you cannot calibrate to 0.Trapped air in sensingarea (shake to tabilized13,75613,756ec:cal,low,12880857434 ic.com/msds.html1,413µS /- 5 C25 C / 77 F F µS/cm C F µS/cmOnce the readings stabilize, issue the low pointcalibration command. ec:cal,low,12880(Readings will NOT change)8963086 1,5481050 1,0203595 1,7111559 1,14740 104 1,8602068 1,27845 113 2,0092577 1,41350 122 2,1585Send41Rinse off the probe before calibrating to the high point. Pour a small amount of the 80,000µScalibration solution into a cup. Shake the probe to remove trapped air. Again, the readingsmay be off by 1 – 40% Wait for readings to yright Atlas Scientific LLCOnce the readings stabilize, issue the high pointcalibration command. ec:cal,high,80000(Readings will change, calibration complete).

DCalibrate Dissolved OxygenLet the Dissolved Oxygen probe sit, exposed to air until the readings stabilize. (smallmovement from one reading to the next is normal).5 305 sec30 ilizedStabilizedSendOnce the readings have stabilized,issue the calibration command.do:calAfter calibration is complete, you should see readings between 9.09 – 9.1X mg/L.(only if temperature, salinity and pressure compensation are at default values)24Copyright Atlas Scientific LLC

ECalibrate TemperatureCalibrating the PT-1000 temperature probe is not required. However, if you want to,a simple method to calibrate the probe is to place the PT-1000 into boiling water. Thenissue command rtd:cal,t100 CElevation in meters305229152760-76-152Boiling point98.999.299.599.7100100.3100.5 C C C C C C CCalibration Complete25Copyright Atlas Scientific LLC

Step 10Almost done!Once you are finished with calibration, issue the datalog command to resume taking areading every 15 seconds and uploading it to thingspeak.To see the data on your phone, download the ThingSpeak app.Setup Complete!26Copyright Atlas Scientific LLC

The Wi-Fi Aquaponics kit has been designed to provide the engineer with a simple way of remotely monitoring and controlling an aquaponics system's chemistry. Sensor data is uploaded to ThingSpeak , a free, cloud-based data acquisition and visualization platform. The Wi-Fi Aquaponics ki