Skip to content

eDNA updates

Bao Nguyen edited this page Jan 13, 2021 · 92 revisions

eDNA - PolyWAG Updates

Jan 2, 2021 - Un-expected wake up from sleep

Author: Bao Nguyen

  • eDNA logic board will wake up with a gentle tap on the acrylic case
Show More

On today's electronic test, a gentle tap on the acrylic case is enough to wake the machine up. The machine also wake up when a sensor is being disconnected or connected.

Suspect, there is a floating pin on wake logic, or the coin-cell is loose causing the RTC to reset. Or the voltage level is too close to the border which allows noise to change the state of the system. A board that has been testing for 3 months, there is a 0.1uF cap across CLR! and GND. This was thought to reduce noise. This board will get swap into the current electronic to see if this solution fixed the issue.

0.1uF extra cap

Solution: Add 0.1uF cap at drawn location help reduce the random wake-up noise to almost completely


Jan 1, 2021 - Reduce motor wire radiation

Author: Bao Nguyen

  • Solution to run motor power wire near dataline
Show More In the previous update, I was just looking at the noise generated on the 12+ power rail by the motor. This noise propergate through the 5+ buck regulator and also our 3.3V linear regulator. The noise was measure at different GND point with the same waveform, this indicate that GND wasn't shifting but it was the 12+ rail shifting up and down. Please check out the previous update for the best motor prep solution.

In this update article, we will loke at different motor power cable to see their effect on electro/magnetic radiation on near by electronic, in our case is I2C data/clk lines.

The test was performed at home so there wasn't waveform result but only pass/fail from each run cycle. The testing sequence include the motor turn on, intake water valve on, and filter valve sequently turn on from valve 0 to 23 (24 valves total). At the same time, sensors data will get updated through WiFi to a computer every 1 second.

  • A pass is when the system run through all 24 valves without hanging

  • A fail is when the system hang halfway, server no reponse

Here are the list of the test performed:

  • Test1: Parallel conductor, underneath sensitive dataline
  • Test2: Parallel conductor, 1 cm away sensitive dataline
  • Test3: Parallel conductor, 4 cm away from sensitive dataline
  • Test4: Twisted pair conductors, underneath sensitive dataline
Test number # of test Pass percentage
1 3 0%
2 3 66%
3 7 85%
4 10 100%

Solution: Twisted pair with capacitors


Dec 21, 2020 - DC motor noise on 12V line

Author: Bao Nguyen

  • Electrical noise found in some eDNA and COVIDsampler motors
Show More
  • Reported issue: COVIDsampler would experience a system hang and I2C pressure sensor reading out the wrong value
  • Tested issue: eDNA 2.0 with one of the wrapped-up motor see a higher amount of noise from the 12V rail when brushed DC motor start. Noise then reduces in normal operation but the pk-pk value is often more than 10% of the rail voltage.

We first gather the waveform of all of the power rail on the system including:

  • 12V: come from the battery terminal.
  • 5V: output of buck converter 12V->5V, input cap 10uF, output cap 47uF
  • 3.3V: output from Feather M0 onboard regulator (SPX3819), LDO, input cap 10uF, output cap 11uF

At the H-bridge, there is a 0.1uF ceramic + 470uF electrolytic cap. There are 3 more 470uF caps at further distance for 12V solenoids.

H-bridge set up

Initial waveform

12V rail - when motor start


5V rail - when motor start


3.3V rail - when motor start

As we can see that the shape of the waveform is the same overall voltage rail. This is suspected that voltage change in the 12V rail is to fast for the 5V and 3V rail to respond. Would this due to bad grounding and the GND potential is different at different locations of the board? Further tests in Test 2 shows that there are no differences in the waveform when the GND reference for the scope is next to the H-bridge or on the micro controller far GND.

Test 1: Adding more capacitor for H-bridge decoupling

Added 220uF electrolyte and 22uF ceramic cap

Result: No significant difference in all waveform

Test 2: Moving power input next to the H-bridge (T configuration)

Battery V+ (yellow jumper wire), Battery V- (blue jumper wire)

Result: Minimal difference, might just due to measurement noise.

Test 3: Add a fast switching Schottky diode at 5V buck regulator input cap

This solution was suggested by Andy aka on the StackExchange post.

Diode before input cap for 5V buck


12V waveform - Diode before input cap for 5V buck

Result: Minimal difference, might just due to measurement noise.

Test 4: Checking motor for Terminals-Case capacitors

Motor capacitor configuration


Motors that did not prepared as planned


Motor with 3x 0.1uF capacitors, 18AWG wires no-shielding


Before: 12V Waveform - Motor with 1x 0.1uF capacitors, 18AWG wires no-shielding


After: 12V Waveform - Motor with 3x 0.1uF capacitors, 18AWG wires no-shielding

Result: We can see that there was a major improvement from 800mV pk-pk to 120mV pk-pk. The capacitor configuration is supposed to be like this but due to a mistake, we forgot to add the side capacitors.

Test 5: Shielded 22AWG wire, GNDed shielding

The two conductors have a thin foil wrap around that can act as the shield. One end of the foil is soldered to the motor case, another hooked up to the GND next to the H-bridge. The capacitor still has 3x 0.1uF caps as in the previous configuration.

At the H-bridge, there is a 0.1uF ceramic + 470uF electrolytic cap. There are 3 more 470uF caps at further distance for 12V solenoids.

Shielded wire set up


22AWG with foil, GNDed


22AWG with foil, not GNDed

Keeping everything the same, return the system back to the 18AWG non-shielded wire

18AWG no foil

