Handheld Water Tester

by jjpaez26 in Circuits > Arduino

21 Views, 0 Favorites, 0 Comments

Handheld Water Tester

IMG_6829.jpg
IMG_6830.jpg

Our project is a handheld water quality tester, utilizing the Arduino Microcontroller and a few other components! We would like this device to not only be interesting to build but also have a positive impact on the user and their community, hopefully leading to better water quality information.

Supplies

We used a variety of materials--both for the water quality device and our circuitry itself. Included below are lists for both the materials and tools we used throughout our entire design and creation processes. Each significant component is linked to where you can purchase either the exact or a similar item to what we used!

Materials List:

  1. Arduino Uno Mini
  2. Solenoid
  3. Perfboard
  4. RGB LED
  5. Diode
  6. Strain Gauge (Force Sensor)
  7. Battery Pack
  8. 4 AA Batteries
  9. IR Detector & IR Light
  10. TIP120 Transistor
  11. Button
  12. Jumper wires
  13. 2 Cups
  14. Syringe
  15. Clear plastic tube

Tools List:

  1. Sharp object for poking syringe
  2. Hot glue gun & glue sticks
  3. Soldering Iron

Devise Project Purpose & Goals

Screenshot 2025-01-29 at 9.38.24 PM.png

We went through a few iterations of thought over the overall design goals, and decided to center our device around the United Nations Goal 6: Ensuring clean water and sanitation globally. Our device aims to be a step in the direction of clean water for all. We also decided that our group goal is to create a simple device to allow people more access to water quality information.

Gather Materials and Tools

The next step is to assemble all the necessary materials and tools for the project. Start by identifying the components and categorizing them into inputs and outputs, grouping them accordingly. Review the materials and tools list to ensure everything is prepared and accounted for. Once everything is organized, proceed to download the necessary software in the next step.

Download Software

Screenshot 2025-01-29 at 9.53.27 PM.png

In order to run the programming of our Microcontroller the Arduino IDE will be needed. In order to download simply navigate to this page on the Arduino website and select the link for whichever computer type you are operating.

Select just download twice and the installation will begin. Open the installer and follow the instructions, installing the IDE to your applications folder. Finally, your Arduino program should be ready to open!

Create Circuit Diagram

circuit (1).png

This circuit diagram represents the setup for your handheld water pollution device. Here's a breakdown of how to wire it and test each component:

Arduino Connections:

  1. Connect the sensors and components to the appropriate pins on the Arduino Uno
  2. Pins: 13, 10, 9, 3, 2, A0, A4, A5
  3. Pins 10, 9, 3 are for the RGB LED
  4. Pin 13 is for the Solenoid
  5. Pin 2 is for the button
  6. Pin A0 is for IR Detector
  7. Pin A4 & A5 are for the strain gauge
  8. Ensure the power and ground connections are secure

IR LED and Detector:

  1. Wire the IR LED to ground and 5V on the Arduino with a current-limiting resistor.
  2. Connect the IR detector to another digital pin to receive signals (A0)

Solenoid:

  1. Use a transistor to control the solenoid from a digital pin on the Arduino (D13)
  2. Include a diode parallel to the solenoid for back EMF protection

RGB LED:

  1. Connect each leg of the RGB LED to PWM pins through resistors, allowing you to control the color output (D10, D9, D3 pins on the Arduino)

Strain Gauge:

  1. Connect the strain gauge to the analog pins for reading weight changes (A4 & A5)
  2. Ensure proper voltage supply (use an amplifier if needed)

Testing the Circuit:

  1. Upload test code to the Arduino to check each component's functionality.
  2. Test each component after installation if possible
  3. Verify connections with a multimeter to ensure correct voltages and signals.
  4. Adjust as necessary based on test results.

Following these instructions and using the diagram, you can successfully wire and test your circuit.

Soldering the Board

IMG_6825.jpg
Screenshot 2025-01-29 at 11.36.53 PM.png

Starting with the Arduino microcontroller, make sure to plan out the soldering diagram (both the top and bottom of the board) before beginning any soldering. We started by first soldering in the pin headers for the Arduino. This ensures that we have secure connections for our jumper wires when connecting to the various components later on.

Next, we soldered power and ground rails on the protoboard. This establishes a reliable source of power for our components. Make sure to connect the positive rail to the 5V pin on the Arduino and the ground rail to the GND pin with wires.

Once the power rails are set up, move on to solder the Strain Gauge. Using a header with 6 pins we were able to solder the weight sensor onto the board. We ensured to test this with small bits of our code, first simply printing a weight measurement.

