Sooo. Before I procrastinate it any longer (because my perfectionism claims that it's not finished enough), I've decided to finally publish the current, unfinished state of the firmware and some accompanying documentation for the #startergenerator

https://github.com/RainbowLabsDE/BSG-Driver

I hope it helps ;)

GitHub - RainbowLabsDE/BSG-Driver: A WIP firmware to control a 48V belted starter generator (BSG) out of a Mercedes MHEV

A WIP firmware to control a 48V belted starter generator (BSG) out of a Mercedes MHEV - RainbowLabsDE/BSG-Driver

GitHub
Also have a bonus video of the #startergenerator spinning up to 4500 RPM under 20 Nm of load without ramp-up.

I've also built a Grafana dashboard for this test setup.
Each #startergenerator is connected to a STM32F072 via CAN which are then connected to the PC via USB serial.
A script then forwards control commands to the STM32s and also receives the telemetry data and publishes them to an InfluxDB.

Here you can see the data of the first video and also a more zoomed out view of the test runs with increasing torque target and slow RPM ramp up.

Finally got to doing some dyno runs with the #startergenerator this week.

As I'm able to vary many factors (target drive torque, generating torque, RPM and time), I tested many variations.

tl;dr: They definitely deliver on their 12.5 kW promise, but the stator gets hot quickly, especially at low RPMs and high torque.
I couldn't test the full 55 Nm, only up to 36.6 Nm, as that's the generating limit.

I'm still amazed by the engineering of those things. So much data and protections :D

Because they report voltage, current, torque and RPM (and I trust those values reasonably), I'm able to calculate the kinetic power and electrical power. The difference between those two values should approximate the efficiency of the #startergenerator.
So I quickly threw together a plot of the efficiencies at various RPM and torque levels. Both for the driving and generating mode.
I honestly expected a bit more, but I guess they are more optimized for torque and other factors :D

Today, I've built a "temporary" test stand, so I can hopefully test the (thermal) performance of the #startergenerator in the coming days.

It was a welcome excuse to finally dabble in some metalworking again :D

Also, those belt tensioners really need quite some force.

- Built the (shitposty) #USB2Speakon adapter
- Designed a new revision of the #SSD1303 breakout PCB
- Developed a small ESP-NOW telemetry and logging framework for a model rocket #jfzhn project
- Finished reverse engineering the #startergenerator. It spins now! \o/
- Built #TheLAEMPAN together with @techbeard and @Toble_Miner (RGB replacement PCBs for IKEA LAMPANs, more info coming sometime™)

#GoodOf2024 2/3

The general control loop is also pretty impressive, the engineers at #Bosch SEG definitely did their job well.

The lowest limit I can set is 6 RPM and it runs buttery smooth.

And it has insane amounts of torque. If you hold the pulley really tightly, it slips out of most strong hands at around 6-7 Nm (as reported via the CAN status messages).

This will be really fun once put into some small vehicle :D

(It can also recuperate really well, but can't run in reverse at all)

#startergenerator

We also did a max RPM test of the #startergenerator using one of @patagona's rescued Pylontech batteries, because the 20A of my 1kW lab PSU weren't enough :D

I set the torque limit to 0.7 Nm (out of 55), no RPM limit and let it rip :D
It reached a peak of 43A (~2kW) at the end of the acceleration, settled at 25A (~1.2kW) and reached a peak RPM of 13400.

It was a bit scary tbh :D
(Not sure if the video accurately captured the sound it made)

(Pylontech thread: https://chaos.social/@patagona/113149877881417810 )

patagona (@[email protected])

Attached: 1 image Heute bei "Kleinanzeigen-Unfälle mit patagona": 3x 2.4kWh 19" LiFePo4-Akkumodule für unter 200€ Der Catch: die Dinger sind nem Wasserschaden zum Opfer gefallen. (Thread) #LiFePo4 #Solar

chaos.social

There's still a lot left to do.
I need to implement the #XCP stuff into the STM32 firmware, so it can run the #startergenerator stand-alone.
Stuff like:
- Checking the firmware version on the ECU, so it doesn't poke the wrong memory address
- Reading and parsing the status of the motor
- And actually controlling the motor properly instead of just sending it a hardcoded 1 Nm torque request :D

And then also cleaning it up enough, documenting and testing it thoroughly, so it can be published.