My Project - A Beginners travel….



  • My Project - A Beginners travel….
    To be honest. I underestimated this.

    My goal was: to built a system that can react to PIRs and turn lamps on and out.
    My parents have a large garden which is really dark in the night. No light till now.
    My plan was to built two Mysensor-Stations that have multiple PIRs attached. And multiple 12V LED.
    Those lights should be turned on according to motion detected by the PIR. But the whole system should be able to be controlled by a central server and Frontend. E.g. a garden party and you don’t want the lights to go on or using all the pirs as a alarm station react on motion, turn on all lights, blinking, and sending a message to my mobile phone.
    I decided to buy a raspberry and add Pimatic as a webfrontend to control everything.
    I built my serial device for mysensor in a box to control wireless sockets….

    0_1491571842923_upload-a7a2b105-bc16-4ce2-9df4-b4880d974864
    0_1491571850903_upload-8814df2a-a652-4de2-8d25-7655f3e2ee55
    0_1491571856989_upload-94ca416d-f4ac-4e97-9770-01f760baa929
    This is running since a year and my lights in the livingroom are automatically turned on and off according to sunrise and sunset. Nice. First goal.
    I had issues with new versions of pimatic and the mysensors lib, but I could work it out.
    Then I started to built a wireless motion sensor in a PIR of Ikea. (MOLGAN)
    0_1491571884272_upload-f3600f49-0f35-42fc-9e9b-b40e614ffbe5
    0_1491571890120_upload-19a70d14-5a59-4eab-bb36-54199fcd7032
    I had to learn what a LDR is, read about current dividers and so on… Hard topics for a beginner.
    Then I started with the system for my parents.
    I started to built a station with 2 PIRS, 2 Relays to control a different 12V LED-Supply and some temperature sensors.

    0_1491571903424_upload-b2093234-e7a2-47b8-9d9a-74cb952422bf

    But I realized that all this soldering with wires takes too much time or is not that nice. So somebody told me make your own PCB.

    So I learned EAGLE and built my first PCB. I sent it to a PCB-Maker and Tataaa. There they are:
    0_1491571947393_upload-052b6355-f591-4e0d-b37c-12b4b4ed6c04

    0_1491571967051_upload-d53388dd-21a3-4ae1-8ccb-176442bfde54

    I built the PCBs in a way, I could divide them for smaller applications. The most important for me was the easy to built Arduino-Radio-Section. It has the most connections. The rest is easy.
    So I’m using this PCB now for all things. Even for little wireless temperature sensors.
    For the PIR-Relay-Temp-Stations I used NTBA-Cases that I found.

    0_1491571988668_upload-ba331c81-dffd-4b7d-b03a-1208b7b4b63d

    They are quite nice. And cheap.

    0_1491571995033_upload-29224ac4-f6a1-4bbb-ab5a-2432257e731c

    So at the end I had two individual PIR-Relay-Stations. And everything is controlled with Pimatic by rules.
    Even my worker desk changed. My wife gave me a nice Soldering Station for a present and within one year my arsenal of electronic pieces grew…

    0_1491572023716_upload-69598a35-4047-4c4f-b234-77ebe35d1509

    0_1491572034686_upload-1321836d-bec5-4111-9da6-1043c98b1bfd

    My current project is a battery-powered Temp-Sensor.

    0_1491572050451_upload-facca371-fbea-4f93-93b1-ceb4647a421d

    Again I’m using a part of the cutted PCB.
    But I#m having problems with the radio. This little friend is 50m away from the main station.
    And it is not connecting.
    My questions:

    1. What is a good orientation for the radio part? Vertical ---- or horicontal: |  Antenna |
    2. How is repeating working? Do I just activate one sensor in between as a repeater and wait?
    3. IS there any order of adding a new sensor? Kind of binding sequence? First have it near the main station? Or is a binding also possible through a repeater?
      Thank you!

  • Hero Member

    @segelmann Great to see you are having fun on your Mysensors journey.

    A reliable connection to your nodes is a most important piece of a Mysensors setup. This becomes very apparent when you start deploying light switches that require an immediate reaction once activated. There is nothing worse than to gather all your family around to show off your latest piece of node wizardry only to find it does not perform as expected every time.

    For nodes that are to be on the fringes of range I use this mod to the antenna, In testing I have found it to make a worthwhile improvement to range.

    For my outside network I used this method to first establish the reliable range from my gateway , then once my first repeater was established used the same method to place the next repeater within range of my first repeater.

    By using the antenna mod and correct repeater placement I now have reliable connections to my nodes over 100m away from the gateway with just two repeater nodes. You will find that once you get clear of buildings you will get a sizeable increase in the distance that can be covered reliably.

    There are a few things to remember with repeater nodes, you cannot use sleep or delay in their code as this will prevent them from working as a repeater. You should try and have the repeater node as high up as is practical and clear of surrounding walls etc that might impede their signal.

    Nodes that are on the fringe of range from the gateway may still connect to the gateway instead of your repeater and thus still give you unstable results. To prevent this you can include the code below .

    #define MY_PARENT_NODE_ID 11            // set this to your repeater node id
    #define MY_PARENT_NODE_IS_STATIC  // this will force your node to use only the repeater
    

    this must be added at the top of your sketch before #include <MySensors.h> and will instruct the node to use the repeater at all times. Of course you must ensure that the repeater is always available.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.