Tampilkan postingan dengan label Microcontroller. Tampilkan semua postingan
Tampilkan postingan dengan label Microcontroller. Tampilkan semua postingan

Digital control system applications

Digital Control System is a branch of the control system with continuous time processes in the region associated with the digital controller as the controller of the control elements that control systems and computing discrete time. Depending on requirements, a digital controller can be shaped microcontroller and ASIC to a standard desktop computer. Because the digital computer system is discrete, then the Laplace transform is used in the control system is replaced with the Z-transform. Therefore, you must understand about the concept of continuous time and discrete time concept.


Digital Control system applications
Flow Chart - Digital Control system applications

Digital computer also has a limited precision (See quantization) extra care needed to ensure that errors in the coefficients, A / D conversion, D / A conversion, etc. do not produce unwanted effects or planned.

The application of digital control can easily be done when used in a feedback form. Since the creation of the first digital computer in the early 1940s the price of digital computers has dropped significantly. The reason this is one of the many reasons for the application of digital control systems for the control of the control system. Other reasons:

Flexibile: easy to configure and reconfigure through software
* Scalable: can be set up programs tailored to the limits of memory or storage space at no extra cost
* Adaptable: program parameters can be changed with the times
* Static operation: digital computers are much more susceptible to environmental conditions rather than of capacitors and inductors

Automatic Water Pump Controller Circuit

Automatic water pump controller is a series of functions to control the Automatic Water Pump Controller Circuit in a reservoir or water storage. As the water level sensor made with a metal plate mounted on the reservoir or water tank, with a sensor in the short to create the top level and a detection sensor for detecting long again made the lower level and ground lines connected to the bottom of reservoirs or reservoir. The series of automatic water pump controller is designed with 2 inputs NOR by 4 pieces and relay that is activated by the transistor. Automatic water pump circuit requires +12 VDC voltage source and can be used to control the water pump is connected to AC power . Here is the complete series of pictures.


Series Automatic Water Pump Controller 

Automatic Water Pump Controller Circuit


List Component Automatic Water Pump Controller 
R1 = 15K 
R2 = 15K 
R3 = 10K 
R4 = 1K 
D1 = LED 
D2 = 1N4148 
Q1 = BC337 
IC1 = 4001 
SW = SPDT Switches 
Relay RL1 = 12V 

The working principle series of automatic water pump controller above is. At the time the water level is below both sensors, the output IC1C (pin 10) will be LOW, Kemudin when the water began to touch the lower level sensor, the output IC1C (pin10) remains LOW until the water touches the sensor level above, then the output IC1C (pin 10) going HIGH and active relay through Q1 and turn on the water pump to meguras reservoir. At the muli down and water level sensors for water untouched MKA IC1C output (pin 10) remains HIGH until the new water untouched semuasensor IC1C output (pin 10) LOW and water pump died. The series of automatic water pump controller is equipped with SW1 which serves to reverse the logic of drains (the output of IC1C) and the concept of water supplied (output dri IC1D). When SW1 is connected to IC1D the water pump will turn on when the water does not touch all the sensors and will die when all the sensors tesentuh water. Automatic water pump controller can be used to fill or drain the water according to which mode is selected via SW1.

Voltage-to-frequency converters LM231/LM331

The LM231/LM331 family of voltage-to-frequency converters are ideally suited for use in simple low-cost circuits for analog-to-digital conversion, precision frequency-to-voltage conversion, long-term integration, linear frequency modulation or demodulation, and many other functions
Voltage-to-frequency converters LM231/LM331
Voltage-to-frequency converters LM231/LM331
Features Voltage-to-frequency converters LM231/LM331:
- Guaranteed linearity 0.01% max
- Improved performance in existing voltage-to-frequency
conversion applications
- Split or single supply operation
- Operates on single 5V supply
- Pulse output compatible with all logic forms
- Excellent temperature stability, ±50 ppm/°C max
- Low power dissipation, 15 mW typical at 5V
- Wide dynamic range, 100 dB min at 10 kHz full scale
- Wide range of full scale frequency, 1 Hz to 100 kHz
- Low cost

