www.webx.dk Start page
OZ2CPU Radioamateur mainpage
Homemade electronics Stuff old and new
ESP8266 with ATTiny85 as Deep Sleep timer

Foreword:
The ESP8266 wifi modules can do some sort of sleep, also with reset and wake up and such
It just dont work for longer wake up intervals and the avarage usage is quite big,
so with small batteries in many of my projects, it drove me mad the recharge/replace interval was way too short
compared to what i know is possible with someting as cheap and simple as ATTINY85 for example.

NOTE: it is expected to have seen my other ESP8266 pages about sleep and loggers, or understand the sleep feature they have


first try with ATTINY85 and PFET and the ESP8266 module
note the missing series resistor to the PFET, if you forget this, it will feed RF noise from the wifi module back into the AVR
and this will jamm the avr sleep feature. I recommend to use 1k.
Any low voltage P channel mosfet logic level drive, can be used, just note the max current needed by the ESP8266 and its voltage range.
The DIP switch is used to change the wake up time (the power up time to the ESP or what ever stuff you use it for)
Later version use 3 bits, for much more flexible settings.


i like to use the small brake out pcb's as shown here, for my many esp8266 projects,
this one now deliver online its voltage and temperature every 4th houres, and battery life is changed from 8 weeks to 8 months.
so it turned out to be a very nice upgrade.


I had to trim down the pins of the socket, so the module will fit into my project.


The top parts are just the normal ESP8266 sleep trick, nothing fancy here

The HEX file for the Tiny : DOWNLOAD HEX HERE right click save as.
Programming settings:
Tiny 85, SLEEP TIMER for ESP stuff and ESP loggers
fuse settings WDT = OFF clock internal 8 MHZ div by 8 ON

Schematic :  
reset     1 PB5    VCC 8
          2 PB3    PB2 7    DIP SW 3 to gnd              
output    3 PB4    PB1 6    DIP SW 2 to gnd             
          4 GND    PB0 5    DIP SW 1 to gnd

DIP SW SETTINGS   
  0      1      2       3        4        5        6        7
1min   5min   10min   30min   60min    120min   180min   240min   
you need a normal atmel avr isp tool to do the programming, good luck.

NO this is not arduino. No you can not have the source code for free

-----------------------------

2018 Thomas Scherrer OZ2CPU
If you found this page usefull, why not consider donate a bit.. see my contact page.