Git Product home page Git Product logo

ltc1392_arduino_library's Introduction

LTC1392 Arduino Library

A simple Arduino Library for the Linear Technology LTC1392 Micropower Temperature, Power Supply and Differential Voltage Monitor.

Usage

To use the library include the header-file and initialize an object as follows:

#include "LTC1392.h"
...
// LTC init
LTC1392 ltc(LTC_CS, LTC_SCK, LTC_DATA);

The pins CS, SCK and DATA have to be digital in-/outputs pins.

To read the in-chip temperature and supply voltage, call the following functions:

float temperature = ltc.get_temperature(); // in degC
float voltage = ltc.get_supply_voltage(); // in V

To read the differential voltage between +Vin and -Vin, call the following function:

float dif_voltage = ltc.get_differential_voltage(false); // in V

You can choose between two measurement ranges: false for 0-1 V range and true for 0-0.5 V range.

To read the current trough a shunt resistor between +Vin and -Vin (see datasheet page 1), first initialize the value of the shunt resistor and call the following function to get the current:

ltc.set_shunt(1.0); // value in ohms
float current = ltc.get_current(false); // in A

You can choose between two measurement ranges: false for 1 V range and true for 0.5 V range. This voltage range is used to measure the voltage drop over shunt resistor based on the current. The current is internally calcluated with the following equation:

I_shunt = (+Vin-(-Vin))/R_shunt

That's it. There are also some examples available for better understanding.

ltc1392_arduino_library's People

Contributors

christophjurczyk avatar per1234 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.