cancel
Showing results for 
Search instead for 
Did you mean: 

SmartSwitch current sensing not working

DiogoPedrosa
Associate III

Hello everyone,

I’m having an issue reading the current sense (CS) output from a VND7040 using an STM32G473 ADC.

When driving a DC motor with PWM:

• At ~50% duty cycle, I measure around 500 mV on the CS signal (after RC filter) using an oscilloscope
• At 100% duty cycle, the voltage drops to around 0 mV

I’ve locked the internal multiplexer so the CS output corresponds only to the channel driving the motor.Also sen is always on at 3.3v. Vcc is stable at around 13V.Also have the gnd filter with diode and resistor recommended on the application document.

The CS pin is connected through an RC filter to the ADC input (schematic attached). However, the voltage behavior seems inconsistent — especially at 100% PWM where I’d expect a higher or steady value since current is continuous.

Observations:

  • On the oscilloscope, the CS signal looks like pulses at 50% PWM (which average to ~500 mV after the capacitor)

  • At 100% PWM, the filtered voltage goes near zero

Questions:

Shouldnt it be linear with current rising?What could be the issue? I ve had the same circuit and it worked before on another board.

Could ADC input impedance/sampling time affect the measurement on STM32G473?

Any guidance or reference designs would be appreciated.

Thanks in advance.

Screenshot 2026-01-26 135013.png

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

If the problem is still relevant:

The RC filter is probably too high‑impedance / too slow for the ADC.

When switching to 100% PWM, the VND7040 current mirror/diagnostic circuit operates differently than in pulsed mode, so that hardly any pulsed signals occur at the CS pin and your RC filter (plus the load from the ADC input and its sample-and-hold capacitor) practically pulls the level down to 0V.

Please try:

  • Reduce the series resistor significantly (e.g. to around 1k or less)
  • Increase the ADC sampling time of the ADC within the STM32G473
  • Optionally adjust the capacitor value (don’t make it too large)

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

If the problem is still relevant:

The RC filter is probably too high‑impedance / too slow for the ADC.

When switching to 100% PWM, the VND7040 current mirror/diagnostic circuit operates differently than in pulsed mode, so that hardly any pulsed signals occur at the CS pin and your RC filter (plus the load from the ADC input and its sample-and-hold capacitor) practically pulls the level down to 0V.

Please try:

  • Reduce the series resistor significantly (e.g. to around 1k or less)
  • Increase the ADC sampling time of the ADC within the STM32G473
  • Optionally adjust the capacitor value (don’t make it too large)

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Changing the series resistor and also the capacitor made it worked better.