element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Blog Secure voting machine, powered by Azure Sphere - DRAFT
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Azure Sphere Starter Kit to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: laziz2020
  • Date Created: 28 Nov 2019 2:43 PM Date Created
  • Views 834 views
  • Likes 1 like
  • Comments 3 comments
  • sensing the world project
  • sensingworldch
Related
Recommended

Secure voting machine, powered by Azure Sphere - DRAFT

laziz2020
laziz2020
28 Nov 2019

This is a draft version. Still need to publish YouTube video and add GitHub repo.

 

Overview:

What is a better indicator of democracy than the people’s ability to select their leaders and the future of their countries in elections or referendums? Selecting freely, without fear of oppression and with assurance that the results are not amended in any ways without their consent.

Some countries still rely on the ink-and-paper based methods to get the voting results, which can take significant time to process and the voting cards themselves can be easily tampered. Others started to use electronic voting solution, however such solutions are not standardised and prone to hacking.

Platforms like Azure Sphere are designed to provide end-to-end security and can revolutionise the voting process. This project describes demo solution of the voting machine, based on AvNET Azure Sphere MT3620 Starter Kit.

image

Right now, it allows you to say only “yes” or “no” by pressing built-in user buttons. However, thanks to MikroE click boards extension, it can be easily converted into real voting machine which can also verify uniqueness of each voter, e.g. via biometric finger print reader or using NFC reader to read the cheap of his / her ID.

UN - Sustainable Development Goals (SDG):

All United Nations Member States adopted in 2015 so-called “The 2030 Agenda for Sustainable Development”. This project can support UN agenda with its one particular Sustainable Development Goal, i.e. SDG # 16: to promote peace, justice and strong institutions.

image

 

Secure solutions utilising platforms like Azure Sphere can help to ensure that the data is protected at rest and in transit, attempts to compromise devices physically or programmatically are detected and reported, confidentially of voters is protected by the strongest encryption keys and overall there is a trust in the data collected and presented, promoting higher level of transparency and accountability across the relevant institutions.

Prerequisites:

To deploy this solution you would require:

  • Avnet Azure Sphere MT3620 Starter Kit;
  • Visual Studio IDE;
  • Azure Sphere SDK Preview for Visual Studio;
  • Access to Azure subscription

Infrastructure Setup:

1. In Azure portal, create and link to each other Azure IoT Hub and Azure IoT Hub Device Provisioning Service (DPS) resources, using the following Quick Setup guide: https://docs.microsoft.com/en-us/azure/iot-dps/quick-setup-auto-provision.

Note: To use Device Twin capability, IoT Hub should be on the Standard pricing tier.
image

 

2. In Azure Sphere Developer Command Prompt, download CA certificate from Azure Sphere tenant using the following command:

azsphere tenant download-CA-certificate --output CAcertificate.cer

You should see confirmation that the CA certificate has been saved.

image

 

3. In Azure portal, upload certificate to Azure IoT DPS -> Certificates. After upload it will show new entry with an “Unverified” status.

image

 

4. Then open certificate record and click “Generate Verification Code” button.

image

 

5. In Azure Sphere Developer Command Prompt, download validation certificate signed with the DPS verification code from Step 4 above using the following command:

azsphere tenant download-validation-certificate --output ValidationCertification.cer --verificationcode <DPS_VERIFICATION_CODE>

You should see confirmation that the validation certificate has been saved.

image

 

6. In Azure portal, upload validation certificate into “Verification Certificate” field of the record window from Step 4 and click “Verify” button. After validation, Azure will change the status of your certificate to “Verified”.

image

7. Switch to Azure IoT DPS -> Manage Enrollments menu and add new enrollment group with the primary certificate that we verified in Step 6 above.

image

Data flow configuration:

1. In Azure Sphere Developer Command Prompt, execute the following command to get Azure Sphere tenant’s ID:

azsphere tenant show-selected

2. In Azure portal, switch to Azure IoT DPS -> Overview and copy DPS ID Scope value.

3. From Azure IoT DPS -> Linked IoT Hubs copy the full name of the linked IoT Hub.

4. Download content of attached Git repo (see the link at the end of the blog post).

5. In Visual Studio, click File -> Open -> CMake, navigate to the repo’s Software -> VotingApp and then open app_manifest.json file.

image

 

6. Update placeholders highlighted in the screenshot below with the values of your Azure Sphere tenant’s ID, DPS ID Scope and IoT Hub names collected in Steps 1, 2 and 3 above.

image

 

7. Select CMakeLists.txt file and then click Build -> Rebuild Current Document (CMakeLists.txt). Verify that an image package is being generated as shown below.

image

 

8. In the toolbar, choose “GDB Debugger (HLCore)” as the target.

image

 

9. In Azure Sphere Developer Command Prompt, enable application development capability on Azure Sphere device:

azsphere device enable-development

10. Back in Visual Studio, click Debug -> Start (or press F5) to deploy Voting Machine app to the device. If successful, Visual Studio will execute Voting Machine app on Azure Sphere device. In Output window, choose “Device Output” option. If you will press any of 2 buttons, you should see the message updates in the debug window.

image

Analytics configuration:

1. In Azure, create new Stream Analytics job and add IoT Hub as its stream input

image

 

2. Add PowerBI as the output for Stream Analytics job and click Authorize.

image

3. Provide relevant output alias name, so that you can use it in the Stream Analytics query.

image

 

4. Alternatively, you can setup Azure storage account or a database as an output for Azure Stream Analytics job.

image

 

5. Last step is to visualise your data in the PowerBI dashboard. You may configure it online directly at https://powerbi.microsoft.com or use richer functionality with offline PowerBI desktop client. This is an example of my PowerBI dashboard, which combines historical data from the database with the live stream from the Azure Sphere device.

image

 

High-Level Design:

The following diagram shows the main components utilised in this project.

image

Working model - GitHub repo and YouTube video:

Solution source code can be found at this GitHub repo. You can also find a short video of the working solution here on YouTube.

Credits:

This solution is based on the original sample code from Microsoft Azure Sphere team, published here.

  • Sign in to reply
  • Athi123
    Athi123 over 2 years ago

    The Internet of Things (IoT) has a significant impact on several aspects of our lives and companies today. The impact of IoT on how we live, work, and engage with the outside world is what gives it its significance. With its capacity for data analytics and device connectivity, it has the potential to revolutionize industries, increase productivity, and open up exciting opportunities for innovation. You have clearly explained how to set up the voting solution of Azure which includes infrastructure setup and data flow configuration. The inclusion of diagrams and solution screenshots enhances the value of this article, making it compelling to read. It's excellent that you've included video links as well. Thank you so much for sharing. 

    Regards,

    Athi

    ThinkPalm UK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • stefheisl
    stefheisl over 2 years ago

    While electronic voting machines are not perfect, they are a vast improvement over paper ballots. They are more accurate, faster, and easier to use. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • stefheisl
    stefheisl over 2 years ago

    Great project...It can be seen that you have been working on a Secure voting machine for a long time. The attached screenshots and pictures look professional. It is clear that the use of a secure voting machine is of the utmost importance. By ensuring that our voting machines are secure, we can ensure that every vote is counted and that our democracy is protected. Thank you for a great post and a reason for reasoning.

    Best Regards,

    Andersen

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube