0
\$\begingroup\$

INA293 has 110V common-mode voltage

1MHz gain bandwidth

my signal 90V, 100Hz PWM, 10%-25% duty,

load current 30mA max

shunt resistor 5 Ohm

the gain of ic 20V/V

enter image description here

Vout = 30mA x 20V/V x 5 Ohm = 3V

i use esp32 adc to meaure Vout (Vout propotional to current)

at 100% duty only I get a continuous current reading

at 10% duty, or less than 80% duty current measurement is not continuous, it gives zeros in between.. why is that happening?

my load is not inductive as well, same time load is on only for like 0.5sec,1 sec or 2 sec

I cannot use a low pass filter due to PWM pulses are required for my load

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Do I understand correctly you are asking why you read zeros in the dead time of the PWM signal? I think you're really close to answering this yourself. What current do you expect when the output is turned off @ 90% of the time? Hint: the INA293 is working as intended. \$\endgroup\$ Commented Jun 22, 2020 at 11:38
  • \$\begingroup\$ @LukeHappyValley is there any other way to measure the current of this PWM signal? \$\endgroup\$
    – oppo
    Commented Jun 22, 2020 at 19:23
  • \$\begingroup\$ "my load is not inductive" - What is your load? "I cannot use a low pass filter due to PWM pulses are required for my load" - Any reason you can't low pass filter the current measurement? \$\endgroup\$ Commented Jun 22, 2020 at 20:57
  • \$\begingroup\$ @Bruce Abbott I need PWM pulses as it is... load is a resistor.... so if law pass filtered, i am losing PWM pulses since it will average. \$\endgroup\$
    – oppo
    Commented Jun 23, 2020 at 4:38
  • \$\begingroup\$ "I need PWM pulses as it is" - Now I am confused. You said "less than 80% duty current measurement is not continuous, it gives zeros in between.", which suggests you don't want PWM pulses in your measurement, but now you say you do want PWM pulses. Please explain. \$\endgroup\$ Commented Jun 23, 2020 at 5:07

1 Answer 1

0
\$\begingroup\$

The INA293 has a wide bandwidth and high slew rate relative to your 100 Hz PWM, so it will follow the actual current through the load which is a square wave. To get a continuous measurement representing the average current you need to integrate readings over the PWM period.

You can do this in software after the readings have been converted to digital numeric form. First take readings until you see the value drop to 0 and then go higher. This is the start of the PWM cycle. Then continue taking readings and and adding them to an accumulated total until you see the current drop to 0 again. Since the PWM period is fixed, you now just have to divide the accumulated total by the number of readings that would be made over a whole PWM period. eg. if the ESP32 is sampling at 6000 samples per second then divide the total by 60 (6000 sps / 100 Hz).

\$\endgroup\$
8
  • \$\begingroup\$ please refer "same time load is on only for like 0.5sec,1 sec or 2 sec" \$\endgroup\$
    – oppo
    Commented Jun 23, 2020 at 6:38
  • \$\begingroup\$ And this is relevant how? \$\endgroup\$ Commented Jun 23, 2020 at 6:40
  • \$\begingroup\$ so I miss the reading I don't even get **5 ** \$\endgroup\$
    – oppo
    Commented Jun 23, 2020 at 7:01
  • \$\begingroup\$ Why would you 'miss the reading'? \$\endgroup\$ Commented Jun 23, 2020 at 7:41
  • \$\begingroup\$ I read ADC for 0.5 sec since the load is on for 0.5 sec but I get 0 reading, the ic cannot capture the current reading during that 0.5 sec period - I get only zeros (0 0 0), if the load is on for 1 sec barely get the current reading 5 in this case (0 0 0 5 0 0 0), if the load is on for 5 seconds then i will get 4 times correct current reading and zeros in between (5 0 0 0 5 0 0 0 5 0 0 0 5 0 0), \$\endgroup\$
    – oppo
    Commented Jun 23, 2020 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.