Creating VintageCell: Nerves, PCBs, and GenStateMachine with Bryan Green
Oct 24, 2024
auto_awesome
In this conversation, Bryan Green, a Senior Software Engineer at GridPoint, shares his innovative journey of transforming a 1930s rotary phone into a modern cell phone using Elixir and Nerves. He reveals the challenges of interpreting rotary dial signals and troubleshooting hardware with LED diagnostics. Bryan highlights the advantages of Nerves, like remote debugging and over-the-air updates, and explains how he utilized GenStateMachine to manage phone states. With advice for DIY enthusiasts, he inspires listeners to embrace the golden age of hardware tinkering.
Bryan Green successfully integrated vintage aesthetics with modern technology by transforming a 1930s rotary phone into a functional cell phone using Elixir and Nerves.
The use of Elixir's GenStateMachine enabled efficient state management of the rotary phone's operations, enhancing performance and facilitating troubleshooting during the project.
Deep dives
Transforming Vintage Technology
A vintage 1930s rotary phone was successfully transformed into a functional cell phone using Elixir and NERVs. The project began with inspiration from a Star Trek communicator project that involved 3D printing and creating a functioning phone with an Adafruit component. Brian Green, the engineer behind this innovation, was drawn to the vintage aesthetic, which motivated him to merge old technology with modern capabilities. This creative endeavor illustrates the potential for blending historical design with contemporary tech solutions.
Challenges in Hardware Integration
The project faced several technical challenges, particularly related to the hardware aspects of the rotary phone. Initial attempts with a different vintage phone revealed that it was malfunctioning, as it produced noise during dialing rather than after, complicating the interpretation of signals. Through inventive debugging methods involving LEDs to visualize signal clicks, Green was able to refine the system for accurate digit recognition. This iterative process exemplifies the unpredictable nature of hardware projects and the necessity for adaptable problem-solving.
Leveraging Elixir's Strengths
Elixir's unique features, such as the GenState machine, played a crucial role in managing the finite states of the rotary phone during operation. The architecture allowed Green to define various states, such as 'off-hook' or 'waiting for digits', with corresponding transition functions that streamlined the phone's functionalities. This clean approach to state management not only reflected the real-world interactions of the phone but also showcased the advantages of Elixir for developers tackling similar hardware projects. By using Elixir, he could also easily deploy updates and monitor performance remotely, enhancing the project's overall efficiency.
Today on Elixir Wizards, Bryan Green shares how he transformed a vintage 1930s rotary phone into a fully functional cell phone using Elixir, Nerves, and a mix of hardware components.
Bryan shares the highs and lows of his project, from decoding rotary dial clicks to troubleshooting hardware issues with LED outputs. He explains why Nerves was the perfect fit for this project, offering SSH access, over-the-air updates, and remote debugging. You’ll also hear how Elixir’s concurrency model helped him manage hardware inputs and outputs efficiently using GenStateMachine and Genservers.
Elixir and Nerves really shine when modeling real-world systems. Bryan dives into how he used a finite state machine to track the phone’s states and handled inputs from the rotary dial and hook switch via GPIO.
For hardware enthusiasts, Bryan’s advice is to embrace this “golden age” of DIY electronics. Whether you're experienced with embedded systems or just curious on where to start, Bryan's VintageCell can inspire you to tinker with a hardware engineering project.
Key topics discussed in this episode:
Advantages of functional programming and immutability in Elixir
Building hardware projects using Adafruit components
Why Nerves was the best choice for the VintageCell project
Interpreting rotary dial clicks using GPIO and circuits.gpio
Troubleshooting hardware issues with LED diagnostics
Challenges in optimizing wiring and PCB design
Benefits of Nerves: SSH access, OTA updates, and remote debugging
Modeling real-world systems with Elixir and Nerves
Implementing a finite state machine with GenStateMachine
Managing input with Genservers for rotary dial and hook switch
Leveraging community resources like Discord, Elixir Slack, and forums
Practical advice for keeping hardware projects on track
Potential applications from SMS servers to home automation