oscgonfer / iron-skulls-mask

Design files and code for Iron Skulls Co Azul Petroleo Mask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Iron Skulls Mask - Azul Petróleo

Code and hardware repository for Iron Skulls Azul Petróleo Mask.

Model

The mask can be 3D printed in two halves (left and right) with supports. Use at least 20% infill to avoid problems in the jaw connection. Both halves can be joined with M3 screws with inserts.

Electronics

There are 45 addressable RGB LEDs (144led/m, skinny type from Adafruit), 2 very high power white LEDs (discontinued?) and 1 laser pointer. Everything is controlled by a Feather M0 board, with a RFM69 433MHz radio and powered by a 2000mAh LiPo battery. A shield is used to control the different elements. In addition, an external antenna is used for enhanced reach.

  • RGB LEDs are powered directly from the battery, controlled with a single pin from the Feather
  • The two high power LEDs are controlled via mosfet, in parallel. The LEDs neeed 3.3V, so a high power LDO is necessary
  • The laser is controlled via PWM

A bill of materials is found in the hardware/controller folder as well as pcb designs for the feather's shield. The kicad files say it's a Atmega 32u4, which can be, but better to use the Atmel SAMD21 (M0) for the extra Flash memory.

Power

The feather handles battery charge via it's on board charger. The mask is charged via USB. Since there are so many LEDs, at least a 0.5C fast discharge rate battery is necessary if everything is on. This means that the battery will last 2h at this discharge rate, otherwise, at 0.2C (normal rate), it will last 5h:

Type Ratio Max. Current Duration (theory)
Normal 0.2C 400mA 5h
Fast 0.5C 1A 2h

The mask hasn't been tested for full power continuous operation for more than minutes, but it does last >6h in normal operation (not everything on at the same time, all the time).

Control

The control follows a client-server architecture. Each mask is a server, with an address, and there is a client connected to a computer via USB. The code in both ends is asynchronous so that messages can be sent and arrive to the masks at any time and be responsive.

Client side

A python script listens to UDP messages and forwards them to a Feather M0 board via USB. This is the Feather client code (platformio needed). This is the python script, using python AsyncIO for serial and OSC/UDP server.

Server side

A similar code listens on the servers:

  • Radiohead is used for receiving packets
  • The RGB leds are managed using NeoPixelBus
  • The two high power LEDs and the LED are managed using JLED

Animations are static, triggered by a string received via radio, and are stored in Animations.h. There is a table for describing how the animations are encoded here.

About

Design files and code for Iron Skulls Co Azul Petroleo Mask


Languages

Language:C++ 57.7%Language:C 22.7%Language:Python 19.6%