wiki:Projekte/EthersexStromzaehler

Version 4 (modified by weef, 14 years ago) (diff)

text

Ethersex-Stromzaehler

Hardware


Main PCB

ethersex-Stromzaehler-Funk-Node: CPU, supply, RFM12 & Impulsformung:

ethersex-Stromzaehler-Funk-Node: CPU, supply, RFM12 & Impulsformung


Sensorboard


ethersex-Stromzaehler-Funk-Node: Sensorkopf am Stromzaehler:

ethersex-Stromzaehler-Funk-Node: Foto-Sensor-Board


Software

ethersex-Buildsystem

http://www.ethersex.de/index.php/Ethersex
oder http://dokucode.de/index.php/Ethersex
oder auch https://www.zerties.org/index.php/Ethersex


  • control6-Support im menuconfig anschalten
[*] control6 scripts (EXPERIMENTAL)


  • control6-code:
CONTROL_START
        ECMD_GLOBAL(revolutionz, 0, uint16_t);
        ON STARTUP DO
 
                // Pullup-Widerstaende aktivieren
                PORTD |= _BV(PORTD3);
                DDRD |= _BV(DDD3);
                PIND &= ~_BV(PIND3);
 
                _EIMSK |= _BV(INT1);
                
                // rising edge 
                _EICRA |= _BV(ISC10);
                _EICRA |= _BV(ISC11);
        END
CONTROL_END
 
ISR(INT1_vect)
{
        revolutionz ++;
}


  • config.mk im buildroot anlegen und Pfad und filename anpassen:
C6_SOURCE = <path_to_source>/your_c6_scriptname.src


  • im ../ethersex/pinning/hardware/ eine custom-Platform (your_board.m4) erzeugen mit u.a. diesem Inhalt (siehe ../ethersex/scripts/add-hardware) :
ifdef(`conf_STATUSLED_TX', `dnl
pin(STATUSLED_TX, PD6, OUTPUT)
')dnl

ifdef(`conf_STATUSLED_RX', `dnl
pin(STATUSLED_RX, PD7, OUTPUT)
')dnl

ifdef(`conf_RFM12', `dnl
/* port the rfm12 module CS is attached to */
pin(SPI_CS_RFM12, SPI_CS_HARDWARE)
RFM12_USE_INT(0)
dnl RFM12_USE_PCINT(0, PB0)
dnl RFM12_ASK_SENSE_USE_INT(1)
/* port the LEDS for rfm12 txrx attached to */
pin(RFM12_TX_PIN, STATUSLED_TX)
pin(RFM12_RX_PIN, STATUSLED_RX)
')dnl

Attachments (12)

Download all attachments as: .zip