How to create a threaded cap

By: Omar Metwally, M.D.

Objective: Design and 3D print a threaded cap that creates a water-tight seal with a threaded glass jar.

Environment: Autodesk Fusion 360

Glass jar dimensions:

Jar Outer Diameter (measured over threads): 48.06 mm

Thread Height: 11.88 mm

Metric Thread Pitch: 3.5 mm

Approach: Design a custom “coil” element.

Thread Terminology

Coil diameter (CD): Diameter of a zero-thickness coil as viewed from above (i.e. in the XY plane).

Jar Outer Diameter (JOD): Diameter of the jar opening, measured with Vernier calipers. Includes threads.

Coils: Protruding rings comprising the thread.

Section size (S): Coil thickness

Height (H): vertical height of the thread

Metric Pitch (P): distance between two adjacent coils

Revolutions (R): The vertical distance traveled by the coil (i.e. along the Z-axis of a cylinder) as it completes a 360 degree turn, beginning and ending at the same X and Y coordinates (i.e. looking down at the cylinder from above).

Tolerance (T): Arbitrary distance added to the coil diameter (CD) to allow the cap coils to interface with the glass jar threads.

Method

1. Create a coil with coil diameter (CD) equal to the jar outer diameter (JOD).

CD = JOD

In this case,

Jar outer diameter (JOD) = coil diameter (CD) = 48.06 mm

S = 2 mm

H = 11.88 mm

T = 0.2 mm

Angle = 0.0 degrees

P = 3.5 mm

2. Calculate coil revolutions (R), remembering that one revolution is a 360 degree turn.

R = H / P

Revolutions = Height / Pitch

In this case,

R = 11.88 / 3.5 mm = 3.39 mm

3. Create the rest of the cap

The cap comprises the cap body combined with the coil. The body is a hollow (shelled) cylinder, and the coils can be either inside or outside the body. In this case, the coils are inside the body to create the shape of a female cap. The body inner diameter (BID) equals the coil diameter (CD) plus tolerance (T). That is,

BID = CD + T

In this case, we’ll use a tolerance (T) of 0.2 mm for a PLA print, and the body will be 2 mm thick, such that:

BID = 48.06 + 0.2 mm = 48.26 mm

BOD = BID + (2*2 mm) = 52.26 mm

RESULTS

A stroll through Victory Mansions

Omar Metwally, MD
Analog Labs
19 November 2018

It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him.

Opening paragraph of George Orwell's Nineteen Eighty-Four. 
306 characters, including spaces.

I did some back-of-the-napkin math to calculate how much it would cost today to upload George Orwell’s novel Ninteen Eighty-Four to the Ethereum blockchain.

To upload the opening paragraph using this Ethereum contract (there are much more efficient ways to accomplish this using Solidity), the transaction would cost 290697 gas under current network conditions. If the entire 576,789-character novel were uploaded in the same manner, it would cost 576789 * 290697 / 306 = 54743895.20588 gas. Gas is currently about 2.2 * 10^9 wei [1].

(54743895.20588 gas) * (2.2 * 10^9 wei / 1 gas) * (1 Ether / 10^18 wei) = 1.2 Ether.

The carat symbol (X^Y) here indicates “X to the power of Y”.

In this manner, Orwell’s Ninteen Eighty-Four would cost 1.2 Ether to upload to the Ethereum blockchain, where it would be permanently and publicly available, served by more than 10,000 nodes.

If Ether were regarded in terms of its utility rather than as a speculative or financial instrument, there would likely be much less price lability, assuming society’s utility for a technology in general changes at a much slower rate than a market’s enthusiasm for securities and commodities. For instance, the cost of electricity in the residential setting varied from an average of 11.26 cents per kWh in 2008 to 12.89 cents per kWh from 2007 to 2017 [2]. Contrast this with the cost of Ether ranging from less than $1 in 2015 to more than $1,400 in early 2018.

How much does Ether really cost? A dollar? $100? $1000?

