Code and design files for my wireless sensor node project
Switch branches/tags
Nothing to show
Clone or download
Shaun Crampton Shaun Crampton
Shaun Crampton and Shaun Crampton Add schematic to readme.
Latest commit 68c5157 Jun 19, 2012

Wireless Sensor Node

This repo contains the source code and assets for my wireless sensor node project.

Completed sensor module

Completed sensor module


The root directory of the repository is an Eclipse CDT/AVR project targetting the ATTiny13, which is a miniscule microcontroller with only 1K of ROM and 64 bytes of RAM.

The code in main.c implements a main loop that:

  • reads a TMP36 temperature sensor on the defined pin
  • writes a Manchester-encoded signal on the defined transmit pin (which should be connected to something like this).
  • goes into deep sleep for about 4 minutes to preserve battery life

To reduce battery usage further, the TMP36 is driven directly via a microcontroller pin and only turned on when needed. Likewise, the transmitter is only turned on when needed; since it uses more power, I used a transistor attached to the "RADIO_POWER_PIN".

The code is released under the BSD license.


Schematic drawing

The TMP36 is driven directly by the ATTiny so that it can be powered down when not in use. The 0.1uF capacitor smoothes the power to the TMP36, increasing its accuracy.

The transmitter is powered via a basic NPN switching transistor. The 10uF cap provides for the transient high current used for transmission. The 2k resistor prevents too much current from flowing through the base to the emitter of the transistor (it only takes a small current to saturate the transistor so any extra current isn't helpful and can be harmful).


The diagram for laser-cut box is in the assets directory. It works well when cut in 3mm MDF or plywood. I've tried birch and walnut ply from

Creative Commons License
Laser cut box by Shaun Crampton is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

The box design is written up in an instructable.