Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Why is the output of ACS712 current measurement module unchanged?

Why is the output of ACS712 current measurement module unchanged?

Scheduled Pinned Locked Moved General Discussion
mysensors
4 Posts 4 Posters 45 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Tessie TT Offline
    Tessie TT Offline
    Tessie T
    Banned
    wrote on last edited by
    #1

    Why is the output of [ACS712](dee940ca-34bd-42c3-b68d-c288c88b4412-image.png link url) current measurement module unchanged? I connected 5.0V to VCC, and the output is always 2.56V. After connecting the current of 2-5A in series, the output has not changed. I use an AC power supply, and I directly use an AC voltage regulator to connect the thermal, serial current. Does anyone know the reason?

    1 Reply Last reply
    0
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by
      #2

      I think you need to post a clear drawing or photos of the setup and the code you are using.

      I donlt know what you mean by "connecting the current in series" nor what "AC regulator" you are using or what "thermal serial currenr" is.

      1 Reply Last reply
      0
      • ZenBlizzardZ Offline
        ZenBlizzardZ Offline
        ZenBlizzard
        wrote on last edited by
        #3

        It seems the ACS712 current measurement module may not show expected changes due to setup issues, like incorrect wiring or misunderstanding of signal interpretation. Checking if you're measuring the right type of current (AC vs. DC) and ensuring your connections are correct can often resolve this.

        F 1 Reply Last reply
        0
        • ZenBlizzardZ ZenBlizzard

          It seems the ACS712 current measurement module may not show expected changes due to setup issues, like incorrect wiring or misunderstanding of signal interpretation. Checking if you're measuring the right type of current (AC vs. DC) and ensuring your connections are correct can often resolve this.

          F Offline
          F Offline
          fsgraz
          wrote on last edited by
          #4

          @ZenBlizzard in case you are measuring the output with a multimeter, you will get an averaged level, since AC current waveform should be sinusoidal and overlapped with the Vcc/2->2.56V in your case.
          To measure the current you need a decently high sampling and some math.

          #define SENSITIVITY	66		// mV/A
          
          const float readings = 5;
          const float alpha = 2.0 / (2 * readings + 1); 
          
          for (ifor = 0; ifor < 250; ifor++)
          	{
          		// Voltage
          		voltageSampleRead = analogRead(V) * vccRead / 1023 - vccRead / 2;	/* read the sample value including offset value*/
          		voltageSampleSum = voltageSampleSum + sq(voltageSampleRead);		/* accumulate total analog values for each sample readings*/
          		voltageSampleOffsetSum = voltageSampleOffsetSum + voltageSampleRead;
          		
          		// Current
          		currentSampleRead = analogRead(I) * vccRead / 1023 - vccRead / 2;	/* read the sample value including offset value*/
          		currentSampleSum = currentSampleSum + currentSampleRead * currentSampleRead;		/* accumulate total analog values for each sample readings*/
          		currentSampleOffsetSum = currentSampleOffsetSum + currentSampleRead;
          
          		wait(1);
          
          
          	}
          
          	voltageMean = voltageSampleSum / ifor;				/* calculate average value of all sample readings taken*/
          	voltageOffset = voltageSampleOffsetSum / ifor;
          	reading = (sqrt(voltageMean) - voltageOffset) * 230.0 / 1.0;		// read voltage / reported voltage.
          	voltage = round_to_dp(alpha * reading + (1 - alpha) * voltage,1);
          	Serial.println(voltage);
          	if (voltage < 25) voltage = 0;
          
          	currentMean = currentSampleSum / ifor;				/* calculate average value of all sample readings taken*/
          	currentOffset = currentSampleOffsetSum / ifor;
          	reading = (sqrt(currentMean) - currentOffset) / SENSITIVITY * 1000 - currentZeroOffset;		// subtract no load current.
          	if (reading < 0) reading = 0;
          	current = round_to_dp( alpha * reading + (1 - alpha) * current,2);
          
          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          26

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular