Skip to content

eDNA updates

StephenMoreOSU edited this page Feb 13, 2020 · 92 revisions

eDNA - PolyWAG Updates

February 12, 2020 - Debug - Logic V3

Author: Stephen More

  • Fixed Wake up and Sleep mode bugs in Hardware
Show More

`Issue: Pulling RTC_INT to ground did put the system into sleep mode, After shorting RTC_INT to RTC_Read change was made, the voltage at 2.2VCC input of D flip flop would drop below 2V after RTC_INT was pulled to ground.

`Solution: Shorting RTC_INT to RTC_Read, removing the 30k resistor between them, changing the resistor values of 128k to 100k and 30k to 39k.

The 30k resistor between RTC_INT and RTC_Read was creating a voltage divider between the 3.3V from the M0 feather. This caused the threshold voltage not to be met for the falling edge needed to send the system into sleep mode. This was fixed by simply shorting RTC_Read and RTC_INT which removed the voltage divider.

To fix the issue with the 2.2Vcc node dropping below 2V during RTC_INT being pulled to ground was solved via changing the resistance values controlling the voltage divider. This caused the voltage at the node to go from ~2.29 to ~2.14 during RTC trigger. This keeps the voltage above 2.1V which makes the system less likely to loop through wake up and sleep mode.

| Prototype Logic Module V3 | |---------|---------------| | Logic Module V3 Prototype |

Wake Mode Sleep Mode
Logic Module V3 Wake Mode Logic Module V3 Sleep Mode

February 10, 2020 - CAD Assembly

Author: Alissa Bergquist

  • Creating the Majority of a CAD Assembly of eDNA
Show More

Issue: There was not a full assembly created for the eDNA project. There were already several parts created, but they were completely disorganized and not put together.

Solution: Making a single folder containing all components used in the Assembly, and beginning to create a full project Assembly

The eDNA project shares the same folder in fusion360 with the water sampler, and so everything was mixed together and in 10 different folders. To fix this we went through every folder to sort out which parts go to the eDNA project, and moved them into their own folder. Additionally, many of the parts did not have their own CAD file, so several parts were created and added to the entire assembly.

The assembly is not completely finished yet, it's missing a bit of tubing, but all major components excluding electronics are present in the assembly.


January 2, 2020 - Debug - Power 7.3

Author: Bao Nguyen

  • Flipping the logic for D-flipflop output
Show More

Issue: The D-Flipflop was unable to turn on/off the regulator with Shutdown/RTC trigger. The output of the FlipFlop was wrong for the LMR16006Y.

Solution: Place an low-power inverter at the output of the Flipflop

Providing the LMR16006Y with 12V power supply, we got 5.0V as expected at the output. With 12V input (measured current), 5V output:

  • At no load => I = 0.38mA , regulator switching frequency is 2.48KHz
  • Shutdown => I = 97uA, regulator off

For the SN74AHC1G04DBVR inverter, current draw when its output is LOW is close to 0uA (too low for our multi-meter). Near 1.2 uA when its output is HIGH:

No load Shutdown Mode
Noload Shutdown

November 18, 2019 - Testing result for Logic Module - Power 7.3

Author: Bao Nguyen

  • MicroSD , RTC, and power regulator work!
Show More

Moving away from the bulky LM2575Sx-5.0, we just finished short term testing for LMR16006Y, with no load and near max load continuously. Providing the regulator with 12V power supply, we got 5.0V as expected at the output. With 12V input, 5V output:

  • At no load => I = 0.38mA , regulator switching frequency is 2.48KHz
  • At 12ohm load => I = 0.26A
  • At 10ohm load => I = 0.49A , regulator switching frequency is 1.96MHz

The regulator response well with different load by changing its frequency up to 2.1MHz. Along with the D-flipflop design, the system shows lower sleep current in compare to OpenSPower V7.2

Improvements

  • 85% efficiency with 12V input at 100mA load (V7.2 was 77% eff)

  • Without Power Module: Sleep current 104uA (V7.2 was 130uA), 20% improvement in power saving.

  • With Power Module attached: Sleep current 123uA (V7.2 was 170uA), 27% improvement in power saving

  • Less than 30% of previous footprint (in comparision to V7.2)

Older version of Logic Module. Power 7.2

