GithubHelp home page GithubHelp logo

carleeno / balance_buddy_esp32 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitchlol/balance_buddy

2.0 1.0 0.0 3.18 MB

Arduino based accessory board for the balance app in BV's BLDC firmware.

C++ 91.38% C 8.62%

balance_buddy_esp32's Introduction

Balance Buddy ESP32

ESP32 based accessory board for the balance app in BV's BLDC firmware.

Based off Mitch Lustig's balance buddy for arduino nano

Features

  1. Directional LEDs for headlight/taillight with dimming.
  2. Buzzer for over speed, low voltage, and high speed half switch warnings.
  3. A teeny tiny small display thats so small you cant even see it with data you probbaly wont be able to read (it's smol).
  4. It uses CAN bus, so there are NO DOWNSIDES to adding it. JUST DO IT!

Parts List

  1. ESP32
  2. CAN transceiver (like the TJA1051)
  3. 5v piezo (active or passive) buzzer
  4. 2x LED Strips (WS2812 GRB is the default, but anything supported by FastLED should work)
  5. SSD1306 128x64 Display (SPI, any color, the blue/yellow works nice too)

Wiring

Can Module:

See config.h for pins

Basically:

  • CAN_RX to CRX on the transceiver
  • CAN_TX to CTX on the transceiver
  • Transceiver VCC and GND to 5v and ground
  • Transceiver CANL and CANH to VESC CAN

2. Piezo:

if you use a fancy buzzer/speaker make sure it wont blow the nano

See config.h for pins

Basically:

  • BEEPER_PIN to + on beeper
  • Ground to - on beeper

3. LEDs:

if you wire lots of LEDs make sure it wont blow the nano

See config.h for pins

4. SSD1306:

See config.h for pins. SPI preffered, I2C kinda supported (but sloowwwww)

Wiring overview:

Not a fancy image, but it's accurate:

Configuration

Options and pins

All features are specified in config.h

Compiling/Installing

Just open the project with platformio and click upload

Updating firmware over Wifi

Set your wifi ssid, password, and device hostname in config.h

Uncomment these 2 lines in platformio.ini

  • upload_protocol = espota
  • upload_port = (hostname).local with (hostname) defined in config.h

If hostname doesn't work, set upload_port to the ip address of the esp32.

If it can't upload, try power/cycling the device so it reconnects to wifi.

Why does my balance buddy keep crashing?!!!

Applicable to I2C:

If youre using a display, it is likely related to bus capacitence and wire.h hangs
In my case using minimal length wires, and a 2.2k pull up from scl to 3.3v solved my issues.

Using SPI is preferred and fixes this.

balance_buddy_esp32's People

Contributors

carleeno avatar mitchlol avatar

Stargazers

 avatar  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.