One way to begin answering this question is to study current market rates of cloud hosting services [3, 4]. Google offers a 2TB standard storage tier at $0.000274 per hour, and Amazon’s standard EC2 instances can range from $94 to $2,367 annually. A direct comparison with the cost of uploading Orwell’s novel is inaccurate because:

  • Information uploaded to the blockchain is permanent as long as a majority of nodes continue perpetuating the blockchain. Cloud hosting contracts are only as permanent as a recurring credit card payment, a company’s existence, and its willingness to serve data.
  • Google and Amazon cloud instance capacity is much larger than the 590kb size of Nineteen Eighty-Four as a text file.
  • Cloud hosting companies charge for bandwidth, whereas there are no blockchain transaction costs associated with downloading blockchain data
  • Conversely, running blockchain clients consumes a lot of bandwidth
  • A large, distributed network’s downtime is virtually zero and is theoretically much more resistant to hacking

I offer file storage as an imperfect thought experiment because a significant part of what consumers pay for when purchasing a smart phone is the ability to store large amounts of media, access and share these data. This thought experiment is only a starting point to answering the question of how much one Ether actually costs.

It took decades for the internet’s value to manifest, which today often takes the form of profiling users and using this information to sell digital ads. As one of my academically-minded siblings keenly points out, however, one important difference between the origins of the internet as we know it today and blockchain networks whose tokens are traded on exchanges is that the internet was built in a more farsighted manner without the objective of making money for speculators. ARAPANET, the precursor to the modern internet, initially ran on four Interface Message Processors (IMPs) at UC Santa Barbara, Stanford, the University of Utah, and UC Los Angles [5]. Of course, the internet has changed dramatically since its early years, and technology in general is constantly evolving under the pressures of regulation and free markets.

Crypto markets poisoned blockchain research by muddling networking protocols and stake in open source projects with financial speculation. On one hand, capital is an important element of many large endeavors. On the other hand, skyrocketing prices and price lability can breed greed, resentment, and hinder the ability of programmers, consumers, and researchers to actually use networking protocols. The lower the price of crypto, the cheaper the transactions on the network and the more accessible the protocol is to the average consumer.

So how much does Ether really cost? A dollar? $100? $1000?

One step toward answering this complicated question is to ask: how much would you pay to perpetually host George Orwell’s Nineteen Eighty-Four (or another 590kb text file or image)?

Great Explorers

Omar Metwally, MD
Analog Labs
15 September 2018

 

She was one of the truly fortunate people who discover what they love to do, have the means and the courage to follow their passion, and the gift to share their discoveries.

Robin Hanbury-Tenison on botanical artist Marianne North

Traveling in Japan with friends, Robin Hanbury-Tenison’s The Great Explorers captivated and inspired me with a collection of biographies of courageous individuals who explored and discovered continents, oceans, deserts, caves, and rivers. These people lived in times when large parts of Earth’s surface were unknown to humanity and entirely uncharted, and their stories left me wondering which frontiers stand before their contemporaries in pursuit of advancing society’s collective knowledge.

Most of these explorers lived before the advent of the digital age, relying on analog instruments to study terra nova: magnetic compasses, sextants, pacing beads, and their powers of observation. A journey that spans thousands of miles over years requires a deliberate estimation of the minimum amount of equipment necessary to facilitate their survival and studies without burdening them. In stark contract, we live in a time of abundant and oftentimes superfluous technology. During the past weeks of travel, I meditated on the question of how much technology one actually needs without becoming burdened by it. Every day reminded me of the joys of good company, the mind’s capacity to acquire languages, the utility of answering questions by asking locals rather than searching the web, and a postcard’s ability to distill thoughts into a memorable moment. Translation software and internet access, while sometimes handy, are no substitute for a sound grasp of a foreign language and asking locals how to get around. Google can help translate a phrase in a pinch, but it’s unlikely to know that a typhoon blocked a bus route and that a taxi driver will find the safest way home.

Richard Burton taught himself to speak 27 languages by the time he died in 1890, and his mastery of cultural camouflage opened doors to civilizations in Africa, India, and the Middle East which would have otherwise been closed off to Europeans of his time. Gertrude Bell, the first female officer in British Intelligence, mastered Arabic and Persian, translating poems by Hafiz as she trekked across deserts meeting local sheikhs and tribe leaders.

