Sunday, January 30, 2011

Control Watt Meter Digital 1 Phase 1 With Microcontroller

Watt meter is designed with a digital method of multiplication that the current burden of reading by reading sensors and flow through the voltage sensor voltage. Besides, the tool also consider the power load factor obtained by looking for difference, or phase shift between current and voltage signals generated by these sensors. So for the signal processing signal there are three parameters that is the signal flow, signal voltage and is the second phase signal is. For the third signal processing is done by using microcontroller AT89S51 the third reading scale through the ADC 0809. Display LCD power is shown through the dot matrix.

Block diagram for the entire series is shown in the picture below:


A wire with electric current to the load ring be missed among a number of wire and toroid email rolled with ring will toroid coil wire in the ring will induce electric current from a wire in cash. With the induction process signals in the wire coil toroid is the current value will be missed for supplay a burden on the end of the wire currents. With this method the flow will be missed on the function legible scale sinusoidal voltage wave shape.


The type of brace that is used in signal processing flow over a non-inverting brace, on the back of a given diode inserted as callper cut the signal under the zero axis and functions as a capacitor voltage DC purification. So that the series of signals conditioner produces DC voltage compatible to the needs ADC voltage.

Voltage Sensor
Voltage sensor is a step-down transformers in general, large transformer is 300mA. Output from the sensor in the form of voltage, sinusoidal wave-shaped.

From voltage transformer to convert the voltage into 220 volt and 3 volt signal directed with full direct waves. Voltage calibration is done by placing a variable resistor 50k so that the resulting voltage can be adjusted, on the other end of the series capacitor installed a filter to produce a pure DC voltage against compatible voltage needed by the ADC.

In conditioner block signal consists of a series of blocks, which aims to create a sinusoidal signal from the sensor output voltage and current signals into a square. The establishment of the signal is done with a square method Zerro Crossing Detector, with the signal it will be a square shape is easier to phase in a series of EX-OR logic.


Over a series of images is a series of conditioner signal output from the two sensors that are used, this produces a series of three main factors used to calculate power, namely: Tension, Flow power factor. Signal generated by a sensor directly before through on series conditioner each signal is taken and on a series of missed zerro Crossing Detector resulting in a square wave. Dioda clamper work to cut the voltage to zero under the axis feed on the EX-OR gate. EX-OR logic difference between the two credit input, and form the phase difference between the current and voltage. The three parameters needed to determine the amount of power is absorbed by the load.

Signals needed by the ADC's third factor is the forming power over voltage DC for that balance is very day phase should be changed to analog voltages.To produce the frequency of the voltage wave converter box is needed to M V, in the design of this series V F to be implemented with the IC 2917. In order to produce a good output voltage, V to M design is supported by external components as shown in Figure 3.4B under this


LM2917 / 2907 is a single IC chip F to V converter or often called a series of static tacho generator designed with minimal external components may be but can produce the optimal output voltage. Tacho generator take a static balance of the frequency of entries through comparator first. Inverting input on comparator first connected with the ground through a series of capacitors and non-inverting input signal waves get input box. With the series that the first comparator this work as a detector crosser zero (zero crossing detector) to compare the square wave at the non-inverting input to the zero volt reference voltage at the inverting input. Comparator output from this first is feed on the charge pump is working to change the frequency of a voltage when the input signal changed circumstances. Tension generated by a series of above formulated with tachogenerator
Vo = VCC IN xf x C1 x R1 x K

Where K LM 2917 constant strengthening of 1 times, while the C2 on the image above functions as a series of improvements riple voltage at the same time improving the response time of change. sedangkan nilai R1 200k dan C1 10nF. 200k while the value of R1 and C1 10nF.

Applications series of ADC 0809