Next, solder the IR LED onto the board. Position it correctly, with the anode connected to the designated Arduino pin and the cathode connected to ground through a resistor.

Following that, we added the IR detector. Again, we double-checked the orientation and connected it to both the power and ground rails, as well as to an appropriate digital pin on the Arduino for signal reading. After, we tested the connection to both IR components by again printing the detector's readings.

After securing the IR components, the next step was to install the transistor for the solenoid. We placed the transistor and soldered the solenoid connections—one terminal went to the collector, while the other connected to the external power supply. We made sure to use a diode across the solenoid for protection against back EMF.

We then finalized the assembly by soldering in the RGB LED and the force sensor connections, ensuring correct placement and pin alignment based on our soldering diagram.

After each step, we paused to inspect connections and run quick test codes to confirm each component operated as expected. This approach not only ensured a clean build but also minimized troubleshooting later on.

With everything soldered and tested, we were ready to proceed to connecting the final components and uploading the main code!

Assembly Instructions

IMG_6824_2.jpg

In order to assemble the system the necessary materials will be necessary. 2 cups, hot glue, and cardboard are used in order to construct the system, in which the boards (motor + detectors) will be placed on.

First, glue the syringe into the cup, ensuring that the glue basically creates a seal around the entry and exit of the syringe into the first cup. Next, glue the plastic tube onto the tip of the syringe.

To prepare the cardboard, using an Exacto knife cut a strip of cardboard large enough to fit the cup, the solenoid, and the IR components. Hot glue the cup to the center of this cardboard. Next glue the solenoid (connected to your board of course!) to the edge of the cardboard, with the plunger of the syringe glued to the head of the solenoid.

Next, glue the second cup to the end of the tube from the first cup. Ensure that the hole for the second cup is near the top of the cup. After, glue the edge of the cardboard piece to the side of the 2nd cup for stability, and glue the IR components to the cardboard.

Lastly, glue entry hole for the tube to the for the second cup to seal it and the device is ready for testing!

Operating Instructions

Step 1: Powering Up the Device

Begin by connecting the external power supply to the device (battery pack), ensuring that both the Arduino and solenoid receive the correct voltage.

Once powered, the Arduino initializes and runs the setup code, getting the system ready for operation.

Step 2: Preparing for Water Sampling

Users fill the first cup/syringe with a water sample, ensuring the plunger is pulled back to draw in the water.

The device is equipped with a physical button to start the testing process. When pressed, the Arduino triggers the system’s operations and the solenoid begins pumping water into the tube.

Step 3: Measuring Initial Water Weight

Upon activation, the force sensor takes a reading of the weight of the syringe filled with water.

The Arduino tars the system to ensure accurate calculations by subtracting the initial weight from subsequent measurements.

Step 4: Activating the Solenoid

While the weight is measured, the Arduino activates the solenoid, causing the plunger to push the water through the exit tube.

This action forces the water towards the detection area where debris analysis will take place.

Step 5: Detecting Debris with IR Sensors

As water flows through the tube, the IR LED emits light across the flow path, while the IR detector measures any interruptions caused by debris.

The Arduino continuously counts the interruptions to gauge the amount of particulate matter in the sample.

Step 6: Providing Real-Time Feedback

While the system analyzes the water sample, it simultaneously activates the RGB LED, which provides real-time feedback based on water quality.

Different colors represent varying levels of particulate matter: green for safe, yellow for caution, and red for unsafe.

Step 7: Finalizing the Test

The system automatically stops when the force sensor indicates that there is no water left, or the user can manually stop the process by pressing the button again.

Upon completion, the Arduino calculates the concentration of debris per volume of water and signals the RGB LED to indicate the final water quality.

Step 8: Re-Initiating the Process

Once testing is complete, the solenoid retracts, allowing the syringe to refill with another water sample. Users can repeat the testing process as needed, making the device practical for multiple samples in different locations. By following these steps, users can effectively operate the handheld water pollution device, making water quality testing simple and efficient.

Potential Improvements

There are several potential improvements for the handheld water pollution device. One enhancement could be the incorporation of a display screen to provide users with detailed readings and analyses, including real-time data trends. Adding a data logging feature could also allow users to store and track water quality measurements over time, making it easier to identify patterns. Additionally, integrating a wireless communication module, like Wi-Fi or Bluetooth, could enable users to share results with others or upload data to a cloud-based system for further analysis. Lastly, refining the hardware used would be a huge improvement.

Using materials like 3D printed rectangles instead of cardboard as well as a stronger solenoid would greatly improve the system's capabilities and efficiency!