No load Shutdown Mode
20191118_131751 20191118_131928

The board is later tested with SD card and RTC DS3231 example script, and passed with flying color.

Front Back
20191118_162652 20191118_162700

20191118_150804

Reference: TI - Benefits and Challenges of High-Frequency Regulators


November 15, 2019 - Testing new voltage regulator for eDNA Logic Module

Author: Bao Nguyen

  • Reduce total height of the pcb
Show More

The previous voltage regulator was a bit bulky and overpower. The LM2575Sx-5.0 was rated for 1A continuous, but provide less than 78% efficiency at 100mA normal draw from the Feather. The old design also use large inductor, as well as capacitors that increase the total height of the system.

To fix this issue, a smaller regulator (LMR16006Y) is chosen for testing. It has smaller footprint and higher efficiency (> 85%) at 100mA load with 12V input. Switching frequency is also higher 2.1 MHz in comparison to 47 KHz for LM2575SX-5.0. Higher frequency mean smaller package size, as well as improved load transient response.

Reference: TI - Benefits and Challenges of High-Frequency Regulators

image


October 8, 2019 - Focusing on eDNA cross-contamination testing

Author: Bao Nguyen

  • Getting help from senior capstone team for lab and field testing
Show More

It is great news that a senior capstone team accepted to assist the project with testing. Due to the cost of testing the machine with real DNA, the first phase of lab testing would use fluorometer and dye to determine cross-contamination between filters. The testing plan and procedure will be updated later.

In the meantime, the lab would make another copy of the machine to accommodate for testing and continuous development of eDNA. This would give us a chance to establish a good build guide for documentation.


October 2, 2019 - eDNA Software Update 2

Author: Kawin Pechetratanapanit

  • Next version of our most popular eDNA control center and server software
Show More

We are pleased to introduce the next version of the eDNA interface, a browser-based application for programming the sampler. The interface is completely redesigned from the ground up with guaranteed supports for Chrome and Firefox. In this version, the user is now able to plan and schedule multiple tasks ahead of time, as well as, using task objects to configure state machines. The stability of the microcontroller is now much-improved thanks to hardware and software refinements.

User Interface

  • Design overhaul
  • Task scheduling (currently up to 4 tasks)
  • Ability to configure state settings (flush, sample, dry, etc.)
  • Real-time status update with support for pressure, temperature, flow, and barometric sensors
  • Live display of onboard RTC time keeper
  • Bug fixes and general refinements

Server

  • Task scheduling (currently up to 4 tasks)
  • Automatic shutdown when not in use for energy saving
  • Web server now operated under power saving mode by default
  • Transfer speed improvement
  • REST APIs for task manipulations
  • Logging to SD card
  • Bug fixes and general refinements

September 18, 2019 - New piping part

Author: Bao Nguyen

  • Newly installed main pipe with different connectors
Show More
Old design

The old design with parallel piping for the main pipe leaks a lot. Bao is tired of fixing the leak as it will randomly shift the leak elsewhere after replacing the part. Because of this, the main pipe is taken apart and replace with the cross connector that we found on Amazon. With this new connector, we are able to archive the highest pressure our pump can generate without any leak. Thanks to Hadi for your awesome assistance.

New design

September 6, 2019 - Pressure Sensor

Author: Bao Nguyen

  • Flow sensor works only if the inline pressure sensor is disconnected. Fixed by swapping out another pressure sensor
Show More

Flow sensor was tested before integrating the eDNA sensor system. However, issue arose yesterday when we try to integrate flow sensor with the rest of the system. The system did not hang like I2C issue but we always get max data from the flow sensor. The pressure sensor worked regardless of the flow sensor connection, but the flow sensor only worked if the pressure sensor is disconnected. We tested the flow sensor separately on a breadboard and was able to get normal data but fail immediately the pressure sensor is connected with the circuit. Unable to identify the source of conflict, we decided to swap the pressure out with an older one we have in stock. Everything works again as expected and we continue with the next cross-contamination test. The pressure sensor might fail due to multiple re-soldering.

Fail pressure sensor

August 30, 2019 - Latch Valve

Author: Kawin Pechetratanapanit

  • Unexpected findings regarding our latch valve: It's a directional one-way valve?