Microcontroller to RS-485 circuit | RS-485 bus can carry up to 256 transceiver modules and over long distances . This is a circuit for connect microcontroller with Rs-485 bus.
Max485
Max485 are low-power transceivers for RS-485 and RS-422 communication. Each part contains one driver and one receiver. Line Length vs. Data Rate The RS-485/RS-422 standard covers line lengths up to 4000 feet. For line lengths greater than 4000 feet, see Typical Applications The MAX481, MAX483, MAX485, MAX487–MAX491, and MAX1487 transceivers are designed for bidirectional data communications on multipoint bus transmission lines.

Microcontroller to RS-485 circuit
Microcontroller to RS-485 circuit diagrams
Features
- In μMAX Package: Smallest 8-Pin SO
- Slew-Rate Limited for Error-Free Data Transmission
- 0.1μA Low-Current Shutdown Mode
- Low Quiescent Current
- -7V to +12V Common-Mode Input Voltage Range
- Three-State Outputs
- 30ns Propagation Delays, 5ns Skew
- Full-Duplex and Half-Duplex Versions Available
- Operate from a Single 5V Supply
- Allows up to 128 Transceivers on the Bus
- Current- Limiting and Thermal Shutdown for Driver Overload

With a microcontroller system AT89c2051 and an LCD display we can create a digital frequency counter which can measure frequencies up to 250KHz. LCD is used LM16200.

LCD LM16200LM16200 LDC Pic
Table LM16200.Pin LCD LM16200

Scheme of frequency counter digital using AT89c2051 are as follows:
Frekuensi Counter DigitalSkema Rangkaian Frekuensi Counter Digutal

AT89c2051 to program, we use the Bascom 8051, the following programs Frequency caunter Digital Using AT89c2051:


'--------------------------------------------------------
' file: efy20fm24.BAS 25-12-05
' Frequency Meter Program using AT89c2051 micro controller
' written using bascom-51 from www.mcselec.com holland
' an embedded visual basic compiler for 8051 micro
' controllers
' by K.S.Sankar Web: www.mostek.biz
'------------------------------------------------------
' Connect the timer0 input P3.4 to a frequency generator
' with 24 mhz xtal accuracy ok upto 250khz
' define crystal speed and include file
$regfile = "89c2051.dat"
$crystal = 24000000
' define variables used
Dim A As Byte
Dim C As Long , D As Long
Dim Count As Word
Dim T0ic As Long
Dim Delayword As Word

' Initialize variables
Count = 0
T0ic = 0
D = 0
' initialize ports
P1 = 0
P3 = 255
' configure lcd display
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.3 , Rs = P1.2
Cls
'clear the LCD display
Lcd " EFY Freq Meter "
' define timer0
Config Timer0 = Counter , Gate = Internal , Mode = 1
'Timer0 = counter : timer0 operates as a counter
'Gate = Internal : no external gate control
'Mode = 1 : 16-bit counter
' set t0 internal interrupt
On Timer0 Timer_0_overflow_int
' interrupt will be generated on every 65536 count
Priority Set Timer0
Enable Interrupts
Enable Timer0

Counter0 = 0
'clear counter
Start Counter0
'enable the counter to count
Do
'set up a 1 sec accurate DO NOTHING loop
Enable Interrupts
'wait 1 as per BASCOM-51 is not accurate
For Delayword = 1 To 45440
Next Delayword
Disable Interrupts
C = Counter0
'get counter value
D = T0ic * 65536
Lowerline
C = C + D
T0ic = 0
Lcd " "
Lowerline
' show the frequency
Lcd "f=" ; C ; " Hz"
Waitms 255
Waitms 255
C = 0
Counter0 = 0
Start Counter0
're-start it because it was stopped by accessing the COUNTER
Loop

' timer0 int subroutine
Timer_0_overflow_int:
Rem timer0 overflow ( 65535 ) interrupt comes here
' increment the variable
Incr T0ic
Return
End
' end of program
' uses 1106 bytes of program memory

RS232 to RS485 Circuit

The new archetypal of RS485 advocate overcomes the RTS controlled botheration accomplished by our chargeless design. However, to do that requires a microprocessor, so there is a greater complication to the design. We advertise this unit, although currently we are attached our sales to barter who can pay by coffer alteration – which in absoluteness is bounded Australian companies. 

