Ds1820 -> pid -> pwm


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    OK, I've just confirmed that the files in the first post of my thermostat thread compile and display the output in hyperterminal as per the image shown in a post above. This version is nothing fancy, it will display the temperature of 4 x DS18B20's on a 4 line 20 chr LCD and drive 4 outputs which can be connected to SSR's to switch main voltage devices, It also allows the values of the PID to be tuned by entering values via hyperterminal on a PC connected via a serial cable.

    Ive re-attached all the files here, inc the compiled HEX - please see the hardware inc file which defines the connections to the LCD etc. You are welcome to use this as the basis for your learning....
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Pid

    We have a complex temperature control on a 16F777 with 20 temperature sensors (5 DS18S20s, the rest analog LM50 and a couple of MCP9701, plus a Sensirion for ambient T/H.) The poor PIC PWMs 3 sets of fans, reads a flowmeter, drives a heater, talks to another brain and handles two sets of serial out. Just as well, driving temperature, you're not in a hurry.

    Temperature with a large thermal inertia has such a long time domain that it's not a great place to demonstrate PID. A few years back I did a motor PID with a PIC that worked great - just one axis and it was slow but moving a 500lb weight. Motor tuning is the quickest way to illustrate the effect of each PID component.

    Back to temperature: PID is a wonderful thing but in the real world may need a lot of tweaks. First off we abandoned the Derivative as all-but-meaningless on these timescales and now use a setpoint and hysteresis band system with PI(D) only above the upper threshhold. The temperature moves in a slow triangular waveform inside the band (like any thermostat with hysteresis) and only invokes PI when things get warm. Also we have an emergency threshhold up there that drives everything to safety levels. (We are not allowed to power down.)

    Good luck with your project.

  3. #3
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default

    Hi Everyone;

    Sorry, but only now had time to get to the fórum!

    [quote]
    Don't worry, I'll try to answer/explain what I can. [/quote}
    @HenrikOlsson
    Once again thank you for your support!

    @malc-c
    Like i said before, this weekend i'll try the code posted, and then i put here the result. Thank you for the code!

    @kenif
    Thanks for your opinion and support, I will take it into consideration!!
    Thanks and Regards;
    Gadelhas

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