Conclusion: The best method of reducing input rail voltage fluctuation is to use all 3 0.1uF capacitors, one between terminals and two between terminals to the motor case. Using a large conductor also help with the noise and conductors shielding/GNDing is not recommended.


October 30, 2020 - Working flowmeter identified

Author: Bao Nguyen

  • New flow sensor testing shows exactly what we were looking for
Show More

We have tried multiple Thermal Mass Flow Sensors like this IDT mass flowsensor, and the Posifa Liquid Flow Sensor but the result was not within our spec. Here is the overall break down of the result:

  • Constant spike in reading: this is due to the pulsation of the peristaltic pump. However, feeding the water to a pulse dampener or changing the source to the lab faucet did not change much in the spike reading.

Posifa sensor reading

  • Slowly drifting average reading: we sample the data at the max speed of the device, then average them over 30 readings. The reading comes out much less spiky but we slowly see drifting in the average value over a short period of time.

We did not try to use the turbine flow sensor due to our expectation of high flow associate with this type of device. A quick google search yields a reading range in the order of 1L/min and above. Our current pump and filter need the flow to be around 100mL/min to 400mL/min. However, after trying a different kind of thermal flow sensor, we finally found a low flow turbine sensor that works for this low range and give us exceptional linear result over the range.

Let's not diving into too much detail, but this is the reading when the motor is hooked up directly to the flow sensor without any pulse damper. The sensor just works! We will soon incorporate this device into the eDNA Sampler as the last missing sensor piece for the whole system.


July 3, 2020 - New filter casing evaluation

Author: Bao Nguyen

  • Developing eDNA V2
Show More

The older filter design has posed some challenges for manufacturing, removal, and also filter paper extraction. It has too many parts and one has to be sourced from the ChemStore at Oregon State University. The connection to this scared part is also very weak and has failed in multiple units during normal transportation.

To address these issue, Alissa has designed a newer version that utilizes less 3D printed parts, more secured connection, and allow the filter to operate with the eDNA 2.0. The old design in on the left and newer is on the right.

Before we dive into the quick review, here is how we would refer to the filter casing: upper chamber and lower chamber. In normal sample, water would enter from the lower chamber, flow against gravity out of the one-way valve of the upper chamber. The filter paper will sit between these two chambers and will be obtained easily in extraction.

This is the major component of one filter casing (housing) before adding filter paper:

Pros: By adding another one-way valve on the side, we were able to remove all of the water in the lower chamber of the new design. In the preservation state, pure ethanol will be injected into the filter casing and mixed with any leftover water. Less water in any chamber means that we will be able to obtain higher alcohol concentration in preservation.

Cons: Water or Alcohol can drain through the lower chamber (not through the 2nd one-way valve) when the filter casing is removed in the same orientation (shown above). Quick inversion or whole machine inversion can prevent draining.

Added extraction steps: Remove filter casing from the machine and transfer it to the lab. Invert the filter and remove the lure-lock cap. Add a vacuum pump to the check valve of the Upper chamber. Draw water in this orientation.

All of the alcohol will be removed from the lower chamber to the upper chamber. The housing now can be cracked and there will be no splashing over the lab bench.

Next step: Cleaning method for these new filter housing?


June 26, 2020 - Steps to reduce cross-contamination

Author: Bao Nguyen

  • Developing eDNA V2
Show More A reduction ratio is defined as the concentration ratio of the solute (or DNA) between 2 adjacent filters. In our case, high concentrated DNA solution was pushed through the first filter, and the 2nd filter downstream just has clear water pushed through it. The concentration of DNA (or rhodamine dye) in the 1st filter over the concentration of DNA (or rhodamine dye) in the 2nd is the reduction ratio. For the version 1.0 of the sampler, we could get the reduction ratio in the neighbor of 10^6. However, we believe a higher ratio (lower cross-contamination) is needed for more cross-contamination usage.

Learning from the Senior Capstone team's result, some physical parts of the machine allow dead space, thus hold on to the previous solution. The 2.0 version is designed to address this issue by:

  • Using smaller inner diameter tubing, taking advantage of water's capillary action
  • Using a ball valve instead of a solenoid valve for water intake
  • Allow air to enter and purge tangential line between filter and mainline
  • Reduce the tangential tube length

Since rhodamine dye test is more cost-effective and faster, we are planning to run some rhodamine dye test with version 2.0 in the next 3 weeks. After that, if the system shows major improvement, a real DNA test might be performed. The pandemic has restricted our lab use for DNA analysis, but we are doing our best with the timeline while ensuring safety for all of the team members.

eDNA 2 render


February 19, 2020 - Next step for eDNA Sampler's developers

Author: Bao Nguyen

  • Further reduction in contamination concentration is needed
Show More

We had a great meeting with our Senior Capstone team last Monday to discuss the overall performance and result for the eDNA after multiple lab test. They have used the machine not only with dye but also real fish DNA to determine the level of cross-contamination in the system. Here is the link to their latest report Biweekly Memo 8.

The contamination are pin down to the Sample stage and the Decontamination stage.

  • Flush stage: the high internal pressure would push the new water up the off-shoot of all the valve. This lead to contamination at later runs.
  • Decontamination stage: the decontamination stage is introducing water droplet into offshoot. Remove the pressurization/depressurization in this state is expected to improve the result.

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.

Logic V3 System Current Sleep Mode = 118uA

Logic V3 System Current Wake Mode = 405uA

Sleep Mode Voltage @ D flip flop VCC = 2.290V

Wake Mode Voltage @ D flip flop VCC = 2.297V

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