# Initial Architecture Document
#### Team Number: 25<br />Team Members: Matthew McManness, Ashley Aldave, Mariam Oraby, Magaly Camacho, Manvir Kaur
## Project Name: Smart Drop-Box Frame
### Project Synopsis
We will be prototyping a "Smart Drop-box Frame". We will attempt all three solutions proposed by Jamie Shew in order of difficulty. Solutions:
---
## Architecture
### Summary
The "Smart Drop-Box Frame" is designed to enhance the security, efficiency, and tracking capabilities of the traditional voting drop box system. This innovative solution integrates various hardware and software components to create a seamless process for collecting and verifying ballots in a secure and automated manner. In this document we will provide a more detailed overview of the system.
</br>
#### Overview
The Smart Drop-Box Frame is a modular device that can be easily inserted into and removed from existing voting drop boxes. The frame itself is constructed from durable, weather-resistant wood, ensuring it can withstand outdoor conditions over extended periods of time. Attached to the frame are several key components, each contributing to the overall functionality of the system.
</br>
#### Components and Functionality
- Logic Board (Raspberry Pi): The heart of the system is the Raspberry Pi which controls the entire operation of the smart drop box. It coordinates communication between all hardware components, handles data processing, and manages the transmission of data to the county clerk.
- Solar Panels: These panels will provide sustainable power to the system, ensuring the drop box remains operational even in remote or off-grid locations. The solar panels charge the system’s battery to maintain functionality during the day and night.
- Battery: The system is powered by a rechargeable battery that stores the energy captured by the solar panels. This ensures the drop box remains active even when there is no sunlight. The battery is designed for long-lasting performance and can be easily replaced when needed.
- Cooling System: The cooling system ensures that all components, particularly the Raspberry Pi and other sensitive electronics, are kept at an optimal operating temperature. It helps prevent overheating in warmer climates or during periods of high use.
- Light Curtain: The light curtain is an infrared sensor array designed to detect when a ballot enters the drop box. As soon as the envelope triggers the light curtain, it activates the system, initiating the process of scanning, capturing images, and updating the counter.
- Reset Button: Located on the system for easy access by collection teams, the reset button is used to reset the counter after ballots are collected. If discrepancies are found between the physical count and the E-ink display, the reset button serves as part of the verification process.
- E-ink Display: The E-ink display provides a constant, low-power visual representation of the total number of ballots that have been deposited. This display is visible to collection teams and serves as a key tool in verifying the integrity of the ballot collection process.
- Ring Light: The ring light provides optimal illumination for the camera when capturing images of the ballots. It ensures clear, high-quality images even in low-light environments.
- High Shutter-Speed Camera: The camera is responsible for quickly taking images of the ballots as they are deposited. These images will be used for verification, auditing, and record-keeping purposes.
- IMb Scanners: These scanners capture barcodes or tracking numbers on the ballots, facilitating accurate and automated tracking. The IMb scanners ensure that the information associated with each ballot is correctly recorded and tied to its respective county clerk database.
- CradlePoint Router (Secure Transfer): The router establishes a secure, encrypted connection for transmitting data from the drop box to the county clerk's office. This ensures that all collected data, including images, scans, and metadata, is securely sent over the internet for further processing.
</br>
#### Data Collection and Transmission Process
When a ballot enters the drop box and triggers the light curtain, the Raspberry Pi begins a series of steps to ensure proper collection and tracking of the ballot:
- Increase the Counter: The ballot count is automatically increased, reflecting the new entry.
- Update the E-ink Display: The E-ink display is updated in real time to reflect the new count.
- Activate Ring Light and Camera: The ring light ensures proper lighting, while the camera captures an image of the ballot.
- Activate IMb Scanners: The scanners read any relevant barcodes or tracking information on the ballot.
Once the data is collected, the Raspberry Pi will format it as specified by the county clerk, ensuring that it adheres to any local standards or guidelines. This data is then securely transmitted to the county clerk's office via the CradlePoint router, where it can be batch-uploaded to the cloud for storage and further processing.
</br>
#### Ballot Collection and Verification Process
At regular intervals, collection teams are responsible for retrieving ballots from the drop box. During this process, the team will:
- Verify the Ballot Count: The team will check the E-ink display to ensure the total count of ballots matches the physical number of ballots in the box.
- Reset the System: If the count matches, the team will reset the system, clearing the counter and preparing the drop box for the next batch of ballots.
- Investigate Discrepancies: If the count does not match, the collection team will reset the system but will also notify the county clerk. The clerk will review the collected data, including images and scans, to determine the cause of the discrepancy and take corrective action.
</br>
#### Security and Data Integrity
The system places a strong emphasis on security and data integrity. The secure transmission of data, combined with detailed records of each ballot deposited, ensures that the entire process is transparent and verifiable. Any discrepancies are flagged immediately, and the county clerk has access to all data for auditing purposes.
The combination of these components creates a robust, efficient, and secure system for managing voting drop boxes, providing transparency, real-time monitoring, and streamlined data collection for election officials.
:::info
Below are the State Diagrams for each solution presented by Jamie Shew. Note that ours (Labeled "Our Solution") combines all three of Jamie's proposed solutions to improve data. For example, if the counter and scanned data do not align, the pictures taken from the camera can be examined to help determine the cause.
:::
```mermaid
---
title: Drop Box State Diagram "Good Solution"
---
stateDiagram-v2
s1 : Waiting
s2 : Ballot Detected
s3 : Reset Button Pressed
s4 : Counter++
s5 : Counter = 0
s12: Team Logs Ballot Count
s1 --> s2
s1 --> s12
s12 -->s3
s3 --> s5
s2 --> s4
s13 : Update E-ink Display
s4 --> s13
s5 --> s13
s13 --> s1
```
```mermaid
---
title: Drop Box State Diagram "Better Solution"
---
stateDiagram-v2
s1 : Waiting
s2 : Ballot Detected
s3 : Light Turns On
s4 : Camera Takes Picture
s5 : Collector team can switch out SD card with data at any time
s6 : Light Turns Off
s1 --> s2
s2 --> s3
s3 --> s4
s4 --> s6
s6 --> s1
```
```mermaid
---
title: Drop Box State Diagram "Best Solution"
---
stateDiagram-v2
s1 : Waiting
s2 : Ballot Detected
s3 : Scanners activated
s4 : Data sent to clerks office for later batch upload
s1 --> s2
s2 --> s3
s3 --> s4
s3 --> s1
```
```mermaid
---
title: Drop Box State Diagram "Our Solution"
---
stateDiagram-v2
s1 : Waiting
s2 : Ballot Detected
s3 : Reset Button Pressed
s4 : Counter++
s5 : Counter = 0
s6 : Light Turns On
s7 : Camera Takes Picture
s8 : Data Formated
s9 : Light Turns Off
s10 : Scanners Activated
s11 : Data sent to clerks office for later batch upload
s12 : Team Logs Ballot Count
s1 --> s2
s1 --> s12
s12 --> s3
s3 --> s5
s2 --> s4
s2 --> s6
s2 --> s10
s6 --> s7
s7 --> s8
s7 --> s9
s9 --> s1
s10 --> s8
s8 --> s11
s8 --> s1
s13 : update E-ink Display
s4 --> s13
s5 --> s13
s13 --> s1
```
---
### Box Frame
All hardware will need to be attached securely, but also be easily removable. Due to this, we will be building a wooden frame, to which all new hardware will be attached, that can be easily dropped in (or pulled out) through the top of the drop box.
**Box Frame Diagram**

