Overview
In PLC control application, a thermometer is required to get the environment's temperature. For example, keeping a water heating system at a preset temperature.
With a tiny open-source DIY PLC such as LDMicro, this job could be done easily at low cost for a dozen of Dollars. Using this DIY features, all system set up and maintenance is in the hands of the system designer. It doesn't require any expensive industrial standard PLC. The overall system needs only a dozen of most typical electronics components with a noticeable 8-bit microcontroller.
The PLC reads analog temperature data from LM35 |
The input to the PLC is an analog temperature data linear to the analog voltage. LM35 create an analog voltage output of 10 mV per degree Celsius. Without any floating data type support in this PLC platform I can only use the unsigned 16-bit integer data type. This analog temperature device could convert the temperature between -55 to 150 degree Celsius. However, to read an analog temperature value we need a negative voltage reference. Using the external voltage reference pins need more ladder diagram instruction and external voltage reference circuits. So I ignore the negative temperature reading here.
PIC16F876 is selected as the CPU of this software-based PLC due to a rich of components stock. The CPU clock at 20 MHz, supplied at +5 V DC. The PLC cycle time is 1 mS to make an ability refreshing the multiplexed seven segments display.
The display is a 4-digit multiplexed common cathode type. The temperature data requires three digit for the 150 degree Celsius maximum reading. The remanding one digit displays "C" represents the degree Celsius.
I assume to make a lamp turn on whenever the temperature reaches the preset temperature value.
Ladder Diagram In LDMicro
Ladder Diagram representation for this example |
Schematic Diagram |
No comments:
Post a Comment