Tag Archive for 'micro controller'

C-function calculates CRC of Sensirion SHT1x humidity sensor data

When reading the measured humidity or temperature value from the SHT1x Sensirion humidity sensor one may also read the optional check sum. This check sum can then be used to validate the read value. This function does this operation without using a precalculated CRC table.

Continue reading ‘C-function calculates CRC of Sensirion SHT1x humidity sensor data’

Interrupt driven SHT1x humidity sensor

The Sensirion humidity and temperature sensor has a two wire serial interface to read out the temperature and humidity. It also has a status register which can be set up, e.g. to choose the number of bits of the measured values . This post is about reading the sensors using the  power on defaults. Continue reading ‘Interrupt driven SHT1x humidity sensor’

Arduino library for the AM2302 humidity and temperature sensor

The AM2303 sensor  from Aosong integrates a humidity and temperature sensor. A micro controller can fetch the sample values from the device via a single serial signal line. The measurement resolutions (not accuracy) are 0.1% RH and 0.1 °C.  AM2301, DHT21, DHT22,  SHT15, SHT11 and SHT10 are probably equivalent products. I have tested the library using an Arduino Pro Micro module. You can download the library here . Continue reading ‘Arduino library for the AM2302 humidity and temperature sensor’

Store docs in the microcontroller’s flash

When starting out as an engineer, building electronic circuits of many kinds, my mentor advised me to always leave a copy of the schematics within the box. This is a wise proposition, the schematics in the box will probably be up to date and readily available. On the other hand, external documentation may be displaced and even lost during a period of time. This is equivalent to program documentation: Comments within the source file are easier to keep up to date than some external documentation, like flow sheets.

Now I use a board with a micro controller which  flash memory is much larger than what I need for the application. So why not use that spare flash to embed  some docs? Continue reading ‘Store docs in the microcontroller’s flash’