Page 1 of 1

I need help for a pH and Humidity project.

Posted: Fri Mar 16, 2018 10:23 am
by Ficher
Hello everyone, I have a project to do in class, i need to use flowcode and PIC16F877A, and I chose pH sensor (SEN0161) and Humidity sensor (YL-69), I created the program for both and it works in simulation but he doesn't work with the sensors. I searched how i can use the sensors but everything is on Arduino. If anyone can help me, thank you very much.

Re: I need help for a pH and Humidity project.

Posted: Fri Mar 16, 2018 10:46 am
by kersing
Perhaps you could post your code so we can give you pointers to what might be wrong? Given the amount of information you have given us at the moment we need a crystal ball...

Re: I need help for a pH and Humidity project.

Posted: Fri Mar 16, 2018 11:20 am
by Ficher
No problem here's the code for the pH :
Capture 1
Capture 2

And the Humidity :
Capture 3
Capture 4

I just need help for the use of the sensors normaly the program works.

Re: I need help for a pH and Humidity project.

Posted: Fri Mar 16, 2018 11:22 am
by Ficher
Capture 4

Re: I need help for a pH and Humidity project.

Posted: Fri Mar 16, 2018 12:10 pm
by kersing
Please attach a flowcode file, screendumps only show us only part of what we normally check. (For instance clock settings, component connections etc)

Re: I need help for a pH and Humidity project.

Posted: Mon Mar 19, 2018 1:13 pm
by Ficher
The two flowcodes codes 1 is for pH and 3 for Humidity.

Re: I need help for a pH and Humidity project.

Posted: Mon Mar 19, 2018 6:33 pm
by johnsondav
Hi Ficher

I would suggest you change the 'Clear' LCD with the following to get a smother display:
FC5_SCR1.jpg
FC5_SCR1.jpg (168 KiB) Viewed 6395 times
Not sure if the flikering display is your problem but this would help. Also, your math is a constant ( *100 / 5) = 20

just multuply your voltage by 20 and it should give your the same result - faster, if the 20 is stored as a variable. Microchip compiler always converts any number system to a hex value before it is compiled, this is how they acheive the 20% speed increase.

Hope this helps.

Regards
Dave

Re: I need help for a pH and Humidity project.

Posted: Tue Mar 20, 2018 4:13 pm
by Ficher
Thanks for your help I go change the program to make it better.