This architecture has been almost agitation free, and if you crave quantities we can acclimate the adapter pinout to clothing your appliance – about again the accessory will no best fit the simple little D25 case in which you see it pictured.

Click image to view larger RS232 to RS485 Circuit

* Data (vs RTS) controlled – does not rely on PC handshake timing
* DB25 RS232 connector compatible with PC
* TxD and RxD translated from RS232 to RS485
* Direction of transmission controlled by Data
* Handshake loop the PC connection so it works with all software
* RS485 signals output on D9 male with lots of Ground pins
* Indicator LED(s) to show communications traffic
* Line powered – powered by RS232 handshake lines
* RS485 Termination resistor not included
* Pullup/Pulldown resistors on RS485 to establish line-idle condition
* Baud rate is dipswitch selectable 1200 – 115.2k

Programming Learning MCS51


Programming Learning MCS51
Learning Programming MCS51 becomes mandatory we learn if we want to use the MCS51. In the first part of this Learning Programming MCS51 we will learn together about the basic programming language MCS51 microcontroller. Where to program MCS51 outline there are 2 core parts of pemrogramanya language is "Words Work" and "Object". In the article Programming MCS51 this first part we will study first the "verb" is a command group Peng-copies of data, the command group arithmetic and logic command group.


Reference to DATA IN PROGRAMMING MCS51
Data can be in many different places, thus known a few ways to describe the data (in English often referred to as 'Addressing Mode'), among others, as follows:

The mention of constant data (immediate addressing mode): MOV A, # $ 20. Constant data is data that was in the instructions. Examples of this instruction has the data meaning a constant $ 20 (as a constant data marked with '#') on-copy it into the accumulator A. What needs to be properly addressed in this order is the number $ 20 is part of the instruction.
Reference to data directly (direct addressing mode), this method is used to refer to data residing in memory by calling the memory number where the data are: MOV A, $ 30. Examples of these instructions have the meaning of data in the memory number $ 30 in-copy it to the accumulators.
At first glance these same instructions to the instruction constant data above, the difference above instructions using the '#' which marks the $ 20 is a data constant, whereas in this instruction because there was no sign '#' then $ 30 is a number from memory.

The mention of indirect data (indirect addressing mode), this method is used to refer to data residing in memory, if memory data storage is changing its location so that the memory number is not called directly but in-'titip' her into another register : MOV A, @ R0.
In this instruction versatile R0 register is used to record the number of memory, so that this instruction has a memory meaning that the number recorded in the contents of R0-copy it into the accumulator A.

Sign '@' is used to mark the memory number stored in R0.

Compare this with the instruction memory number directly mention above, in this instruction first memory numbers are stored in R0 and R0 appoint a role which memory is used, so that if the value of R0 change the designated memory will also be changed as well.

In this instruction registers R0 functioning multipurpose container for the address register (indirect address register), other than all-purpose registers R0 R1 can also be used as a container for the address register.

Reference to data in the register (register addressing mode): MOV A, R5. This instruction has the meaning of data in all-purpose register R5 is copy it into the accumulator A. This instruction makes all-purpose registers R0 to R7 as a place to store data that is very practical that it works very fast.
The data referred to in the discussion above all in the data memory (including all-purpose registers are also located in data memory). In writing the program, often required standard table that is stored along with the program. Tables of this kind is really a data residing in program memory!
For this purpose, MCS51 have any mention of data in memory means programs conducted by indirect (indirect addressing code mode): MOVC A, @ A + DPTR.

Notice in this MOV instruction is replaced with MOVC, the additional letter C is meant to distinguish that this instruction is used in the program memory. (MOV without the letter C means that the instruction used in the data memory).

Sign '@' is used to mark A + DPTR is used to indicate the number of contents in-memory copy it to the accumulator A, in this case the value stored in the DPTR (Data Pointer Register - 2 bytes) plus the value stored in accumulators A (1 byte) is used to refer to the program memory numbers.

'Verb' in AT89Cx051
Overall AT89Cx051 have as many as 255 kinds of instruction, which was formed by combining the 'verb' and objects. "The verb 'is the group discussed the following:

