Saturday, May 21, 2011

Control Introducing of PLC (Programmable Logic Controller)


At former epoch, before PLC is found, control systems at industry applies conventional network, which in the form of network relay. By using this network, we require many places and many components, besides need many cables also to string up it is and many releasing cost that is big enough to make a conventional control system.

PLC in finding around year of 1968 and company that is firstly makes is Schneider electric by the name of MODICON (Digital Modular of Controller). After the time/date of that is automation network many changes, and increasingly simple. As according to the name, this controller earns in program to apply logic, it is of course understandable logic by PLC. Logic that is most popular and many in using in PLC is Ladder logic, or doorstep logic. very Popular doorstep logic, because is adaptation from contact logic and relay. If you understood about contact logic and relay, you are not too difficult to comprehend programming PLC. Here also applies ladder logic program PLC to. In general usage of unlimited PLC, now control PLC is not merely limited to control ON/OFF (digital/discrete), PLC here and now can control magnitude (analogue) for example motor speed, level tank, big value of aperture valve and others. At the moment PLC often applied for controller sequential, and monitoring plant.

Sequential Control/ Drum sequencer
PLC ahead created to make control sequential or drum sequencer, which if using network relay and timer, hence inefficient. Mean a lot of relay and timer require, depends on how many step at the sequence (drum sequencer I debate later). If would apply PLC, enough one PLC, relay and timer can be replaced with software in PLC. ‘PLC can replace relay and timer', because PLC has relay and timer virtual in it.'

