Skip to content

Firmware and generic board for low-power environment sensors

License

Notifications You must be signed in to change notification settings

arcadien/tinySensor

Repository files navigation

TinySensor

Travis build status

TinySensor aims to provide a customisable firmware and a hardware design for low-power environment sensors using wireless communication.

In the complete system, data is processed by a Domoticz/RFlink couple. Data decoding is also tested using RTL_433 decoder. Large part of the code, especially wireless encoders, are unit-tested.

Supported MCUs

  • ATTiny84a
  • ATMega328p (ongoing)

Supported sensors

Wireless technology

  • "one pin" emmiters. Tested with low-cost 433Mhz emmitters.

Wireless protocol

  • Oregon(c) for environment measurement transmission
  • X10(c) for (optional) battery level transmission
  • Lacrosse Technology for enviroment measurement transmission

Used libraries

Various libraries are used here, and some where tweaked to remove any Arduino dependencies, making the whole firmware more compact:

Firmware builder

A web application wrapped in a Docker container allow to build the firmware in a sealed environment. NOTE: It is at his early stage!

Useful documentation about low power AVR

Development

TinySensor build environment now uses PlatformIO.

Hardware options

TinySensor can use combination of sensors, the limit comes from amount of flash memory on the ATTiny.

DS18B20

OneWire sensor, cheap and efficient.

BMP/BME 280 environment sensor

The BMP280 and the BME280 share the same library, but the BME provide humidity sensing, and thus use more memory.

Analog sensor

Analog sensor can be used for LM35 temperature sensor, or LDR.

LM35 temperature sensor

Without negative temperature support

A 0v ground reference is needed. Solder pads 2 and 3 of J4, (rear side) as well JP3.

With negative temperature support

In the case of a -CAZ version, temperature below 0 can be measured. To allow this, two 1N914 diodes must be placed to put the sensor reference below 0v. This setup is documented in the LM35 datasheet. On TinySensor board v2.1 and up, this can be implemented by:

  • solding D2 and D3 diodes *solding R4 with a value of 18k
  • solding JP3 to bypass C3 capacitor
  • solding pads 1 and 2 of J4 (rear side) to set ground reference.

Notes about swing

You can add a filter capacitor C3 to avoid swing if the wire is long. In this case, do not solder JP3. See datasheet for details.

LDR

Use the right value for R4 (should match the used LDR) and solder JP3 and, on JP4, middle and 3 pads. This way, there will be no RC filter (no cap because of J3) and Vss analog reference thanks of JP4.