Using the MAX11311 Internal and External Temperature Sensor to Activate Motors and Fans

Abstract

The MAX11311 is a 12-port PIXI™ device that is a programmable mixed I/O with 12-bit ADC, 12-bit DAC, analog switches, and GPIO. This application note describes how to design the MAX11311 with control loops. The Atmel ATMEGA328 can communicate with the MAX11311 through the SPI interface. Included in the application note are complete schematics and firmware.

Introduction

The MAX11311 integrates a PIXI 12-bit, multichannel, analog-to-digital converter (ADC) and a 12-bit, multichannel, buffered digital-to-analog converter (DAC) into a single integrated circuit (IC). In this application note, we use a MAX11311 LiveLab Demo board to demonstrate how the internal and external temperatures sensors are used to activate the DC motor, LED, alarm, and three fans (two for external temperature sensors, and the other for internal temperature sensor with a Peltier cooling device beneath the device).

Figure 1 shows the MAX11311 LiveLab Demo board, and Figure 2 shows the MAX11311 block diagram.

We focus on four demo scenarios. With the provided schematics and firmware, designers can customize to their requirements using their own hardware.

Figure 1. MAX11311 LiveLab Demo board. Figure 1. MAX11311 LiveLab Demo board.

Figure 2. MAX11311 block diagram. Figure 2. MAX11311 block diagram.

Schematics and Source/Demo Files
Download the following items to get started:

Development Process

With the 12 ports available on the PIXI, the flowchart in Figure 3 provides an idea on how to start designing with the PIXI.

Figure 3. MAX11131 development process flowchart. Figure 3. MAX11131 development process flowchart.

What Should the Board Demonstrate?

Here we consider four demo scenarios. Note that Px is one of the 12 ports on PIXI.

Demo 1: INT temperature regulated by Peltier junction with BLDC fan mounted underneath PIXI.

  • P0: DAC BLDC fan cooling INT temperature, output level 4V, voltage range 0 to 10V
  • P1: DAC Peltier TEC cooling INT temperature, internal reference, output level 1.5V, voltage range 0 to 10V
  • P2: GPO LED alarm INT temperature, output level 3.3V
  • P8: GPO buzzer INT temperature, output level 10V

Demo 2: EXT1 temperature regulated by BLDC fan.

  • P3: DAC BLDC fan cooling EXT1 temperature, internal reference, output level 4V, voltage range 0V to 10V
  • P4: GPO LED alarm EXT1 temperature, output level 3.3V
  • P5: ADC trim pot set point EXT1 temperature, internal reference, voltage range 0V to 10V
  • P8: GPO buzzer EXT1 temperature, output level 10V

Demo 3: EXT2 temperature regulated by BLDC fan.

  • P6: DAC BLDC fan cooling EXT2 temperature, internal reference, output level 4V, voltage range 0V to 10V
  • P7: GPO LED alarm EXT2 temperature, output level 3.3V
  • P9: GPO buzzer EXT2 temperature, output level 10V

Demo 4: Periodic timer run 3VDC motor.

  • P9: DAC 3VDC motor emitter follower, internal reference, output level 0V, voltage range 0 to 10V
  • P10: ADC trim pot speed 3VDC motor, # of samples 1, internal reference, voltage range 0 to 10V
  • P11: ADC trim pot reserved duty cycle 3VDC motor, # of samples 1, internal reference, voltage range 0 to 10V

By listing the ideas, we can map the discrete components into the PIXI equivalent, determine the pinout for the PIXI, and set parameters for the components.

Transferring Our Ideas to the Configuration Software
The MAX11300 configuration software is a tool to simplify a design. It sets up the registers within the PIXI accordingly. Once the register (.csv) and programming (.h) files are created, the software developer has a foundation to start programming the device.

Within the configuration software, the following component fields are allowed in the design (see Figure 4).

  • Single Ended ADC
  • Differential ADC
  • DAC
  • DAC with ADC Monitoring
  • GPI
  • GPO
  • Level Translator
  • B-Directional Level Xltr
  • GPI Controlled Analog Switch
  • Software Controlled Analog Switch

Each component is drag-and-dropped to the panel. Connections are made by left-clicking the mouse and dragging from port to input/output of the component, and vice versa. Figure 4 shows the PIXI demo board design. Within each component, parameters can be accessed using the right-click of the mouse and selecting Properties or by selecting the Properties tab on the right edge of the GUI. See Figure 5 for parameters of DAC with ADC Monitoring. Repeat each port on the PIXI until the desired connections and parameters are set.

Figure 4. MAX11131 configuration software design. Figure 4. MAX11131 configuration software design.

Figure 5. Properties for DAC with ADC Monitoring parameters window. Figure 5. Properties for DAC with ADC Monitoring parameters window.

Within the General Parameter Configuration menu option, the user can adjust voltages, DAC, ADC, interrupt mask, and general control. In this design, Figure 6 shows the configuration. Only applicable voltages are allowed. Refer to the IC data sheet for voltage ranges.

