Close
0%
0%

Github Connected Soldering Iron

My favorite programming language is solder -- Bob Pease

Similar projects worth following
Using an internet connected microcontroller (probably a NodeMCU) running MicroPython we will be able to connect a soldering iron to Github. This device will be able to track when a soldering iron turns on and when it is removed from it's cradle and submit that information as a commit.

Challenges addressed:

Github has done wonders for social coding. One of Github's most distinctive features is the the contribution heatmap. This tracks your commits and in no way encourages burnout [1]. Currently Github tracks almost every coding language with one glaring omission: solder. Time spent soldering has not been tracked and in turn can be considered wasted. All of that changes today.

Solutions:

Using an internet connected microcontroller (probably a NodeMCU) running MicroPython we will be able to connect a soldering iron to Github. This device will be able to track when the iron turns on and when it is removed from it's cradle.

The soldering iron after being turned on will use the microcontroller to log time out of the cradle and put an entry into a Github repository with a durational timestamp in it's commit message [2].

i.e.

Turned On [Apr 30, 2017 03:21:16 PM]

Soldering [spent 8m10s]

Soldering [spent 3m55s]

Soldering [spent 1m21s]

Soldering [spent 10m01s]

...

Turned Off [Apr 30, 2017 04:42:18 PM]

This will require a small pressure switch and some voltage detection. The project could be fitted to almost any soldering iron but will focus on my Weller one to start.

World changing possibilities:

Hardware and software people will finally live in a world of equality.

License:

GPL3

Code and Schematics will be released on Github

Notes:

[1]: https://github.com/isaacs/github/issues/627

[2]: Format stolen from https://github.com/timeglass/glass

  • 1 × NodeMCU
  • 1 × IR Break Beam Sensor HD-DS25CM-3MM​
  • 1 × Non-Invasive AC Current Sensor SCT-013-000

  • Iron Removal sensor

    cabalist05/14/2017 at 16:54 0 comments

    The initial pass of the iron removal detection is finished. This uses a pair of IR Beam breakers attached to the iron holder. After some experimentation a large binder clip handle was extremely well suited for the job.

    The part in question is the HD-DS25CM-3MM. It is a simple digital IR break beam sensor that can be tied directly to one the MCU pins.

    See Below:

  • Software Update

    cabalist05/01/2017 at 19:58 0 comments

    I am now able to commit messages to Github using their API.

    pygit was overkill and I can do everything using requests/json with the API. Here is the code before it has been converted to micropython:

    # coding=utf-8
    """
    Writing this code in regular python before moving to micropython.
    
    This code will handle putting commits up on Github for the Github connected Soldering Iron
    """
    
    import json
    
    import requests
    
    GITHUB_OAUTH_TOKEN = "your_oauth_token_goes_here"
    GITHUB_REPO_ADDRESS = "" # For example: "Cabalist/testSolder"
    
    commit_message = "First try #2"
    
    last_commit = requests.get("https://api.github.com/repos/{}/git/refs/heads/master".format(GITHUB_REPO_ADDRESS),
                               params={"access_token": GITHUB_OAUTH_TOKEN})
    
    last_commit_sha = last_commit.json()['object']['sha']
    
    r = requests.post("https://api.github.com/repos/{}/git/commits".format(GITHUB_REPO_ADDRESS),
                      params={"access_token": GITHUB_OAUTH_TOKEN},
                      json={"message": commit_message,
                            "parents": [last_commit_sha],
                            "tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904"}) # This is the empty folder SHA in git
    
    commit_sha = r.json()['sha']
    
    r2 = requests.patch("https://api.github.com/repos/{}/git/refs/heads/master".format(GITHUB_REPO_ADDRESS),
                        params={"access_token": GITHUB_OAUTH_TOKEN},
                        headers={'content-type': 'application/json'},
                        data=json.dumps({"sha": commit_sha, "force": True}))
    

  • First Code Talk

    cabalist05/01/2017 at 03:23 0 comments

    My first steps to get this code working:

    1) Explore the `Timer` class in Micropython or the `time` module. Can this handle 1hr+ events?

    2) Port some minimal piece of pure python git to MicroPython. This code here is probably the most adaptable. https://github.com/benhoyt/pygit Gonna have to go at it with a machete...

    3) Create voltage sensing code using one of the SCT-013-000 Non-invasive AC Current Sensor Split Core Transformers.

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates