ACS712 component doing wrong

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

ACS712 component doing wrong

Post by Monie Jacobsen »

Hi!
I have tyed to make a program with ACS712. I used Jordy´s component from here: viewtopic.php?f=58&t=12785&p=51809&hilit=acs#p51809
When I try to compile to chip, I get error code – 2.
Please, what am I doing wrong?
Files:
Acs712.fcfx
(5.75 KiB) Downloaded 602 times
Last edited by Monie Jacobsen on Mon Jul 18, 2016 8:42 am, edited 2 times in total.
Best Regard
Monie

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: ACS712 component doing wrong

Post by kersing »

Monie, could you include the error messages in your post? Providing those messages could give us a clue about the issue without having to download both the flowchart and the component... (not to mention having to boot the computer and start flowcode ;-) )
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello kersing

Here is Compile two Hex:
Compile to Hex.txt
(5.14 KiB) Downloaded 563 times
Best Regard
Monie

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: ACS712 component doing wrong

Post by medelec35 »

Hi Monie,
If you look at:

Code: Select all

ROM available:8192 words, used:8654 words (105.6%), free:-462 words (-5.-6%)
Too much code to fit in ROM, overfilled by:462 locations.
It shows there is not enough ROM so you will need to choose a target with a bigger ROM (Program Memory) size.
viewtopic.php?f=54&t=16403&p=72550#p69835
Or
only have 8bit selected

Martin
Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hi Martin.

Dont know if you had a look on my program, it is very small. Does it mean we can not use the component ACS in FC, or am what am I do wrong, please.

Monie
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

See here, Arduino UNO does not work.
Input A0 for ACS712
Have attached:
Program
arduinoAamp.fcfx
(7.34 KiB) Downloaded 593 times
Compile_Messages
Compile_Messages_from_Arduino_UNO.txt
(4.71 KiB) Downloaded 581 times
Can compile but no change in the display.
The input signal into A0 changes not reading in the display.
Very much hope to help...
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello!
Please is nobody able to help or fix the ACX component, or is it useless, please please.
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

Hi Monie,

Have you been able to get in touch with Jordie to see if he can shine any light on the issue. It's his components and I don't think he published the source code so very hard to try and guess what might be going wrong.

Have you done the basics like a 1 second flasher test to confirm the micro is running and have you set up the component's properties correctly?

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj

Yes there has to be a 1 second flash.
I have looked up the component's properties CORRECTLY...
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj
Can you make a component to ACS7xx
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

I can do but currently there is a lot on my plate in terms of adding polish to v7 components, bug fixing and documentation.

I also don't want to tread on Jordy's toes as his component should work well. I'll see if I can get in touch with him regarding the issue.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj

Thank you very much
It will be very pleased about component came to work in practice
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

Hello Monie,

Do you get anything appearing on the LCD?

I wonder if the problem is the LCD rather than the ACS7x component as that simply seems to be doing ADC readings and then converting the result.

If the LCD is working fine then maybe there is a problem with the getAverage ADC reading that we can investigate?

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hi Ben!

Thank you for help. I have no problem with the LCD. Seemed to work. The component work perfect in simulation.

Concerning the ADC I dont know. I would be glad if you could help, or tell me what I could do, test or investigate.

Best regard
Monie.
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

Hi Monie,

A quick test would be to use a standard ADC component and use the GetAverageByte or GetAverageInt functions to take a reading of the ADC voltage. Then pass this value to the display.

If everything worked well then you should get a number on your display. If there is a problem then the GetAverage function may cause a hardware lockup which we will need to investigate.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hi Ben!

I try to made a program according your request. It work well in simulation as in real world.

So what can we now do :?:

Thank´s

Monie...
Attachments
Acs712 Ben_Test.fcfx
(5.97 KiB) Downloaded 468 times
Best Regard
Monie

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: ACS712 component doing wrong

Post by jgu1 »

Hello Monie!

Have you figuring out of something concerning the ACSxx component. I have also tested it. It work fine in simulation, but error when compiling. I am also very interested in this component. :D it would be easy to make an ammeter with this component.

Best regard

Jorgen.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello!

Unfortunately not. Obviously nobody can. I also try PM to Jordy, but it is not possible to send him a PM.

Monie. :?
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

Hello,

I have spoken with Jordy and he was going to dig through his code and try to find the source to send to me. I haven't heard back from him yet about this.

One thing you could try is to look in the C code produced by the component and try to replicate the code in a macro. Hopefully it shouldn't be too hard but if your still having problems then I'll get it on the list and try to make this an inbuilt officially supported component.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj
Is that how you think as an attachment?
I did not ouput to the display
ArdinoUnoACS7xx-Test.fcfx
(33.06 KiB) Downloaded 494 times
But is it something you could use?
Or can fix coderne to so I can test ACS7xx???
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj!

Please, something new concerning the ACS component.
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ACS712 component doing wrong

Post by Benj »

Hi Monie,

I've just tried the program on an Arduino Uno using v6, replacing the I2C LCD with a standard LCD and used a potentiometer to simulate the analogue input and everything seems to be working fine.

The number is changing nicely from 5,59 to -5,59.
arduinoAamp-1.fcfx
(6.08 KiB) Downloaded 430 times
Looks to me like the component is working correctly but maybe something in your circuit is having a problem?

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello Benj!

It seemed to work on Arduino. But on a pic16fxx I still get the compilemessage “ ROM available:8192 words, used:8248 words (100.6%), free:-56 words (0.-6%)” ??
So I wonder, how much rom does it use when I use a Arduino and am I also almost on the limit usage and why does it use so much space in a Pic??

Se here example with PIC16F876...
Compiler messages:
compiler messages.txt
(404 Bytes) Downloaded 347 times
PIC16F876AampASC7.fcfx
(6.11 KiB) Downloaded 418 times
Conflict of channel choices.
ACS7XX1 channel A2
Potentiometer channel A0
By regulating ACS7XX1 follows both Potentiometer with
Code:
ArduinoAampI2C-Channel.fcfx
(8.07 KiB) Downloaded 428 times
Please are you able to make a component for the ACSxx. I am far to do it. Please.
Best Regard
Monie

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: ACS712 component doing wrong

Post by jgu1 »

Hi Monie!

I dare to ask, do you managed to get it run :?:

I still not. I get the same result as you. It is a shame it not do, because it is a really good idea. Wish I was able to create a new, but unfortunetely not :(

Br

Jorgen

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: ACS712 component doing wrong

Post by Monie Jacobsen »

Hello
Sorry no, I can´t find the bug, I am not able to fix it, and it seem nobody else can. Sad.
Best Regard
Monie

Post Reply