Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Dirk_H
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Dirk_H

    @Dirk_H

    Contest Winner

    14
    Reputation
    63
    Posts
    1360
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Dirk_H Follow
    Contest Winner

    Best posts made by Dirk_H

    • [contest] 3D printed battery powered Wall Remote Control

      Hello everybody,

      finally I manged to contribute my Project to the MySensors Contest 2015.
      It is a 3d printable Wall Remote control for Home Automation. The Size is 55x55mm, so it fits into many "switch frames" (e.g. Berger, Gira, Merten etc.) The project consists of the 3d printed Parts, the PCB (with Eagle sources), the Sketch, an FHEM example and of cause a detailed documentation which describes howto rebuild this Project on your own. All this is included in the zip file I will provide.

      Because the pdf, where the building is described precisely, is quiet long (20 pages I guess, but many photos) I don't want to put it here in the post. If you are intrested in the Project just have a look at the pdf inside the zip file. There are also more pictures included.

      WallRemote.zip

      To finish this project you need the following equipment/skills: 3D printer, SMD soldering capabilites, AVR Programmer (to install bootloader)

      Enough of talking, lets let the pictures speak for themselve:
      WR.jpg Housing_PCB_View_resized.jpg pcb_w_usb2ttl.jpg moved_key_resized.jpg

      A 3d preview of the printer parts can also be found on Thingiverse: http://www.thingiverse.com/thing:692238

      posted in Enclosures / 3D Printing
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      @Gulpman @hek
      Hello everybody,
      I just added a pullrequest which will support SST25 Series flash for OTA Bootloader:
      https://github.com/mysensors/Arduino/pull/445

      SST25 Series flash mentioned by Gulpman as 1st and 2nd Alternative are currently not supported, because the dont support pagewriting with opcode 0x02. Instead they support Automatic Address Increment Word writing (opcode 0xAD). I updated teh SPIFlash.cpp and .h so they will take care of that if #define MY_SPIFLASH_SST25TYPE is set somewhere.
      I tested with this SPI Flash: http://www.reichelt.de/25PF020B80-4C-S/3/index.html?&ACTION=3&LA=446&ARTICLE=137365&artnr=25PF020B80-4C-S&SEARCH=25pf020b80 which is of Type SST25PF020B-80-4C-SAE (2MBit) and working now.

      I only hat a short look at the ISSI and Winbond flash Datasheets mentioned by Gulpman before. At first look I think they both could work with the current Mysensors / SPIFlash Version becuase they support Pagewriting with opcode 0x02 and seem to implement the other relevant opcodes. However I did not test..!

      Best Regards
      DirkH / D-H-R 🙂

      -edited on 2016-06-01 to take care of changed Name for define (added "MY_")

      D-H-R created this issue in mysensors/Arduino

      closed Added support for SST25 Series SPI Flash (e.g. from Microchip) for OTA #445

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: Protocole radio for new device

      @jaumard
      yes nrf24L01+ works fine. in fact only the plus version works fine because mysensors typically uses the slower but more power effective 250kbps mode which was introduced with the + version. Older version (without +) needs some tweaks to work..

      posted in Development
      Dirk_H
      Dirk_H
    • RE: [SOLVED] Development branch: st=fails after node sleep

      Glad it helped David. I just thought about it again, maybe sleep(0xff, 0x00, 0) does work too. I did not test it but I think it calls the same function anyway.

      However the method of direct calling sleep(0xff, 0x00, 0xff, 0x00, 0) should save some clocks because one less jmp is required 🙂

      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      Yes the AT25DF512 seems to outperform other memories and is truly a good chip. However unfortunately its hard to get in Germany (and maybe other parts of the world 😉 ). The common distributors here do not have it in stock...

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      Sorry for replying this late, just having some "real world" issues 😉
      Yes, with the new driver it works. Do we have a comparison about pros/cons of the new RFM69 driver. As I'm migrating all my nodes from nrf24 to rfm69 its no problem to use the new driver in all sketches. Just wondering what has changed in the new driver..

      Thanks, DirkH

      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      About the AT25F512N wich was proposed by @AWI: tbowmo was right, I got confused by Sector, Page and Block erase. Like tbowmo said atmel does call blocks sectors... The AT25F512 does not support Block Erase 64k, which is defined but AFAIK not used in SPIFlash.cpp BUT it is used in the Bootloader if the "Imagesize" is > 32k. But I dont know how Image size is retrieved. Also I think for an ATMega 328p the image size should never be >32k. So this Flashtype could probably work as long as the image size is below 32k. I'd expect the Bootloader to crash or fail when program size is >32k.

      About the S25FL... @bjacobse proposed I see the problem that it does not support the Bock Erase 32k opcode which is used in SPIFlash.cpp and Bootloader. Both must be changed when S25FL... should be used. (I would emulate the 32k Block erase by 8 times 4k Block erase.) However remember that Dualoptiboot must also be altered which requires "non-arduino" programming and some work / knowlegde about makefiles / compiler/linker settings in IDE.

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      @sundberg84
      It does not work for me with softspi too. Although the debug output does not look that bad..

      MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2<\n>
      4 TSM:INIT<\n>
      5 TSF:WUR:MS=0<\n>
      8 TSM:INIT:TSP OK<\n>
      10 TSM:INIT:GW MODE<\n>
      12 TSM:READY:ID=0,PAR=0,DIS=0<\n>
      14 MCO:REG:NOT NEEDED<\n>
      577 GWT:TIN:IP=192.168.178.203<\n>
      1581 MCO:BGN:STP<\n>
      1583 MCO:BGN:INIT OK,TSP=1<\n>
      1585 TSM:READY:NWD REQ<\n>
      
      
      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      @sundberg84 Hi, I'm not using level converters becuse I use a ProMini with 3,3V (with W5100 and rfm69hw).

      Maybe I have a small clue: The Interrupt Pin is high all the time. It seems that the interrupt request from the RFM Module is not processed. I cant see interrupts when I start a node. (With a working setup with ESP8266 and RFM69, the pin is low most of the time except when new packets arrive from a sensor).

      posted in Troubleshooting
      Dirk_H
      Dirk_H

    Latest posts made by Dirk_H

    • RE: Gateway W5100 with RFM69 fails to compile

      @sundberg84 Hi, I'm not using level converters becuse I use a ProMini with 3,3V (with W5100 and rfm69hw).

      Maybe I have a small clue: The Interrupt Pin is high all the time. It seems that the interrupt request from the RFM Module is not processed. I cant see interrupts when I start a node. (With a working setup with ESP8266 and RFM69, the pin is low most of the time except when new packets arrive from a sensor).

      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      @sundberg84
      It does not work for me with softspi too. Although the debug output does not look that bad..

      MCO:BGN:INIT GW,CP=RPNGA---,FQ=16,REL=255,VER=2.3.2<\n>
      4 TSM:INIT<\n>
      5 TSF:WUR:MS=0<\n>
      8 TSM:INIT:TSP OK<\n>
      10 TSM:INIT:GW MODE<\n>
      12 TSM:READY:ID=0,PAR=0,DIS=0<\n>
      14 MCO:REG:NOT NEEDED<\n>
      577 GWT:TIN:IP=192.168.178.203<\n>
      1581 MCO:BGN:STP<\n>
      1583 MCO:BGN:INIT OK,TSP=1<\n>
      1585 TSM:READY:NWD REQ<\n>
      
      
      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      Hello,

      thank you scalz for the very good clarification.
      @sundberg84 I can confirm that it does compile with the #define MY_RFM69_NEW_DRIVER option. AFAIK Arduino changed the way setDataMode should be called (see links in first post). I'm not a SW-Expert but I think Someone would have to change the coresponding SoftSPI calls in the old RFM69 (old) driver if you want to use it. I currently use an ATMega2560+W5100+NRF24PA with SoftSPI which is working (but I do not know with which Arduino Verison it was compiled).

      I will go with the new driver. I think it takes some time until I really do the change in HW, because I have to change several productive nodes. As we have big heat at the moment and my lab is under the roof my motivation is currently not that high... 🌡 😥

      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: Gateway W5100 with RFM69 fails to compile

      Sorry for replying this late, just having some "real world" issues 😉
      Yes, with the new driver it works. Do we have a comparison about pros/cons of the new RFM69 driver. As I'm migrating all my nodes from nrf24 to rfm69 its no problem to use the new driver in all sketches. Just wondering what has changed in the new driver..

      Thanks, DirkH

      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • Gateway W5100 with RFM69 fails to compile

      Hello,

      im trying to build a Gateway based on ATMEGA2560 with W5100 Ethnernet Chip and RF69 Radio Module.
      I'm using the stock GatewayW5100 from the MySensors Examples folder. Becuase I'm using a RF69 and not a NRF24 I disable the NRF24 driver and enable the RF69 Driver by (dis)commenting the specific lines.

      However my Arduino 1.8.8 gives me an error message: 'class SoftSPI<16u, 15u, 14u, 0u>' has no member named 'setDataMode'. Arduino.cc says that setDataMode shall not be used anymore. I think something is screwed up here...

      The debug output of Arduino says the following Versions are used:
      Bibliothek Ethernet in Version 2.0.0 im Ordner: D:\Program Files (x86)\Arduino\libraries\Ethernet wird verwendet
      Bibliothek MySensors in Version 2.3.2 im Ordner: D:\EigeneDaten\Dokumente\Arduino\libraries\MySensors wird verwendet
      Bibliothek SPI in Version 1.0 im Ordner: D:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI wird verwendet

      Source of the Gateway Sketch (only put a comment on #define MY_RADIO_RF24 and removed comment from #define MY_RADIO_RFM69.

      /*
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2019 Sensnology AB
       * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Henrik Ekblad
       * Contribution by a-lurker and Anticimex
       * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
       * Contribution by Tomas Hozza <thozza@gmail.com>
       *
       *
       * DESCRIPTION
       * The EthernetGateway sends data received from sensors to the ethernet link.
       * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
       *
       * The GW code is designed for Arduino 328p / 16MHz.  ATmega168 does not have enough memory to run this program.
       *
       * LED purposes:
       * - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
       * - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
       * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
       * - ERR (red) - fast blink on error during transmission error or receive crc error
       *
       * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
       *
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      //#define MY_RADIO_RF24
      //#define MY_RADIO_NRF5_ESB
      #define MY_RADIO_RFM69
      //#define MY_RFM69_NEW_DRIVER
      //#define MY_RADIO_RFM95
      
      // Enable gateway ethernet module type
      #define MY_GATEWAY_W5100
      
      // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
      //#define MY_W5100_SPI_EN 4
      
      // Enable Soft SPI for NRF radio (note different radio wiring is required)
      // The W5100 ethernet module seems to have a hard time co-operate with
      // radio on the same spi bus.
      #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
      #define MY_SOFTSPI
      #define MY_SOFT_SPI_SCK_PIN 14
      #define MY_SOFT_SPI_MISO_PIN 16
      #define MY_SOFT_SPI_MOSI_PIN 15
      #endif
      
      // When W5100 is connected we have to move CE/CSN pins for NRF radio
      #ifndef MY_RF24_CE_PIN
      #define MY_RF24_CE_PIN 5
      #endif
      #ifndef MY_RF24_CS_PIN
      #define MY_RF24_CS_PIN 6
      #endif
      
      // Enable UDP communication
      //#define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS below
      
      // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
      #define MY_IP_ADDRESS 192,168,178,66
      
      // If using static ip you can define Gateway and Subnet address as well
      //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
      //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
      
      // Renewal period if using DHCP
      //#define MY_IP_RENEWAL_INTERVAL 60000
      
      // The port to keep open on node server mode / or port to contact in client mode
      #define MY_PORT 5003
      
      // Controller ip address. Enables client mode (default is "server" mode).
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
      //#define MY_CONTROLLER_URL_ADDRESS "my.controller.org"
      
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Arduino examples use  "DEAD BEEF FEED" for the MAC address.
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
      
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN  3
      
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Flash leds on rx/tx/err
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  9  // Transmit led pin
      
      #if defined(MY_USE_UDP)
      #include <EthernetUdp.h>
      #endif
      #include <Ethernet.h>
      #include <MySensors.h>
      
      void setup()
      {
      	// Setup locally attached sensors
      }
      
      void presentation()
      {
      	// Present locally attached sensors here
      }
      
      void loop()
      {
      	// Send locally attached sensors data here
      }
      
      
      posted in Troubleshooting
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      @LastSamurai The SST25VF020B... should work fine with the 2.0 developversion and #define MY_SPIFLASH_SST25TYPE set. It seems to be very close to the SST25PF020B I used. However keep an eye on the even more limited voltage range of the SST25VF Type which needs at least 2,7V which would be a problem if you want to power your circuit directly by 2xNiMH Batteries.

      The SST25VF512 needs also 2,7V but additionally does not support the 64k erase command (see my comments on that issue some posts above where I wrote something about the AT25F512).

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      About the AT25F512N wich was proposed by @AWI: tbowmo was right, I got confused by Sector, Page and Block erase. Like tbowmo said atmel does call blocks sectors... The AT25F512 does not support Block Erase 64k, which is defined but AFAIK not used in SPIFlash.cpp BUT it is used in the Bootloader if the "Imagesize" is > 32k. But I dont know how Image size is retrieved. Also I think for an ATMega 328p the image size should never be >32k. So this Flashtype could probably work as long as the image size is below 32k. I'd expect the Bootloader to crash or fail when program size is >32k.

      About the S25FL... @bjacobse proposed I see the problem that it does not support the Bock Erase 32k opcode which is used in SPIFlash.cpp and Bootloader. Both must be changed when S25FL... should be used. (I would emulate the 32k Block erase by 8 times 4k Block erase.) However remember that Dualoptiboot must also be altered which requires "non-arduino" programming and some work / knowlegde about makefiles / compiler/linker settings in IDE.

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      @AWI
      The AT25F512 (from Atmel?) is quiet different from the Adesto AT25DF512. As far as I can see the Atmel one seems not to have a Block erase command (32k/64k), which is used in MySensor AND in Bootloader code.

      If I'm not wrong with that assumption (and I dont think I am), I would NOT recommend to use the Atmel AT25F512.

      To all: please provide links to the Datasheet if you expect help... Its tedious to search them every time. Gulpman did great preparation work in his post above.

      Edit: Never mind what I said in this Post. I got confused with sectors pages and blocks 👀 ... I'll write some more later.

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      Yes the AT25DF512 seems to outperform other memories and is truly a good chip. However unfortunately its hard to get in Germany (and maybe other parts of the world 😉 ). The common distributors here do not have it in stock...

      posted in Hardware
      Dirk_H
      Dirk_H
    • RE: OTA flash types for MySensors

      @tbowmo
      I looked at the defines inside the DualOptibootloader, I truly hope that there is no "hardcoded" opcode hidden somewhere... Assuming this, dualoptiboot does not write to the SPIFlash. It does erase, however thats not writing in this scope 😉

      #define SPIFLASH_STATUSWRITE      0x01        // write status register
      #define SPIFLASH_STATUSREAD       0x05        // read status register
      #define SPIFLASH_WRITEENABLE      0x06        // write enable
      #define SPIFLASH_ARRAYREADLOWFREQ 0x03        // read array (low frequency)
      #define SPIFLASH_BLOCKERASE_32K   0x52        // erase one 32K block of flash memory
      #define SPIFLASH_BLOCKERASE_64K   0xD8        // erase one 32K block of flash memory
      #define SPIFLASH_JEDECID          0x9F        // read JEDEC ID
      

      @Koresh please post a link to the datasheet. You can also check on your own: check if your spi-flash supports all commands listed in the SPIFlash.h defines. Of cause obvious things such as pinning and supply voltage range must also be checked.

      A caveeat I fell into, was that opcode 0x02 supports byte and pageprogramming for some SPI-Flash types but not for all (e.g. SST25 does not support pageprogramming but therefore has the AAI Wordprogramming feature).

      posted in Hardware
      Dirk_H
      Dirk_H