ADC 0809 is a product component modifier analog to digital data with the most complete composition, this is because the ADC 0809 is also equipped with 8 channels multiplekser than 8-bit digital data peubah analog to a compatible port on mikrokontroler. With 8 channels multiplekser this input ADC 0809 can read 8 analog data to be read the input alternately address based channel called by multiplekser. ADC of this type of application are very appropriate in this case mikrokontroller system because the system work every daata ADC conversion process must be driven through the 0809-free digital phone to be more easily controlled if mikrokontroller through. System 0809 series of ADC mikrokontroller in applications such as in the picture below;


In the picture above shows the system of work complement each other from 0809 to the ADC-function port on microcontroller. A number of analog data to be read on Vin1 to connect with Vin8 reading method based on the logic data AD0 to AD2. System of each channel data input on the ADC 0809 is done through the system multiflekser following:

To design a system microcontroller AT89S5x some components needed to make microcontroller becomes a minimum system that is integrated. The components needed in the series sismin is the frequency range of the work mikrokontroller applied to the 12 MHz crystal. And two ceramic 33 PF organized as the pin 18 and 19 above. A system reset active high cycle to start working on any new changes interuksi work mikrokontroller terminal connected to the RST. The no less urgent is the 5 volt power supply voltage to activate the system work over the minimum.
At a minimum system using IC programmable AT89S5X far more practical system with the disappeal of the type of AT 89C5x because the types of applications can be enabled 89S5X system as well as download the program from the serial port without the need to move on sismin new IC will be applied when the program that will run . While using the type 89C5x series down load can not be enabled sismin so as to apply the program, IC microcontroller should be moved into the applicationed special sismin into a series of work.

By using the IC programmable AT89S52 each incoming data from the ADC in the 0809 port 1 will direspon by output port (port 2) to be addressed in the LCD provided. To produce a data displaying on the LCD and the necessary step of the program is determined by flow chart programming work as follows:

read more "Control Watt Meter Digital 1 Phase 1 With Microcontroller"

Tuesday, January 25, 2011

Schematic AVR Wireless Streaming Radio

How to Construct Wireless Streaming Radio
The project allow you streaming your radio broadcast wirelessly over internet. The wifi radio built using an Asus WL-520gu wireless router, an old USB audio headset, AVR ATmega8 and other part. If you are interested to build Wireless Streaming Radio, here is the requirement you need to prepare : Wireless connectivity through existing Wifi network; Audio output (preferably 44kHz, 16 bit stereo); Shoutcast/MP3 streaming audio decode; A display to indicate the station and currently playing song; An integrated amplifier and speaker(s); Several built in station presets; and Simple user interface, using standard radio controls (volume, tune, etc).

Gary Dion said that the radio can be controlled over Ethernet and also IR transmitter. The firmware in the project is written in C. You can download the source code here and router shell script. The project inspiration come from Jeff Keyzer.


read more "Schematic AVR Wireless Streaming Radio"

Monday, January 24, 2011

Control Microcontroller Chip PIC16F84 Introduction

PIC16F84 belongs to a class of 8-bit microcontrollers of RISC architecture. Its general structure is shown on the following map representing basic blocks. Program memory (FLASH)- for storing a written program. Since memory made in FLASH technology can be programmed and cleared more than once, it makes this microcontroller suitable for device development. EEPROM - data memory that needs to be saved when there is no supply. It is usually used for storing important data that must not be lost if power supply suddenly stops. For instance, one such data is an assigned temperature in temperature regulators. If during a loss of power supply this data was lost, we would have to make the adjustment once again upon return of supply.

Thus our device looses on self-reliance. RAM - data memory used by a program during its execution. In RAM are stored all inter-results or temporary data during run-time. PORTA and PORTB are physical connections between the microcontroller and the outside world. Port A has five, and port B has eight pins. FREE-RUN TIMER is an 8-bit register inside a microcontroller that works independently of the program. On every fourth clock of the oscillator it increments its value until it reaches the maximum (255), and then it starts counting over again from zero. As we know the exact timing between each two increments of the timer contents, timer can be used for measuring time which is very useful with some devices. CENTRAL PROCESSING UNIT has a role of connective element between other blocks in the microcontroller. It coordinates the work of other blocks and executes the user program.

