Over 2 billion people around the world lacked safe drinking water in 2020, according to the World Health Organization and UNICEF.
It's a global problem, but for Hrishikesh Bhandari, it's also personal: His mother fell ill after drinking contaminated water in a village in southern India last year.
To help tackle the problem, Bhandari and a group of friends started Saaf Water, an open source Internet of Things system that anyone can use to monitor groundwater safety around their home and in their communities. There are many water quality monitoring tools available for governments and businesses, but the Saaf Water team was built for everyone. “Typically information only goes to the authorities, not to the public,” Bhandari explains. Water purification systems are widely available, but different types of contaminates require different treatments. By providing better information about water quality and specific contaminants, Saaf Water hopes to help people make more informed decisions about what steps to take to ensure their water is safe.
Their platform—a WiFi and cellular-enabled device that can be mounted on many different types of pumps—is outfitted with sensors that gather data such as total dissolved solids, turbidity, pH, electrical conductivity, and temperature. The device uploads collected data to software in the cloud that analyzes it. When contamination is found, users receive text alerts, as the pump’s LED warning lights flick on.
The Saaf Water team, who met through an IBM internship for high school students in 2018, won this year's Call for Code Global Challenge. The competition gives developers a chance to experiment with new ideas and secure funding and support to scale those ideas into something bigger. This year's other finalists were Green Farm, a platform that matches consumers with local, sustainably-run farms; Honestly, a browser extension that helps online shoppers make ethical purchasing decisions; Plenti, a pantry management app that helps individuals and families cut back on food waste; and Scavenger, an app that keeps e-waste out of landfills by connecting people who need to dispose of old electronics with recyclers.
The challenge is part of a growing movement called Tech for Good—developers applying their talents to the world's biggest issues, like climate change, racial justice, and food accessibility. As with practically all software today, Tech for Good projects are built on open source. Every piece of the Saaf Water project, from its hardware to its web dashboard, relies on open source software and designs.
“Ground water safety is a global problem, so implementing a solution with the massive scale required to address it is not something a single NGO or a single startup can deal with alone,” Bhandari says. “With open source, we're able to work with a worldwide community of people to solve problems and implement these technologies in ways we couldn't on our own.”
Open source doesn’t just save them time and effort. It creates entirely new opportunities: Open hardware platforms and open source artificial intelligence and machine learning frameworks, for example, give communities the tools to tackle problems in ways they never could before.
“By using open source you are not limited by pre-written code,” says Call For Code Director Ruth Davis. “You get diverse perspectives from thousands of people around the globe. You're essentially bringing more points of view, more wisdom into your project.”
That's long been the case, of course, but by relying on this new wave of UI tools, these libraries make it possible to build rich, cross-platform user interfaces quickly and easily. “Using React Native, you can even build native applications for smartphones and tablets,” Krook points out.
Global Challenge finalists Plenti cite accessibility as a major motivation for using popular UI libraries. Ensuring accessibility is challenging even for large, full-time teams. “Using React made it easier to make sure practically anyone can use our app,” Plenti co-founder Apurva Shukla says.
Libraries like React and Vue are enormously popular, which makes it easier for outside developers to step in and contribute their skills, Krook says. Plus, because many people want to learn how to use these tools, they’ll be eager to lend a hand. “We've seen students step in and contribute to some of the projects we oversee because they want to apply what they learned to a real-world project,” he explains. “So these libraries make it easier not just to develop new projects, but to attract contributors as you grow.”
The World’s AI Expertise at Your Fingertips
Building AI and machine learning platforms is one of the heaviest lifts in software development. Fortunately, open source is decreasing that burden. Several large companies have open sourced AI frameworks in recent years, including Google, Facebook, and Microsoft. These companies have invested heavily in AI R&D and employ many of the world’s foremost experts in the discipline. Now anyone can tap their expertise.
Many of these same companies also offer AI via cloud services—all of this year's Call for Code finalists used IBM Watson, for example—to make AI and ML more accessible. In some scenarios, developers find that open source solutions are a better fit. Saaf Water uses the Python machine learning library Scikit Learnto process the data it collects. Right now they’re running Scikit Learn in the cloud, but they’re working on running it locally on their hardware device so that they can analyze data and turn on warning lights even when there’s no internet connection. They’re also evaluating TinyML and TensorFlow Lite. “TensorFlow has an amazing community behind it,” Bhandari says.
Flexibility is another reason to augment cloud services with open source AI tools. In addition to Scikit Learn, Green Farm used an AI platform called KubeFATEto distribute machine learning workloads across Kubernetes clusters, giving them the ability to manage the same workloads in different private, public, or hybrid cloud environments.
Likewise, Plenti might augment their use of the IBM Watson Natural Language Classifier service, which they use to process grocery receipts, with another framework. “Open source frameworks such as TensorFlow would give us additional flexibility in the model design and deployment process,” Shukla says.
Open Source Gets Physical
The falling costs of hardware and the rise of programmable circuit boards and other gear has lowered the barrier to entry in the world of hardware, bringing open source to life for millions of developers. Saaf Water built their system on the Arduino open source microcontroller platform, and incorporated other open hardware components such as the Adafruit Neopixel display into their project as well.
While these sorts of hardware-based projects are still less common than pure software projects, they play an increasingly important role in the Tech for Good ecosystem. For example, in 2020 a company called Grillo contributed an open source earthquake early warning system called OpenEEW to the Call for Code initiative.
Grillo and OpenEEW co-founder Andres Meira says the project started as an attempt to make early warning systems cheaper and more widely accessible. “There were only a few available in the whole world and they cost tens of millions of dollars to build,” he explains. “We created a system that can run on off-the-shelf software and hardware.” The system is already being utilized in Mexico, and deployments in Puerto Rico and Haiti are in progress.
Just as in the open source software world, communities are what power open hardware. “The open hardware community was essential for us as we designed both the hardware and the software,” Bhandari says. “The community helped with everything from ensuring better power isolation for different sensors to understanding which libraries are and aren't compatible with our hardware to helping us fix routing issues after deployment.”
They're also giving back to those that help them. “We're still pretty new to this community, but we're already filing bug reports and providing tips and workarounds for libraries,” Bhandari says.
Saaf Water may be new to the community but, then again, so is practically everyone else. Open source software has been around for decades, but the rapid growth in the adoption and creation of new open source projects in recent years highlights just how much potential remains untapped. More and more people around the world are contributing to open source hardware and software every day—which means the opportunities for the future of the Tech for Good movement are endless.