lot box (Court, 2022b). In the first round of the 2022
elections, 641 electronic ballot boxes were audited
across Brazil (Court, 2022h).
The system presented here was developed to au-
tomate the entire integrity test of the electronic ballot
boxes in the 2015 and 2020 versions, as they were
used in the last election. It consists of a robotic arm,
application software, information extraction from the
paper ballots, and some customizations, requiring
only one operator per system.
In addition to this introductory section, the article
is divided into five other sections: “Contextualization
of the Problem”, which contains a detailed description
of how the integrity audit process of electronic bal-
lot boxes functions; “Related Works”, which includes
some articles where authors have used robotic arms
to automate software testing; “Automation System for
Integrity Testing of Electronic Ballot Box”, which de-
scribes all parts of the presented system; “Tests and
Results”, which contains the tests conducted in the
laboratory and real-world situations; and “Conclu-
sion”.
2 CONTEXTUALIZATION OF
THE PROBLEM
The integrity testing of electronic ballot boxes begins
one day before the elections. The polling stations
from which the voting machines will be collected for
the integrity test are selected through a random draw.
The number of polling stations selected varies be-
tween 6 and 33, depending on the number of polling
stations per state and the voting round (Fachin, 2021).
These voting machines are removed from their origi-
nal municipalities, replaced with new equipment, and
installed in a monitored location with a significant
presence of people, as indicated by the Regional Elec-
toral Tribunal of each state. Representatives from po-
litical parties, the Brazilian Bar Association (OAB),
the Public Prosecutor’s Office, other oversight enti-
ties, and interested citizens participate in this process
(Court, 2022b).
Some paper ballots are filled out for each selected
voting machine, ranging from 75% to 82% of the
number of registered voters in the respective polling
station (Sans
˜
ao, 2018). Representatives from political
parties, federations, and coalitions participate in this
process. If they do not appear, third party will fill out
the ballots, excluding Electoral Justice staff (Court,
2022a). A list of candidates to be voted on at the
selected polling stations is available to fill out paper
ballots by hand in addition to party votes, blank votes
and invalid votes and are then deposited in canvas bal-
lot boxes. On the day of the test, these ballots are en-
tered into a digitizing system on a computer, which
is used for tallying and digitizing the votes. Subse-
quently, they are printed on paper ballots. The audit
work takes place on the same day and at the same
time as the regular election, from 08:00 AM to 05:00
PM. After issuing the ”Zeresima” report, which certi-
fies that no votes were counted before the start, issued
by the voting machine and support system, the proce-
dures are initiated (Court, 2022a).
Each voting machine involves four individuals in
the auditing process: the verifier, the data entry oper-
ator, the enabler, and the voter.
• The verifier retrieves the ballot from the canvas
ballot box and checks its validity. The valid bal-
lots are labeled with a sequential vote number. In
the case of a blank ballot, “EM BRANCO” (por-
tuguese for “BLANK”) is stamped next to each
space.
• The data entry operator selects a valid voter ID
and enters it into the auxiliary system. They com-
pare the sequential number labeled on the ballot
with the one displayed in the auxiliary system and
input the votes from the ballot into the auxiliary
system. They verify what has been entered with
what is on the ballot and then file the voted ballot.
The vote remains on the monitor of the auxiliary
system until the voter completes the process on
the electronic ballot box.
• The enabler activates the voter, enters the polling
station and places their fingerprint if necessary.
Then, the voting machine is enabled for the voter.
• The voter enters each digit of their vote into the
voting machine, announcing it aloud for record-
ing in the video. For each position, the candi-
date’s name indicated by the voting machine is an-
nounced, and after entering, there is a 3-seconds
wait before confirming the vote (Court, 2022a).
At the closing time of voting, at 05:00 PM, the
integrity test is also concluded, even if only some of
the ballots have been entered. The Ballot Box Report
(in portuguese, ”Boletim de Urna” or ”BU”) is printed
with the totalized votes to provide a physical record of
the results (Court, 2022a). A storage medium contin-
uing the results is removed from the voting machine,
inserted into the computer and the system generates
a comparative report between the BU and the ballots
entered in the support system.
If the results match, a closing report will be pre-
pared. However, suppose there is a discrepancy be-
tween the BU and the support system’s report. In that
case, the discrepancies will be identified, and the en-
tries on the respective ballots will be checked based
Robotics and Computer Vision in the Brazilian Electoral Context: A Case Study
517