The tools one has at hand bias one’s approach to discovery. Compare our trip to Japan, for example, with that of Francis Garnier, who embarked on a treacherous journey to explore the Mekong with his crew. Compared to Garnier’s crew, we enjoyed every luxury available to modern travelers: airplanes, hotel reservations at our fingertips, smart phones, and Google Translate. And should we stray from cell reception or forget to charge our phones, my GPS-connected RPI can still pinpoint our whereabouts anywhere on Earth. Unlike the fearless explorers who risked life and limb in pursuit of beliefs, passions, or sheer love for discovery, who immersed themselves in native cultures and dedicated lifetimes to observing and describing, one might say we left Japan only slightly more acquainted with its people and culture as when we arrived.

IMG_3763

Humankind – the individual mind and collective human behavior – is a perpetual frontier. Know thyself, so the wisdom of ancient civilizations. Most interesting to me and pertinent to my research is the question of how human societies can use finite resources to provide better lives for future generations. A solitary zero-sum endeavor has the potential to become a vast leap forward when knowledge is shared effectively with a global village. This is what excites me most about open source collaboration and paradigms of participatory computing, such as peer-to-peer networking and data structures based on them.

Norwegian explorer Roald Amudsen left his medical studies to pursue his childhood dream of traversing the Northwest Passage. Having gone into debt to acquire a shipping vessel and assemble a team that would succeed in achieving his childhood dream – as well as becoming first to reach the South Pole – he departed on his journey hours before debt collectors planned to seize his ship. Debt was a recurring theme in many of these ventures, and many explorers burned through personal fortunes, imperial funds, or private capital to fund their expeditions. Amudsen’s story is an example of humankind’s capacity to lift itself from its own bootstraps, to produce lasting humanistic and technical works that are greater than the sum of individual labors. Amudsen’s successful return converted the same debt collectors into patrons and benefactors eager and proud to support his future voyages.

Screen Shot 2018-09-15 at 4.07.58 PM

Screen Shot 2018-09-15 at 4.07.00 PM

I chronicled our trip on the Ethereum network for the sake of posterity and to illustrate the utility of technologies that have grown into areas of interest and focus for me. For non-technical users, the easiest way to download these points from the Ethereum blockchain is to use the Ethereum Mist Browser (similar to a web browser for blockchain).  They can also be downloaded using numerous command-line frameworks for interfacing with the blockchain, such Web3py.

Fleet Fox contract address:

0xe18FE4Ded62a8aa723D6BE485B355d39d409354d

Link to Fleet Fox ABI

Many colleagues and friends have asked me, in the context of the distractions of financial speculation, why anyone would bother developing an application on a blockchain and forego the relative ease and inexpensiveness of services offered by large, established corporations. The reason why most people, myself included, use services offered by large tech companies is because they sell useful products. It is the logic of a free market. For example, I have a MacBook and iPhone, and I have benefitted from Apple, Google, and Amazon’s products. My work studio is also filled with home-made computers running Linux-based operating systems, and I use the Ethereum blockchain on a daily basis to run my and others’ code, which performs familiar tasks such as networking, storing, and moving information. To enjoy the convenience of mainstream products such as iMessage, iCloud, and iPhone, one must pay the Apple “tax” by purchasing one’s way into the Apple ecosystem, an exclusive gateway to access one’s multimedia, emails, text messages, documents, and personal contacts’ information. To enjoy the convenience of Google’s cloud, one pays the Google “tax” by waiving a certain degree of privacy and control over one’s personal data, which is only as permanent as a recurring credit card payment, the company’s existence, and the output of its machine learning algorithms. The same analogies and parameters can be extended to Facebook and Amazon.

The notion of transaction costs on blockchain networks is the analogous “tax” one pays for the security, persistence, and control over one’s information on a decentralized network, which are sacrificed more or less when relying on corporations. It is the cost of digital sovereignty. At the time of writing, the transaction cost of uploading each individual GPS location onto the blockchain cost 0.0004164664 Ether, or $0.09 at a rate of 1 ETH = $220 USD.

