Hi all,
I try to build up a node to measure the electric consumption of my flat and want to send the data wireless to my jeelink adapter.
something like this:
http://www.hobbyheizer.de/index.php/haussteuerung/stromzaehlerI have chosen the Attiny84 because I wanted to start with something small and simple, maybe this was a bit optimistic.
I have build up an Arduino Nano to be used as ISP programmer for the ATTINY84.
I have also connected a Serial connection to the ATTINY84 (RX and TX) and a LED for debugging,
both is working fine.
I can flash the ATTINY with the RF12DEMO.12 Sketch (slighly changed, see Attachment for details).
I am using the IDE 1.6.10 on a windows machine with the ATTinyCore from Spece Konde Version 1.1.1, PinMapping CounterClockwise(like AttinyCore).
I have "burned the bootloader" with the 8MHz (internal) setting.
The IDE reports this during upload to the ATTINY
avrdude: Version 6.3, compiled on Jun 22 2016 at 16:05:21
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\...\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/etc/avrdude.conf"
Using Port : COM3
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATtiny84
Chip Erase delay : 4500 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e930c (probably t84)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\
avrdude: writing flash (6924 bytes):
Writing | ################################################## | 100% 9.79s
avrdude: 6924 bytes of flash written
avrdude: verifying flash memory against C:\Users\...\AppData\Local\Temp\buildcf8a00e937f42983805471fd39c96602.tmp/RF12demo_sven2.ino.hex:
avrdude: load data flash data from input file C:\Users\...\AppData\Local\Temp\buildcf8a00e937f42983805471fd39c96602.tmp/RF12demo_sven2.ino.hex:
avrdude: input file C:\Users\...\AppData\Local\Temp\buildcf8a00e937f42983805471fd39c96602.tmp/RF12demo_sven2.ino.hex contains 6924 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 4.72s
avrdude: verifying ...
avrdude: 6924 bytes of flash verified
avrdude done. Thank you.
It seems to me that workes fine.
Now to test the connection on the wireless side, I have another arduino nano with an RFM69 connected and the "standard Demo sketch" (including #define RF69_COMPAT 1).
The serial prompt from the Nano looks like this:
[RF12demo.12] A i1 g212 @ 868 MHz x2
The serial prompt from the Attiny84 looks like this:
[RF12demo.12] Tiny B i2 g212 @ 868 MHz x2
I am able to send a message from the nano to the Tiny, but I get no answer:
> 0t
test 04 -> 66 b
On the Tiny I see that the message has been received and an ACK has been send:
OKX 210405060708090A0B0C0D0E0F101112131415161718191A1
B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233
3435363738393A3B3C3D3E3F404142434445 (35)
ASC <A . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E
-> ack
I have the feeling that something with the clock or some Interrupts are not correct.
I am quite new to this topic and I don't know were the problem is or were to start...
Thank you in Advance!