Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
xro:eh2024_badge_homeassistant_esp32 [2024-10-17 02:10] xro created |
xro:eh2024_badge_homeassistant_esp32 [2024-10-17 02:32] (current) xro |
||
---|---|---|---|
Line 3: | Line 3: | ||
==== Goal ==== | ==== Goal ==== | ||
- | - Control the brightness and activity of the beautiful EH2024 Badge via Homeassistant | + | * Control the brightness and activity of the beautiful EH2024 Badge via Homeassistant |
- | - which means, controlling it via esphome from an ESP module | + | * which means, controlling it via esphome from an ESP module |
- | - which means, controlling it's supply voltage | + | * which means, controlling it's supply voltage |
==== HowTo ==== | ==== HowTo ==== | ||
+ | |||
* The badge takes 3V and about 200mA of power | * The badge takes 3V and about 200mA of power | ||
* It still works with about 1.8V where it takes about 50mA but has almost no activity and is very dark | * It still works with about 1.8V where it takes about 50mA but has almost no activity and is very dark | ||
- | *which is perfect, so we can control it's activity by controlling it's supply voltage | + | * which is perfect, so we can control it's activity by controlling it's supply voltage |
+ | |||
+ | Basically we want to trick the step-down module to generate less output by changing the feedback voltage it sees by generating an offset voltage using the ESP32's DAC. | ||
+ | |||
+ | {{ :xro:eh2024_badge_esp32.svg |}} | ||
- To do that, we use a common StepDown module and connect it's Vin and GND to 5V and GND of an ESP32 | - To do that, we use a common StepDown module and connect it's Vin and GND to 5V and GND of an ESP32 | ||
Line 19: | Line 24: | ||
- for fun, we also connect the Step-Down Modules Vout to an ADC pin of the ESP32 | - for fun, we also connect the Step-Down Modules Vout to an ADC pin of the ESP32 | ||
- let's make sure the DAC output is 0V and re-measure the Step-Down Output and re-adjust it's poti so the output is exactly 3V (or a bit more if you want it brighter) | - let's make sure the DAC output is 0V and re-measure the Step-Down Output and re-adjust it's poti so the output is exactly 3V (or a bit more if you want it brighter) | ||
- | - we are done | + | - Flash the ESP32 with esphome |
+ | - we are done | ||
+ | |||
+ | {{:xro:pxl_20241016_214556255.jpg?400|}} | ||
+ | |||
+ | === Resources === | ||
+ | |||
+ | * [[https://github.com/btittelbach/esphome_config_examples/blob/main/eh_badge_power_indicator.yaml|ESPhome Example YAML]] | ||
+ | * [[https://www.analog.com/en/resources/technical-articles/digital-adjustment-of-dcdc-converter-output-voltage-in-portable-applications.html|Helpful Document explaining different options of controlling power supply voltage]] | ||
+ | |||
+ | ==== Result ==== | ||
{{:xro:20241017_002312-collage.jpg?400|}} | {{:xro:20241017_002312-collage.jpg?400|}} | ||
- | {{ :xro:eh2024_badge_esp32.svg |}} | + | Badge controllable via HomeAssistant. |
- | {{:xro:pxl_20241016_214556255.jpg?400|}} |
realraum Graz, Brockmanngasse 15, 8010 Graz, realraum - Verein für Technik in Kultur und Gesellschaft