Вы находитесь на странице: 1из 18

Eng.

Hakim Altamimi

Chapter focus
Focus on electronics hardware which includes computer,

controller and analog interface

computer and c in mechatronics


Main functions of computer and C as embedded

controller
Digital control and multiple tasks coordination Data acquisition, monitoring and automation Data communication with external systems User interface- input configuration and customized data,

display system states and diagnostics Data storage Calibration and self-testing

Other functions of computer : CAD and CAE

Control with a PC
Advantage of using PC as platform for embedded

controller
Reduce time in system dev. cycle tested PC motherboards

are available in the market. Save dev. cost- no cost for dev. of computer and cheaper PC software tools Large choice of data storage (HD, FD) standard hardware with software drivers supported by manufacturers Engineers dont need to waste time on building interfaces and software drivers because they are ready, so they can focus only on the desired systems Standard software. OS such as winXP, Linux ease the software development

Control with a PC
Disadvantages of using PC as platform for embedded

system
Cost increases for high volume and cost sensitive products

we pay for all components even though we dont use Less effective if a lot of customized interfaces to be built (limited interfaces) - its better to design by our self Spare parts availability- PC technology is changing rapidly Non real-time OS- we must by RTOS or use RTLinux Design problem- if theres a problem we need to debug it ourself since no much information about the motherboard are available

Control with C
Discussion: based on the PC advantages and

disadvantages, derive the advantages and disadvantages of using C as and embedded controller

Interfacing with computer


Interfacing means connecting transducers (sensors and

actuators) or external devices to computer Some issues and problems need to be handled when interfacing such as:
Voltage and current levels incompatibility Electrical isolation Timing incompatibility for data transfer Analog-to-digital and digital-to-analog

There are standard interfaces to simplify connections with

external devices: SPI, USB etc

Analog interfaces
DAC- to be elaborated in details in IM06 In brief: device that converts digital input value into analog

Output Voltage =

Where D is the digital input (0 to 2n-1) and n is the number of bits

Analog interfaces
Full-scale voltage (VFS) for DAC normally Vref The voltage for each step change for a 1-bit change in

digital value is called resolution. Its also called 1 LSB = 1 = 2 Example resolution for some DAC with Vref= 5V
n 8
12

Resolution (mV) 5 = 19.53 8 2 5 = 1.22 12 2

Resolution (%FS) (19.53m/5)*100=0.39


(1.22m/5)*100=0.024

Analog interface
Example of interfacing DAC with M68HC11

Interfacing with Data & Address buses

Interfacing I/O ports

Analog interfaces- ADC


Its been discussed in IM06, anyway well have short

recall of whats been taken Device that converts analog voltage to digital code ADC transfer function

The conversion is performed till full scale voltage minus one LSB (resolution) because the FS voltage is n+1 bits for an n-bits converter (over range)

Analog interface
An 8-bit ADC wit parallel interface

Digital output value (D) = Resolution (R) =


28

28

1 = 255

Analogue interface
Example: calculate the resolution for the following a) AD7819

(8-bit) b) AD7854 (12-bit) with voltage references (FS) Vref=

2.5V, Vref= 4.069V and Vref= 5.1V. Which ADC can be used to
convert the input voltage Vin= 2 mV.

Signal conditioning
Signals from transducers are normally very small, non-

linear and not in a condition that is suitable to be directly read/ sent to microcomputer, thus signal conditioning is required Signal conditioners can be:
Amplifiers for this sem Filters Linearizers Converters Buffers/ protectors

Op-amp
We have taken a whole chapter on this topic To recap on the op-amp types: Inverting amplifier Non-inverting amplifier Unity gain amplifier/ buffer Summing amplifier Integrating amplifier Differential amplifier Difference amplifier

Signal conditioning with op-amp


Example: A sensor with output range of -10 to +10V is to

be connected to an ADC with input range of 0 to 5V. Design a suitable signal conditioning circuit.
+10 Vi Signal conditioning circuit VO 5 ADC 0

-10

Signal conditioning
Example: pressure sensor graphical TF is given below

Find the mathematical TF, nonlinearity.

Signal conditioning
If the sensor is to be interfaced with 12 bits ADC with

input range of 0-5V


Find the converters minimum voltage change Find the minimum pressure change if the sensor is going to

be directly interfaced with the ADC Design a suitable signal conditioning circuit.

Вам также может понравиться