Readme update

This commit is contained in:
Jan Mrna
2026-03-22 20:08:42 +01:00
parent 911837e964
commit 7fd8ffead5
+23
View File
@@ -26,6 +26,8 @@ We will not use any LED driver IC. We will either simply use constant voltage, o
## Notes ## Notes
### Build
In fw folder run: In fw folder run:
``` ```
@@ -33,3 +35,24 @@ cmake -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake -S ./ -B Debug -DCM
arm-none-eabi-objcopy -S -O binary led_driver.elf led_driver.bin arm-none-eabi-objcopy -S -O binary led_driver.elf led_driver.bin
st-flash write led_driver.bin 0x8000000 st-flash write led_driver.bin 0x8000000
``` ```
### Debug
```
target extended-remote localhost:4500
gdb led_driver.elf
# in gdb then:
load
```
### Design notes
- bez zateze (bez zapnutych tranzistoru u H mustku) je samovybijeni cca 0.7 V za 50 ms (v prvni chvili, z 5V na 4.3V)
- coz odpovida cca tomu ze tam je zatez (2k || 2k) ohm = 1k ohm, takze casova konstanta RC je 0.3 s, takze na 80% (4V) by se to melo dostat za 0.2 RC = 0.2 * 0.3 s = 0.06 s = 60 ms, coz zhruba sedi
- viz [zaznam se Saleae](./data/vybijeni_C_50_ms_strida.sal)
- coz zhruba sedi s vypoctem:
- $Q_{partial} = Q * dV / V_0 = V_0 * C * dV / V_0 = C * dV = 330e-6 * 0.7 F = 0.00023 F$
- I je zhruba 5 mA (5V, 1k zhruba hodnota delice (viz nahore))
- Q_{partial} / I = 0.046 s = 46 ms, coz zhruba sedi tem 50 ms ktere jsem nameril
- TODO zvysit rezistory napetoveho delice, 1k je malo