Controling the temperature, humidity of the aviculture with PIC16F877A


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94

    Default Controling the temperature, humidity of the aviculture with PIC16F877A

    Hi, i want to measure the temperature, humidity and the amount of ammoniac gas in the aviculture and control the fans and the heaters with PIC16F877A, first i want a complete and correct algorithm,could you help me? i use picbasic pro
    Last edited by amindzo; - 29th August 2008 at 16:57.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Here's an example for temp & humidity http://www.picbasic.co.uk/forum/show...ight=HS-2000DD

    Can't help with the ammoniac gas part.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    it's depend of the aviculture,usually more than 100m2 with 6 or more fans and 2 or 3 heaters in each saloon,we also have some coolers that works with water(water pour on the chaff and and fans distribute the water on the air,we can adjust the humidity and temperature with with that,i'll show you sample algorithm that you can modify it.

  4. #4
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    imagine that we have 3 inputs from keyboard: temperature,humidity and the amount of ammoniac gas that insert from the operator and also we measure the temperature,humidity and the amount of ammonic gas from sensors.
    ,for example we have 5 fans,2 heaters and 3 cooler
    variables: temp1,humid1 and gas1 that insert form keyboard with operator
    temp2,humid2 and gas2 are the variables the measures from the sensors.
    we use fan1,fan3 and fann5 for adjust tempreature, fan2 and fann 4 for humidity.
    algorithm:

    if temp2 > (temp1+2) then put fan1 in high revolution
    fan2 in high revolution
    fan3 in high revolution
    heather 1 and 2 OFF
    cooler 1,2 and 3 OFF

    if temp2 > (temp1+5) then put fan1,3 and 5 in high revolution
    heather 1 and 2 OFF
    cooler 1,2 and 3 ON

    if temp2 < (temp1-2) then put fan3 OFF
    fan 1 and 5 in low revolution
    heather 1 and 2 OFF
    cooller 1,2 and 3 OFF

    if temp2 < (temp1-5) then put fan3 OFF
    fan 1 and 5 in low revolution
    heather 1 and 2 ON
    cooler 1,2 and 3 OFF

    if (temp1-2) < temp2 < (temp1+2) then put fan 1 and 5 in low revolution
    fan3 in high revolution
    heather 1 and 2 OFF
    cooler 1,2 and 3 OFF


    if humid2 > (humid1+2) then put fan2 and 4 in high revolution


    if humid2 < (humid1-2) ten put fan2 and 4 OFF

    if (humid1-2) < humid2 < (humid1+2) then put fan 2 and 4 in low revolution

    if gas2 > (gas1+40) then ALARM
    fans 1,2,3,4 and 5 in high revolution


    if temp2 > (temp1+10) then ALARM

    if temp2 < (temp1-10) then ALARM

    if humid2 > (humid1+10) then ALRM

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    What you have looks like it will work from the info you gave about the system. So if there is not any surprises.

    On existing machines (systems) that I am going to automate, I get the best human operator I can find to run the machine, then record everything. See what the operator does if a problem comes up and work that into the algorithm.
    ON ERROR 1 GOTO FIX 1
    IF FIX 1 fails THEN ALARM

    You may have the situation where one problem needs fixed with and in dealing with it causes another, so min and max values for the error fixing part.

    I do not know about avicultures, but say the gas levels go up and fresh air is needed, and some how because of the weather this drives up the humidity. Can the humidity be higher than the set point for how ever long it takes to bring the gas levels back into range?

    Just thoughts...
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    the humidity level is not important, i will define a maximum level but i need a complete and correct algorithm.

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Well that is what I am getting at. I did not know humidity is not much of a problem. So I would maybe have the algorithm wrong. I still think the only ones that can write a correct algorithm for a system is one that completely understands the system. Getting that into code is another story, many here can help with that.

    About the gas sensor. If you can not find one for ammoniac, maybe use an O2 sensor. If I remember correctly, when NH4 goes up O2 goes down. If nothing else is messing with the O2 levels...
    Dave
    Always wear safety glasses while programming.

  8. #8
    sheepdog's Avatar
    sheepdog Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by amindzo View Post
    the humidity level is not important, i will define a maximum level but i need a complete and correct algorithm.
    Very difficult to provide a correct and precise algorithm as previously stated, to many real world variables, unhatched to hatch parameters to solve. Perhaps an ultrasonic detector to alert of hatchlings so they can be moved to a monitored area to avoid ammoniac poisoning and monitor the ammonia there, (thus not altering the ideal conditions of the hatchery) reducing the problem in this way might be the simplest way.
    Hope it of some help
    Last edited by sheepdog; - 1st September 2008 at 02:09.

  9. #9
    sheepdog's Avatar
    sheepdog Guest


    Did you find this post helpful? Yes | No

    Default

    double post
    Last edited by sheepdog; - 1st September 2008 at 14:01.

  10. #10


    Did you find this post helpful? Yes | No

    Thumbs up

    What sensor will you be using? I ask because I have built one of these (without the amoniac gases bit) which not only works (activates relays) but allows the user to define the parameters, such as max/min temp, max/min humidity etc...

  11. #11
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    i use MQ137 sensor for ammoniac gas

Similar Threads

  1. Replies: 10
    Last Post: - 17th February 2012, 07:19
  2. A Temperature & Humidity Data Recorder Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 9th July 2008, 18:47
  3. Conversion problem
    By eva in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th March 2007, 18:21
  4. Help for decimal conversion
    By eva in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 18:20
  5. Serout "onewire.bas"
    By puru in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th July 2005, 00:14

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts