Professional Documents
Culture Documents
Project Report on
Bachelor of Engineering in
Submitted by
N KOTRESH-1BI16EC089
NITHISH B M-1BI16EC112
SHRUTHI R G-1BI16EC184
BEL. Bengaluru
Internal guide
Dr. C R BYRA REDDY
Professor
Department of ECE, BIT
DEPARTMENTOF ELECTRONICSANDCOMMUNICATION
ENGINEERING
CERTIFICATE
This is to certify that the project work entitled “Thermal Sensing and Regulation
module for 100W Power Amplifier”, carried out by Mr.N Kotresh (1BI16EC089),
Mr.Nithish BM (1BI16EC102), Ms.Shruthi R G (1BI16EC184), bonafide students of
Bangalore Institute of Technology in partial fulfillment for the award of degree of
Bachelor of Engineering in Electronics and Communication Engineering, affiliated to
Visvesvaraya Technological University, Belagavi during the year 2019-2020. It is
certified that all corrections or suggestions indicated for internal assessment have been
incorporated in the record. The project work has been approved as it satisfies the
academic requirements in respect of project work prescribed by the said Degree.
EXTERNALVIVA
1.
2.
ACKNOWLEDGEMENT
The project conduction opportunity we had with BEL was a great chance for learning and professional
development. Therefore, we consider ourselvesto be very fortunate as we were provided with an
opportunity to be a part of BEL. We are also grateful for having a chance to meet so many great
personalities and professionals who led us through this project period.
We wish to express our sincere gratitude to our guide Dr. C. R. BYRA REDDY, professor, ECE
department, BIT for his patience, motivation and support throughout.
We take this opportunity to express our deepest gratitude and special thanks to our guide at BEL,
Mr.ABHINAV SONI, senior engineer, MilCom division who in spite of being busy with his schedule
andduties, took time to hear, guide and keep us on the correct path and allowing us carry out our project in
BEL.
We are thankful to Dr. K V PRASAD, HOD, Dept of ECE, Bangalore Institute of Technology,
BANGALORE for all his support and valuable suggestions.
. It is our radiant sentiment to place on record our best regards, deepest sense of gratitude to all our
senior officers, project trainee, employees and foremen for their careful and precious guidance which were
extremely valuable for my project study both theoretically and practically. I perceive this opportunity as a
big milestone in my professional career development.
We would like to thank all the staff members of Department of Electronics and Communication
Engineering for their constant support and encouragement. It would be our privilege to express our
heartfelt gratitude and respect to BANGALORE INSTITUTE OF TECHNOLOGY which has given us
an opportunity to present this project report.
N Kotresh-1BI16EC089
Nithish B M-1BI16EC112
Shruthi R G-1BI16EC184
i
ABSTRACT
Power amplifiers are critical in Radio frequency communication chain used in Commercial as
well as defense requirements. Particularly in Defense applications where the temperature variability is
huge, thermal management acquires more significance.
This 100 watts Power amplifier is used in RF communication among Indian Naval Ships along with
other sub-systems like Data link Radio unit, Power supply, GPS. This product has been designed
keeping in mind the link requirements of Indian Navy under a classified project.This power amplifier
has a pulsed power output of 100 W ±2dB over a frequency band of 970MHz-1230MHz with three
different levels of power control. It requires protection features for High load VSWR & over
temperature protection.
The mechanism for over temperature control and device protection is implemented here in this project.
It involves design of Controller card & software development which along with other things provides
for automatic thermal management.
ii
CONTENTS
Chapter 1
1.INTRODUCTION……………………………………………………………………..1
1.1 TYPES OF AMPLIFIERS………………………………………………………….....2
1.2 APPLICATIONS OF AMPLIFIERS……………………………………………….....3
1.3 PURPOSE OF STUDY…………………………………………………………….....4
Chapter 2
2.LITERATURE SURVEY……………………………………………………………..5
Chapter 3
3. REQUIREMENT ANALYSIS……………………………………………………….7
3.1 HARDWARE REQUIREMENTS……………………………………………….......7
3.2 SOFTWARE REQUIREMENTS…………………………………………………....13
Chapter 4
4. METHODOLOGY AND IMPLEMENTATION………………………………….18
Chapter 7
7.CONCLUSION AND FUTURE WORK…………………………………………...35
Chapter 8
8.REFERENCES……………………………………………………………………….36
Chapter 9
9.APPENDIX……………………………………………………………………….......37
9.1 HARDWARE SPECIFICATIONS……………………………………………….....37
Chapter1
INTRODUCTION
power of a given input signal. The power of the input signal is increased to a higher level
such that it is enough to drive loads of output devices like speakers, headphones, RF
transmitters etc. Unlike voltage or current amplifiers, power amplifiers are designed to
drive loads directly and are used as a final block in an amplifier chain.
The input signal to a power amplifier needs to be above a certain threshold value. Instead
of directly passing the raw audio or RF signal to the power amplifier, it is first pre-
amplified using current or voltage amplifiers and is sent as input to the power amplifier
after making necessary modifications. It can also be observed from the block diagram of
In the above discussed case, a microphone is used as an input source and the magnitude
of signal from the microphone is not enough for the power amplifier. This calls for a need
to first pre-amplify the input signal where its voltage and current are increased slightly.
Then the signal is passed through tone and volume controls circuit which makes the
aesthetic adjustments to the audio waveform. Finally, the signal is passed through a
power amplifier and the output from power amplifier is fed to a speaker.
Depending on the type of output device that is connected, the power amplifiers are
This type of power amplifiers are used for increasing the magnitude of power of a weaker
audio Signal. The amplifiers which are used in speaker driving circuitries of televisions,
The output of an audio power amplifier ranges from a few milli watts (like in headphone
Wireless transmission requires modulated waves to be sent over long distances via air.
The signals are usually transmitted using antennas and the range of transmission depends
For wireless transmissions like FM broadcasting, antennas require input signals at a range
of thousands of kilowatts of power. Radio Frequency Power amplifiers here are employed
to increase the magnitude of power of modulated waves to a level high enough for
DC power amplifiers are used to amplify the power of a PWM (Pulse Width Modulated)
signals. They are used in electronic control systems which need high power signals to
drive or actuators motors. They take input from microcontroller systems, increase its
There are wide ranges of applications of these amplifiers in the various sectors.
• These are used in variety of devices such as headphones, microwave ovens, home
theatre systems, etc. These form the most important part of the basic electronics
that comes under the category of the household needs and consumer’s range.
• To control servo motors and the specific DC motors, the power amplifiers are
widely utilized.
the signals over a long distance, the power amplification is beneficial in such areas
of work. Higher the levels of power, higher are the transfer rate of data and its
usability.
• Power amplifiers are also utilized in the types of equipment designed for the
PURPOSE OF STUDY
Being a prime part of several setups and equipments, power amplifiers are prone to wear
and tear and their performance degrades with time. This process fastens if the temperature
within the power amplifier is more than the allowable value. The gain value of the
amplifier decreases if the temperature is high. Hence controlling the temperature within
the power amplifier is of prime importance. In this project, we intend to address the above
problem and offer an optimal solution using cost efficient and mass friendly resources.
Chapter2
LITERATURE SURVEY
The various references used:
fan.The main objective of this paper is to device a temperature controlled fan using the
analog components and to measure the threshold temperature for which the fan works
satisfactorily. An alarm circuit is attached to indicate the fan turn on. This device can be
used in smart homes. The temperature controlled dc fan is designed to turn off and turn on
according to the temperature of the surroundings. This device majorly functioning on the
behaviour of the thermistor and has a major advantage in power saving aspect. The device
will be designed in a way that the critical temperature (the minimum temperature) to turn
The research paper presented here is based on automatic fan speed controller that
automated fan, controlled by a temperature sensor. The heart of this project comprises of
the temperature sensor circuit which senses the change in the ambient temperature of the
surrounding. Here pulse width modulation technique is used. When heat is applied to the
temperature sensor which this will indicate it to the fan automatically increasing or
decreasing in speed according to the four speed levels of a normal fan that are set to
Usually, the traditional system fans run at high speed at high temperature and the opposite
at lower temperature. In this paper, to control the speed of the fan a circuit comprising
detection of human body in the room depending on which the fan gets operated and LCD
is used to display the temperature, number of people in the room and the speed of the fan.
CHAPTER 3
REQUIREMENT ANALYSIS
The hardware components used in this project and the different softwares used for
that varies the speed and airflow of a cooling fan using a pulse width modulated
provides external speed control of PWM control function fans. This contributes to
2. ADT7470
monitor for any system requiring monitoring and cooling. This device
The device has a single address line for address selection, a serial data line for reading
and writing addresses and data and an input line for serial clock. All control and
programming functions of the ADT7470 are performed over the serial bus, that supports
both fast I2C and SMBus specifications. When the ADT7470 monitoring sequence is
started, it cycles through each fan tach input to measure the fan speed. Measured values
from these inputs are stored in few value registers. These can be read out through the
serial bus or can be automatically compared with programmed limits stored in the limit
registers. The results of out-of-limit comparisons are stored in the status registers, which
can be read over the serial bus to flag out-of limit conditions. If fan speeds drop below
preset levels or a fan stalls for a while, an interrupt is generated. Similarly the
ADT7470 can flag fan over speed conditions by using limits set in the fan tach registers.
for low cost and small form- factor applications. Temperature data is converted to
samples/sec. Compactness, low installed cost and ease of use make the TC74 an
FEATURES
4. PIC32 MICROCONTROLLER
PIC stands for “Peripheral Interface Controller”. The 32-bit PIC family offers a large
microcontrollers have high performance and great memory capabilities. They are
MPLAB X, assemblers and C/C++ compilers under the MPLAB and PICKIT series. PIC
devices are widely popular with industrial developers due to their low cost, wide
availability, extensive set of application notes,, large user base, availability of low cost or
Some of the salient features of the starter kit are listed below:
Operational Conditions:
Communication Interfaces:
The I2C module in PIC32MZ starter kit provides complete hardware support for both
• I2C Slave and master modes support 7-bit and 10-bit addressing
• Bidirectional transfers between master and slaves are allowed by I2C port.
• Serial clock synchronization for the I2C port can be used as a handshake mechanism to
MPLAB X IDE is a software program that is used to develop applications for Microchip
computer that helps to write, edit, debug and program the code which is the intelligence
system which contains all the components needed to design and deploy embedded
systems applications.
With MPLAB X IDE, many tools can be selected, but they all will have a similar
interface, and the learning curve from simulator to low-cost in-circuit debugger to
powerful in-circuit emulator. Once the application has been debugged and is run in the
device programmer.
• A full-featured programmer’s text editor that also serves as a window into the debugger.
• A project manager that provides integration and communication between the IDE and
project’s device.
• A debugger engine that provides breakpoints, single stepping, Watches windows and all
• A software simulator for all PIC MCU and ds PIC DSC devices. The simulator is
two bus lines namely serial clock (SCL) and serial data (SDA). I2C bus is a shared bus
system to which many I2C devices can be connected. The devices can be either master or
The sequence of operations for communicating with an I2C slave device is as below:
2. Master device pulls SDA ‘low’ when SCL is ‘high’ initiating start condition.
3. Master device sends the address of slave device with which it wants to
5. Master waits for the acknowledgement from slave whose address is sent.
6. Upon receiving acknowledgement, master sends data to the slave over SDA line.
7. Once the data transmission is done, it waits for an acknowledgement from the
slave.
making SDA ‘high’ when SCL is ‘high’ indicating the initiation of stop condition.
Chapter 4
POWER
ADT7470
SUPPLY
unified virtual address space. The starter kit used here belongs to this family.
They have 5 I2C modules inbuilt that support the communication. The
microcontroller is written upon with the program using the I2C protocol. It
behaves as the decision making device for the temperature input received and
microcontroller and the sensor and also that between the microcontroller nad
PWM fan controller and fan speed monitor for systems requiring active
temperature sensor and controls the speed of fans. Control of the ADT7470 is
carried out using the serial system management bus (SMBus). The ADT7470
controller which in this case is the PIC32MZ. The temperature sensor also
is placed on the oscillator part of the power amplifier where it detects the value
reception of the data, it is converted to an 8-bit digital data and is sent to the
master.
➢ The cooling device - San Ace 60 fan is used for this purpose. The chosen
Initially the fan has 100% duty cycle while temperature has crossed the
threshold value and upon the appropriate instructions from ADT7470 through
the microcontroller, its speed is decreased or increased and the duty cycle is
varied correspondingly. This device is placed in the exterior edge of the power
embedded C. Similarly, the code to read the speed at which the fan is rotating
and to increase or decrease its speed appropriately as per the temperature input
1) Temperature sensor TC74 is placed on the metal coated oscillator unit of the
power amplifier.
2) The sensed temperature is converted into digital format and is sent to the
turn connected to the San Ace 60 fan that is placed in the exterior part of the
indication is sent and the fan is switched on. The cooling device will have a
100% duty cycle on exceeding the critical value which means that it runs
5) The rpm of the fan is monitored and the speed can be reduced upon the
reduction of the temperature inside the equipment. This helps in utilizing the
resources optimally.
4.2 Implementation
4.2.1 Interfacing
This section includes the representation of the connection of the components to the
The top assembly of the PIC32MZ DA starter kit Base Board includes several key
features. The slots that are utilized for interfacing in this project are discussed below.
ADT7470
TC74
U SDA
S
B PIC32MZ BOARD SCL
PC TC74
GND
USB SDA SCL GND
PWM
FAN
TACH
+24V GND TACH PWM SDA SCL GND
+12V
ADT7470
GND
POWER SUPPLY
To accomplish the communication of master with a slave, the software will sequence
3. Send the I2C device address byte to the slave with a write indication.
10. Send the device address byte to the slave with a read indication.
11. Wait for an Acknowledge from the slave and verify it.
13. Generate an ACK or NACK condition at the end of a received byte of data.
I2CxTRN is a register to which transmit data is written. This register is used when the
I2C module operates as a master transmitting data to the slave, or as a slave sending reply
data to the master. If the I2C module receives another complete byte before the software
1. Read I2C1 Status register and I2C1 control register. Set and reset the control register
bits appropriately.
2. Send slave device address and turn on the I2C module (I2C3CONbits.ON = 1).
4. Send slave address along with a write bit and check for the acknowledgement.
6. Data is sent by the slave and reception occurs at the master end.
8. After the data transmission, if the acknowledgement is received, the stop enable bit is
set.
(in 2’s complement format) recorded by thermal sensor. Further, varying external
temperature on metal plate of TC74 results in different values of temp which is reflected
in corresponding register bits. (this was verified with the help of soldering iron).
Code snippet:
while(I2C3CONbits.SEN == 1);
I2C3TRN = 0x91; //slave transmission & master reception + READ BIT HIGH
I2C3CONbits.RCEN = 1;
while(I2C3CONbits.RCEN == 1);
while(I2C3CONbits.ACKEN == 1);
I2C3CONbits.PEN = 1;
2. While the module is activated, initiate stop condition and then the start condition.
3. After setting start enable bit, send the slave address with write bit high.
5. Upon receiving the acknowledgement, calculate the decimal value of duty cycle
reg_C = (float)(dutycycle)/(float)(0.39);
the speed of the fan changes according to the dutycycle value. Thus, the fan speed control
can be achieved.
Code snippet:
I2C3CONbits.SEN = 1;
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
reg_C = (float)(dutycycle)/(float)(0.39);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.PEN = 1;
1. Initiate a start condition and send slave device address with write bit high.
2. Check for acknowledgement and send the address of the lower byte of the tach3 slot.
4. Initiate the start condition and send address of slave device with read bit high.
6. While receive enable bit is set, check for the acknowledgement and set the stop
enable bit.
tach_high = I2C3RCV;
rev = ((float)5400000)/((float)tach_value);
hex. Hence the data of fan RPM can be passed to other application as per requirements.
Code snippet:
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.RCEN = 1;
while(I2C3CONbits.RCEN == 1;
while(I2C3CONbits.ACKEN == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
tach_low = I2C3RCV;
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
tach_high = I2C3RCV;
rev = ((float)5400000)/((float)tach_value);
Code snippet:
high_temp_limit= 80;
current_temp = Read_temperature ( );
if (diff_temp >2 || diff_temp <-2)//change the speed if there is variation of more than 2º
if ( current_temp > 45) // 100% duty cycle if temp is more than 45 deg
set_fan_speed(FAN1, 99);
set_fan_speed(FAN2, 99);
set_fan_speed(FAN3, 99);
Chapter 5
RESULTS
After the setup is completed, the model is now working. The following results were
➢ The TC74 sensor is sensing the temperature of the surrounding it is placed in.
➢ If the sensed temperature is exceeding the threshold value, the ADT7470 sends an
➢ Upon reduction in the temperature in the power amplifier, the speed of the fan is
gradually reduced.
The monitored values are plot to produce the below graph. It can be seen that the speed of
Chapter 6
APPLICATIONS
The project mainly focuses on the controlling of the excess temperature in the power
amplifier setup. Reducing the unwanted over temperature results in efficient working and
Some of the major places where the project finds its relevance and is of high importance
➢ Network Communication Server (NCS) – The NCS used in BEL uses a VHF or
UHF power amplifier. This power amplifier is capable of delivering 100W at the
output. This is associated with the release of enormous amount of heat and hence
in order to not have a hampered performance, the thermal state regulation module
is used.
➢ This can be used to drive a speaker of low input impedance efficiently as the
➢ This is also used in power amplifiers that drive high power antennas for long
range transmission.
➢ In the high-powered Radio Frequency (RF) linear power amplifier that enables
➢ Navy applications.
Chapter 7
There are numerous approaches to this cause, yet here a brilliant technique for
interfacing a sensor with the starter kit ie microcontroller using the concept of I2C
was done. The module designed is mainly used of the power amplifiers in the NCS
which are installed in the naval systems as the amplifiers are exposed to a higher
temperature and are prone to work falsely if not taken care of.
The main goal of the system is to secure the amplifier from over-temperature so
that it can work without wear and tear that helps to enhance efficiency and
decrease irregularities.
Though the claim has been made that a module has been developed to protect the
➢ The module can be collaborated with a wifi gateway and the display can
Chapter 8
REFERENCES
[1] Dr.Sudha Senthilkumar, Dr. K. Brindha, Prof.Rathi.R Siya Hardi
[2] Surabhi ,Upendra Prasad , Vivek Kumar Jain “Design and Fabrication of Temperature
based DC Fan”
[3] Nigade, A. S,Deepanshu Verma, Brajesh Kumar Pandey and Pranjal Srivastav,”
[4] Shivesh, Rishabh Mishra, and Dr. E.Annie Elisabeth “SPEED CONTROL OF
https://www.electronicshub.org/power-amplifier/
https://www.analog.com/en/products/adt7470.html
https://www.analog.com/en/products/adt7470.html
https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/DM320010
CHAPTER 9
APPENDIX
The component layouts, component specification of the different components used,
brief introduction about the different software’s used in this project are explained in
this section.
The various components used and their working have been briefly explained in the above
• One Type-A male to Micro-B USB cable (to communicate with the PIC32 DEBUG
port)
• Information sheet
• Through USB Micro-B connector (J4) – This enables using a wall adapter to supply
• An external application board with a regulated DC power supply that provides +5V
can be connected to the application board connector that is provided on the bottom
Salient features:
Operating Conditions
•DSP-enhanced core:
Communication Interfaces
• bit 14 TRSTAT: Transmit Status bit (when operating as I2C master, applicable
• bit 13 ACKTIM: Acknowledge Time Status bit (Valid in I2C Slave mode only)
1 = I2C bus is in an Acknowledge sequence, set on 8th falling edge of SCL clock
• bit 10 BCL: Master Bus Collision Detect bit 1 = A bus collision has been
bus collision.
• bit 9 GCSTAT: General Call Status bit 1 = General call address was received 0 =
General call address was not received Hardware set when address matches
• bit 8 ADD10: 10-bit Address Status bit 1 = 10-bit address was matched 0 = 10-
bit address was not matched Hardware set at match of 2nd byte of matched 10-bit
• bit 7 IWCOL: Write Collision Detect bit 1 = An attempt to write the I2CxTRN
register failed because the I2C module is busy 0 = No collision Hardware set at
• bit 6 I2COV: Receive Overflow Flag bit 1 = A byte was received while the
• bit 5 D_A: Data/Address bit (when operating as I2C slave) 1 = Indicates that the
last byte received was data 0 = Indicates that the last byte received was device
slave byte.
• bit 4 P: Stop bit 1 = Indicates that a Stop bit has been detected last 0 = Stop bit
was not detected last Hardware set or clear when Start, Repeated Start or Stop
detected.
• bit 3 S: Start bit 1 = Indicates that a Start (or Repeated Start) bit has been
detected last 0 = Start bit was not detected last Hardware set or clear when Start,
• bit 2 R_W: Read/Write Information bit (when operating as I2C slave) 1 = Read –
indicates data transfer is output from slave 0 = Write – indicates data transfer is
input to slave Hardware set or clear after reception of I2C device address byte. bit
is empty Hardware set when I2CxRCV is written with received byte. Hardware
• bit 0 TBF: Transmit Buffer Full Status bit 1 = Transmit in progress, I2CxTRN is
• bit 22 PCIE: Stop Condition Interrupt Enable bit (I2C Slave mode only) 1 =
disabled
• bit 21 SCIE: Start Condition Interrupt Enable bit (I2C Slave mode only) 1 =
• bit 20 BOEN: Buffer Overwrite Enable bit (I2C Slave mode only) 1 = I2CxRCV
is updated and ACK is generated for a received address/data byte, ignoring the
• bit 19 SDAHT: SDA Hold Time Selection bit 1 = Minimum of 300 ns hold time
on SDA after the falling edge of SCL 0 = Minimum of 100 ns hold time on SDA
• bit 18 SBCDE: Slave Mode Bus Collision Detect Enable bit (I2C Slave mode
only) 1 = Enable slave bus collision interrupts 0 = Slave bus collision interrupts
are disabled bit 18 AHEN: Address Hold Enable bit (Slave mode only) 1 =
Following the 8th falling edge of SCL for a matching received address byte;
SCKREL bit will be cleared and the SCL will be held low. 0 = Address holding is
disabled
• bit 16 DHEN: Data Hold Enable bit (I2C Slave mode only) 1 = Following the 8th
falling edge of SCL for a received data byte; slave hardware clears the SCKREL
• bit 15 ON: I2C Enable bit 1 = Enables the I2C module and configures the SDA
and SCL pins as serial port pins 0 = Disables the I2C module; all I2C pins are
• bit 13 SIDL: Stop in Idle Mode bit 1 = Discontinue module operation when device
• bit 12 SCLREL: SCLx Release Control bit (when operating as I2C slave) 1 =
Release SCLx clock 0 = Hold SCLx clock low (clock stretch) If STREN = 1: Bit
is R/W (i.e., software can write ‘0’ to initiate stretch and write ‘1’ to release
of slave reception. If STREN = 0: Bit is R/S (i.e., software can only write ‘1’ to
• bit 11 STRICT: Strict I2C Reserved Address Rule Enable bit 1 = Strict reserved
• bit 10 A10M: 10-bit Slave Address bit 1 = I2CxADD is a 10-bit slave address 0 =
• bit 9 DISSLW: Disable Slew Rate Control bit 1 = Slew rate control disabled 0 =
• bit 8 SMEN: SMBus Input Levels bit 1 = Enable I/O pin thresholds compliant
• bit 7 GCEN: General Call Enable bit (when operating as I2C slave) 1 = Enable
• bit 6 STREN: SCLx Clock Stretch Enable bit (when operating as I2C slave) Used
• bit 5 ACKDT: Acknowledge Data bit (when operating as I2C master, applicable
during master receive) Value that is transmitted when the software initiates an
during Acknowledge
SDAx and SCLx pins and transmit ACKDT data bit. Hardware clear at end of
• bit 3 RCEN: Receive Enable bit (when operating as I2C master) 1 = Enables
Receive mode for I2C. Hardware clear at end of eighth bit of master receive data
• bit 2 PEN: Stop Condition Enable bit (when operating as I2C master) 1 = Initiate
Stop condition on SDAx and SCLx pins. Hardware clear at end of master Stop
• bit 1 RSEN: Repeated Start Condition Enable bit (when operating as I2C master)
1 = Initiate Repeated Start condition on SDAx and SCLx pins. Hardware clear at
progress
• bit 0 SEN: Start Condition Enable bit (when operating as I2C master) 1 = Initiate
Start condition on SDAx and SCLx pins. Hardware clear at end of master Start
controller and fan speed monitor for systems requiring active cooling. It is designed to
TMP05 temperature sensors. It can also monitor and control the speed of four fans, in
via external hardware control, under extreme thermal conditions or on system startup.
An SMBALERT interrupt communicates error conditions such as fan under speed and
conditions can then be read from status registers over the I2C bus.
measure
pull-up.
Fan 2.
measure
measure
output to
pull-up.
measure
output to
pull-up.
address.
failures.
Bit 0x7F[3] = 1.
3. TC74
The TC74 is a serially accessible, digital temperature sensor particularly suited for low
cost and small form factor applications. Temperature data is converted from the onboard
Pin description
Power Supply Input (VDD) - Power supply input. See Electrical Specifications.
SMBus/I2C Serial Clock (SCLK) - Input. SMBus/I2C serial clock. Clocks data into and
Serial Data (SDA) - Bidirectional. Serial data is transferred on the SMBus/I2C in both
4. SAN ACE 60
General Specification:
· Material - Frame: Plastic (Flammability: UL 94V-0), Impeller: Plastic
· Insulation resistance - 10 MΩ or more with a 500 VDC megger (between lead wire
conductors and frame)
· Mass - 130 g
MPLAB X IDE is a software program that is used to develop applications for Microchip
microcontrollers.
1. Create the high level design. From the features and performance desired, decide
which PIC MCU or dsPIC DSC device is best suited to the application, then design
the associated hardware circuitry. After determining which peripherals and pins
control the hardware, write the firmware – the software that will control the hardware
directly translatable into machine code, or a compiler that allows a more natural
language for creating programs, should be used to write and edit code. Assemblers
and compilers help make the code understandable, allowing function labels to
identify code routines with variables that have names associated with their use, and
2. Compile, assemble and link the software using the assembler and/or compiler and
linker to convert your code into “ones and zeros” – machine code for the PIC MCUs.
This machine code will eventually become the firmware (the code programmed into
the microcontroller).
3. Test your code. Usually a complex program does not work exactly the way imagined,
and “bugs” need to be removed from the design to get proper results. The debugger
allows you to see the “ones and zeros” execute, related to the source code you wrote,
with the symbols and function names from your program. Debugging allows you to
experiment with your code to see the value of variables at various points in the
program, and to do “what if” checks, changing variable values and stepping through
routines.
4. “Burn” the code into a microcontroller and verify that it executes correctly in the
finished application.
Optional components can be acquired or purchased to work with the MPLAB X IDE:
MPLAB XC C compilers from Microchip provide fully integrated, optimized code for
PIC MCUs and dsPIC DSCs. Along with compilers from microEngineering Labs, CCS
and SDCC, they are invoked by the MPLAB X IDE project manager to compile code that
is automatically loaded into the target debugger for instant testing and verification.
• Programmers
MPLAB ICD 3 in-circuit debugger, MPLAB REAL ICE in-circuit emulator, and MPLAB
PM3 programmer are capable of the production programming of code into target devices.
target devices.
All of these tools may be used with MPLAB X IDE to control programming of both code
and data, as well as the Configuration bits to set the various operating modes of the target
In addition, all of these tools may be used with MPLAB IPE to program code, data and
configuration bits. MPLAB IPE is designed more for production programming, and its
PICkit 3 and MPLAB ICD 3 in-circuit debuggers, and MPLAB REAL ICE in-circuit
emulator can be used to debug application code on target devices. By using some of the
on-chip resources, these can download code into a target microcontroller inserted in the
application, set breakpoints, single step and monitor registers and variables. The emulator
• Plugin Tools
Several plugins are available to add to the capabilities for MPLAB X IDE. For example,
the Data Monitor and Control Interface (DMCI) provides a mechanism to view and
control variables in code and change their values real-time. It also allows you to view
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <xc.h>
float reg_C ;
I2C3CONbits.SIDL = 0;
I2C3CONbits.SCLREL = 1;
I2C3CONbits.A10M = 0;
I2C3CONbits.DISSLW = 1;
while(I2C3CONbits.ON == 0);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
reg_C = (float)(dutycycle)/(float)(0.39);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
return (EXIT_SUCCESS);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.SEN = 0;
I2C3CONbits.RSEN = 0;
I2C3CONbits.PEN = 0;
I2C3CONbits.ACKEN = 0;
I2C3CONbits.RCEN = 1;
while(I2C3CONbits.RCEN == 1);
I2C3CONbits.ACKDT = 1;
I2C3CONbits.ACKEN = 1;
while(I2C3CONbits.ACKEN == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
tach_low = I2C3RCV;
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.SEN = 0;
I2C3CONbits.RSEN = 0;
I2C3CONbits.PEN = 0;
I2C3CONbits.ACKEN = 0;
I2C3CONbits.RCEN = 1;
while(I2C3CONbits.RCEN == 1);
I2C3CONbits.ACKDT = 1;
I2C3CONbits.ACKEN = 1;
while(I2C3CONbits.ACKEN == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
tach_high = I2C3RCV;
rev = ((float)5400000)/((float)tach_value);
return(rev);
short reg_f;
I2C3CONbits.SIDL = 0;
I2C3CONbits.SCLREL = 1;
I2C3CONbits.A10M = 0;
I2C3CONbits.DISSLW = 1;
while(I2C3CONbits.ON == 0);
while(I2C3CONbits.SEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.SEN = 0;
I2C3CONbits.RSEN = 0;
I2C3CONbits.PEN = 0;
I2C3CONbits.ACKEN = 0;
while(I2C3CONbits.RSEN == 1);
while(I2C3STATbits.TRSTAT == 1);
while(I2C3STATbits.ACKSTAT == 1);
I2C3CONbits.RCEN = 1;
while(I2C3CONbits.RCEN == 1);
I2C3CONbits.ACKDT = 1;
I2C3CONbits.ACKEN = 1;
while(I2C3CONbits.ACKEN == 1);
I2C3CONbits.PEN = 1;
while(I2C3CONbits.PEN == 1);
reg_f = I2C3RCV;
while(I2C3STATbits.RBF == 0);
return (reg_f);
short diff_temp;
high_temp_limit= 80;
current_temp = Read_temperature ( );
general_error_status |= 0x20;
if (diff_temp >2 || diff_temp <-2)//change the speed if there is variation of more than 2º
if ( current_temp > 45) // 100% duty cycle if temp is more than 45 deg
set_fan_speed(FAN1, 99);
set_fan_speed(FAN2, 99);
set_fan_speed(FAN3, 99);
else if ( current_temp > 40) // 70% duty cycle if temp is more than 40 deg
set_fan_speed(FAN1, 70);
set_fan_speed(FAN2, 70);
set_fan_speed(FAN3, 70);
set_fan_speed(FAN1, 60);
set_fan_speed(FAN2, 60);
set_fan_speed(FAN3, 60);
set_fan_speed(FAN1, 50);
set_fan_speed(FAN2, 50);
set_fan_speed(FAN3, 50);
set_fan_speed(FAN1, 30);
set_fan_speed(FAN2, 30);
set_fan_speed(FAN3, 30);
set_fan_speed(FAN1, 10);
set_fan_speed(FAN2, 10);
set_fan_speed(FAN3, 10);
else
set_fan_speed(FAN1, 0);
set_fan_speed(FAN2, 0);
set_fan_speed(FAN3, 0);
prev_temp = current_temp;
temperature_loop (void);