juergs / ATtiny85_433MHz_LaCrosse_Temp

1 stars 0 forks source link

ATtiny85_433MHz_LaCrosse_Temp

ATtiny85: using a STX882-433Mhz Transmitter with a LaCrosse TX3 Protocol and a Dallas 18B20 Onewire-Sensor. TX on D3 --- Pin 2 DS18B20 on D2 ---PIN 5 Configurable SensorID and DEEP_SLEEP-Time (see Code)

Fuses: LF=0xF1 HF= 0xDF EF=0xFF Lock= 0x03

Zitat

// NEU:
int iLongPulse  = 1300;
int iShortPulse  = 500;
int iDelay         = 1100;

Timing taken from http://www.f6fbb.org/domo/sensors/tx_signals.php

Bit_0: 1,3ms HIGH + 1,0ms LOW => Gesamt: 2,3 ms Bit_1: 0,5ms HIGH + 1,1ms LOW => Gesamt: 1,6ms

                            *ATtiny-85-Version!!!*

Bei Programmer-Fehler: Dallas Sensor entfernen! Wenn: Mosi = Data & SCK = Sensor ! Auf Pin-Belegung der Platine achten!!!!! -> Board_Typ setzen!

Auszug aus der Beschreibung des Herstellers: – 120 Powerful Instructions – Most Single Clock Cycle Execution – 32 x 8-bit General Purpose Working Registers – Up to 20 MIPS Througput at 20 MHz – 8K Bytes of In-System Programmable Program Memory Flash – 512 Bytes In-System Programmable EEPROM – 512 Bytes Internal SRAM – Write/Erase Cycles: 10,000 Flash/100,000 EEPROM – Data retention: 20 Years at 85°C/100 Years at 25°C – 8-bit Timer/Counter with Prescaler and Two PWM Channels – 8-bit High Speed Timer/Counter with Separate Prescaler – USI – Universal Serial Interface with Start Condition Detector – 10-bit ADC: 4 Single Ended Channels, 2 Differential ADC Channel Pairs – Temperature Measurement – On-chip Analog Comparator – Low Power Idle, ADC Noise Reduction, and Power-down Modes – Internal Calibrated Oscillator – Six Programmable I/O Lines – 2.7 - 5.5V Operating Voltage

ATMEL ATTINY 25/45/85 / ARDUINO

+-\/-+ Ain0 (D 5) PB5 1| |8 Vcc Ain3 (D 3) PB3 2| |7 PB2 (D 2) Ain1 Ain2 (D 4) PB4 3| |6 PB1 (D 1) pwm1 GND 4| |5 PB0 (D 0) pwm0 +----+

Install ATtiny - Models in Arduino IDE:

ATtiny:

Powersave modes:

lightweight-low-power-arduino-library

(http://www.gammon.com.au/forum/?id=11488&reply=9#reply9) (http://gammon.com.au/forum/?id=11497&reply=6#reply6)

power

(https://forum.arduino.cc/index.php?topic=326237.0)

sleeping

... und weitere Powersave-Gedanken: (https://harizanov.com/2013/08/every-%CE%BCa-counts/)

run on batteries

Hier noch ein weiteres Projekt mit RFM69: aaduino

und der Sketch dazu: sketch

*

Example:

*HHHH 1000 0010 1111 1101 0010 1111 1101 0011 1010 0100 encoding T=22.0C and RH=44%

Thanks to: http://www.f6fbb.org/domo/sensors/tx3_th.php

Thanks to: http://forum.arduino.cc/index.php?topic=155483.0

Thanks to: https://forum.fhem.de/index.php/topic,50333.0.html

OneWire DS18S20, DS18B20, DS1822 Temperature Version

using this Arduino Library: http://www.pjrc.com/teensy/td_libs_OneWire.html

http://milesburton.com/Dallas_Temperature_Control_Library

http://images.google.de/imgres?imgurl=http://www.tweaking4all.com/wp-content/uploads/2014/03/ds18b20-waterproof.jpg&imgrefurl=http://www.tweaking4all.com/hardware/arduino/arduino-ds18b20-temperature-sensor/&h=988&w=800&tbnid=mowdJDteDQmw_M:&tbnh=104&tbnw=84&docid=7g-v-bKlWHiqKM&usg=__9sTNcsYyWEgAZF-aP5rpUuvCyio=&sa=X&ved=0ahUKEwiRvJfp44HMAhVDDCwKHc1OBgcQ9QEIKjAB

http://www.tweaking4all.com/hardware/arduino/arduino-ds18b20-temperature-sensor/

https://github.com/PaulStoffregen/OneWire

https://arduino-info.wikispaces.com/Brick-Temperature-DS18B20

https://arduino-info.wikispaces.com/MultipleTemperatureSensorsToLCD

http://www.pjrc.com/teensy/td_libs_OneWire.html

Hardware Overview and HowTo:

http://www.tweaking4all.com/hardware/arduino/arduino-ds18b20-temperature-sensor/

Additionals:

https://gcc.gnu.org/onlinedocs/gcc-3.1/cpp/Standard-Predefined-Macros.html

https://gcc.gnu.org/onlinedocs/gcc-3.1/cpp/Invocation.html#Invocation

https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html

*How to connect multiple Sensors: The DS18B20 Digital Temperature sensor allows you to set multiple in parallel. When doing this, the OneWire library will read all sensors. For larger networks of sensors (more than 10), using smaller resistors should be considered, for example 1.6 KΩ or even less. It has been observed that large amounts of sensors (more than 10) in the same network can cause issues (colliding data), and for that purpose an additional resistor of say 100 … 120 Ω should be added between the data line to the Arduino and the data pin of the sensor, for each sensor !

Fuse-Einstellungen beim ATtiny85 für interne 20 MHz:
====================================================
LF = 0xF1 ( PLL-Clock, not internal 8 MHz)
HF = 0xDF
EF = 0xFF
LB = 0x03

*/

/**/