basics of temperature data logger (with energia and stellaris)

of 14

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
14 pages
0 downs
1. STELLARIS (ARM CORTEX M-4 , LM4F120) ã ã LM 35 (ANALOG TEMPERATURE SENSOR) ã DS1307 (REAL Time clock) ã Energia compiler 2. ã ã ã ã Analog temperature…
  • 1. STELLARIS (ARM CORTEX M-4 , LM4F120) • • LM 35 (ANALOG TEMPERATURE SENSOR) • DS1307 (REAL Time clock) • Energia compiler
  • 2. • • • • Analog temperature sensor It has an output voltage that is proportional to the Celsius temperature. The scale factor is .01V/oC The output voltage is converted to temperature by a simple conversion factor.
  • 3. • • Conversion factor that is the reciprocal, that is 100 oC/V. The general equation used to convert output voltage to temperature is: Temperature (oC) = Vout * (100 oC/V)
  • 4.  Real Time Clock IC  I2C communication (SCL , SDA)  SDA = Serial Data Line  SCL = Serial Clock Line
  • 5.  Masters and Slaves : The devices on the I2C bus are either masters or slaves. The master is always the device that drives the SCL clock line. The slaves are the devices that respond to the master.   Slave is DS1307 , Master Stellaris in our case. Master must know the Slave address ( 0x68 for DS1307)
  • 6.  RTC - Ram Address Map And Time Keeper Registers :
  • 7.  Circuit of RTC :
  • 8.    Energia is an open-source electronics prototyping platform for MSP-EXP430G2, MSP-EXP430FR5739 and Stellaris EKLM4F120XL LaunchPads. Energia uses the mspgcc compiler ,is based on the Wiring and Arduino framework. It has a lot of libraries including «Wire» library which is for I2C operations.
  • 9.          Some «wire» functions : Wire. Begin() ; Initiate the Wire library and join the I2C bus as a master or slave. Wire.setModule (x) ; Choose one of the I2C pairs. Wire.beginTransmission(ds1307_address) : begins the I2C transmission Wire.endTransmission(); Finishes the transmission between master and slave. Wire.write() ; Writes the data that will be transmitted to slave. Wire.write(zero) ; Stop/start the oscillator : Read data from slave Wire.requestFrom(ds1307_address,7); Used by the master to request bytes from a slave device. 7 is the number of bytes requested from slave. (total bytes of second,minute,hour,weekday,week,mounthday,mounth and year is 7 .That’s why ,7 is used in the project)
  • 10.  1. First operation ; time must be set (initialization) Transmission is started 2. Oscillator is stopped 3. Second ,minute,hour ,weekday,mounthday,mounth ,year are sent as bytes sequentially ( because, each related address is 1 byte in the RTC) 4. Oscillator is started 5. Transmission is finished.
  • 11.  1. 2. 3. 4.  1. 2. Reading from slave (RTC) Transmission is started Oscillator is stopped Data requested from Slave Second ,minute,hour ,weekday,mounthday,mounth ,year are read from slave sequentially Reading LM35 Volt is read from lm35 with analogRead() function Convertion : temperature = ((5.0 * volt )/8192.0) *100 (Remember : Temperature (oC) = Vout * (100 oC/V))
  • 12.  In the project , a time interval is decided, then ,temperature data and time value is read continuously (polling method) . When the time comes , temperature and time is written to the serial monitor.
  • Related Search
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks