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

BLE Battery Shunt
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.
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.
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.
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.
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.
Configuring is done over the debug serial at 115200 baud, press h for menu. The name can be changed.
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
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 10K | Resistors_SMD:R_0805 | R102, R103 |
| 2 | CONN_1 | Divers:M5Bolt | P101, P105 |
| 2 | CONN_2 | Pin_Headers:Pin_Header_Straight_1x02 | P102, P103 |
| 1 | 100nF | Capacitors_SMD:C_0805 | C103 |
| 1 | 10uF | Capacitors_SMD:C_0805 | C102 |
| 1 | 1uF | Capacitors_SMD:C_1206 | C101 |
| 1 | 2.2K | Resistors_SMD:R_0805 | R104 |
| 1 | 270R | Resistors_SMD:R_0805 | R101 |
| 1 | ATTINY3224-SS | Housings_SOIC:SOIC-14_3.9x8.7mm_Pitch1.27mm | IC101 |
| 1 | CONN_3 | Pin_Headers:Pin_Header_Straight_1x03 | K101 |
| 1 | DEBUG | Pin_Headers:Pin_Header_Straight_1x05 | P104 |
| 1 | INA219-module | Divers:INA219Module | U102 |
| 1 | JDY25M | Divers:JDY-25M | U104 |
| 1 | LED | LEDs:LED_0805 | D101 |
| 1 | NCP1117ST50T3G | TO_SOT_Packages_SMD:SOT-223-3Lead_TabPin2 | U101 |
| 1 | NCP718 | TO_SOT_Packages_SMD:SOT-23-5 | U103 |
| 1 | THERMISTOR | Resistors_ThroughHole:Resistor_Horizontal_RM7mm | TH101 |
It measures 64.6 × 47.9 mm and has 2 copper layers, 1.6 mm thick.
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.
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.
Its repository states no licence, so its author keeps all rights: ask ieb before reusing the design.

ieb/BatterySensor
A Modbus RTU Battery Current and Voltage sensor board based Attiny3224, MAX485, MAX9918 chips.
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…



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

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


ieb/CanPressure
NMEA2000 Sensor based on ATTiny3224 for Pressure, Temperature, Humidity