Show More

We have been using a latch valve to lower the power consumption of eDNA sampler. This type of valve can be opened/closed without needing a constant supply of power. However, unbeknown to us, the latch valve in our system is actually directional one-way latch, not simply "open and close" like we previously thought. The manufacturer website doesn't mention anything about this behavior, and it did cost us a little bit of time as we were trying to figure out why we couldn't reverse the pump.

Pulsing the red wire for 50 ms sets the latch valve to intake mode. Pulsing the black wire sets the valve to outtake mode.

Note that you would never notice this problem unless you reverse the pump direction, which is required as part of our decontamination procedure.

shift.writeLatchIn(), shift.writeLatchOut()


July 26, 2019 Filter - 5th State

Author: Bao Nguyen

  • Decontamination is crucial to reduce cross-contamination for different sample. The eDNA use pressure-depressure method
Show More

Andrew and I were playing with pressure in the system as a whole and we have come up with some interesting behavior. If there is a tiny bit of air between the filter valve and the main pipe, the air would get squeezed to the left and the water would move in closer to the valve. When the main pipe is depressurized, the air would expand so fast that it would force the water out of the connector tube and down to the mainline.

In the current operation protocol, after preservation, the connector pipe would be filled with alcohol and may introduce contamination for the later run. The first solution we have come up with is creating a difference in height so that gravity and alcohol weak surface tension would slowly drain the alcohol down to the main pipe. However, the alcohol still remains in the pipe after the mainline is cleaned with air. The second solution adds extra steps to the first solution. We would inject a bit of air into the connector tube by pushing the alcohol up into the filter. The system is then pressurized and depressurized twice. This would force the alcohol out of the pipe into the mainline.

Proposed 5th step - Decontamination:

  1. Open flush valve, run air through the system.
  2. Close flush valve, open filter valve, pulse the motor for very short period of time
  3. Close all valve, run the pump for 4 seconds (pressurization) and wait for 3 seconds.
  4. Open flush valve
  5. Repeat step 3 and 4 twice

July 19, 2019 Filter - New Filter Setup

Author: Kawin Pechetratanapanit and Bao Nguyen

  • New design for inverted casing that will fully submerge filter in alcohol
Show More Kawin and I just completed a new filter set up and ready for more testing. Here are some development notes that had in the past month.

Problem:

The filter, when oriented in the upright position as shown below provides better air drying capability. However, as we have demonstrated, the alcohol would flow right through the unclogged filter. This problem motivated us to explore other alternatives.

One design adjustment we have come up with involves inverting the filtering unit. However, this design consideration poses another challenge: The remaining water in the filter casing would dilute the high concentration of alcohol. So how exactly do you get water out of the filtering unit?

Our solution is to use a 3D printed mass to displace the unwanted volume inside the filtering unit. This reduces the amount of water retained in the filtering unit after the sample state, which ensures that the concentration of alcohol when injected in the preserve state is at its maximum.

Filter Orientation

Attempt 1: We try to fill the air gap with ABS printed design. A vial septum is also added to act as a weak check valve. It took us many fail designs to get to the tight fit version.

Fails - Graveyard Bad Check Valve

After getting the right fit, we tried 3 different cuts for the septum: one poke, one slit, cross-cut. The pressure built up for the one poke and one slit was too high and the cross was just too loose to hold alcohol in.

After more test will the 3D printed design and a real check valve that we have on hand, we found out that the check valve was bad. The solution wasn't staying in the system when the check valve supposed to close on its own.

Attempt 2: We found a more expensive but better check valve on McMaster-Carr. This combine with the current 3D printed part seems to retain alcohol regardless of the orientation after removal. A small tube was inserted in the casing to control the thickness of the alcohol layer on top of the filter. Here is the final looks and parts:

Complete Filter Unit Parts

July 8, 2019 Filter - Web Interface

Author: Kawin Pechetratanapanit

  • Sneak peak of the eDNA brand new web interface
Show More

I'm in the process of writing up a new version of web interface and would like to ask you what functionalities I should prioritize first. Here are some things I have considered (some of these are already implemented):

  • Set Real Time Clock via the Web Interface (UTC and Local): This is to ensure that the sampler have accurate timings/date
  • Display live status
  • State selection
  • Independent valve selection: Being able to select individual valve (or batch) is useful for task planning
  • Task planning: The ability to schedule a task at the a specific date and time

