Go Down

Topic: trouble with acs712 (measuring ac current) (Read 3061 times) previous topic - next topic

Juraj

I found this development board on my research and it claimed 32bit adc. Let say voltage around 110V, using this STM32 board and acs712 will this be more accurate? Please comment what you think
no. the problem is that you want measure under 3A with 30A module

lupamundur

no. the problem is that you want measure under 3A with 30A module
if  i changed it to acs712 5A, it will work perfect right?

Wawa

List ALL the items you are planning to use AND what you want to measure.
An STM32 (3.3volt micro) and and ACS712 (5volt sensor) can't be used together.
Don't think you can simply measure complex loads with simple code.
Only resistive loads will be 'accurate'.
Leo..

lupamundur

List ALL the items you are planning to use AND what you want to measure.
An STM32 (3.3volt micro) and and ACS712 (5volt sensor) can't be used together.
Don't think you can simply measure complex loads with simple code.
Only resistive loads will be 'accurate'.
Leo..
ummm...

first schematic :
let say i want to measure AC current under 5AC with 110V from main source.
and here's my list item:
            1. acs712 (5A)
            2. STM32, yes some pin only accept 3.3V. but IDK about 3.3 volt micro
will it work? given that acs712 was in the right position (under 5A, 110v AC), and STM32 working on 32bit ADC. also will it work to measure DC current under 5A and under 100V?

second schematic :
measuring AC current under 5A with 220V from main source.
item list :
            1. acs712 (5A)
            2. STM32
will it work?

it would be enough for me if it only have 80% accuracy. just wanted to know with my listed item will it be work or not. about the code, maybe i will have to spend some time searching again :D


Only resistive loads will be 'accurate'.
Leo..
by resistive load, it means something that generate magnetic field right? i will placing it far from any magnetic field. actually the thing i want to measure is my air conditioner current, when it reach up to 4A i want it to turn on relay to pump water so heat from ourdoor unit get lower. lowering heat means lowering Amp too. :D

Wawa

Did you read the second sentence of post#17?
Forget about the STM32, or forget about the ACS712.

So you don't want to measure current, you only want to detect if the aircon is on.
Why don't you use a DS18B20 temp sensor in the air stream.
Much safer than fiddling with AC power.
Leo..

lupamundur

#20
Oct 15, 2018, 11:55 pm Last Edit: Oct 15, 2018, 11:56 pm by lupamundur
Did you read the second sentence of post#17?
Forget about the STM32, or forget about the ACS712.
yeah, but i'm not sure what it is mean. can you please kindly explain it to me?

So you don't want to measure current, you only want to detect if the aircon is on.
Why don't you use a DS18B20 temp sensor in the air stream.
Much safer than fiddling with AC power.
Leo..
ummm it's not to detect if air conditioner is on or not. due to time, voltage on my region would drop to 200V and it causing Amp on aircon to rising up to 4-5 Amp to balancing the watt and it causing outdoor unit to heated more. i know using DS18B20 (i had buy it) would be more convenient, but i'm just curious enough to know how this thing work (acs712), and did i have the capability to make it possible, and work fine. basically just curious enough hehe :D

Wawa

#21
Oct 16, 2018, 12:29 am Last Edit: Oct 16, 2018, 12:36 am by Wawa
There are many reasons why you shouldn't use a 5volt ACS712 with a 3.3volt processor.
One of them is that the STM32 might not like the possible >=4.5volt output of the sensor.
Another one is that you loose ratiometric behaviour. Zero current drift, gain drift, etc.

A clip-on current sensor with 1volt AC output (ebay), with e few extra parts (two resistors + cap), might be a better (and safer) solution for a 3.3volt MCU.
Leo..

lupamundur

#22
Oct 16, 2018, 01:21 am Last Edit: Oct 16, 2018, 01:23 am by lupamundur
There are many reasons why you shouldn't use a 5volt ACS712 with a 3.3volt processor.
One of them is that the STM32 might not like the possible >=4.5volt output of the sensor.
Another one is that you loose ratiometric behaviour. Zero current drift, gain drift, etc.
i see.. so basically it was because difference ratio from 5V collected data and 3.3V processed data. am i right?

A clip-on current sensor with 1volt AC output (ebay), with e few extra parts (two resistors + cap), might be a better (and safer) solution for a 3.3volt MCU.
Leo..
actually i have ordered ta12-100 (see attachment) with board and resistor attached, basically it was same like your recommend and already have 800 Ohm on the output. here is the specification from seller:
Code: [Select]
The Electricity sensor module is a member of Crowtail. It is based on the TA12-200 current transformer which can transform the large AC into small amplitude. You can use it to test large alternating current up to 5A.

Features
Crowtail compatible interface
Display Type: FSTN/Positive/Transflective/6:00 Visual Angle
Maximum 5A input
High accuracy
Small size

Specifications
Ratio: 2000: 1
Input Current: 0-5A
Output Current: 0-2.5mA
Sampling resistor: 800
Sampling voltage: 2V
Non-linearity: 0.2%
Phase Shift: 5 '

combining with arduino uno, it will also do the trick wouldn't it?

Wawa

#23
Oct 16, 2018, 02:19 am Last Edit: Oct 16, 2018, 02:23 am by Wawa
The TA12-100 (200ohm burden resistor) seems to output a peak/peak voltage of 2.8volt@5Amp (1volt AC).
Both 5volt and 3.3volt boards should be able to work with that.
The TA12-200 outputs 5.6volt peak/peak@5A. Too high for a 3.3volt board.
Make sure what you have ordered.
Leo..

Juraj

The TA12-100 (200ohm burden resistor) seems to output a peak/peak voltage of 2.8volt@5Amp (1volt AC).
Both 5volt and 3.3volt boards should be able to work with that.
The TA12-200 outputs 5.6volt peak/peak@5A. Too high for a 3.3volt board.
Make sure what you have ordered.
Leo..
ta T12-200 has error in datasheet. it outputs 5 V at 10 A

pylon

Quote
by resistive load, it means something that generate magnetic field right? i will placing it far from any magnetic field. actually the thing i want to measure is my air conditioner current, when it reach up to 4A i want it to turn on relay to pump water so heat from ourdoor unit get lower. lowering heat means lowering Amp too
You demonstrate that you're not experienced with electrical installations. You should not work with mains electricity at that level of knowledge, 110V AC may be lethal!

If you must measure the current used by your air conditioner, use the clip-on sensor suggested by Wawa, that way you don't have to open the circuit.

Go Up