Git Product home page Git Product logo

smt172_t1's Introduction

SMT172_T1 Library for the ATmega microcontroller family and the LogicGreen lgt8f328p.

The previous SMT172 library did not work with the LogicGreen lgt8f328p as the overflow interrupt from timer 1 occasionally failed. As at 32 Mhz clock speed the amount of clock cycles at the lowest sensor frequency of 500 Hz is 64.000 and still within the counting range of 65.535 of the timer, the overflow interrupt could be omitted resulting in a slightly smaller library with less overhead in the interrupt routine.

Please note that the sensor frequency used to calculate the minimum time required to obtain the desired sampling error is now based on the previous measurement so that the very first measuring time is only 8 sensor cycles long.

Earlier documentation advised to calculated the duty cycle as the ratio between the on time and the total sensor cycle time over a multiple of 8 cycles. The present documentation advice to calculate the duty cycle individually for each sensor cycle and subsequently calculate the average duty cycle for the multiple of 8 sensor cycles. This library is based on the earlier documentation. For completeness a library is placed in the extras folder that uses floating point calculations inside the interrupt routine to calculate the duty cycle according to the present documentation. Maybe this library yield a more accurate result but uses many more clock cycles within the interrupt routine.

The SMT172 is a ultra-low power, high accuracy temperature sensor. The output signal is pulse width modulated (PWM) and the duty cycle is a function of the measured temperature. For more details see the home page of the manufacturer: http://smartec-sensors.com/ and the documentation. Accuracy can be up to 0.1 degree Celsius for a limited temperature range and the resolution up to 0.001 degree Celsius.

This library uses Timer1 and ICP1 on avr architecture, and TCB0 and TCB1 on megaavr.

The SMT172 needs a clean powersupply (a 100uF capacitor with a 100 nF ceramic capacitor in parallel fed through a small signal diode), a 220 ohm resistor in series and a 100nF ceramic capacitor as close to the sensor as possible. See also the diagram in the extras folder.

smt172_t1's People

Contributors

edwincroissant avatar milenovic 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.