Giter VIP home page Giter VIP logo

magic-8-badge's Introduction

Magic 8-Badge

Hardware, software, and other resouces for a fun little CircuitPython-compatible PCB badge!

Note: Lots of information and improvements to be added soon!

IMG_0826

Hardware

All of the hardware design files are included in the hardware/ directory. The board was designed with KiCad 7, using mostly components from JLCPCB's Assembly Parts Library.

Firmware

The Magic 8-Badge was created to utilize Adafruit's CircuitPython ๐Ÿ, and will hopefully have a board definition available on the CircuitPython website soon. The v1 version of the Magic 8-Badge distrbuted at PhreakNIC 24 in Nov 2023 are runnings a slightly-modified version of CircuitPython 8.2.0 that enables software pullup resistors on the I2C lines connected to the 6DoF IMU chip. The diff in changes in available in firmware/8.2.x-circuitpython-patch-208ebdf3.diff.

The CircuitPython *.py files used to run the badge are included in firmware/circuitpy-code. This code is a huge mess, but I have some changes coming soon that will clean up the code, speed up the boot time, improve the UX and graphics a bit, and hopefully add more fun little features! The main application is found in firmware/circuitpy-code/code.py, and there are some required libraries that need to be installed from the Adafruit CircuitPython Bundle as well as the Community Bundle:

  • Adafruit CircuitPython Bundle requirements:
    • adafruit_display_text
    • adafruit_imageload
  • Community Bundle requirements:
    • gc9a01

You'll need to copy these libraries from the respective bundles into the /lib directory on the CIRCUITPY drive that should show up when plugged into a USB port on your computer.

Errata

I will include notes her about board bugs, things to consider when making code changes, and whatever else little idiosyncasies are present in various versions of the Magic 8-Badge.

v1

Version v1 of the Magic 8-Badge has a couple of issues that are mostly worked around in software and hardware re-work:

  • The QMC6308 magnetometer chip (U9) has been removed from all v1 boards because the power and ground connections are reversed. If the chip is placed, the board will fail to start, effectively shorting the 3v3 power rail. Don't do this!
  • There are no external pullups on the I2C lines connected to the QMI8658C accelerometer/gyroscope chip (U7). CircuitPython doesn't currently support setting internal pullup resistors for I2C pins, and the internal pullup resistors on the RP2040 are technically out of spec for I2C communications (50-80kohms). The patch to the CircuitPython core described above manually enables the internal pullup resistors, and I've not seen any issues reading from the QMI8658C with those. I'm going to try to submit a pull request to allow compile-time enabling of these internal resistors so that a custom build of CircuitPython is no longer neccessary. If you want to try a different version of CircuitPython that doesn't include that patch, no harm will be done, but CircuitPython will throw an error when trying to connect to the QMI8658C.
  • There is no low-voltage cut-off for the Li-ion battery used for the Magic 8-Badge. The battery selected does offer low-voltage protection to keep the battery from discharging to dangerous levels, but the threshold voltage is lower than I would have liked. I recommend disconnecting the Li-ion battery if it is not going to be used in order preserve the capacity and health of the battery.

License

The hardware and its design files are licensed under the CERN Open Hardware Licence v2 - Permissive.

The firmware/software is licensed under the MIT License.

The CrumpSpace logo is a trademark of CrumpSpace and should not be used in association with hardware or software that is sold or distributed by others.

magic-8-badge's People

Contributors

tylercrumpton avatar

Stargazers

Keegan Leitz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.