Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. A STM32 Microcontroller (the one used in this prototype is STM32F2027 discovery kit)

  2. A 4.2V Lithium battery (must not be wielded)

  3. A Battery Holder

  4. Some bread boards

  5. Resistances of 20, 100K ohms and such.

  6. An external load (the one used is DL 3031 Rigol)

  7. Some jumper cables, wires and alligator plugs

\uD83D\uDCD8 Instructions

...

  1. Our first step is designing an STM32 board with a battery charger, a battery connector, and an ADC connection to read the battery’s voltage. Most lithium batteries today have a charge voltage of 4.2V, but most STM32s have a maximum voltage of 3.6V. We need to build a voltage divider such that voltage measured by the ADC is of the verified range, but we cannot use the ADC to read an analog voltage which is higher than the supply voltage.

  2. The voltage divider diagram will be added in some time (I am not a 100% sure of the connections so I will make it next time we go) but we connected the resistors in series and connected the STM32 ADC port (PA1) between the resistors with one end of the resistors having the battery and the other end connected to the load.

  3. The laptop has to be connected to the STM32 and then some code can be used to get access to the voltage reading of the ADC (the code hasn’t been finalized and will be implemented we go next time in the bay).

...

  1. .

...