Skip to content

〽️ DC power monitoring using a Trinket and INA219 breakout

License

Notifications You must be signed in to change notification settings

mildsunrise/power-trinket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

power-trinket

Little project that uses the Trinket and INA219 current sensor breakout from Adafruit to monitor the power consumption of a DC device, using up to 26V and 3.2A, and shows realtime lectures of voltage, current and power.

Software screenshot

Communication is done via TrinketFakeUsbSerial which is explained in Adafruit Learning System.

Install

You should have Python, PIP and libusb installed.
On Debian-based OSes, you can do:

sudo apt-get install python-dev python-pip libusb-1.0-0

Then install the PyUSB and docopt Python modules:

sudo pip install pyusb docopt

You will also need the Arduino IDE, correctly configured to use the Trinket, and with the TrinketFakeUsbSerial and TinyWireM libraries installed.

Now go on and use it!

Use

You need a 5V Trinket working at 16MHz to use this. Upload the sketch and build the following circuit:

Sketch breadboard view

Connect the load and power supply, plug the Trinket via USB, and run the Python script:

python power-trinket.py

If everything goes well, the Trinket will be detected as soon as it boots the sketch and the script will start displaying realtime lectures at the console.

You can see which options it accepts with:

python power-trinket.py --help

About

〽️ DC power monitoring using a Trinket and INA219 breakout

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published