Please feel free to request any feature that you guys think would be highly beneficial to the eDNA and environment science communities. Also, what should be configurable for each state? Right now I have time-limit, pressure-limit, and volume-limit.

Peace out,

Kawin Pechetratanapanit

YouTube


June 29, 2019 Filter - Alcohol Issue

Author: Bao Nguyen

  • The filter, when oriented in the upright position as shown below provides better air drying capability. However the alcohol would flow right through the unclogged filter.
Show More

Problem

Dr. Taal and I just went on the first field test for the eDNA. The website and the tubing worked without any leak. We weren't able to reach 10 psi even though the total filtered volume was more than 1.3L. With the filter was not completely clogged, the alcohol did not retain in the filter. The filter used for the field test is also larger in pore size in comparison to the one we have before.

When the machine is first designed, we were always aiming for the filter getting clogged before injecting alcohol. However, in clear water, the filter failed to reach stop pressure and was stopped with a timeout. With little sediment on the filter, the alcohol just went through in preservation step.

Possible solution

In the next week, we are planning to test a new filter orientation and design. Originally, I have an idea about inverting the filter, then the water/air/alcohol can be pushed from bottom up. However, this design does not allow us to dry the filter and the alcohol solution will get diluted. A solution to that problem is getting rid of all of the air gap in the filter casing. I have talked to Dr.John, and he suggested me to use silicone to fill the larger gap. The smaller gaps will be tested with just a straw and see if the design will perform well under pure ethanol.

So the plan for next week and the week after that is to made and test the new filter orientation/design. Inverting the filter will let us keep the filter fully submerged in alcohol and no contact with air.


May 16, 2019 I2C Communication and Motor

Author: Bao Nguyen

  • Noise from motor has corrupt pressure sensor communication. Adding suppression circuit and moving the motor away from pressure sensor help.
Show More

As Kawin was mentioning in his post, our wire library is not robust enough to recover from broken I2C protocol. This leaves the I2C bus hanging and waiting for the response from the slave, thus just freezes the master.

The interference was identified as from the motor electrical noise. This noise can affect the sensor reading and communication even if the motor is in its own isolated circuit. I did some research online and found some information about the suppressor circuit for DC motor. The first level is just adding capacitors, and the second level is adding a ferrite bead for the power cord.

When we were looking at the failing of the pressure sensor, the motor wires were very close to the sensor (in space), but not on the PCB. Each test is running the motor over 3 intervals (sampling, dry, preserve), with the sensor constantly update its data. A fail run is when the feather fails to update the sensor data via the web interface and refuses to shut off the motor after 40 seconds.

With only capacitor and motor wire near by the sensor, the success rate was nearly 0%. By moving the wires away, I was able to achieve a 50% success rate for the I2C bus. And by adding the ferrite bead across the terminals, the success rate is 100%. Each variation is tested for at least 10 times. The test report is included below.

Test result Pressure Sensor Motor with suppressor

I got this idea from StackExchange , GM3 Noise Suppressor, Polulu


May 9, 2019 I2C Freezes

Author: Kawin Pechetratanapanit

  • Fail communication will keep I2C line hanging and freeze the master
Show More

Long wire in I2C line, or external interference can cause the I2C bus to have faulty communication thus keep the master waiting for response from slave devices. We start to have this issue when placing the sensor around 3 feet away from brushed DC motor.

From my research, I2C freezing is a big problem all-around, but for some reason, the problem doesn't get publicize that much unless you search for it. Here is a link to StackOverflow post (I have found 20+ websites and posts of the same problem all over the net). Specifically, there is an infinite loop in Wire.h that checks for the acknowledgment bit from the slave device. If the device is damaged for whatever reason, the loop will not break and hangs forever.

