Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
alexsh1A

alexsh1

@alexsh1
About
Posts
1.3k
Topics
71
Shares
0
Groups
0
Followers
1
Following
1

Posts

Recent Best Controversial

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    Try this one.
    The smallest board I have ever assembled using just a hot fan. A solar battery charger based on BQ25504 from a solar panel. Almost all components are 0402. Far too small for my liking, but can go under the solar panel.

    0_1546964306401_FFE84E8C-991D-4342-8272-2180F79333A8.jpeg

    General Discussion

  • 2xAA powered PIR
    alexsh1A alexsh1

    Took me a while to make it though the idea is very simple. I took this jModule https://www.openhardware.io/view/20/jModule and a BMP280 i2c board (I have a few spare ones) and hooked them up Mini Pro (modified for the battery use) as well as the PIR and the battery compartment. I have to admit I am cheating here - I am using 2xAA Ni-Zn and they are 1.6V each giving me a stable voltage 3-3.2V throughout its life.
    I had to do a little modification to the PIR to be able to work at 3.3v. It does work really well. Cannot say much about the battery life as it depends. Sleeping current is low, but the life really depends on how many times the PIR is going to be triggered.

    Some photos at the end:

    0_1467975285529_2016-07-05 14.26.28.jpg

    0_1467975308059_2016-07-05 14.26.54.jpg

    0_1467975316388_2016-07-05 14.26.15.jpg

    And the final product is ...(compared with DHT22)

    My Project

  • Step-by-step procedure to connect the NRF24L01+ to the GPIO pins and use the Raspberry as a Serial Gateway (MySensors 1.x)
    alexsh1A alexsh1

    @ahmedadelhosni said:

    Is connecting the nrf directly to the pi causes any problems and u need to restart it ?

    No, I have not had any big problems. The problem may only be the nrf24l01+ - I had to have a few changed plus fix the con to make it work. Wiring could be an issue. Also pay attention to CE pin.
    CE Pin = Custom GPIO25 (I have Custom GPIO22) - this can be changed by the constructor

    Excellent write-up

    Hardware nrf24 raspberry pi raspberry raspberry nrf24l01 gpio gateway

  • Fewer home automation postings? What's behind it?
    alexsh1A alexsh1

    @neverdie Nope! I meant riding :relaxed: :relaxed: :relaxed:

    General Discussion

  • My own board (50mm x 30mm)
    alexsh1A alexsh1

    IMG_2229.JPG

    My board waiting for a sensor from China

    My Project

  • 2.4" TFT: does it work with MySensors?
    alexsh1A alexsh1

    @jsiddall Yes, it does work. However, you may have to spend some time looking for a screen processor and schematics as Chinese are not providing much information.

    1. Ask for schematics and have a look - there are four digital pins on your Arduino used for the SD card. Disolder these pins (some screens do not have them). These can be used for nrf24l01+ with Soft SPI (you have to enable it in MyConfig.h and change MISO, MOSO and SCK pins to correspond the pins you use).

    2. Please do a bit research on Arduino forum. There is a sketch to help you to define a screen processor, there is a new library etc tons of information available.

    3. It may take a while to do the whole research - there are many-many posts.

    I have tried recently three different screens 2.8-3.2 (one similar to yours with analogue pins) with MySensors and all of them were working. Abeit one was very difficult - took me a while to
    take it work due to lack of documentation.

    I posted some pictures in "Scene Controller" under "Development" - please have a look

    PS @mfalkvidd provided excellent links

    Hardware

  • New Moteino M0 is out!
    alexsh1A alexsh1

    Hello

    Some of you may have followed discussion at low power lab about a new ARM module. Here we go available to purchase now:

    https://lowpowerlab.com/2018/05/27/moteino-m0-released/#more-2427

    Felix also introduced a modular system (“sandwich board”). Absolutely fantastic!

    General Discussion

  • 💬 NRF2RFM69
    alexsh1A alexsh1

    0_1473417301903_image.jpeg

    I have just soldered rfm69w module to the adapter. All works just fine

    OpenHardware.io rfm69 adapter converter nrf24l01

  • Please add a guide for how to connect use the RFM69(H)W
    alexsh1A alexsh1

    @hek I can confirm that Moteino Mega USB (and I think Moteino Mega as well) works out of the box:

    Starting sensor (RRNNA-, 2.0.0-beta)
    Radio init successful.
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    Init complete, id=255, parent=255, distance=255
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    
    Feature Requests

  • [solved] Moteino Mega -> cannot compile 2.2.0 beta
    alexsh1A alexsh1

    @scalz My avr is 1.6.18 (newest)
    I'll pull the latest dev and try again.

    EDIT: Thanks @tekka - I have corrected pins_arduino.h for Moteino Mega (attached)

    pins_arduino.h

    Bug Reports

  • atmega328p small (SMD) alternative with more memory?
    alexsh1A alexsh1

    My new toy (atmega1284p) - Mightyduino
    However, I have to think about connecting radio as this is just a bare board.
    Size wise it is quite small0_1523634439436_53944617-D2C8-4479-A40A-42DA90D8D896.jpeg

    Hardware

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    This is my new PSU - 3D printed enclosure and a few components
    It is very precise.

    2_1540841375727_3.jpg 1_1540841375727_2.jpg 0_1540841375727_1.jpg

    General Discussion

  • 💬 Various bootloader files based on Optiboot 6.2
    alexsh1A alexsh1

    @mar.conte yes, you can measure consumption (should be in uA) while sleeping with a good voltmeter.

    However, I really fail to understand what has Nick's sketch you mentioned to do with MySensors? I suppose some people here may be aware of sleeping issues, but again your problem has nothing to do with MySensors.

    Please see the following - it may help you troubleshoot your issue
    https://www.mysensors.org/build/battery

    OpenHardware.io optiboot

  • [solved] Sensor freezes - Low memory available, stability problems may occur.
    alexsh1A alexsh1

    @scalz I'm with you, but just like you I just do not have time for it. There is Teensy 3.2 with excellent footprint and 10 times speed and memory. So I just feel like if I'm going to spend time, it has to be not yesterday's technology.

    Troubleshooting

  • Which dust sensor do you use and why?
    alexsh1A alexsh1

    @vladimir The answer is it depends. If you are happy with +/- 40% error, you probably be better of with a generic dust sensor. I think the best would be if you do a bit of research online. This is would be a good start - http://aqicn.org/sensor/

    Personally, I moved from a cheap sensor to Plantower PMS7003 (about $23). The amount of time one spends in calibrating and understanding cheap sensors, is just not worth it in my view.

    Hardware

  • Scene Controller
    alexsh1A alexsh1

    This is a semi finished project. The power is fed via ICSP through 662k (under the red tape):

    0_1465645782812_2016-06-10 14.27.18.jpg

    Now I need to isolate everything:

    0_1465645826597_2016-06-11 12.05.59.jpg

    This is how Mega + the screen looks:

    0_1465645871949_2016-06-11 12.07.50.jpg

    0_1465645883516_2016-06-11 12.07.56.jpg

    Now I need to figure out how to stick the battery between the screen and Mega :)
    Any suggestions welcome!

    Development

  • 💬 MyMultisensors
    alexsh1A alexsh1

    My sensor is now fully completed with all sensors and flash. I decided to go for 2450 battery

    0_1498299022820_IMG_5438.JPG

    0_1498299079412_IMG_5440.JPG

    OpenHardware.io 328p motion atsha204a multi sensor humidity temperature pir ambiant light low power coincell

  • Issues with NACK on RFM69HW
    alexsh1A alexsh1

    @ryanmt can you please try to use any AVR instead of Wemos for the GW?
    Are you 100% sure you have HW version?

    Try with and without

    define MY_IS_RFM69HW
    
    Troubleshooting

  • Sketch for Lightning Sensor
    alexsh1A alexsh1

    I have adopted the MOD-1016 module (https://www.embeddedadventures.com/datasheets/MOD-1016_hw_v8_doc_v4.pdf) for MySensors if anyone is interested:

    /*
    
    Copyright (c) 2016, Embedded Adventures
    All rights reserved.
    
    Contact us at source [at] embeddedadventures.com
    www.embeddedadventures.com
    
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:
    
    - Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    
    - Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    
    - Neither the name of Embedded Adventures nor the names of its contributors
      may be used to endorse or promote products derived from this software
      without specific prior written permission.
     
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
    THE POSSIBILITY OF SUCH DAMAGE.
    
    */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    #define MY_NODE_ID 15
    
    #include <Wire.h>
    #include <MySensors.h>
    #include <AS3935.h> // AS3935 MOD-1016 by Embedded Adventures
    
    volatile bool detected = false;
    
    
     //-----------------IMPORTANT--------------------
     //---------------CHANGE SETTINGS HERE-----------
    #define IRQ_pin 2
    
    #define AS3935_TUNE_CAPS     6 // <-- SET THIS VALUE TO THE NUMBER LISTED ON YOUR BOARD 
    #define AS3935_INDOORS       1 // AS3935_INDOORS=1 indoors, AS3935_INDOORS=0 outdoors
    #define AS3935_NOISE_FLOOR   6
    #define AS3935_ENABLE_DISTURBERS 1 // 0 or 1      
    
    #define CHILD_ID_DISTANCE 1
    #define CHILD_ID_INTENSITY 2
    MyMessage msgDist(CHILD_ID_DISTANCE, V_DISTANCE);
    MyMessage msgInt(CHILD_ID_INTENSITY, V_VAR1);
    
    void setup()  
    { 
      Serial.begin(115200);
      while (!Serial) {}
      Serial.println("MOD-1016 (AS3935) Lightning Sensor");
      Serial.println("beginning boot procedure....");
      
      Wire.begin();
      mod1016.init(IRQ_pin);
     
     //-----------------IMPORTANT--------------------
     //---------------CHANGE SETTINGS HERE-----------
      //Tune Caps, Set AFE, Set Noise Floor
      //autoTuneCaps(IRQ_pin);
      mod1016.setTuneCaps(AS3935_TUNE_CAPS);
    delay(2);
    #if AS3935_INDOORS == 1
      mod1016.setIndoors();
      #else
      mod1016.setOutdoors();
    #endif
    delay(2);
    mod1016.setNoiseFloor(AS3935_NOISE_FLOOR);
    delay(2);
    #if AS3935_ENABLE_DISTURBERS == 1
      mod1016.enableDisturbers();
    #else
      mod1016.disableDisturbers();
    #endif
    //mod1016.calibrateRCO();
    delay(2);
      Serial.println("TUNE\tIN/OUT\tNOISEFLOOR");
      Serial.print(mod1016.getTuneCaps(), HEX);
      Serial.print("\t");
      Serial.print(mod1016.getAFE(), BIN);
      Serial.print("\t");
      Serial.println(mod1016.getNoiseFloor(), HEX);
      Serial.print("\n");
    
      pinMode(IRQ_pin, INPUT);
      attachInterrupt(digitalPinToInterrupt(IRQ_pin), alert, RISING);
      Serial.println("after interrupt");
        // delay execution to allow chip to stabilize.
      delay(1000);
    
    }
    
    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Lightning Sensor MOD-1016", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID_DISTANCE, S_DISTANCE);
      present(CHILD_ID_INTENSITY, S_CUSTOM);
    }
    
    void loop() {
      if (detected) {
        translateIRQ(mod1016.getIRQ());
        detected = false;
      }
    }
    
    void alert() {
      detected = true;
    }
    
    void translateIRQ(uns8 irq) {
      switch(irq) {
          case 1:
            Serial.println("Noise detected");
            break;
          case 4:
            Serial.println("Disturber detected");
            break;
          case 8: 
            Serial.println("Lightning detected!");
            printandsendToGW();
            break;
    
      }
    }
    
    void printandsendToGW() {
      int distance = mod1016.calculateDistance();
      unsigned int lightning_intensity = mod1016.getIntensity();
      if (distance == -1)
        Serial.println("Lightning out of range");
      else if (distance == 1)
        Serial.println("Distance not in table");
      else if (distance == 0)
        Serial.println("Lightning overhead");
      else {
        Serial.print("Lightning ~");
        Serial.print(distance);
        Serial.println("km away\n");
        Serial.print("Lightning Intensity: ");
        Serial.println(lightning_intensity);  
        send(msgDist.set(distance));
        send(msgInt.set(lightning_intensity));
      }
    }
    

    You have to change the sketch according to your module settings

    Development

  • atmega328p-au counterfeit
    alexsh1A alexsh1

    @yveaux Yes, the problem has gone as soon as the new chip was soldered and the firmware burned. A lot of valuable time wasted and a lesson learnt - no more Aliexpress for components. Only a reliable source - Digi-key, mouser, allow, Farnell etc.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular