Skip to the content
PCBKitNew board
2 layers64.6 × 47.9 mmBLEBatteryMonitor, the printed circuit board in 3D

BLEBatteryMonitor

ieb/BLEShunt1

BLE Battery Shunt

Size
64.6 × 47.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
20
Nets
20
Pads
85
Tracks, vias
217, 10
Pours
10
Routed
Yes
KiCad
KiCad 4
Created
14 Sep 2022
Updated
9 Sep 2023

Overview

BLEBatteryMonitor is an open-source printed circuit board by ieb, from the ieb/BLEShunt repository on GitHub. It is a 2-layer board of 64.6 × 47.9 mm with 20 parts on 20 nets, routed with 217 tracks and 10 vias.

It is built around the ATTINY3224-SSU. Its parts include 5 ICs, 5 connectors, 4 resistors, 3 capacitors and 1 diode. It belongs with the power and radio and wireless boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

BLEShunt

This is a Battery Shunt module that uses a JDY-25M to notifiy subscribing BLE Devices of current, voltage, power from a INA219 and 2 NTC temperature sensors. The BLE Device can be phones or ESP32's that are able to connect to the service UUID and subscribe to the characteristics, both are non standard and statically defined inside the JDY-25M firmware.

The JDY-25M is normally in a light sleep consuming about 50uA, emitting advertisements every 3s. On connection the Attiny3224 wakes and starts emitting notifications of to the characteristic. During sleep the Attiny3225 and all other periperhals are put into deep sleep, hence the device should be capable of being permanently connected to 12V batteries as the draw is significantly less than the leackage current of the battery. This assumes the battery is > 50Ah.

Programming is via UDPI, using jtag2udpi although other prorammers can be used.

JDY-25M

In mode 0 it operates as a transparent GATT Characteristic device with a fixed Service UUID, and characteristics. Writing to the serial porta results in devices that have connected and subsctibed to the characteristic being notified of each byte[] terminated by \r\n.

INA219

Very simple to directly interact with over i2c. 1 config register, and 2 registers for raw voltage and raw shunt voltage. It is configured for 16V bus voltage, 12bit giving 4mv resplution, and 80mV shunt which gives 0.019mv per bit or 29mA/bit resolution. Stability appears rock solid.

Attiny3224 sleep

The Attiny sleep is simple and allows putting the chip into deep sleep woken by a interrupt attached to the status pin of the JDY-25M. This goes high when a device connects, waking the device out of deep sleep.

In sleep the INS219 is also put to sleep, but the JDY-25 light sleeps consuming about 50uA and emtiting BLE advertisements.

Configuration

Configuring is done over the debug serial at 115200 baud, press h for menu. The name can be changed.

BLE

Service UUID is 0xFFE0, caracteristic is 0xFFE1 or 0xFFE2 supporting notify and write.

Data format uses int16 packed into a buffer 14 bytes long, big endian.

Bytes 0-1 Voltage * 0.001 +- 32V. Bytes 2-3 Current * 0.01 +- 320A. Bytes 4-5 Temperature 1 * 0.01 C +320C -273C Bytes 6-7 Temperature 2 * 0.01 C +320C -273C Bytes 8-9 On time in seconds Bytes 10-11 error flag set bits indicates nature of the error. 0x0001 == failed reading voltage. 0x0002 == failed reading current. 0x0004 == failed reading temp1. 0x0008 == failed reading temp2. Byte 12 == \r Byte 13 == \n

PCB

Schematics

Pcb

Todo

  • Implement temperature sensors
  • Build temperature sensors
  • calibrate

Parts

20
QtyValueFootprintReferences
210KResistors_SMD:R_0805R102, R103
2CONN_1Divers:M5BoltP101, P105
2CONN_2Pin_Headers:Pin_Header_Straight_1x02P102, P103
1100nFCapacitors_SMD:C_0805C103
110uFCapacitors_SMD:C_0805C102
11uFCapacitors_SMD:C_1206C101
12.2KResistors_SMD:R_0805R104
1270RResistors_SMD:R_0805R101
1ATTINY3224-SSHousings_SOIC:SOIC-14_3.9x8.7mm_Pitch1.27mmIC101
1CONN_3Pin_Headers:Pin_Header_Straight_1x03K101
1DEBUGPin_Headers:Pin_Header_Straight_1x05P104
1INA219-moduleDivers:INA219ModuleU102
1JDY25MDivers:JDY-25MU104
1LEDLEDs:LED_0805D101
1NCP1117ST50T3GTO_SOT_Packages_SMD:SOT-223-3Lead_TabPin2U101
1NCP718TO_SOT_Packages_SMD:SOT-23-5U103
1THERMISTORResistors_ThroughHole:Resistor_Horizontal_RM7mmTH101

Questions

How big is the BLEBatteryMonitor PCB?

It measures 64.6 × 47.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the BLEBatteryMonitor use?

20 parts, built around the ATTINY3224-SSU. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the BLEBatteryMonitor KiCad files?

From the ieb/BLEShunt repository on GitHub, at the commit this page was made from: the board is pcb/BLEBatteryMonitor.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the BLEBatteryMonitor design in my own project?

Its repository states no licence, so its author keeps all rights: ask ieb before reusing the design.

Similar boards

  • 2 layers56.7 × 25.4 mmBatteryMonitorATTiny3224, the printed circuit board in 3D

    BatteryMonitorATTiny3224

    ieb/BatterySensor

    A Modbus RTU Battery Current and Voltage sensor board based Attiny3224, MAX485, MAX9918 chips.

    24 parts1
  • 2 layers21.1 × 19.6 mmSoic14-bb, the printed circuit board in 3D

    Soic14-bb

    jaco-pixeldump/attiny-soic-14-barebone-breakout-board

    A compact, breadboard-friendly breakout adapter PCB for 14-pin SOIC Microchip ATtiny microcontrollers (such as ATtiny3224, ATtiny1624, ATtiny824, ATtiny424, as well as 1-series and 0-series parts like ATtiny1614…

    5 parts1MIT
  • 2 layers79 × 80 mmDiy esc, the printed circuit board in 3D

    Diy esc

    Siddharth2308/esc

    79 parts1
  • 2 layers93 × 93 mmAMN TopPcb, the printed circuit board in 3D

    AMN TopPcb

    hschack/ANM_TOP_PCB

    31 parts
  • 2 layers62.5 × 48.5 mmVacSensor, the printed circuit board in 3D

    VacSensor

    hschack/ZB3245TSS_OPENPNP

    More to come Link Mellow Fly Super8Pro https://teamgloomy.github.io/flysuper8proh723general35.html

    25 parts
  • 2 layers64 × 78 mmActuator board, the printed circuit board in 3D

    Actuator board

    ieb/autopilot

    An ML Autopilot designed and written almost entirely by Google AntiGravity.

    37 parts
  • 2 layers89.2 × 38.3 mmCanGNSS, the printed circuit board in 3D

    CanGNSS

    ieb/CanGNSS

    NMEA2000 GNSS device using Neo M8N receiver and attiny3224 MCU.

    22 parts
  • 2 layers66.4 × 28.1 mmCanPressure, the printed circuit board in 3D

    CanPressure

    ieb/CanPressure

    NMEA2000 Sensor based on ATTiny3224 for Pressure, Temperature, Humidity

    18 parts