PIC16F84 perfectly fits many uses, from automotive industries and controlling home appliances to industrial instruments, remote sensors, electrical door locks and safety devices. It is also ideal for smart cards as well as for battery supplied devices because of its low consumption.

EEPROM memory makes it easier to apply microcontrollers to devices where permanent storage of various parameters is needed (codes for transmitters, motor speed, receiver frequencies, etc.). Low cost, low consumption, easy handling and flexibility make PIC16F84 applicable even in areas where microcontrollers had not previously been considered (example: timer functions, interface replacement in larger systems, coprocessor applications, etc.).


read more "Control Microcontroller Chip PIC16F84 Introduction"

Control Stepper Motor Interface


A typical single axis stepper system consists of a stepper controller, a motor drive, a motor (with or without gearbox), and a power supply. A stepper is typically commanded by two digital inputs: a digital pulse train and a direction bit. The stepping drive and motor is used primarily for position control. And unlike all other motor types, stepper motor is moved in "steps" (just one step per one command pulse) and will hold at its present position if no command pulses are received. The frequency of the pulse train controls the velocity of the motor, where the number of pulses determines the length of the move. The direction signal determines in which direction the motor will rotate. For each pulse from the controller, the drive will move the motor "one step" in the direction indicated by the direction command.

A stepper motor is a “digital” version of the electric motor. The rotor moves in discrete steps as commanded, rather than rotating continuously like a conventional motor. When stopped but energized, a stepper (short for stepper motor) holds its load steady with a holding torque. Wide spread acceptance of the stepper motor within the last two decades was driven by the ascendancy of digital electronics. Modern solid state driver electronics was a key to its success. And, microprocessors readily interface to stepper motor driver circuits.

Application wise, the predecessor of the stepper motor was the servo motor. Today this is a higher cost solution to high performance motion control applications. The expense and complexity of a servomotor is due to the additional system components: position sensor and error amplifier. (Figure below) It is still the way to position heavy loads beyond the grasp of lower power steppers. High acceleration or unusually high accuracy still requires a servo motor. Otherwise, the default is the stepper due to low cost, simple drive electronics, good accuracy, good torque, moderate speed, and low cost.

A stepper motor positions the read-write heads in a floppy drive. They were once used for the same purpose in hard drives. However, the high speed and accuracy required of modern hard drive head positioning dictates the use of a linear servomotor (voice coil).

The servo amplifier is a linear amplifier with some difficult to integrate discrete components. A considerable design effort is required to optimize the servo amplifier gain vs. phase response to the mechanical components. The stepper motor drivers are less complex solid state switches, being either “on” or “off”. Thus, a stepper motor controller is less complex and costly than a servo motor controller.

Slo-syn synchronous motors can run from AC line voltage like a single-phase permanent-capacitor induction motor. The capacitor generates a 90o second phase. With the direct line voltage, we have a 2-phase drive. Drive waveforms of bipolar (±) square waves of 2-24V are more common these days. The bipolar magnetic fields may also be generated from unipolar (one polarity) voltages applied to alternate ends of a center tapped winding. (Figure below) In other words, DC can be switched to the motor so that it sees AC. As the windings are energized in sequence, the rotor synchronizes with the consequent stator magnetic field. Thus, we treat stepper motors as a class of AC synchronous motor.

read more "Control Stepper Motor Interface"

Control Serial Communication Description

In telecommunication and computer science, serial communication is the process of sending data one bit at one time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent together (on a link comprising of several wired channels in parallel).

Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties make parallel communication impractical. At shorter distances, serial computer buses are becoming more common because of a tipping point where the disadvantages of parallel busses (clock skew, interconnect density) outweigh their advantage of simplicity (no need for serializer and deserializer (SERDES)). Improved technology to ensure signal integrity and to transmit and receive at a sufficiently high speed per lane have made serial links competitive. The migration from PCI to PCI-Express is an example.

