Has anyone used a current sensor in Flowcode?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

I'm looking at a ACS712 device that measures current being used in a circuit and wondered if anyone has any experience of this or similar devices please....


Best regards,


James Dexter :-}

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: Has anyone used a current sensor in Flowcode?

Post by JohnCrow »

Hi James

Have a look at my ACS 712 project

http://www.matrixmultimedia.com/mmforum ... 712#p30651
1 in 10 people understand binary, the other one doesn't !

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

John Crow you never cease to amaze me sir!

It seems every single idea I have has already been done by your good self.

I have a similar board on the way via eBay and will check out your code.

Thank you John for all your projects you post in this fine forum.

Best regards,


James Dexter :-}

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: Has anyone used a current sensor in Flowcode?

Post by JohnCrow »

Hi James

No problem, hope the e-bay board works with my code. I would expect the device will be the same, maybe a different breakout board.
1 in 10 people understand binary, the other one doesn't !

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

It lives John!

Thank you very much - I'm off to play now but without any mods I hacked together an old EBlock and here we are without your decoupling stuff that was on the board from eBay.

If anyone needs a link to the auction please let me know. It cost £5.20 with free shipping and next day delivery...

James :-}
Attachments
IMG_1531.jpg
I've invented an EBlock ;-}
(229.76 KiB) Downloaded 1223 times

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

Works correctly on the ECIO-28 as well.....

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: Has anyone used a current sensor in Flowcode?

Post by JohnCrow »

Looks like you have taken a hacksaw to that poor old e-block :cry:

Have you see these, very useful little board

http://proto-pic.co.uk/breakout-board-for-serial-db9/
1 in 10 people understand binary, the other one doesn't !

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

That looks good John and I did indeed take a hacksaw to an eBlock ;-}

I've slowed down your code to sample only every 2 seconds by putting a delay in each of your three sub routines and am going to do an average on 10 samples before displaying the averaged current used to sort of slow it down if you get me!

Best regards,


James :-}

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Re: Has anyone used a current sensor in Flowcode?

Post by Sparkoids »

Got it to do the average with my array and all is well but I cannot convert my "averagevolts" variable to FloatToString$ to print it :-{

Any ideas anyone please?


Best regards,

James :-}

Post Reply