</br>
**Component List**
| Piece ID | # Needed | Dimensions (in inches) | Description |
| -------- | -------- | -------- | -------|
| A.1 | 2 | 39 x 2 x 2 | Back Vertical columns|
| A.2 | 2 | 44 x 2 x 2 | Front Vertical columns |
| B | 5 | 18 3/4 x 2 x 2 | Front/Back beams |
| C | 4 | 20 1/2 x 2 x 2 | Side Beams|
|Assorted plywood sheets| | | |
These pieces will be put together into a box frame using all half lap joints.
**Half Lap Joint**

Small sheets of plywood will be attached to the interior of the frame to facilitate connecting hardware components.
---
### Physical Hardware
:::info
Note that the Logic Board powers all components using the energy from the battery.
:::
```mermaid
flowchart
subgraph Components needed by Different solutions
direction TB
subgraph All Solutions Need:
direction LR
DBF(Drop Box Frame)
SC(Solar Cells)
B(Battery)
LB(Logic Board)
LC(Light Curtain)
CS(Cooling System)
end
subgraph Good Solution only needs:
direction LR
RB(Reset Button)
end
subgraph Better Solution only needs:
direction LR
RL(Ring Light)
C(Camera)
end
subgraph Best Solution only needs:
direction LR
IMbS(LMb Scanners)
end
end
```
#### Purchases Needed
| Item Description | Link | Price |
| -------- | -------- | -------- |
| Wood for frame | Matthew will provide (he has a bunch of scrap left over from his last big project) | $0.00 |
| On-board computer | [Raspberry Pi](https://www.canakit.com/raspberry-pi-500.html?cid=USD&variant=UK&src=raspberrypi) | $90.00 |
| Counter Sensor (light curtain) | [Amazon link](https://www.amazon.com/Antstone-Curtain-Sensors-Security-Protection/dp/B0BRK7BPBR/ref=sr_1_6?dib=eyJ2IjoiMSJ9.q8SZyx2WPClhbPW5kpBXXP6G7C_gBdl0otm9vTWBFmXWRZhjrL18y0IpMLWuDKX-Ex8qE4RlOyrzn_EGm-u7HF5mdv71pSROEab1wWYoez4jZKG5qMQo-HHnBGlrAFvQObbd58fhrVMPMJlxd7aGFKUl191BW54wohHBPauJo7ILWi-oUaV5rChxjOPV5DGnRcSN5z1YbwSK1a0vN-4piUtLdj_js5Ku848jf5oSAkPbf7oBWuVDtDi1kl6AOCNkMdIhWnFEV0Kj71N4FACHoaqwQlPMMAEuWKJDIByUAub98yfGZEOQKLI7u5cphJOzqVNsx-sEQFY6ykkbqjE6raD4EAIsiGI7pA9hTQ4wBzr96_wo9CDXWNHKMsQR1gs4Owij6r1o76pZ7_I2D_7IBlBNkSnIWJGUPr1Y9beq02DkhAa46M48VKc83eoa20gc.8zCafLNLZhFyGzmUTjLyd638nTaYY4FQ6TgI_Qw8loQ&dib_tag=se&keywords=light%2Bcurtain%2Bsensor&qid=1739036367&sr=8-6&th=1) | $139.00 |
| Counter Display (E-ink display) | [Amazon link](https://www.amazon.com/2-13inch-Display-HAT-Two-Color-Raspberry/dp/B07Z1WYRQH/ref=sr_1_8?dib=eyJ2IjoiMSJ9.UQEWmdUnozuDD5-a74CTPg4ZlT8nccgIDCz_GdkbTJA_50IWS7aSh2_klqoqg_v4DTctrZI2egSb9SvXZHiPYiRGEeyIFhx8e_gbx2fvyVQGTT1VBU15CDeF3Z8c1986uDMEjo62BCe1_-d5RWA-W22rkFENYbBiHBbZkkW1a0e4jsvwsMoSCXiX12MvtqPYRS81HDa9l55k07avHfVdkP1GKTVEflYeXLmT2Fcttiw.7RONHTeuvz-0xiUCKiS7iOE0JWroLI2EZxVOvRB2vM0&dib_tag=se&keywords=e-ink+display&qid=1738541369&sr=8-8) | $22.07 |
| Reset Button | [Purchase Link](https://www.digikey.com/en/products/detail/pi-supply/PIS-1276/10315631?gclsrc=aw.ds&&utm_adgroup=&utm_source=google&utm_medium=cpc&utm_campaign=PMax%20Shopping_Product_Low%20ROAS%20Categories&utm_term=&utm_content=&utm_id=go_cmp-20243063506_adg-_ad-__dev-c_ext-_prd-10315631_sig-CjwKCAiAnpy9BhAkEiwA-P8N4qbw9gCvyioG4eavdXndz1JA7oUJv-6H7rbEA3_4uB942isWIHo0zRoC10kQAvD_BwE&gad_source=1&gclid=CjwKCAiAnpy9BhAkEiwA-P8N4qbw9gCvyioG4eavdXndz1JA7oUJv-6H7rbEA3_4uB942isWIHo0zRoC10kQAvD_BwE&gclsrc=aw.ds) | $2.87 |
| Light (to help with the high shutter speed camera) | [Amazon Link](https://www.amazon.com/Foneso-Reading-Protection-Flexible-Gooseneck/dp/B08RNQVZMD/ref=sxin_16_pa_sp_search_thematic_sspa?content-id=amzn1.sym.c5787da2-212d-48eb-a894-9ea5a87adeb3%3Aamzn1.sym.c5787da2-212d-48eb-a894-9ea5a87adeb3&crid=2D15BEMCGEYA3&cv_ct_cx=usb%2Blight%2Bdirectional&keywords=usb%2Blight%2Bdirectional&pd_rd_i=B08RNQVZMD&pd_rd_r=0a425b42-9c60-428a-bc6d-83ad45617a4e&pd_rd_w=C5qU4&pd_rd_wg=KO8l3&pf_rd_p=c5787da2-212d-48eb-a894-9ea5a87adeb3&pf_rd_r=97TQPGQZKJ26K8P26FJN&qid=1738011029&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sprefix=usb%2Blight%2Bdirectional%2Caps%2C110&sr=1-4-6024b2a3-78e4-4fed-8fed-e1613be3bcce-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9zZWFyY2hfdGhlbWF0aWM&th=1)| $8.99 |
| High Shutter Speed Camera |[Amazon Link](https://www.amazon.com/ELP-Computer-Lightburn-Variable-Close-up/dp/B0CXDS8F6Q/ref=sr_1_2_sspa?crid=3AJSGT8D1UI43&dib=eyJ2IjoiMSJ9.yyFuvSJWGsEm0iosCZI35NoS258w07hQjMJR2TOYHnErCjuAqxCbyjQUyQ8tR3NuCKfsrWB3GqJA6w_vTIUNVPZF7klESO4s9Yc9oKfHuLvW0VVYIrRmL0tbQkjDx2jGBNEiRVZkmz3LMnk2AHvIh3NJKN6BYaKjXWJKyZ9xR9T86IUZok5MtwdcQHOtcuB5KnYWh3npKMV2unQgyj-uxmcf345qJObnNwqu655kZuM.lHn9K8Ok4F9C6WyztzEZGRvu9OQQE71Cves-qJZI0oQ&dib_tag=se&keywords=high+shutter+speed+digital+camera&qid=1738010965&sprefix=high+shutter+speed+digital+camera%2Caps%2C110&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1) | $91.80 |
| **Solar Panel and Battery** | Waiting to hear back from Brad Allen at the Lawrence Public Library | $?.?? |
| cooling system (fans maybe), heat sensor, and metal mesh to provide access to the outside | Waiting to hear back from Brad Allen at the Lawrence Public Library | $?.?? |
| **IMb Scanner** | Still looking for the best option |$?.?? |
| Total Price: | - | $354.73 |
---