Monitoring Plant
PLC is also able to be applied as one of component for monitoring plant. Ably its receiving magnitude value data from sensor/transmitter. as well as can communicate with other peripheral, hence by connecting PLC with HMI (Human machine Interface), we can monitor condition of plant. now a lot of producer HMI, started from only sells software only, until selling its(the hardware is also, and most HMI now supports communications with Merk PLC distinguised like mho, Omron, and others. One Of Merk HMI which distinguised is: WinCC (mho), Wonder ware, Proface, LG, and others. Usually producer PLC produces also its(the HMI.

read more "Control Introducing of PLC (Programmable Logic Controller)"

Control 2-Way Multiplexed LCD and Low Cost ADC Using COP8 Microcontroller

This circuit is intended to show a general solution for implementation a low cost ADC and a 2-way multiplexed LCD using COP840C 8-bit microcontroller. The implementation is demonstrated by means of a digital personal scale. Details and function of the weight sensor itself are not covered in this article. Also the algorithms used to calculate the weight from the measured frequency are not included, as they are too specific and depend on the kind of sensor used. This circuit is use a V/F Techniques for driving the LCD. The diagram is shown in below;


Today's most popular digital scales all have the following characteristics:
They are battery powered and use a LCD to display the weight. Instead of using a discrete ADC, in many cases a VFC is used, which converts an output voltage change of the weight sensor to a frequency change. This frequency is measured by a microcontroller and is used to calculate the weight. The advantages of a V/F over an A/D converter are multifold. Only one line from the V/F to the microcontroller is needed, whereas a parallel A/D needs at least 8 lines or even more (It also offers A/Ds with serial output). A V/F can be constructed very simply using National Semiconductor's low cost, precision voltage to frequency converters LM331 or LM331A. Other possibilities are using Op-amps or a 555-timer in unstable mode.

The principle work of the circuit is a capacitive or resistive sensor's weight related capacitance or resistance change is transformed by a 555 IC (in unstable mode) to a change of frequency. This frequency is measured using the COP800 16-bit timer in the “input capture'' mode. After calculation, the weight is displayed on a 2-way multiplexed LCD. Using this configuration a complete scale can be built using only two ICs and a few external passive components.
read more "Control 2-Way Multiplexed LCD and Low Cost ADC Using COP8 Microcontroller"

Thursday, May 19, 2011

Control PIC for Multiplexer

Recently, I had to design a circuit real quick that transmitted 4 parallel TTL data bits over 350m of twisted pair cable. I needed to feed in four parallel data bits at one end, and get 4 parallel data bits out the other end, completely transparent to the transmitting and receiving circuits. I decided to implement this using a PIC 16F84 for both an encoder and decoder, and use RS-485 drivers (DS26C31 and DS26C32) to drive the 350m cable. I only needed five I/O pins per PIC, so this could have been implemented using the smaller 8pin 12C508 device, but the 16F84 has the advantage of being reprogrammable, and PCB size or cost wasn't an issue anyway. The design presented here can be easily modified for any number of bits and any desired interface RS-232, Fiber optic, almost anything. In fact, the software is interfacing independent, you only need to change the interface chips. This is the diagram figure;


As you can see, there isn't much too it. I have omitted the power pins and XTAL inputs which are also used. The MCLR line must also be tied HIGH on both chips. Port A is not used The software is written for an external crystal running at 1MHz, although the actual speed isn't important, but you must have both the encoder and decoder at the same speed. The watchdog has been enabled. There is a burst of five bits every 100ms. The start bit is 0.5ms, and the data bits are 1ms each. This is assuming a 1MHz crystal clock is used. This gives an update rate of 10Hz, which may not seem very fast, but was more than sufficient for driving the relays in my application. The timing could be easily changed in software. The decoder simply waits in a loop for the start bit, and then times for 1ms before sampling the first data bit. This sample then occurs exactly in the centre of the data bit to ensure a reliable reading. The subsequent data bits are then read every 1ms as well. The timing diagram figure;



read more "Control PIC for Multiplexer"

Control Power Supply derives 5 and 3.3V from USB port Circuit for Microcontroller



The circuit in the figure derives its power from a USB port and produces 5 and 3.3V supply rails for portable devices, such as digital cameras, MP3 players, and PDAs. The circuit allows the port to maintain communications while, for example, charging a lithium-ion battery. IC2 boosts the battery voltage, VBATT, to 5V, and IC3 buck-regulates that 5V output down to 3.3V. IC1, a lithium-ion battery charger, draws power from the USB port to charge the battery. Pulling its SELI terminal low sets the charging current to 100 mA for low-power USB ports, and pulling SELI high sets 500 mA for high-power ports. Similarly, pulling SELV high or low configures the chip for charging a 4.2 or 4.1V battery, respectively. To protect the battery, IC1’s final charging voltage has 0.5% accuracy. The CHG terminal allows the chip to illuminate an LED during charging.

IC2 is a step-up dc/dc converter that boosts VBATT to 5V and delivers currents as high as 450 mA. Its low-battery detection circuitry and true shutdown capability protect the lithium-ion battery. By disconnecting the battery from the output, “true shutdown” limits battery current to less than 2 _A. An external resistive divider between VBATT and ground sets the low-battery trip point. Connecting the low-battery output, LBO, to shutdown, SHDN, causes IC2 to disconnect its load in response to a low battery voltage. The internal source impedance of a lithium-ion battery makes IC2 susceptible to oscillation when its low-battery-detection circuitry disconnects a low-voltage battery from its load. As the voltage drop across the battery’s internal resistance disappears, the battery voltage increases and turns IC2 back on. For example, a lithium-ion battery with 500-m_ internal resistance, sourcing 500 mA, has a 250-mV drop across its internal resistance. When IC2’s circuitry disconnects the load, forcing the battery current to
read more "Control Power Supply derives 5 and 3.3V from USB port Circuit for Microcontroller"

Control Radio Remote Control Using Base DTMF Circuit


This circuit of a remote control unit which makes use of the radio frequency signals to control various electrical appliances. This remote control unit has 4 channels which can be easily extended to 12. This circuit differs from similar circuits in view of its simplicity and a totally different concept of generating the control signals. Usually remote control circuits make use of infrared light to transmit control signals. Their use is thus limited to a very confined area and line-of-sight. However, this circuit makes use of radio frequency to transmit the control signals and hence it can be used for control from almost anywhere in the house. In this circuit, we make DTMF (dual-tone multi frequency) signals (used in telephones to dial the digits) as the control codes.

The DTMF tones are used for frequency modulation of the carrier. At the receiver unit, these frequency modulated signals are intercepted to obtain DTMF tones at the speaker terminals. This DTMF signal is connected to a DTMF-to-BCD converter whose BCD output is used to switch-on and switch-off various electrical application (4 in this case). The remote control transmitter consists of DTMF generator and an FM transmitter circuit. For generating the DTMF frequencies, a dedicated IC UM91214B (which is used as a dialer IC in telephone instruments) is used here. This IC requires 3 volts for its operation. This is provided by a simple zener diode voltage regulator which converts 9 volts into 3 volts for use by this IC. For its time base, it requires a quartz crystal of 3.58 MHz which is easily available from electronic component shops.

The frequency modulated DTMF signals are received by the FM receiver and the output (DTMF tones)are fed to the dedicated IC KT3170 which is a DTMF-to-BCD converter. This IC when fed with the DTMF tones gives corresponding BCD output; for example, when digit 1 is pressed, the output is 0001 and when digit 4 is pressed the output is 0100. This IC also requires a 3.58MHz crystal for its operation. The tone input is connected to its pin 2 and the BCD outputs are taken from pins 11 to 14 respectively. These outputs are fed to 4 individual D flip-flop latches which have been converted into toggle flip-flops built around two CD4013B ICs.

Whenever a digit is pressed, the receiver decodes it and gives a clock pulse which is used to toggle the corresponding flip-flop to the alternate state. The flip-flop output is used to drive a relay which in turn can latch or unlatch any electrical appliance. We can upgrade the circuit to control as many as 12 channels since IC UM91214B can generate 12 DTMF tones. For this purpose some modification has to be done in receiver unit and also in between IC2 and toggle flip-flop section in the receiver. A 4-to-16 line demultiplexer (IC 74154) has to be used and the numbers of toggle flip-flop have also to be increased to 12 from the existing 4

read more "Control Radio Remote Control Using Base DTMF Circuit"

Control Format Short Message Service

At command for communications with SMS-CENTER.
At hand phone GSM there is facility to data access applies serial connection, for data access is required by instruction sequence at interface hand phone. ETSI (European Telecommunication Standard Institute) that is the instruction standard in technical specification GSM. instruction phone is started with character AT and terminated with enter or 0Dh. Command received will be response with receiving of data 'OK' or ' Errors'. Applying AT Command important for SMS is:
AT+CMGS : to send SMS
AT+CMGL : to verify SMS
AT+CMGD : to vanish SMS
AT COMMAND for SMS usually followed by I/O started by units PDU. Streaming data or from SMS-CENTER must be in the form of PDU (Protocol Data Unit). PDU contains hexadecimal number what express language I/O. PDU consisted of some Header. Header to send SMS to SMS-CENTER differs from SMS received from SMS-CENTER. PDU send SMS to SMS-CENTER. There is eight header to send SMS, that is:
1. Number SMS CENTER
This first header divided to become three sub header
a. Number of couples hexa decimal SMS-CENTER in number hexa.
b. International Code and national code, header for national it is 81 and international is 91.
c. Number SMS-CENTER itself in couple hexa is turned over repeatedly.
example:
if number SMS-CENTER 0875400000
hence, writing national.
for writing of Heksa from SMS-CENTER 0875400000 becoming -->
80-57-04-00-00
so that writing as complete this is:
06818057040000 ==> value 06 showing there is 6 value tide
that is Code National(1 tide) + number SMS-CENTER(5 tide).

writing international
for writing of Hexsa from SMS-CENTER 62875400000 becoming -->
26-78-45-00-00-F0
so that writing as complete his is:
07912678450000F0 ==> value 07 showing there is 7 tide value that is Code International(1 tide) + number SMS-CENTER(6 tide).
2. Type SMS
Type AS OF neodymium SMS : 1 thus its a hexsa number is 01.
3. Number Reference SMS
Reference number gives value 0, causing the heksa value 00. Because later automatically will be given value by SMS-GATEWAY
4. Number Phone Acceptor
Writing of PDU at writing of phone number as follows:
a. Number of number decimal phone numbers gone to in number hexsa.
b. National or international Code. For National with code: 81. And international with code: 91
c. Number phone gone to in couple heksa is turned over repeatedly.
Example:
If phone number gone to be 081227153432.
For National Code :
at number gone to National is 081227153432 ==> the numbers 12 numbers ==> value hexsa 0C, and couple heksa from phone number gone to 80-21-72-51-43-23, hence writing is : 0C81802172514323
For International Code:
at number gone to International is 6281227153432 ==> number of numbers there are 13 numbers ==> value heksa 0D, and couple hexsa from phone number gone to 26-18-22-17-35-34-F2, hence writing it is : 0D91261822173534F2
5. form of SMS
0 ==> 00 --> SMS is sent in the form of SMS.
1 ==> 01 --> SMS is sent in the form of telex.
2 ==> 02 --> SMS is sent in the form of fax.
6.Scheme Encoding Data I/o
This time there are many the SMS Gateway in marketing applies 7 bit so that we apply code : 00, if there are still SMS Gateway which applies code bigger than 0 changed to Hexsa.
7. Duration Before SMS EXPIRED
If part of this skip, meant we are to derestricted time implementation of SMS.
8. Contents Of SMS
at part contents of SMS there are two sub Header.
a. Bulk length or number of contents of SMS
for example: to say " Hi.." ==> there is 5 letter --> 05
b. Contents of in the form of number pair heksa phone or SMS-GATEWAY is having scheme encoding 7 bit to mean if we are etic a letter from key pad we make 7 successive I/O number, applies convertion ASCII to Heksa can. Or applies convertion itself that is:
first step : changes it becomes code 7 bit.
second step : changes code 7 bit to become 8 bit, what represented by couple hexsa.
so conclusion from writing of this PDU by writing down all sequences as follows :
Number SMS-CENTER - Type SMS - Reference number SMS - Number phone acceptor - Form Of SMS - Scheme Encoding Data I/O - duration before SMS expired - Contents Of SMS
read more "Control Format Short Message Service"

Control Analog-input circuit for microcontroller


The simple ADC in the figure 1 is perfect for getting analog signals into a purely digital microcontroller. Using just five surface-mount parts, you can assemble it for less than 50 cents (1000), which is approximately half the cost of a single chip-ADC approach in the same volume. Moreover, this design takes only one pin from the microcontroller to operate. Although you can purchase many microcontrollers with built-in ADCs, in some circumstances, this solution is impractical. For example, you might have an all-digital microcontroller already designed in. In this design, a USB-compatible, digital-only microcontroller needed analog input at low cost for a consumer application.

The basic operations are as follows:
Set the ADC pin as a low output to discharge C1. Reset a suitable timer-counter in the microcontroller. Set the ADC pin as an input. Allow the timer to count until it reads as logic 1 in the microcontroller, or let the timer count to some suitably long value, which suggests that the input is essentially zero. Stop the timer counter. Convert to the timer count by some suitable scaling factor to an ADC reading. Start over for the next conversion.
read more "Control Analog-input circuit for microcontroller"