The communication links across which computers—or parts of computers—talk to one another may be either serial or parallel. A parallel link transmits several streams of data (perhaps representing particular bits of a stream of bytes) along multiple channels (wires, printed circuit tracks, optical fibres, etc.); a serial link transmits a single stream of data.

At first sight it would seem that a serial link must be inferior to a parallel one, because it can transmit less data on each clock tick. However, it is often the case that serial links can be clocked considerably faster than parallel links, and achieve a higher data rate. A number of factors allow serial to be clocked at a greater rate:

  • Clock skew between different channels is not an issue (for unclocked asynchronous serial communication links)
  • A serial connection requires fewer interconnecting cables (e.g. wires/fibres) and hence occupies less space. The extra space allows for better isolation of the channel from its surroundings
  • Crosstalk is less of an issue, because there are fewer conductors in proximity.

In many cases, serial is a better option because it is cheaper to implement. Many ICs have serial interfaces, as opposed to parallel ones, so that they have fewer pins and are therefore cheaper.


read more "Control Serial Communication Description"

Control Description Microcontroller

A microcontroller is a functional computer system-on-a-chip. It contains a processor core, memory, and programmable input/output peripherals. Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.

It emphasizes high integration, in contrast to a microprocessor which only contains a CPU (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller integrates additional elements such as read-write memory for data storage, read-only memory for program storage, Flash memory for permanent data storage, peripherals, and input/output interfaces. At clock speeds of as little as 32KHz, microcontrollers often operate at very low speed compared to microprocessors, but this is adequate for typical applications. They consume relatively little power (milliwatts or even microwatts), and will generally have the ability to retain functionality while waiting for an event such as a button press or interrupt. Power consumption while sleeping (CPU clock and peripherals disabled) may be just nanowatts, making them ideal for low power and long lasting battery applications.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, remote controls, office machines, appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes.

Since embedded processors are usually used to control devices, they sometimes need to accept input from the device they are controlling. This is the purpose of the analog to digital converter. Since processors are built to interpret and process digital data, i.e. 1s and 0s, they won't be able to do anything with the analog signals that may be being sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. There is also a digital to analog converter that allows the processor to send data to the device it is controlling.

In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is the Programmable Interval Timer, or PIT for short. A PIT just counts down from some value to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc.

Time Processing Unit or TPU for short. Is essentially just another timer, but more sophisticated. In addition to counting down, the TPU can detect input events, generate output events, and other useful operations. Dedicated Pulse Width Modulation (PWM) block makes it possible for the CPU to control power converters, resistive loads, motors, etc., without using lots of CPU resources in tight timer loops. Universal Asynchronous Receiver/Transmitter (UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU. For those wanting ethernet one can use an external chip like Crystal Semiconductor CS8900A, Realtek RTL8019, or Microchip ENC 28J60. All of them allow easy interfacing with low pin count.


read more "Control Description Microcontroller"

Wednesday, January 19, 2011

Control Plan and prepare the operation of the PLC

4.1 Plan and prepare the operation of the PLC

Planning is a basic function of management. So that the risk could be minimized, for that all the work, action and policy must be planned beforehand. While the preparation is a follow-up of planning, where in the preparation of all materials and equipment required is collected and checked before the work actually performed. Planning and preparation to give a clear and complete picture of the whole job.

4.1.1. Check the wiring diagram

Stage before starting the operation of the PLC is check and learn the wiring diagram. This stage is important because with check and learn the wiring diagram , someone can immediately understand the working principles of the PLC control of the operation will be. Following, the simple example of the PLC wiring diagram.
Figure 4.1. Wiring diagram of PLC


4.1.2. Preparing the work plan

Preparing the work plan is activity to make steps implementation of the work that most efficiently. In preparing the work plan prioritized the parts that are easy first, and then the difficult part. Step this is only one example:
a. Learn wiring diagram and configuration of PLC
b. Connecting with the tool programmer (computer programming or console)
c. Conducting initial settings;
  • Turning on PLC
  • set PLC to the PROGRAM mode
  • check the indicator on CPU and the display of tool programmer (computer programming or console)
  • Remove the memory program (if it will create a new program)

d. Program PLC (if needed) ;
  • Make a Ladder diagram or code mnemonic
  • Transfer Ladder diagram to PLC with the computer or transfer the code mnemonic with programming console.

e. Running PLC ;
  • check the wiring of I/O in PROGRAM mode
  • check and debug the programs in MONITOR mode
  • operate the PLC in RUN mode (if the program is created has been tested completely)

4.1.3. Preparing tools, materials, and safety equipment

Tools and materials are collected must be examined one by one to ensure that tools and materials in good condition and can be used. Equipment and materials which is required, among others:
  • PLC unit
  • Toolset (screwdriver, pliers, measuring equipment / Multimeter, etc.)
  • Cable
  • I/O tools (buttons, sensors, relays, motors, etc.)
  • Tools programmer (computer or Programming Console)
  • Equipment power / power suppliers (MCB, sekring, etc.)
  • Equipment Health and Safety

4.1.4. Coordinate the work

after work plans are prepared, interested parties in this case is a member of the team involved in the completion of the work is contacted to ensure that the work is coordinated effectively so that no misunderstandings at the time of execution of the work.


4.1.5. Checking the work order

Orders of working that have been given are checked to ensure that those commands can be executed in accordance with SOP / Standard Operating Procedures.


4.1.6. Understand the requirements and procedures of safety

Job Safety and Health (K3) is an action to prevent an accident while working that may happen to the workers and other people, machines, tools and environment, anytime and anywhere.

Equipment safety, among others:

  1. Clothing or protective clothing;
  2. Safety shoes
  3. Hat or helmet
  4. Gloves (Gloves)
  5. Glasses
  6. Mask

Accident prevention at the work place must consider several factors, among others:
• Make sure that equipment in good condition
• Make sure that work clothes in good condition
• Must be disciplined in use the tools
• Must be careful and concentrate on the job
• Make sure to understand how to operate a machine or tool
• Ensure that body condition in healthy before working

Discipline of personal at the work place. Every worker (student), in an industry and educational institutions must have the discipline, especially for its self:
• Discipline of time
• Discipline for promise, in personal or in jobs
• Do not deviate from what is assigned
• Sincerely on the subordinate and superior

Responsibility of the workers or students for safety. Workers or students have a responsibility as follows:
• Must adhere to proper rules and instructions from his superiors
• Act with properly and precisely at the time of the accident
• Report immediately, if the accident which occurred
• Investigate and explain the cause of the accident or damage to the engine
• Work with full concentration and careful

read more "Control Plan and prepare the operation of the PLC"

Control Introduction

My article in this time explains how to program a Programmable Logic Controller (PLC). This article I compile in 3 titles. To see the picture on this article more detail, you can access on the picture.

Title 1 : Plan and prepare the operation of the PLC
Explains about the matters that must be planned and prepared before operate the PLC such as cheking the wiring diagram, planning and preparing the equipment and material, coordinates the work, etc.

Title 2 : Operate the PLC part 1 - 5
Describes how to program the PLC using the computer and programing console correctly.

Title 3 : Checking the work and making the report
Explains abouts checking the work and making the report.

Reference;
  • Manual guide of the Omron PLC
  • Manual guide of the LG PLC
  • "Operate the PLC" ; Training module of Department of Labour and Transmigration of Indonesia
read more "Control Introduction"

Monday, January 17, 2011

Robotic - Internal State and External State

The Use of Internal State in Multi-Robot Coordination
Abstract

—Coordination is an essential characteristic of
any task-achieving multi-robot system (MRS), whether it is
accomplished through an explicit or implicit coordination
mechanism. There is currently little formal work addressing
how various MRS coordination mechanisms are related, how
appropriate they are for a given task, what capabilities they
require of the robots, and what level of performance they
can be expected to provide. Given a MRS composed of
homogeneous robots, we present a method for automated
controller construction such that the resulting controller
makes use of internal state and no explicit inter-robot
communication, yet is still capable of correctly executing
a given task. Understanding the capabilities and limitations
of a MRS composed of robots not capable of inter-robot
communication contributes to the understanding of when
and why inter-robot communication becomes necessary and
when internal state alone is suf cient to achieve the desired
coordination. We validate our method in a multi-robot
construction domain.
more

Adaptive internal state space construction method for reinforcement learning of a real-world agent
Abstract

One of the difficulties encountered in the application of the reinforcement learning to real-world problems is the construction of a discrete state space from a continuous sensory input signal. In the absence of a priori knowledge about the task, a straightforward approach to this problem is to discretize the input space into a grid, and to use a lookup table. However, this method suffers from the curse of dimensionality. Some studies use continuous function approximators such as neural networks instead of lookup tables. However, when global basis functions such as sigmoid functions are used, convergence cannot be guaranteed. To overcome this problem, we propose a method in which local basis functions are incrementally assigned depending on the task requirement. Initially, only one basis function is allocated over the entire space. The basis function is divided according to the statistical property of locally weighted temporal difference error (TD error) of the value function. We applied this method to an autonomous robot collision avoidance problem, and evaluated the validity of the algorithm in simulation. The proposed algorithm, which we call adaptive basis division (ABD) algorithm, achieved the task using a smaller number of basis functions than the conventional methods. Moreover, we applied the method to a goal-directed navigation problem of a real mobile robot. The action strategy was learned using a database of sensor data, and it was then used for navigation of a real machine. The robot reached the goal using a smaller number of internal states than with the conventional methods.
more


Research on Internal State-Based Systems
A new methodology for evaluating utility preferences using internal state information is attracting much attention within the robotics community. This methodology is based on on-going research in the fields of biology, psychology, and cognitive science and attempts to capture preference information through the use of artificial emotions, drives, and motivations.



Traditional state-based systems focus on external state information, such as the number and type of percepts, etc. when using the current state to influence decisions. External state-based systems scan the environment and then react or deliberate using the information gathered. Internal state-based systems monitor the external state, but these systems also include internal variables such as emotions, motivations, and feelings when making decisions. The internal variables are derived from dynamic internal processes and from associations and recollections pulled from long-term memory.
more


Lecture Series on Robotics - Internal State Sensors

Lecture Series on Robotics by Prof.C.Amarnath, Department of Mechanical Engineering,IIT Bombay.




Lecture - 10 Internal State Sensors



Lecture Series on Robotics - External State Sensors

read more "Robotic - Internal State and External State"

Sunday, January 16, 2011

Control AVR Downloader



This peripheral is a module single chip with microcontroller ATmega8535 and ability of serial communications in UART and In-System Programming (ISP). This module is completed with array pad that is service the purpose of place for addition network. This compatible module for user is wishing having experiment, makes prototyping, or makes the application of simple. Example of the application of its is as display controller LED, controller driver motor, motion controller of robot, to changes data with computer, digital sensor reader and also analogue sensor, and memory access and PPI.



Program which has been written down into ATmega8535 serve the purpose of initial testing program. This program will test PD0 and PD1 as serial communications line then releases waving box at all of pin Port A, Port B, Port C and Port D.

Testing stages:

· Arranges jumper J2 and J3 that PD0 and functioning PD1 as serial communications line of UART RS-232 ( jumper connected).

· Connects serial cable to COM computer port and RJ11 at downloader.

· Connects source of tension 9 VDC to VIN.

· Implements program SERIAL1EXE. Determines COM port applied and depressed Test Serial.

· If serial communications run at ease, at program would seems to enlisting data sent received and is same (Sends = 0, Receives = 0; Sends = 1, Receives = 1; Sends = 2, Receives = 2, etc) and comes up windows to contain "Serial communications OK" !. If serial communications didn't go well, at program would seen difference of data received sent and comes up windows to contain "Serial communications of errors".

· Waving visible box passed oscilloscope or interfaced to network LED or DT-I/O LED LOGIC Tester so that seen its "ON-OFF" the LED.

read more "Control AVR Downloader"

Control temperature indicator with ATMEL 89C51



Description of feature devices;

  • Measures temperatures from -55 degrees C to +125°C
  • Three LED's to indicate in what range the temperature
  • User definable thermostat with high and low settings
  • Output via a relay to control a heater element or a blower fan (or something else)
  • Power supply......................4.5 to 5.5 VDC
  • Power consumption ...........15mA


This schematic device uses a Dallas DS1621 temperature sensor which indicates the temperature of the device. The temperature sensor has a thermal alarm output, which becomes high when the temperature of the device exceeds a user defined value. When the temperature drops below a user defined value, the alarm output becomes low. In this way any amount of hysteresis can be programmed. The values are stored in a special register of the device that is nonvolatile. The signal of the alarm output is amplified by a BC557 PNP transistor, that it drives a relay that can switch a heater element or a blower on or off. The temperature settings and readings are communicated to/from the device over a simple 2-wire serial interface. An ATMEL 90S2313 microcontroller controls the serial communication to/from the DS1621.The microcontroller also controls three LED, only one of the LED's is on when the temperature is within a certain range. The range of the temperature in which the LED's are on can be set by the user in the program code. The circuit needs to be powered by a 5V power supply, which can be obtained from a wall-wart.

read more "Control temperature indicator with ATMEL 89C51"

Control Temperature Display Seven Segment



This project shows the temperature on a three digit 7-segment display, it measures the temperature from -9.5 0C to 99 0C in 0.5 C steps. The last digit shows the 0.5 degrees. Because of the LED display the temperature is also readable in the dark.



The DS1621 is used to measure the temperature. The DS1621 has a 2 wire serial interface, which is a bidirectional bus with a speed up to 400Kbs. Up to eight devices of the same type can be controlled by the bus. In this case only one device is connected to the AT2313 microcontroller. The 2 wire bus is also called I2C. I2C is an abbreviation for IC Inter Circuit. The DS1621 has also a build in programmable thermostat, which is not used in this circuit.



The AT2313 is used the control the two wire serial interfacing with the DS1621 and to translate the information for showing on the three digit 7-sement display. The reading of the temperature from the DS1621 happens every 3 seconds. A ceramic resonator is used for clocking the microcontroller.



The three 7-segment displays are of the common cathode type, at each cathode the display is connected to a transistor for amplifying the current. The transistors are of the NPN type and are controlled by the AT2313 microcontroller. Each segment of the display is connected to a 200 Ohm resistor to limit the current of the AT2313 port. The multiplexing of the three displays is handled in the software. Each display is lights up consecutively for 5ms seconds. The LED digits have a height of 14,2mm (0.56").



The circuit needs a 3 to 5V DC power supply and draws about 100mA current. It can also be supplied with two 1.5 volt batteries, but then the brightness of the LED's will be less. Two D-type batteries will last for about one month.



The program is written in the BASCOM-AVR programming language. The program uses about 1Kb of the 2Kb flash memory that the AT2313 has. BASCOM is a programming language for AVR-microcontrollers based on BASIC, a demo version can be downloaded for free and can be used for up to 4Kb of programming code. BASCOM has special commands for driving chips with the two wire interface. The BASCOM program compiles the program code into the hex-file that can then be loaded into the microcontroller to make the circuit work. BASCOM has also a build-in programmer to get the hex-file into the microcontroller.

read more "Control Temperature Display Seven Segment"