Skip to content

fasaxc/wireless-sensor-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wireless Sensor Node

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

Completed sensor module

Completed sensor module

Code

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

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).

Assets

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 laserbits.com.

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.

About

Code and design files for my wireless sensor node project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages