PH sensing project

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

Moderator: Benj

Post Reply
Artis
Posts: 10
Joined: Mon Jan 19, 2015 10:59 pm
Has thanked: 1 time
Been thanked: 1 time

PH sensing project

Post by Artis »

Hi i have started to build PH sensing project. I ordered hardware for ph probe from Sparky's Widgets. They have arduino code for it but i want to added some extra options and for that i need transfer code to flowchart.

Does someone have experience  in translating arduino code to flowchart?

Hardware from Sparky's Widgets is getting analog signal and transform it to digital with 12bit  ADC. It has assigned address. 0x4D . Basically i need connect digital sensor with this address.

I will add arduino code below. Sincerely Artis.

P.S. Here can find more info on this hardware http://www.sparkyswidgets.com/portfolio ... interface/
Attachments
MinipH.rar
(2.75 KiB) Downloaded 324 times

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: PH sensing project

Post by Benj »

Hello,

It looks like you should be able to read the sensor using the I2C component.

Here is a blog on I2C how to use it which should help.
http://www.flowcode.co.uk/blog/simplifie ... c-and-spi/

Artis
Posts: 10
Joined: Mon Jan 19, 2015 10:59 pm
Has thanked: 1 time
Been thanked: 1 time

Re: PH sensing project

Post by Artis »

I wiread ph probe to Arduino nano and wrote flowcart but i think something is missing because on hardware its show PH: 0.
Attachments
mcp3221.pdf
Here is ADC what i use.
(443.79 KiB) Downloaded 290 times
PH (2).fcfx
(9.93 KiB) Downloaded 296 times

howard123
Posts: 75
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Has thanked: 30 times
Been thanked: 28 times

Re: PH sensing project

Post by howard123 »

hello
I think one problem it that you are reading 12 bits into a byte. The two values from the probe can be bytes but the resultant value of your calculation should be an int. You will have to shift one of the bytes 8 bits to the left. I think the MSB comes out first.
good luck

Post Reply