Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


ADC pin Current Draw

I am looking for the typical as well as the maximum value of ADC pin current draw while it is sampling. My micro is a STM32F103.
Many thanks.

I don’t have the datasheet for the F103 handy, but here’s some data taken from the F072 datasheet, which I suspect applies to all STM32’s with ADC’s.

Section 6.3.16, from table 58, STM32F072 datasheet (DocID025004 Rev 2)

Sampling switch resistance: 1K
Internal sample and hold capacitor: 8 pF

Worst-case peak current draw will be:
Ipeak = Vin / 1K
If Vin = 3.3V, Iin(peak) will be 3.3 / 1000 ~= 3.3mA

This is the worst-case peak current, it assumes that the internal sampling capacitor is fully discharged (close to AVss) and your signal source (Vin) is at the upper analog rail (AVdd). As the sampling cap charges (or discharges) to the level applied to the analog input, the current will of course decrease and eventually approach 0.

The actual formula for peak current draw takes into account the voltage level across the internal sampling capacitor:

Ipeak = (Vin - Vcap) / 1K

Vin = Voltage applied to analog input pin
Vcap = Voltage across internal sampling capacitor just before input is sampled. This will be at or close to the level of the last analog input that was converted.

Actual current draw can be positive or negative depending on the voltage level that the internal sampling capacitor is sitting at, and what the signal level applied to the analog input is when the analog mux switches the pin onto the sampling cap.

Ideally, analog signal sources provided to an ADC input (for any device that uses a sample-and-hold type of signal capture) should be as low impedance as possible. A high-impedance signal source can be used only if you’re willing to specify a lengthy sampling period. All STM32 ADCs provide a means to set the input sampling period. I would not suggest using the minimum sampling period unless your signal impedance is very low (< 270 ohms).

I recall seeing somewhere, in one of the ST reference documents (I regret to say I don’t remember which one) a table showing recommended signal impedance for differing ADC clock rates and sample period selections. The 270 ohm figure mentioned above is one value I remember seeing in that table.


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs