A PIC 12f1840 developer board with mcp79410 RTC and the tcn75 temperature sensor.


This little developer board can be used as:

  • Serial interface
  • Temperature Sensor
  • Alarm clock

Naturally these functions can be merged together to build more complex functions.


Most of microcontrollers don't know anything about the time, because generally they don't need such an information.

Usually the knowledge of the time is used to store data or to build clocks, timers and PLC events.



The MCP79410 is a Real Time Clock (RTC) chip that uses a digital compensation of the time to realize an accurate clock/calendar. It has a programmable output line (it is possible to program up to two alarms), it can be backupped by an external battery (there is an ad hoc circuit), it has a small non volatile memory to store data and a small backupped SRAM.


The MCP79410 communicates over an I2C™ bus.


The clock/calendar automatically reguates itself with months up to 30 days. The clock works fine with the 24 hours format or with the 12 hours foramt with an AM/PM indicator.

It provides a programmable output pin that can be used as a configurable alarm or it can be used as a frequency generator working at 32,768, 8,192 e 4,096 kHz e 1 Hz. 

The last frequency cannot be used when the power supply comes from the backup battery.

It also provides an EEPROM, a backupped SRAM, 64 bits of non volatile space that can be used for a unique ID or for a MAC Address.


The devices is completely accessible trough the I2C™ serial port and it needs a Vcc in the [1,8..5,5]V range


In the following picture there is a simplified blocks diagram of the device.

The TCN75 is a very simple temperature sensor but at the same time it is very accurate, with a precision of ±0,5 ° C, fra 25°C≤ TA ≤ 100°C e ±3 °C -55°C≤ TA ≤ +125°C.

The TCN75 needs only 0,25mA when it is in operative mode and 1uA when acting in stand-by mode.


The TCN75 communicates over an I2C™ bus and provides three programmable address pins, they can be programmed using hardware jumpers allowing up to 7 devices on the same bus.


It has a programmable pin used to signal if the temperature overcomes a defined value(user programmed set point). 

The Hysteresys can be programmed.


The PIN can be programmed as a simple comparator for a thermostat or as a temperature event generator. The communication has been realized using a two wires I2C™ bus. Tramite I2C e' possibile  la lettura del temperatura ambiente, la programmazione del set point e della isteresi e la configurazione del dispositivo. 

Last it as a shutdown mode that consumes very little power.


In the following picture there is a simplified blocks diagram of the device.



The interface to the sensors has been demanded to a PIC microcontroller.

We have chosen a new generation PIC, it is small and powerful its name is PIC12F1840. 




PIC12f1840 functionality

It has 8 pins and it doesn't need of an external clock because it has its own internal clock (up to 32Mhz using a PLL).

It provides 5 I/O pins and a pin used only for input.

In the following picture there is a simplified blocks diagram of the device.



We have connected the PIC micro with the sensors using the I2C bus trough the MSSP block.

After connecting the sensor to the MSSP interface we have two pins less….


The other pins will be used for the interface and for the additional functions.

The EUSART pin will be used configured as Asynchronous serial, so now we have the interface adapter between the I2C bus and an RS232ttl interface.



Description

This small circuit is a good compromise between sensors and microcontrollers, it can be used to develop a lot of different applications and it is so flexible to be used stand alone or connected to other devices like ARDUINO or ARM boards or it can be connected trough the serial port to a standard PC.


Applications

  • Serial to I2C serial converter.
  • Programmable I/O (PIC and sensors)
  • Termostato ambientale
  • Registratore di temperatura
  • Expansion board for ARDUINO
  • Domotic projects.
  • Automation


Here you are the schematic



And two rendered pictures

Upper side



Bottom side.


We are building 20 of these circuits, if you are interested and you want to support us then contact us.

 

Gg1