Skip to content

Support for INA219 High Side DC Current Sensor Breakout #1500

Closed

Description

@msi-matthew

It would be nice to have support for a current sensor, which could be used to trigger other devices. There is an Arduino library made by Adafruit (https://github.com/adafruit/Adafruit_INA219) and a Python library by Chris Borrill (https://github.com/chrisb2/pi_ina219) as well as a few others an Github repos.

What would it take to port one of these into the Johnny Five environment?

Activity

  1. dtex commented on Sep 4, 2018

    @dtex
    Collaborator

    This device uses I2C so it is totally doable. The first thing to solve is whether it should be its own, new class, a plug-in, or if an existing class should be expanded to include current sensors (i.e. Relay becomes Power).

    I lean toward its own new class. but would be interested to hear what others think.

  2. msi-matthew commented on Sep 4, 2018

    @msi-matthew
    Author

    I also found this repo, which seems capable of interfacing with Johnny Five, but perhaps not in a standardized way. (https://www.npmjs.com/package/ina219)

    I'm not sure how J5 classes/plugins are defined, what features are required to make an appropriately defined plug-in?

  3. dtex commented on Sep 9, 2018

    @dtex
    Collaborator

    @msi-matthew I don't know enough about the raspi-io to know if Johnny-Five and the ina219 code can both have access to different GPIO pins on the Pi, but I bet @nebrius can advise on this. I seem to recall that there is a way to tell raspi-io to not use certain pins, leaving them available for other code.

    Apart from sharing access to the GPIO pins on the Pi there is no reason that Johnny-Five can't work with that code. Johnny-Five plays nice with others.

  4. nebrius commented on Sep 13, 2018

    @nebrius
    Contributor

    I followed up in the Raspi IO issue thread, but tl;dr yes the ina219 module and raspi-io should work together without modification or the need to use the excludePins property that @dtex was referring to.

  5. dtex commented on Sep 13, 2018

    @dtex
    Collaborator

    Closing. This is being handled over in the raspi-io issue linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions