
Bms4 f051
GyrocopterLLC/bms4-rust
Battery management system (bms) for 4 series Li-Ion cells programmed in Rust

HW/SW for energy replay
EnergyReplay is an open-source printed circuit board by FoRTE-Research, from the FoRTE-Research/EnergyReplay repository on GitHub. It is a 2-layer board of 80 × 58 mm with 57 parts on 107 nets, routed with 553 tracks and 84 vias.
It is built around the MSP430FR5994IPN, TPS613222ADBV and 19-237/R6GHBHC-A04/2T, with the LTST-C155GEKT among its other parts. Its parts include 19 resistors, 12 capacitors, 7 connectors, 5 ICs and 2 diodes. It belongs with the MSP430 boards of this library.
This is a hardware system for replaying arbitrary energy harvesting traces to drive experimentation on batteryless systems. It does so by measuring the voltage at the load and the current across a shunt resistor to determine instantaneous power input into the load and comparing this actual power input to a desired time-varying setpoint; if the actual power is below (above) the setpoint, it increases (decreases) supply voltage produced by a DAC to approach the setpoint. Since this is all done in software, you are free to implement whatever arbitrary functions may affect the power in your imagined system - IV curves for a solar panel, voltage-dependent efficiencies for a converter/regulator, etc.
V1.2 is available as part of this Github repo, but the PCBs have not been ordered. The only difference between V1.1 and V1.2 is the addition of the voltage divider (R18 and R19) to reduce measured load voltage. Because V1.1 measures load voltage directly, it cannot produce a load voltage higher than ~3.3V (software will stop voltage from increasing further if load voltage approaches this point to avoid damaging the hardware).
An assembled and validated PCB for V1.1 is available in the lab.
Schematic and PCB designs are generated in KiCad version 9.
The central microcontroller is an MSP430FR5994, which drives an MCP4725 12-bit DAC. Both the MSP430 and DAC operate at 3.3V; the output of the DAC is fed into an amplifier to increase its dynamic range to 5V. Current flows across a 0.5 ohm shunt resistor through an optional diode and into the load. Load current is measured by taking the voltage across the shunt resistor using a 150x differential amplifier into one ADC pin of the MSP430. Load voltage is divided by 2 using a resistive voltage divider and fed into another ADC pin of the MSP430. The short-circuit current of the OPA2837 op amps used is roughly 50 mA, so at 5V the nominal maximum output power is about 250 mW.
LEDs and switches are available for basic debugging and interactive use.
J1: Debug header for programming the MSP430FR5994.
J2: Power select jumper for replay system. The center pin is connected to the system supply voltage; it can draw power either from the debug header or from the 3V3 pin on J5.
J3/J4: Jumpers to connect and disconnect the green and red LEDs.
J5: GPIO breakout header. Also provides access to ground and 3V3 pins for supplying the system from a non-debugger source.
J6: Jumper for optional diode use. RAW is connected to the load side of the shunt resistor and can be connected to the load if the diode is not desired. Closing this jumper connects the load side of the shunt resistor to an LM66100 ideal diode to prevent current backflow from the load. When J6 is closed, the load should be connected on the OUT pin of J7.
J7: Jumper providing access to output pin for connecting load and ground pin for convenience. Do not close this jumper.
Code is generated as a Code Composer Studio version 11 project.
The energy trace to replay is defined in the dac.h file as a const float powerArray[]
containing the setpoints and a #define TIMESTEP macro to set the time (in milliseconds) that power
should stay at each setpoint. This timestep is used to calculate a period value for a hardware timer
that tracks the time spent at each setpoint; when the timer rolls over, the setpoint increments.
The main application loop reads samples from the shunt and load ADC pins, converts those readings to an actual power measurement, and compares them to the desired setpoint. The output voltage is incremented/decremented by 1 on each iteration of the main loop; this is basically a PID controller with KP = 1 and KI = KD = 0. Improving the design of this control loop is one avenue for improvement in future iterations, although it currently works "well enough". ADC, timer, and software control are all decoupled - increasing software execution speed (e.g., by doing the actual power calculation in hardware using some clever op-amp circuits) should only have the effect of reducing the response time of the control loop and not mess with the timing of the power trace. If you do significantly increase the software execution speed, you should double check that the ADC measurements are blocking so that it doesn't overshoot based on stale power readings.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 100n | Capacitor_SMD:C_1206_3216Metric | C1, C2, C3, C4, C11, C12 |
| 4 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3, J4, J6, J7 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 4 | NetTie_2 | NetTie-0.2mm:NetTie-2_SMD_Pad0.2mm | NT1, NT2, NT3, NT4 |
| 2 | 150k | Resistor_SMD:R_1206_3216Metric | R16, R17 |
| 2 | 1k | Resistor_SMD:R_1206_3216Metric | R14, R15 |
| 2 | 22u | Capacitor_SMD:C_1206_3216Metric | C9, C10 |
| 2 | 4.7k | Resistor_SMD:R_1206_3216Metric | R7, R8 |
| 2 | 820k | Resistor_SMD:R_1206_3216Metric | R18, R19 |
| 2 | SW_Push | TL59NF160Q:SW_TL59NF160Q | SW1, SW2 |
| 1 | 0.1u | Capacitor_SMD:C_1206_3216Metric | C7 |
| 1 | 10k | Resistor_SMD:R_1206_3216Metric | R9 |
| 1 | 10u | Capacitor_SMD:C_1206_3216Metric | C5 |
| 1 | 110 | Resistor_SMD:R_1206_3216Metric | R4 |
| 1 | 120 | Resistor_SMD:R_1206_3216Metric | R3 |
| 1 | 120k | Resistor_SMD:R_1206_3216Metric | R11 |
| 1 | 12k | Resistor_SMD:R_1206_3216Metric | R10 |
| 1 | 150 | Resistor_SMD:R_1206_3216Metric | R2 |
| 1 | 19-237/R6GHBHC-A04/2T | EAST1616RGBA3:EAST1616RGB_SMD_B_EVE | LED2 |
| 1 | 2.2n | Capacitor_SMD:C_1206_3216Metric | C6 |
| 1 | 2.2u | Inductor_SMD:L_1210_3225Metric | L1 |
| 1 | 20 | Resistor_SMD:R_1206_3216Metric | R5 |
| 1 | 4.7u | Capacitor_SMD:C_1206_3216Metric | C8 |
| 1 | 43 | Resistor_SMD:R_1206_3216Metric | R6 |
| 1 | 47k | Resistor_SMD:R_1206_3216Metric | R1 |
| 1 | 500m | Resistor_SMD:R_1206_3216Metric | R13 |
| 1 | 68k | Resistor_SMD:R_1206_3216Metric | R12 |
| 1 | Conn_02x07_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x07_P2.54mm_Vertical | J1 |
| 1 | Conn_02x10_Counter_Clockwise | Connector_PinHeader_2.54mm:PinHeader_2x10_P2.54mm_Vertical | J5 |
| 1 | Crystal | MS1V-T1K:XTAL_MS1V-T1K-32.768KHZ-12.5PF-20PPM-TA-QC | Y1 |
| 1 | LM66100DCKR | LM66100DCKR:DCK6_TEX | U5 |
| 1 | LTST-C155GEKT | LTST-C155GEKT:DIODE_LTST-C155GEKT_LTO | LED1 |
| 1 | MCP4725xxx-xCH | Package_TO_SOT_SMD:SOT-23-6 | U2 |
| 1 | MSP430FR5994IPN | MSP430FR5994IPN:PN0080A_N | U1 |
| 1 | OPA2387DGKR | OPA2387DGK:DGK0008A-IPC_A | U3 |
| 1 | Power Select | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
| 1 | TPS613222ADBV | Package_TO_SOT_SMD:SOT-23-5 | U4 |

GyrocopterLLC/bms4-rust
Battery management system (bms) for 4 series Li-Ion cells programmed in Rust




DavidMurrayP2P/PhotonPowerZero
A Solar Powered Raspberry Pi Board


UniversalScientificTechnologies/SPACEDOS02
Solid-state PIN diode dosimeter for manned spacecraft. Liulin detector replacement.

theparanoids/keyhole-badge
The Paranoids have designed a sound-reactive LED electronic conference badge for DEFCON 2022. This repository contains the PCB design files for the badge and the source code to the firmware that runs on the…
It measures 80 × 58 mm and has 2 copper layers, 1.6 mm thick.
57 parts, built around the MSP430FR5994IPN, TPS613222ADBV, 19-237/R6GHBHC-A04/2T and LTST-C155GEKT. 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 FoRTE-Research/EnergyReplay repository on GitHub, at the commit this page was made from: the board is energyReplay/energyReplay.kicad_pcb and its schematic energyReplay/Control.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask FoRTE-Research before reusing the design.