Figure 6. General Parameter Configuration menu window. Figure 6. General Parameter Configuration menu window.

Within the Temperature Sensor Configuration menu item, the temperature interrupt mask and threshold can be set. In this design, Figure 7 shows the configuration. Only applicable temperatures are allowed. Refer to the IC data sheet for temperature ranges.

Figure 7. Temperature Sensor Configuration menu window. Figure 7. Temperature Sensor Configuration menu window.

Within the User Notes menu item, users can write a description for each PIXI port.

Figure 8. User Notes menu window. Figure 8. User Notes menu window.

Once the design and parameters are set properly, it is time to save the design. Use the File ® Save As menu item and save as an .mpix file. See Figure 9.

Figure 9. Saving the .mpix file. Figure 9. Saving the .mpix file (File → Save As).

Register files for the design can be saved as a .csv file using File ® Generate Register menu item. See Figure 10.

Figure 10. Saving register files as .csv. Figure 10. Saving register files as .csv (File → Generate Register).

C header files can be saved using the File → Generate C Header File menu item. See Figure 11. This file follows Figure 14 found in the MAX11311 IC data sheet (PIXI port configuration flow chart).

Figure 11. Saving C header files. Figure 11. Saving C header files (File → Generate C Header File).

Once all the above files (Microcontroller Source Files) are created, the user can start programming the microcontroller to communicate with the PIXI. In this case, ATMEGA328 was used.

The next set of files (MAX11311 Demo Files) are needed to start the demonstration after programming the microcontroller. They also include Realterm installation files.

The hardware can be controlled by placing a shunt in specific header locations to perform an interrupt. Figure 12 shows the location of header J18 that will be used to demonstrate the different interrupt.

Use Realterm to communicate with the board. It is programmed to receive ASCII commands from the PC, execute them, and send the ASCII results back to the PC. This option provides more control over each port.

With the firmware preloaded into the MAX11311 LiveLab Demo board, we are ready to do a quick plug and play. Connect the wall adapter from an outlet to the board. Then plug in a USB cable from the PC to the board.

Figure 12. Header (J18) for demonstration. Figure 12. Header (J18) for demonstration.

When a shunt is placed on the D4–D3, Demo 1 is the INT temperature, drive P0 Fan, P1 Peltier, and P2 LED. Figure 13 shows a photo of the Peltier cooling device and heatsink beneath the MAX11311 IC.

When a shunt is placed on the D5–D4, Demo 2 is the EXT1 temperature, P5 trim pot drive P3 Fan, P4 LED.

When a shunt is placed on the D6–D5, Demo 3 is the EXT2 temperature drive P6 Fan, P7 LED, P8 buzzer.

When a shunt is placed on the D7–D6, Demo 4 is the P10 trim pot, P11 trim pot drive P9 Motor.

For each demonstration, observe the physical component connected to the port (Px).

The demonstrations can also be accessed using the Realterm. Click on the file realterm_115200_8N2_HalfDuplex.bat within the MAX11311 Demo Files. A terminal window appears like Figure 14.

Figure 13. Peltier cooling device with heatsink beneath the MAX11311. Figure 13. Peltier cooling device with heatsink beneath the MAX11311.

Figure 14. Realterm MAX11311 LiveLab screen. Figure 14. Realterm MAX11311 LiveLab screen.

Demonstration 1: PA1, 2000
Demonstration 2: PA2, 2000
Demonstration 3: PA3, 2000
Demonstration 4: PA4, 2000

Enter the command PA1, 2000 as shown on Figure 14 and press the respective Send ASCII button.

Here is a list of other useful commands:

  • S -  Status report temperature and voltages
  • L? -  Temperature limits
  • L0Htt.ttt -  0x19 r/w tmp_mon_int_hi_threshold internal temperature hot
  • L0Ctt.ttt -  0x1a r/w tmp_mon_int_lo_threshold internal temperature cold
  • L1Htt.ttt -  0x1b r/w tmp_mon_ext1_hi_threshold external D0P/D0N hot
  • L1Ctt.ttt -  0x1c r/w tmp_mon_ext1_lo_threshold external D0P/D0N cold
  • L2Htt.ttt -  0x1d r/w tmp_mon_ext2_hi_threshold external D1P/D1N hot
  • L2Ctt.ttt -  0x1e r/w tmp_mon_ext2_lo_threshold external D1P/D1N cold
  • GHnn -  High output PIXI port index 0–11 (Use GH8 to turn on the buzzer)
  • GLnn -  Low output PIXI port index 0–11 (Use GL8 to silence the buzzer)
  • Ann -  Read ADC voltage PIXI port index 0-11
  • Vnn,v.vvvv -  write DAC voltage PIXI port index 0-11

For each demonstration, try the status, temperature limits, and limit commands. Observe the board and adjust as desired.