PENG GROUP-COPY-DATA AN MCS51
Basic code for this group are MOV, abbreviation of MOVE, which means to move, though more correct to say this command have meaning copying the data. This can be explained the following: after the instruction MOV A, R7 done, accumulators A and all-purpose register R7 contains the same data, originally stored in R7.

MOV command is distinguished according to the type of memory AT89Cx051. This command is on the memory data is written into MOV, for example:


MOV A, $ 20

MOV A, @ R1

MOV A, P1

MOV P3, A

To use the program memory, this command is written into MOVC, there are only 2 types of wear MOVC instructions, namely:


MOVC A, @ A + DPTR; DPTR as register indirect

MOVC A, @ A + PC, PC as the register indirect


In addition, there is also known MOVX command, the command that is used for external data memory (X singkatakan from External). This command is only available to the MCS51 family members who have an external data memory, for example AT89C51 and so forth, and certainly not known by the group that tidam AT89Cx051 have external data memory. There are only 6 kinds of wear MOVX instruction, these instructions are:


MOVX A, @ DPTR

MOVX A, @ R0

MOVX A, @ R1

MOVX @ DPTR, A

MOVX @ R0, A

MOVX @ R1, A



GROUP ARIMATIK (ADD, ADDC, SubB, DA, MUL and DIV)
ADD and ADDC command

The contents of accumulators A plus the number 1 byte, the sum will be collected back in the accumulator. In this operation Carry bit (C flag in the PSW - Program Status Word) serves as a reservoir overflow of the sum. If the sum of the abundance (a value greater than 255) will carry bit value '1 ', if not Carry bit value '0'. ADDC same with ADD, only in bits Carry ADDC value in the previous process involved summed together.

Numbers 1 byte is added to the accumulator, can be derived from a constant, from the all-purpose register, memory data from memory number is called directly or indirectly, as shown in the following example:

ADD A, R0; register versatile

ADD A, # $ 23; a constant

ADD A, @ R0; no memory indirect

ADD A, P1; no direct memory (port 1)




ORDERS IN PROGRAMMING SubB MCS51
The contents of Accumulator A less the number 1 byte follows with Carry bit value, the reduction will be accommodated again in the accumulators. Carry bits in this operation also serves as a reservoir overflow of the reduction. If the reduction is abundant (score less than 0) bits Carry would be worth '1 ', if not Carry bit value '0'.

SubB A, R0; A = A - R0 - C

SubB A, # $ 23; A = A - $ 23

SubB A, @ R1

SubB A, P0


DA command

DA command (Decimal Adjust) is used after the command ADD, ADDC, or SubB, used to convert 8-bit binary value stored in the accumulator into 2 pieces decimal number, each consisting of 4-bit binary value.

MUL AB ORDERS IN PROGRAMMING MCS51
8-bit binary number in accumulator A is multiplied by an 8-bit binary number in register B. The result of multiplication of binary 16-bit, 8 bit binary number that greater weight be accommodated in the register B, while the other 8 bits are accommodated in the smaller weight accumulator A.

OV bit in the PSW (Program Status Word) is used to mark the result of multiplying the existing value in register B. OV bit will be worth '0 'if register B is worth $ 00, if not worth OV bit '1'.

MOV A, # 10

MOV B, # 20

MUL AB

DIV AB ORDERS IN PROGRAMMING MCS51
8-bit binary number in accumulator A is divided by an 8-bit binary number in register B. The result of the division of 8-bit binary numbers stored in the accumulator, while the rest of the division of 8-bit binary number stored in register B.

OV bit in the PSW (Program Status Word) is used to mark the value before the division that exists in the register B. OV bit will be worth '1 'if register B originally worth $ 00.

GROUP LOGIC (ANL, ORL and XRL) IN PROGRAMMING MCS51
This command group used to perform logic operations MCS51 microcontroller, logic operations can be done is the AND operation (operation code ANL), OR operation (operation code ORL) and the Exclusive-OR operation (XRL operation code).

The data used in this operation can be data that is in the accumulator or data that are in-memory data, this is a little different with arithmetic operations that must be actively melihatkan accumulators.

