Hackpack v3: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 16: Line 16:


== Hardware details ==
== Hardware details ==
=== Power management ===


I want to be able to detect when external power is connected and disconnected. External power will be an automobile,
I want to be able to detect when external power is connected and disconnected. External power will be an automobile,
Line 29: Line 31:
This chip has some registers you can read to find out the state of the battery.
This chip has some registers you can read to find out the state of the battery.
You can put it to sleep to save power by dropping SDA and SCL for at least 2.5 seconds.
You can put it to sleep to save power by dropping SDA and SCL for at least 2.5 seconds.
=== Neopixel ===
There are 16 on this board. I also still have the 8x8 matrix from Hackpack v1 (Signal 2015).
I am not working with the LEDs yet, this is a little information I collected for future needs.
"NeoPixel" is an [https://www.adafruit.com/category/275 Adafruit brand] for an LED with a controller. Each LED is individually addressable on a serial bus. You can buy individual LEDs or you can get various strips and sheets.
There are more tutorials on these than you can shake a stick at on the [http://adafruit.com/ Adafruit] site.
Here is a [https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Components/LED/adafruit-neopixel-uberguide.pdf pdf guide]

Revision as of 16:15, 28 May 2017

Hackpack v3 was part of the badge for Signal 2017.

It consists of a custom PC board with a socketed Particle Electron, a Lithium Ion battery, and 16 Neopixel LEDs.

Now that I am home, I am experimenting with it.

You can program it entirely via the Particle web site, or you can download Particle's fork of Atom, and use it to edit code. Atom is a Github product so as you might expect, your code gets stored in Github. Then you can compile the code (on the Web) and then you can flash it into the Electron.

I am trying out Atom right now. I installed it on my Mac.

Hello World

See the code and some variants at https://github.com/twilio/hackpack-v3

Hardware details

Power management

I want to be able to detect when external power is connected and disconnected. External power will be an automobile, so I want to know when the car starts and is shut down.

BQ24195 power management unit and battery charger (pdf data sheet) Refer to section 8.5 to find out about i2c communications with this device. You can poll it or accept interrupts from it; when you get an interrupt, read the fault register to clear it.

Q. Is the interrupt line connected on the Electron board?

MAX17043 fuel gauge (pdf data sheet) This chip has some registers you can read to find out the state of the battery. You can put it to sleep to save power by dropping SDA and SCL for at least 2.5 seconds.

Neopixel

There are 16 on this board. I also still have the 8x8 matrix from Hackpack v1 (Signal 2015).

I am not working with the LEDs yet, this is a little information I collected for future needs.

"NeoPixel" is an Adafruit brand for an LED with a controller. Each LED is individually addressable on a serial bus. You can buy individual LEDs or you can get various strips and sheets.

There are more tutorials on these than you can shake a stick at on the Adafruit site. Here is a pdf guide