From 96b4d132c6d603e653c87ddd134f02228fd9f34d Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Thu, 2 Jan 2025 15:20:25 -0500 Subject: [PATCH] update voltage divider, was reworked --- projects/dyno/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/dyno/main.cpp b/projects/dyno/main.cpp index 636ddde..ecb607b 100644 --- a/projects/dyno/main.cpp +++ b/projects/dyno/main.cpp @@ -332,8 +332,8 @@ void SysTick_Handler(void) // Get system voltage // adc is 12 bit (4096 count) spread over 3.3V - // voltage divider is 15k/1k - dyno.system_voltage = (ADC1->JDR1 / 4096.0f) * 3.3f * 16.0f; + // voltage divider is 20k/1k + dyno.system_voltage = (ADC1->JDR1 / 4096.0f) * 3.3f * 21.0f; ADC1->CR2 |= ADC_CR2_JSWSTART; // Encoder update runs at 250hz