Operating results are accommodated in the first data source.

AND logic operation is widely used to me '0' a few specific bits of an 8-bit binary number, the way to forming an 8-bit binary numbers as a data-ANL constant in a number of origin. Bit-'0' want in a represented by '0 'in constant data, while other bits given the value '1', eg
Instructions ANL P1, #% 01111110 will result in bit 0 and bit 7 of Port 1 (P1) value '0 'while the other bits remain unchanged in value.

OR logic operation is widely used to me '1' a few specific bits of an 8-bit binary number, the way to forming an 8-bit binary numbers as constant data in a number-ORL origin. Bit-'1' want in a represented by '1 'in constant data, while other bits given the value '0', eg
Instructions ORL A, #% 01111110 will result in bit 1 to bit 6 of the accumulator value '1 'while other bits remain unchanged in value.

Exclusive-OR logic operation is widely used to reverse the value (complement) some particular bits of an 8-bit binary number, the way to forming an 8-bit binary numbers as constant data in a number-XRL origin. Bit you want behind-the value represented by '1 'in constant data, while other bits are the value '0', eg
Instructions XRL A, #% 01111110 will result in bit 1 to bit 6 of the accumulator turned value, while other bits remain unchanged in value.

Microcontroller Interface Engineering With ADC 0804

In ADC 0804 interface techniques with microcontrollers are pin-pin control must be controlled if we want to use the ADC with the microcontroller, there is value addition refferensi voltage to be supplied in 0804 ADC interface with a microcontroller, for example, we use the 0804 ADC (8 bit), if we give refferensi voltage 2.55 volts then we will get the increase of 1 bit to change 10 mVolt. Please note that the 0804 ADC pin on the leg that is form Vref Vref / 2, so to get a 10mV resolution is necessary for setting Vref / 2 equal to 1.275 V


The interface circuit microcontroller with ADC 0804



Mechanical interface microcontroller with ADC 0804
The steps in accessing data from the ADC 0804 by the microcontroller sebgai follows;

Enable ADC with signal 0 at the foot of Chip Select.
Give commands from conversion by providing a low pulse to the foot of the ADC Write narrow
Wait for the ADC issued a signal 0 from his leg INT
Give a moment of time delay for data from the ADC is correct
Give the read command by giving the signal 0 at the foot of ADC Read
Give a moment of time delay
Now data from the ADC is ready for use and if the microcontroller.

2 Transistor Line Follower Robot

Make a line follower robot can be done with two transistors. Line Follower Robot series is one of the two transistors contor robot line follower circuit is in Bagun with two NPN transistor and the motor driver as well as processing of sensor signals.


In the circuit of line follower robot consists of two parts of the same, only different functions for the motor driver the right and left. Sensor circuit of line follower robot uses the LDR and LED. LDR sensor sensitivity can be set with the VR 10 is mounted in series with the LDR. For more details, see the following figure.

Line Follower Robot series 2 Transistor


The working principle of the motor driver circuit between the right and left together, when the LDR get the reflection of light from the LED LDR resistance will decrease and make the transistor saturation and motor gets supply and rotates so that the robot moves forward. So at the moment is not the case then the motor did not get a supply, for example, only one sensor is exposed line and make the LDR did not receive the reflected light is then Motr in the stationary and the other motor rotates and makes the LDR are back in the reflection of light and the robot moves forward again.

Line Follower Robot

Atmel microcontroller-Easy Downloader Circuit

Easy Downloader Circuit
Atmel microcontroller series AT89Cxx51 Easy Downloader is one of the downloader that is often used to write data to program the Atmel microcontroller AT89CXX51. Easy Downloader AT89Cxx51 ATMEL microcontroller is using the serial port as a channel of communication with the computer. 



Easy Downloader ATMEL Microcontroller AT89Cxx51 can be used to program Atmel AT89CXX51 in parallel. Atmel microcontroller series AT89Cxx51 Easy Downloader is quite simple to make your own because the components necessary to membutanya not complex. Atmel microcontroller series AT89Cxx51 Easy Downloader do not support the serial programming microcontrollers ISP. In the article Easy Downloader ATMEL Microcontroller AT89Cxx51 only displays images Easy Downloader Microcontroller series from Atmel AT89Cxx51 only and are simple.

