smt 160

Discussion in 'The Projects Forum' started by BorealDude, Jul 11, 2013.

  1. BorealDude

    Thread Starter New Member

    May 20, 2013
    my question again is about smt160.
    i wanna use 4 sensors with an atmega16.first i tied to connect their outputs to the input pins of a 4:1 MUX.and the output of the MUX to INT0 of the micro.
    but it didn't work properly.then i found out that the mux can't pass the wave generated by the sensors to the micro with their original shapes and that's why i got no correct result.
    then i decided to change the hardware.i connected all the sensor's output to the INT0 and their vcc to 4 different pins of micro to on & off them in sequence.again it didn't work.
    now i'm thinking about using different external interrupts.but the problem is that i've only 3 timers to measure the dutycycle.
    is there any software solution to this or i've to change my micro.
    and what avr micro has 4 timers.
  2. GopherT

    AAC Fanatic!

    Nov 23, 2012
    You can use the same timer, just read the sensor values one by one.
    The sensor is operating at 1kHz to 4kHz range. That means you can read one device in 0.001 seconds (or less), then move on to the next timer.

    These chips do not respond to temperature changes instantly so your results will be plenty accurate by reading one at a time. Read from four different input pins and make your calculations of duty cycle then convert to temperature.

    The DATASHEET suggests using a multiplexing chip - this should work fine - the waveform should be square (rectangle) anyhow.
    BorealDude likes this.