Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

DC1208A High Voltage I2C Current and Voltage Monitor. More...

Detailed Description

DC1208A High Voltage I2C Current and Voltage Monitor.

  Setup:
    Set the terminal baud rate to 115200 and select the newline terminator. Refer
    to Demo Manual DC1208A. Ensure all jumpers are installed in the factory default
    positions. A power supply and load resistor are required. A DVM may be used to
    verify displayed voltage results. A precision voltage source (preferably
    low-noise) may be used to apply a voltage to the ADIN pin. For all tests,
    connect power supply between VIN and GND, 7V-75V. Connect a load resistor to
    Vout and GND.

  Command Description:

                             *****Main Menu*****

    1- Read Continuous Mode- If selected, program keeps taking readings every second
       or so. In this mode, the program displays Load Current, VIN Voltage and ADIN
       voltage.

    2- Snapshot Mode- Selecting this option causes display of the Snapshot Mode
       Menu. Readings are taken just once for each Snapshot Mode menu entry.

                    ***** SNAPSHOT MODE MENU COMMANDS *****

      1- Load Current- Selecting this option causes load current to be displayed.

      2- V_IN Voltage- Selecting this option causes VIN voltage to be displayed.

      3- ADIN Voltage- Selecting this option causes the voltage at the ADIN pin to
         be displayed.

USER INPUT DATA FORMAT:
 decimal : 1024
 hex     : 0x400
 octal   : 02000  (leading 0 "zero")
 binary  : B10000000000
 float   : 1024.0

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
  • Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file DC1208A.ino.

Go to the source code of this file.

Functions

static void print_title ()
 Prints the title block when program first starts. More...
 
static void print_prompt ()
 Prints main menu. More...
 
static int8_t LTC4151_snapshot (uint8_t i2c_address, uint8_t channel)
 Build and send the snapshot command. More...
 
static int8_t menu_1_continuous_mode ()
 Reads all inputs in continuous mode. More...
 
static int8_t menu_2_snapshot_mode ()
 Reads inputs in snapshot mode. More...
 
static void setup ()
 Initialize Linduino. More...
 
static void loop ()
 Repeats Linduino loop. More...
 

Variables

static int8_t demo_board_connected
 Set to 1 if the board is connected. More...
 
const float resistor = .02
 Sense resistor value. More...
 
const float LTC4151_sense_lsb = 20e-6
 Typical sense lsb weight in volts. More...
 
const float LTC4151_vin_lsb = 25e-3
 Typical Vin lsb weight in volts. More...
 
const float LTC4151_adin_lsb = 0.5
 Typical ADIN lsb weight in mV. More...
 

Function Documentation

◆ loop()

static void loop ( void  )
static

Repeats Linduino loop.

Definition at line 126 of file DC1208A.ino.

◆ LTC4151_snapshot()

static int8_t LTC4151_snapshot ( uint8_t  i2c_address,
uint8_t  channel 
)
static

Build and send the snapshot command.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
Parameters
i2c_addressI2C address of the LTC4151.
channelDesired channel from the header

Definition at line 187 of file DC1208A.ino.

◆ menu_1_continuous_mode()

static int8_t menu_1_continuous_mode ( )
static

Reads all inputs in continuous mode.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 198 of file DC1208A.ino.

◆ menu_2_snapshot_mode()

static int8_t menu_2_snapshot_mode ( )
static

Reads inputs in snapshot mode.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 243 of file DC1208A.ino.

◆ print_prompt()

static void print_prompt ( )
static

Prints main menu.

Definition at line 176 of file DC1208A.ino.

◆ print_title()

static void print_title ( void  )
static

Prints the title block when program first starts.

Definition at line 162 of file DC1208A.ino.

◆ setup()

static void setup ( void  )
static

Initialize Linduino.

Definition at line 113 of file DC1208A.ino.

Variable Documentation

◆ demo_board_connected

int8_t demo_board_connected
static

Set to 1 if the board is connected.

Definition at line 104 of file DC1208A.ino.

◆ LTC4151_adin_lsb

const float LTC4151_adin_lsb = 0.5

Typical ADIN lsb weight in mV.

Definition at line 110 of file DC1208A.ino.

◆ LTC4151_sense_lsb

const float LTC4151_sense_lsb = 20e-6

Typical sense lsb weight in volts.

Definition at line 108 of file DC1208A.ino.

◆ LTC4151_vin_lsb

const float LTC4151_vin_lsb = 25e-3

Typical Vin lsb weight in volts.

Definition at line 109 of file DC1208A.ino.

◆ resistor

const float resistor = .02

Sense resistor value.

Definition at line 106 of file DC1208A.ino.