Real time controller AT89C2051
Real time controller is a device used to exercise control over household device continuously ongoing and scheduled. The series of Real Time Controllers with microcontroller AT89C2051 which dituls in this article is a tool that can do that serve targeted. The series of Real Time Controller with Microcontroller AT89C2051 Atmel AT89C2051 uses a data processor and controller as device installed. 


In the application directly devices requires a separate interface from a wide range of Real Time Controllers with this AT89C2051 microcontroller. When will connect the device with the AC power source to use interface optocoupler (MOC) or solid state relay. Devices that can be connected with the series of Real Time Controller with Microcontroller AT89C2051 include lights, water machines, fans, electronic gate. The series of Real Time Controllers with this AT89C2051 microcontroller to control a height of water level, controlling the flame lights the scheduled SCARA and censored.

Specifications Series Real Time Controller with AT89C2051 Microcontroller
The series of Real Time Controller with Microcontroller AT89C2051 uses a computer to perform serial communication settings via computer. The series of Real Time Controller with Microcontroller AT89C2051 has 6 units of output channels that can be independently controlled depending on the program induced in the tool. Output in the series of Real Time Controller with AT89C2051 microcontroller requires an interface to deal with equipment that will be in control.

SMS Remote controller circuit

SMS Remote controller is a device used to control a device remotely using SMS through GSM mobile phones. Process control equipment with a series of AVR ATTiny To SMS Remote Controller can be used to control life and death of these equipment will provide information on the status of replies to our phone in return successful command execution. 
Equipment can be controlled by a series of AVR ATTiny To SMS Remote Controller include lights, water pumps, garage doors, gates and much more. AVR series ATTiny To SMS Remote controller uses the module-47 Sony ericson GM as recipient and sender of the SMS module. Then to the SMS data processor on a series of AVR ATTiny To SMS Remote controller is using AVR microcontroller ATTiny 2313.


Series AVR ATTiny To SMS Remote Controller

SMS Remote controller circuit Click to view larger. 

AVR circuit this part ATTiny To SMS Remote Controller
AVR series ATTiny To SMS Remote controller uses the AVR attiny2313 with 4MHz clock frequency, GSM Module GM trnceiver 47 Sony ericson, SIM Card, 4 relays and an IC regulator. ATTiny AVR microcontroller 2313 can work well on the voltage 2.7 VDC - 5.5 VDC for working with the frequency at 10MHz bahwah. 

The set of AVR ATTiny In SMS Remote Controller To make use of this power supply from the batteries 3.3 VDC. Connection using a SIM Card SIM Card Holder which is connected to the module GM-47, AVR series ATTiny To SMS Remote Controller works with communication between AVR ATTiny and GM-47 module at 9600bps. In a series of AVR ATTiny To SMS Remote controller is equipped with LED D6 as an indicator of the data interconnect GM-47 module with cellular operators where this LED will light continuously when not apat network and will be lit by flashes when a signal from the operator.

Specifications AVR series ATTiny To SMS Remote Controller


  • 4 Relay for ON / OFF electronic devices
  • 8 input lines for reading in a normal switching
  • LED indicators signal operator
  • SMS command with password, so only the owner can operate

Control Relay Circuit with 9 Second

See figure below its Control Relay Circuit Schematics.



Control Relay Circuit

8 to 18 volts TDA2005 Power Amplifier

This time, there is a series of audio amplifer 20W as well, but using IC TDA 2005 as a series of his base amplifier. The series of 2x20 Watt Audio Power Amplifier using TDA2005 can you see in the picture below.


TDA2005 2 X 20 Watt Power Amplifier

Technical Data:
Performance of TDA2005M: (for this circuit); At 4.14 V supply voltage: 2 x 20 watts (stereo) into 4 Ohms.
Distortion: Approx. 0.2% at 4 Watts into 4 ohm load.
Frequency Range: Approx. 20 Hz to 22 KHz.
Input Sensitivity: Approx. maximum 150 mV rms. .
Power supply: + 8 to 18 volts, approx. 3.5 Amps maximum per channel.
source [link]