55. STM32CubeIDE ACS712 current Sensor with STM32F103C8T6

Sdílet
Vložit
  • čas přidán 19. 09. 2021
  • STM32 Blue Pill for beginners
    Code and diagram are at www.micropeta.com/video55

Komentáře • 35

  • @farukben
    @farukben Před rokem

    Thank you for your content sir.

  • @ligneshenathi5704
    @ligneshenathi5704 Před 2 lety +2

    Hi !!!
    What should be done in measuring AC current ?
    How to get the Vrms value ?
    How to get Maxi and Mini values of Vout ?

  • @hogo750
    @hogo750 Před 2 měsíci

    Hi, I would love to see alternating current measurement with this sensor in this video. 🎉

  • @sabiinsearch1
    @sabiinsearch1 Před 2 lety

    Very nice and explained in detail…kindly share for AC measurement also..Thanku

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +5

      Thanks. The ACS712 module can be used for both DC and AC current. You can use the same way for AC current. Same wiring. Same CubeIDE settings and same code. Just cut the wire and feed into the sensor. Please take safety precautions since AC voltages are lethal.
      The country which I am living currently has a law. Only the licensed Electricians are allowed to cut AC wires. I need to respect the law so I can not make a video and demonstrate. Thanks for understanding.

    • @sabiinsearch1
      @sabiinsearch1 Před 2 lety

      @@NizarMohideen Thanku for the reply. Understand the limitations... Sir can u plz tell if voltage divider is to be used with stm32 ..?

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      Yes. Sensor Out will be 0 - 5Volt. Same for AC 220V.
      Use 5k Ohm & 5k Ohm resisters to get 0-2.5Volt.
      It is exactly same setup as I used for DC current

    • @sabiinsearch1
      @sabiinsearch1 Před 2 lety

      @@NizarMohideen Thanks for the reply..

  • @fernandocatalani8295
    @fernandocatalani8295 Před rokem

    Why the current value are negative?

  • @muhammadwasifnazir9551
    @muhammadwasifnazir9551 Před 2 lety +1

    sir can you please tell how to measure AC voltage using STM32

  • @bangsame121
    @bangsame121 Před 2 lety

    can you make more videos about zmpt101b with stm32

  • @WISmusicOfficial
    @WISmusicOfficial Před 2 dny

    I think if you use sensor for measure, you should calibrate it.

    • @NizarMohideen
      @NizarMohideen  Před 2 dny +1

      You are right. I have calibrated only zero ampere point.
      We have to calibrated at several points until rated 30 ampere
      We need variable load to produce variable high currents. Even 20A/ 5V produce 100W and the load I had can not handle the heat for few seconds.
      So for many beginner students don’t have the facility to calibrate at home
      If they wanted so precise measurements then they should contact current calibrating people.
      Thanks

  • @fatiswealth7865
    @fatiswealth7865 Před 2 lety

    Hi, thanks for recommending this video!
    Do you have a video on adjusting the PWM with a potentiometer? 😊

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      In my channel
      Video no 15 - PWM
      Video no 16 - Potentiometer
      Video no 32 - Potentiometer with PWM (It is for multi also it can be used for single)

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      czcams.com/video/92_CWBWXPw0/video.html
      czcams.com/video/oNiz5md51G4/video.html
      czcams.com/video/03IxWEe1bQk/video.html

    • @fatiswealth7865
      @fatiswealth7865 Před 2 lety

      Hi, would like to ask, can this work without the voltage divider?

    • @fatiswealth7865
      @fatiswealth7865 Před 2 lety

      For the current sensor

    • @NizarMohideen
      @NizarMohideen  Před 2 lety

      Current sensor output voltage range is between 0-5 V
      STM32 ADC input voltage range is between 0-3.3 V
      These two do not match so we can use a voltage divider to make it compatible

  • @sabiinsearch1
    @sabiinsearch1 Před 2 lety

    Facing some problem with same set up .. (Used 1k + 1k resistors for voltage divider) . In live expression, the values are not updating continuously. I have to manually pause and resume. Can u plz suggest .... waiting for reply

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      STM32CubeIDE Settings
      ADC1 - IN9 (tick)
      Parameter Settings --> ADC Settings --> Continuous Conversion Mode (Enabled)

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      For some microcontrollers, you need to stop and start ADC in the loop.
      HAL_ADC_Start(&hadc1);
      HAL_ADC_PollForConversion(&hadc1,1000);
      readValue = HAL_ADC_GetValue(&hadc1);
      HAL_ADC_Stop(&hadc1);

    • @sabiinsearch1
      @sabiinsearch1 Před 2 lety

      @@NizarMohideen Sir, checked these settings but same problem exist...

    • @NizarMohideen
      @NizarMohideen  Před 2 lety

      Okay. We need to find out the reason.
      Is the live expression not lively? Create a simple counting program. Add one to a variable every second and monitor it in the live expression
      Is the ADC not converting continuously? Use an LCD or OLED to display the values and see whether it is updating.

    • @sabiinsearch1
      @sabiinsearch1 Před 2 lety

      Sir checked as directed but variable can only be added / checked in expression not in Live Expression Window...if added it says feature is not available

  • @Hammad5113189
    @Hammad5113189 Před 2 lety +1

    Thankyou for this video sir. I am trying to design 3 phase overrcurrent relay. Could you please tell me how can I take 4 current inputs and 3 voltage inputs in the stm32cubeide?

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +2

      Thanks. You need to use multi channel adc.
      I have done with 3 potentiometer input in my video-no-32
      Have a look at it.
      Similarly you can use seven channels

    • @Hammad5113189
      @Hammad5113189 Před 2 lety +1

      @@NizarMohideen Thankyou for the quick reply
      , I'll check it out!

  • @abdulhai2201
    @abdulhai2201 Před 2 lety

    This project would have been better if it had a display with it

    • @NizarMohideen
      @NizarMohideen  Před 2 lety +1

      Hi Abdul Hai,
      Thanks. I left the display part for a later video where I can combine voltage and current measurement together to calculate power (in Watt). If you want to display only the current, you can use the steps I used in OLED with DHT11 (czcams.com/video/rIqM63S9eUQ/video.html). It is very similar to displaying Fahrenheit

    • @abdulhai2201
      @abdulhai2201 Před 2 lety

      Voltage show in display

  • @hogo750
    @hogo750 Před 2 měsíci

    Hi, I would love to see alternating current measurement with this sensor in this video. 🎉