ACS712 20A

For general Flowcode discussion that does not belong in the other sections.
jgu1
Posts: 777
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

ACS712 20A

Post by jgu1 »

Hi!

I am using the ACS 712 20 sensor with Arduino Uno. This has been working but now not anymore?
It work perfect in simulation but not in real.

The display show by: 0,0Amp >24,75. by 1,0Amp > 25,74. by 2,0 Amp > 26,74

If I add this calculation in a calculation: Amp = Amp - 24,74 it work perfect?

For me it look like the ref voltage out of ACS712 on 2,5V is removed in the calculation for the ACS component? Please advice.

Br jorgen
Attachments
MartinACXxxOK.fcfx
(10.82 KiB) Downloaded 59 times

medelec35
Matrix Staff
Posts: 1924
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 623 times
Been thanked: 645 times

Re: ACS712 20A

Post by medelec35 »

Hi Jorgen.
The readings you are getting are caused by the incorrect VDD properties setting.
instead of 501.00 for VDD of 5.01V, you need to enter 5.01 instead.
The reference voltage has not been removed, there have been no recent changes.
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

Ok I thought it was ok, this is what the proporties i comes up with default when choosing the ACS component. Again I will follow your advice, also concerning the ESP32. Again I "out" and is first able to test on thursday and you hear from me. :D

Thank´s Martin

Br Jorgen

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

Perform a test with 5.01 Volt. Again you are rigth it work, no bug. Will you tell me what the Vref. is doing?

I perform the test with the ESP32 tomorrow ;)

Thank´s in advance

Br Jorgen
Attachments
Vref.PNG
Vref.PNG (2.14 KiB) Viewed 2352 times

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

I need a to measure a bigger value than 20Amp so therefor I now use ACS758 LCB- 50U

The output of the analog out when 0 amp. Offset is0,640V and the mV increase with 60mV/Amp.

When I connect the output to the arduino without load, the display show -47,4 amp.

If I connect a potmeter (divider with 5V) and connect to the Arduino I the display first show 0,0V with input of 2,5V and it look like 0,020V/Amp

Have I done anything wrong or can I adjust it in Properties. Please.
Br Jorgen
Attachments
MartinACX50AmpOK.fcfx
(10.85 KiB) Downloaded 67 times
Last edited by jgu1 on Mon Dec 19, 2022 5:31 am, edited 1 time in total.

medelec35
Matrix Staff
Posts: 1924
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 623 times
Been thanked: 645 times

Re: ACS712 20A

Post by medelec35 »

Hi Jorgen.
The reason you are having issues is because the ACS758 Flowcode component is bidirectional.
The component you are using is unidirectional, hence the current reading when no current is flowing.
I will see what I can do for you.
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

Ok that`s the reason, also it`s offset is 0,600V? Anyway Will be glad If you are able to help, thanks`s

Br Jorgen

medelec35
Matrix Staff
Posts: 1924
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 623 times
Been thanked: 645 times

Re: ACS712 20A

Post by medelec35 »

Hi Jorgen.
I have modified the component to include both Bidirectional and Unidirectional Current Directionality.
I have also added a voltage offset option to deal with different component tolerances.
Finally, have added a custom selection so you can use a component that is not on the list.
It allows you to set high and low currents, offset, and sensitivity.
The component will be pushed onto the update system as soon as possible.
If you would like to try the component before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV9\Components
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten with the updated version.

Can you let me know how it goes, please?
Attachments
ACS712_Current_Sensor.fcpx
(5.55 KiB) Downloaded 76 times
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

You are amazing :D I am first able to test in real world tomorrow evening or wednesday. As soon I have perform a test, you are first who I tell.

Thank you Martin.

Jorgen

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: ACS712 20A

Post by jgu1 »

Hi Martin!

Just perform a quick test with the ACS758 working perfect now :D

But no change whatever value I put in the offset, is this only for custom selection ?

Edit; Just have a closer look to the custom selection, yes for that, so nice Martin, look forward to test .


Thank you very much.

Br jorgen

Post Reply