Blockchain technologies are in their infancy. Using a Blockchain Messaging Service today reminds me of sending email in the early 90s, when my uncle (a networking engineer) and a few hobbyists in the UK and Japan, whom I had never met, were the only people in my address book. One of my first books was a kid’s guide to the internet, which listed a handful of websites, such as Nickelodeon, Kellogg’s, and NASA, along with the authors’ advice to have a pencil and paper handy to doodle because some images (very low-resolution by today’s standards) could take up to 30 minutes to load on slow dial-up connections. Like those early days of the internet, blockchain applications still have a long way to go. And that’s what makes working with this technology fun and worthwhile. It’s a new frontier.

Fleet Fox (Github repo | Fleet Fox receiver) is an application that allows decentralized exchange of information and value tied to one’s physical location. It’s built on the same open source infrastructure I’ve used to chronicle our trip to Japan, and I’m excited to pilot the technology as a backend for vehicle fleet-sharing services in coming months. I would be grateful for and humbled to receive feedback from fellow explorers using it to collaboratively build a behavior-centric map of the world on the Ethereum blockchain.

IMG_3747

Take-Home Lessons:

  • What you really need is good friends. Technology is optional.
  • Anything can be learned.
  • Transaction costs on blockchain networks contribute to security, persistence, and control over one’s information on a decentralized network

Participatory Computing

One of my family friends congratulated me recently on the success of the ‘Ether startup,’ leaving me briefly puzzled. While the parallels between issuing common stock, stock options, and digital tokens are relatively intuitive, this was the first time I heard an open source community described as a company — by someone unfamiliar with open source software. Technically, Ethereum isn’t a startup but an organization rooted in open source communities working to develop decentralized, logic-gated information and value exchange. There are similarities, and differences, between open source communities funded by digital tokens and traditional startup equity.

Transitioning from a Clinical Informatics fellow at UCSF to starting an R&D lab has provided me an opportunity to reflect on the valuable mentorship I’ve been lucky to receive along the way.

Analog Labs is an applied research laboratory aiming to:

  1. Educate societies about blockchain technology and emerging paradigms in Participatory Computing
  2. Apply this research directly toward social good
  3. Be financially and environmentally sustainable

The excitement surrounding cryptocurrencies drew attention to a field in tech that had been niche until relatively recently. Capital allows companies to grow and subsequently create value for society. However too rapid influx of wealth into cryptocurrencies can outrun the ability of these technologies to mature and evolve. Rapidly increasing prices of cryptocurrencies can bring wealth (and ruin) to speculators and can also discourage the spending of Ether to actually run applications. The excitement surrounding the industry, despite being a source of attention and potential investment funds, needs to keep pace with the development of these technologies for the sake of the long-term health of these technologies.

Since I started purchasing health insurance last month — $902.04 per month for medical insurance and $32.52 per month for dental insurance — I’m reminded of the dizzying cost of healthcare in the United States — the glaring economic and public health problem that sparked my interest in Ethereum several years ago. Analog Labs’ flagship project is a study of grassroots primary care models on the Ethereum blockchain. This living experiment is an opportunity to tap into a body of literature in Global Health and international communities’ experience with designing creative solutions to the challenge of funding healthcare’s perpetual journey to better.

Analog Labs is also seeking to help develop 2-4 projects that further the lab’s goals of applied research for sustainable social good by providing funding, technical expertise, and collaborative work, especially in the areas of:

  • health insurance
  • environmentally-friendly shipping materials
  • public transportation

 

I’m grateful to Betty Tran, Steven Truong, Peter Mikhail, Royd Carlson, The Haham-Grossman family, Linh Tran, Darlene Nguyen, Dr. Blake Gregory, Dr. Indhu Subramanian, Dr. Taft Bhuket, Dr. David Avrin, Dr. Sidhartha Sinha, Dr. Scott Enderby, the Highland family, the UCSF community, Bella Shah, Seth Blumberg, Dana Gersten, Tanner Irwin, Youssif Abdulhamid, Shahzad Ahsan, and friends at UCSF’s Aldea community for their support, mentorship, and contributions to this work.

 

Omar Metwally, MD