It seems like this is an open problem for Feather M0 which uses Atmel SAMD21. There is no non-wire.h dependent library for I2C protocol that implements timeout for Atmel SAMD21. So unless the hardware is super solid (which it's not), failure is is going to happen eventually.

Here is what I found on Adafruit forum:

You seem to have hit upon a dirty little secret of the arduino Wire library: it does not implement any sort of timeout in requestFrom. At a low level, the library uses an interrupt service routine to manage the I2C communication sequences. At a higher level, the library assumes that some sort of interrupt will always occur, notifying it of either a successful completion or an error. And so it simply loops and waits for that to happen.

eDNA has not found a solution to recover the master from faulty I2C communication.


April 30, 2019 WIFI, TPIC and Programming Mode Switch

Author: Bao Nguyen

  • Physically preventing Feather from going to sleep and using latching solenoid valve to reduce power consumption
Show More

We have made some solid process since week 4. Bugs on hardware and software are slowly identified and fixed. originally, the WIFI module and the TPICs were sharing the same SPI pins. This has resulted in only once component can be used in one specific code, either WIFI or TPICs. By separating WIFI pins completely from TPICs pins, we are able to run both of them at the same time. However, this takes away two more pins from the Feather. With the rewiring, we have the WIFI, TPIC, and motor all working as expected.

Future development on the hardware include rewiring the TPIC, and also the motor to free pin 13. Then we are planning to add one WAKE/NO SLEEP switch to manually wake up the Power Board while keeping the SQW of the RTC functional. The sketch is included below. We are also planning to use a latch valve for the water intake to reduce power consumption. This valve will need to be driven by an H-bridge. To reduce the number of pin use, this H-bridge would be driven by the first TPIC since we still have 6 more registers available. The sketch is also included below.

The TPIC when activated will sink current (ground the pin, active low), but the H-Bridge is active high. To accommodate this, we add inverters to flip the logic. This two inverters will be power with 5V, which will be switched off when the Feather is as sleep.

This post is development note. Actual product will depend on later update.


April 24, 2019 Hardware update

Author: Bao Nguyen

  • Motor noise, turn on when boot, WIFI fail when connected to PCBs
Show More

Hi team, it took us a while to find a different part for the eDNA filter module. The main goal is to find a product that exists on the shelves, affordable, and more important is alcohol tolerant.

For the filter module, we are close to finalizing the design after one more lab test under pressure. The previous test showed that the failure point is at 15 psi with the filter rubber cover as the weakest link. This max pressure can be improved with tighter 2 inch PVC pipe coupler. The pressure sensor was hooked up directly to the main PVC tubing with a little leak at more than 15 psi. All the piping is considered to have high alcohol tolerance, except the peristaltic tubing inside the pump that has not been tested or looked at.

For the motor, it is the one we found on Amazon and run on 12V. The max pressure the pump can generate is 30psi, more than what the system is rated for. This gives us more room to increase the max pressure as needed for the whole system. DC motor noise on power line has been fixed thanks to Mitch Nelke. However, the lab has not encountered noise from separate power source. Upon order, the pump when running from a separate power supply, would shut off the feather M0 with pressure sensor if nearby. I was able to reduce this effect drastically by adding more capacitor between the motor leads.

Valve mount is designed for 3d print with the Fusion 3. The T tube connector mount is laser cut. These design consideration will reduce the cost and time of manufacture.

Problem arises when testing existing hardware:

  • Fields from the pump are enough to shut off the Feather with sensor
    • Fixed: 5 capacitors were added. And motor went through constant run for 3 hours so that the brushes shaped into the roter.
  • H-Bridge get hot when driving 12V motor
    • Fixed: Remove the biggest capacitor from the motor. Current from H-bridge was charging the capacitor instead of starting the pump
  • Wifi module send corrupted data with new PCB connected
    • Fixed: Rewire the TPIC because the MOSI pin was interfering with the Wifi module
    • Update: MOSI was only a part of the interference. The source has been identified as the SD card. Removing the SD card reader allows orignal WIFI and TPIC wiring
  • The motor turns on when system boot up
    • Not fixed: The motor driver is connected to pin 13 - BUILD IN LED. This LED turns on at boot up, before the program start. This makes the motor runs for a short period of time. Rewiring needed

Here is my plan for hardware design/improvement/testing for the next 2 weeks:

  • Find a latch solenoid valve for the water intake
  • Finish the water/alcohol/air intake tubing
  • Complete the bare minimum design for a demo that would include:
  • New electronic
  • Able to pump in water/alcohol/air selectively
  • Full feature filter module
Clone this wiki locally