The Special Calculator
1. Project Premise
Narrative
In an age where digital technology underpins much of our everyday lives, society's unwavering trust in these systems is both a testament to their utility and a reflection of our growing dependency. However, this trust, if unchecked, poses profound questions about our vulnerabilities to technological failures, both accidental and intentional. "The Special Calculator" emerges in this context, serving as a potent critique of our societal tendencies to over-rely on technology.
At its heart, "The Special Calculator" functions as any regular calculator would, executing mathematical operations with the precision and reliability expected of modern digital tools. Yet, what distinguishes it is a designed peculiarity: it will, on occasion, and intentionally, produce an erroneous result.
Historical Precedences
1983 Soviet Nuclear False Alarm Incident: In 1983, amidst heightened Cold War tensions, Soviet early warning systems mistakenly detected a US missile strike. This software error risked sparking a catastrophic nuclear conflict. However, Lieutenant Colonel Stanislav Petrov, on duty at a bunker near Moscow, judged it a system malfunction. He wisely refrained from initiating a retaliatory strike. Petrov's discernment averted a potential disaster, underscoring the perils of over-reliance on technology in critical situations.
Therac-25 Radiation Overdoses: In the 1980s, the Therac-25 radiation therapy machine was introduced to treat cancer patients. However, software glitches, coupled with poor safety checks, caused the machine to deliver excessive radiation doses on multiple occasions. This led to serious injuries and, in some cases, fatalities among patients. The Therac-25 incidents underscore the critical need for meticulous software testing and safety measures in medical device design.
2010 Flash Crash: In May 2010, the "Flash Crash" saw the Dow Jones plummet 1000 points momentarily, triggered by high-frequency trading algorithms reacting to a sizable futures contract sale by a Kansas mutual fund. This catalyzed a ripple effect among trading systems, causing drastic market fluctuations and turning some established stocks to penny values. The event highlighted the fragility of modern financial systems, leading to the implementation of protective measures like circuit breakers to prevent repeat incidents.
Critique
These episodes underscore the criticality of questioning and double-checking even our most trusted technological tools. By embedding deliberate errors in something as foundational as a calculator, "The Special Calculator" forces users out of technological complacency. Each unexpected inaccuracy is a jolt, a reminder to retain our critical thinking and not surrender it wholly to machines.
"The Special Calculator" does not aim to erode our faith in technology but rather advocates for informed trust. In a world increasingly dictated by digital determinism, this project underscores the timeless adage: "Trust, but verify."
2. Process
Operations
Process Images
Maquettes:
Several prototype maquettes were crafted before settling on the final design. Initially, I leaned towards a streamlined appearance, akin to conventional calculators, as evident in the designs showcased in the first two columns. However, as I refined the narrative behind my project and embraced its foundational inspiration, I pivoted to a bulky and heavy design that harks back to the charm of older-generation computers. The maquette in the final column played a pivotal role, helping to precisely determine and optimize the dimensions of each component.
In this initial iteration, the primary focus was to grasp the dimensions of the calculator, optimize button placements, and envision its presentation and user interaction. While rudimentary, it effectively encapsulates the quintessential elements of a calculator: a keypad, display, and essential operators.
In this rendition, the aim was to define the precise dimensions of each component and refine their placements on the calculator. Notably, enlarged button apertures were conceptualized for the "Clear" and "Enter" functions. However, this particular design element did not make its way into the final product.
In this culminating iteration, the focus was on validating each component's dimensions, pinpointing their precise locations, and ensuring a seamless assembly of all parts and components. This approach minimizes errors and wastage during the acrylic cutting process.
Wiring:
The wiring process was straightforward, given that my project incorporated just four key components: a 20x16 LCD Screen, an Arduino UNO, a 3x4 Metal Numeric Keypad, and a 1x4 Stripe Keypad, which functioned as the operators "+", "-", "x", and "//". While the wiring was swiftly accomplished, it was the coding phase that demanded the bulk of the time.
My initial goal was to ensure the screen displayed inputs from the metal keypad as a sequence of digits. However, this proved more complex than anticipated. Specifically, the key mapping of the metal keypad presented software challenges, leading me to seek guidance from Prof. Zach. Still, the accompanying image illustrates the streamlined wiring schematics employed to relay inputs from the keypad to the screen.
In this phase, I incorporated a 1x4 stripe keypad, which acted as the calculator's operator. Every component displayed on the table was integrated into the final product. It's worth mentioning that the 2x16 screen was upgraded to a 4x20 variant, facilitating a more polished calculation format. The annotations in red highlight Prof. Zach's guidance on using the "enum" function—the over-arching structure of my code.
Reflections
This project offered me the opportunity to delve into representational methods and acquire novel coding skills, which I deeply value. As highlighted earlier, the wiring process was uncomplicated, save for the metal keypad's key mapping. A significant portion of my efforts centered on decoding the intricate programming nuances inherent to a calculator. I will delve deeper into the technical intricacies in the subsequent chapter. The labyrinth of wires, though essential, was challenging to navigate and maintain order with. Recognizing this, I promptly created a schematic post-wiring to preempt potential complications.
However, the finished product isn't without its shortcomings. Certain edge cases of inputs would disrupt the flow of the "enum" function, leading to unexpected outcomes. The keypad's occasional delayed response remains a mystery, as of now, with its origins either in hardware or software. Given the chance to refine it, my priorities would be addressing these glitches. I would also swap the LCD for a vintage monitor, enhancing its throwback vibe to earlier computers. For a whimsical touch, inspired by real-world software-induced calamities, I'd have the calculator depict varying degrees of disasters with each incorrect answer, ranging from minor irritants to apocalyptic scenarios.
In sum, while the wiring phase might not have been a substantial learning curve, I cherish the hands-on experience in fabrication and the invaluable software acumen I garnered.
3. Technicals
Code
https://github.com/DunnQiyuan/The-Special-Calculator/blob/main/Calculator_Code.ino
This code is intricately structured around the "enum" and "switch" functions, and it progresses methodically through several phases: "INPUT1", "OPERATOR", "INPUT2", "ENTER", "SOLUTION", and "DUNN" (as in DONE).
It begins with the user entering a number, dedicated to the "INPUT1" phase. Once an operator is chosen, the system transitions seamlessly to the "OPERATOR" state. Following this, any digit pressed ushers the program into the "INPUT2" phase. To kick off the computation, the user presses "*", directing the system to process the two numbers based on the pre-selected operator within the "ENTER" phase.
The "SOLUTION" phase is dedicated to the nuanced manipulation of results. Under specific conditions, such as when the Arduino's real-time clock ticks a second divisible by 5 or it is the occasion of the 10th consecutive calculation, this phase offers three distinct manipulation means:
1. Add a value between 1 and 10 to the result.
2. Deduct a value between 1 and 10 from the result.
3. Swap positions between two digits within the number.
Concluding the sequence is the "DUNN" (for DONE) phase. When the system transitions to this state, it automatically resets, restoring all parameters to their default values. This guarantees an unblemished beginning for subsequent calculations while also tallying the count of calculations performed by incrementing it by 1.
Schematics
4. Gallery
Final Product
The finished product boasts a body crafted from pristine white acrylic, lending it a more reminiscent appeal. The color palette, dimensions, and overall aesthetic are nostalgic for the iconic computers from the late 1970s.
Detailed Images
The text is laser-etched onto the acrylic surface, after which an ink layer from a marker is applied. This is then deftly wiped off to ensure clarity.