Tag Archive for 'micro controller'

Very simple integer digital low pass filter

Low pass filters are often used to reduce higher frequency components of a signal. Electronic LP filters are for example used after a sensor to remove high frequency noise from the signal before analog to digital conversion in a micro controller. Often we want to reduce the bandwidth of the signal even more using a digital LP filter within the micro controller program.

Continue reading ‘Very simple integer digital low pass filter’

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’