top of page

Week 3: Electrical Testing and Fabrication

j323yu
Mar 18, 2022
2 min read

During the third week of the term, our team began testing of a current divider circuit and the flow meter outputs to the Arduino board.


Flow Meter Testing and Programming


It is important to make sure the Arduino is reading the flow meter outputs accurately. During our work session on Monday January 25, 2022, we set up tests in order to verify the accuracy of the flow meter. A pump is being powered from a bench-top power supply for it to pump water from a basket, through the flow meter, and back to the same basket. The flow meter is being powered from the 5V pin on Arduino. The output of the flow meter is being probed by the oscilloscope and read by the Arduino at the same time.

Figure 1: Test Setup


The output from the flow meter is a square wave. Its datasheet provides us with a formula relating the frequency of the square wave to the volumetric flow rate of the liquid. We were considering two possible approaches to get a frequency reading using the Arduino. The first one was to feed the flow meter output into an interrupt pin and use interrupts to catch the rising edges of the square wave. The Arduino calculates and outputs a frequency reading every second. The second approach was to feed the flow meter output into a normal digital pin and use pulling. There's a built-in function in Arduino that returns the length of a pulse in its high/low state in microseconds. More information on the built-in function can be found below. For a square wave, adding the length of a pulse in high and low states gives us period. Thus, a frequency reading can be obtained for every period of the square wave.

pulseIn(pin, value)
https://www.arduino.cc/reference/en/language/functions/advanced-io/pulsein/

When using the interrupt approach, the oscilloscope read a frequency range of 36.73 Hz to 37.03 Hz and the Arduino returned a frequency range of 37 Hz to 43 Hz. When using the pulling approach, both the oscilloscope and the Arduino returned a frequency range of 36.5 Hz to 37.5 Hz. The pulling method yielded a more accurate result so it was selected as the approach for frequency readings.

Figure 2: Oscilloscope Flowmeter Measurements


The volumetric flow rate (Q) was then calculated using the formula from the flow meter's datasheet(https://media.digikey.com/pdf/Data%20Sheets/Seeed%20Technology/114991177_Web.pdf), where Q is in L/min. Using the values obtained from the pulling method, we should be expecting a volumetric flow rate between 54.5 mL/sec and 56.8 mL/sec.

Freq = 11 * Q


Figure 3: Arduino Pulse Frequency Measurements vs. Time


Figure 4: Arduino Calculated Flowrate vs. Time


Additional Data and Links






 
 
 

Recent Posts

See All
Fused System Testing

Once we had the mechanical, electrical, and software systems built, we started on the most exciting part --- fused system testing....

 
 
 

Comments


bottom of page