[null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://f.ch9.ms/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-135.png", "src": "https://f.ch9.ms/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-135.png", "formatted_filename": "image  B   D", "alt_text": "image", "rendered_width": 543, "rendered_height": 336}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/b2a8/06ea5a8b-162f-4b57-b6cd-b09519d3b2a8/IoTPetDoor_512.jpg", "src": "https://sec.ch9.ms/ch9/b2a8/06ea5a8b-162f-4b57-b6cd-b09519d3b2a8/IoTPetDoor_512.jpg", "formatted_filename": "IoTPetDoor", "alt_text": "Building a Pet Recognition Door Using Windows 10 IoT Core"}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/1ab5/00931989-9471-4712-8027-6516e03b1ab5/Episode401_512.jpg", "src": "https://sec.ch9.ms/ch9/1ab5/00931989-9471-4712-8027-6516e03b1ab5/Episode401_512.jpg", "formatted_filename": "Episode", "alt_text": "TWC9: Creators Updated Released, Learn What's Next Event, Happy Path to Azure IoT, Git Pretty and more..."}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/3568/730449a8-754a-48ae-b49f-38efac643568/CortanaOnWindowsIoTCore_512.jpg", "src": "https://sec.ch9.ms/ch9/3568/730449a8-754a-48ae-b49f-38efac643568/CortanaOnWindowsIoTCore_512.jpg", "formatted_filename": "CortanaOnWindowsIoTCore", "alt_text": "Cortana on Windows 10 IoT Core"}, null, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/e12f/7ab66717-4132-4ca8-9576-1e4c8b3be12f/IoTCore_512.jpg", "src": "https://sec.ch9.ms/ch9/e12f/7ab66717-4132-4ca8-9576-1e4c8b3be12f/IoTCore_512.jpg", "formatted_filename": "IoTCore", "alt_text": "What is Windows 10 IoT Core?"}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/c011/3b7e22dd-049f-43f0-80f3-6b1a5f4cc011/UWPWithAzureIoT_512.jpg", "src": "https://sec.ch9.ms/ch9/c011/3b7e22dd-049f-43f0-80f3-6b1a5f4cc011/UWPWithAzureIoT_512.jpg", "formatted_filename": "UWPWithAzureIoT", "alt_text": "Building UWP Experiences with Azure IoT"}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/d836/aa363534-3588-43bd-bdbd-25771266d836/20161007TWC9_512.jpg", "src": "https://sec.ch9.ms/ch9/d836/aa363534-3588-43bd-bdbd-25771266d836/20161007TWC9_512.jpg", "formatted_filename": "TWC", "alt_text": "TWC9: Windows Insider is Two, Connect() is coming, Docker .NET Images and more..."}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/b3a6/46fc2b7b-c0c5-498f-a888-ccfc5212b3a6/20160923TWC9_512.jpg", "src": "https://sec.ch9.ms/ch9/b3a6/46fc2b7b-c0c5-498f-a888-ccfc5212b3a6/20160923TWC9_512.jpg", "formatted_filename": "TWC", "alt_text": "TWC9: Igniting Windows 10 Insiders, MIDI, Spatial Audio and Laser Drone Space Invaders..."}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/a1ec/30fae451-ddc9-42a2-8632-8e4f591ba1ec/CommercializeIoTCore_512.jpg", "src": "https://sec.ch9.ms/ch9/a1ec/30fae451-ddc9-42a2-8632-8e4f591ba1ec/CommercializeIoTCore_512.jpg", "formatted_filename": "CommercializeIoTCore", "alt_text": "Commercializing Your IoT Core Solution"}, null, {"document_url": "https://channel9.msdn.com/coding4fun/blog/Windows-10-IoT-Core-Breathalyzer", "unformatted_src": "https://sec.ch9.ms/ch9/fdf6/27efd1c0-632c-4cd3-a6dc-c1537d97fdf6/20160909TWC9_512.jpg", "src": "https://sec.ch9.ms/ch9/fdf6/27efd1c0-632c-4cd3-a6dc-c1537d97fdf6/20160909TWC9_512.jpg", "formatted_filename": "TWC", "alt_text": "TWC9: More Bug Bounties, Spaces or Tabs, Xamarin.Forms on macOS and more..."}, null]
Coding4Fun Blog

Windows 10 IoT Core Breathalyzer


Today's Hardware Friday project from Paul DeCarlo seems to be custom made for the Holiday season, doesn't?

Windows 10 IoT Core Breathalyzer Windows 10 IoT Core was created to build powerful solutions on low-powered devices with the potential to bridge the physical world into the nearly endless power of the cloud.  It offers a world of synergistic opportunity within the Microsoft ecosystem, which includes technologies such as Visual Studio, .NET, and Microsoft Azure.  All of this is available on a variety of devices including the ever popular Raspberry Pi 2, a $35 computer with 1 GB RAM, quad-core processor, 4-port USB hub, and HDMI out.  And get this, all of this comes packed on a machine about the size of a credit card at a little over 1.5 inches thick.  This little computer also boasts a GPIO hub or General Purpose Input / Output.  This GPIO hub can allow you to take readings from the physical world and even perform operations on physical devices that create actions in the real-world.

Okay, you get the picture, big opportunity, small package, can perceive and effect the physical world…  How can this change your life or the world for that matter?

That all depends, what is the problem that you wish to solve?

In this case, I decided to pay attention to a problem that is encountered very often, especially in college campuses and in the realm of night-life entertainment.  Have you ever known someone to have too much to drink to where it might pose a problem for yourself or others?  We have kiosks which will display arcade games and such, but that really just passes the time.  What if we had an internet connected device that could track your alcohol consumption?  We could identify those who are at risk, or even on their way to becoming a risk to themselves and/or others and intervene.

In this project, we will look at creating an internet connected breathalyzer with cloud-based reporting and logging.  From a technical perspective, this project will introduce us to using an analog sensor for detecting alcohol and a standalone LCD screen for prompting a user with instructions.  We will tie information gathered from the sensor up to an external interface that logs results and displays them locally while also storing into an Azure Mobile Service.

You may have heard that Windows 10 IoT Core runs Universal Windows Platform apps, meaning that our code should potentially run across any device that supports the Windows 10 Core APIs including Windows Mobile, Xbox One, Windows 10 desktop and potentially Hololens.   As such, this implies that it should be able to support UWP controls offered by third parties.  We are going to include a charting package from SyncFusion to prove that this is in fact possible.

Note: *Accuracy of this device is not guaranteed.  Any replication of this device should be considered as a novelty and not a substitute for more scientifically accurate or legally acceptable methods of measurement

Software Prerequisites:


Circuit Layout:...

RPi2 Pinout:...

Connecting the ADC:...

Connecting the MQ2 sensor to the ADC:...

Connecting the 1.8″ TFT Color Display Module:...


The full project and code is contained as a sample within the Microsoft iot-devices project on GitHub.  You may wish to modify the member variables within MainPage.xaml.cs


Modifying this project to support completely different scenarios:...

[Click through to see the complete post]

Follow @CH9
Follow @coding4fun
Follow @gduncan411


Coding4Fun, IoT, Windows 10

Related episodes