Navigation

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

    stedew

    @stedew

    3
    Reputation
    18
    Posts
    597
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    stedew Follow

    Best posts made by stedew

    • RE: Best IDE to use for MySensors projects

      @ivankravets
      Hello Mr Ivankravets

      Ok birthday is done and bottles empty....
      -Well When you compare to Arduino IDE vs PlatforIO is something slightly different:
      Running the "BatteryPoweredSensor.ino" (Mysensors 2.0) example in Arduino 1.6
      1)Load new Sketch "Examples">>Mysensors >> BatteryPoweredSensor
      2)Compile >>will not work for all boards (due to INTERNAL is not defined for all AVR members )
      3)Download to controller

      PlatformIO:
      1) Choose Board (here tested with UNO)
      2) Choose Dir (only existing dir no create possible) (First make MKDIR BatteryPoweredSensor )
      3) Copy code file from Mysensors example dir to PlatformIO \src dir (right click open in explorer)
      4) Enable Use development Version of PlatformIO (at the moment for PIO 3.0) in settings
      5) Add PATH string variable in settings (Good explanation anyway)
      6) Start cmd (Powershell in Windoze) from PlatformIO
      7) Execute the cmd  >>  platformio lib install 548 (For Mysensors 2.0 lib)
      8) Compile
      9) Download to controller
      

      -This being sayed for these additional steps you get something what is non existing in Arduino ide:
      +AutoComplete variables /suggest with function prototypes
      +Acces to all used code off the included library
      +Compile in seconds

      -Still some questions also:
      Is there a quick way to refractor over source files (not readed the manual)?
      Goto declaration does not work (maybe my fault) Clang is installed however.
      Local version control?
      Specify wich serial port for upload (and not use the default first one)

      Tnx in advance,
      Stefan.

      posted in Development
      stedew
      stedew
    • RE: Esp8266 with wifi off

      @emc2

      Tnx spot on 👍

      Before i measure 88mA and now ~ 30mA. In reality the profit (% saving) will be even higher. The test setup is with all node mcu hardware so there will definitly be a higher gain with a "bare" esp.
      As for some may ask: why use a esp (nodeMCU) as a arduino?
      -"Solid" Integrated 3v3 regulator
      -Good RF design(shielding)
      -USB RS232 interface
      -High processing power (if needed).

      -I could not get the wifi gateway rock solid (compared to the RS232) .
      From the moment domoticz disconnect (or the ESP lost connection) there was no communication anymore without an intervention to domoticz.

      Regards,
      Stefan.

      posted in General Discussion
      stedew
      stedew
    • RE: Help needed - SSR switch / SCR dimmer

      @ksga
      For the R1 R2 it is easy P = I² * R so for 240v rms this gives 8mA² * 30000 gives 1.92W! this wil give you a constant energy loss off 2W only to know the zero crossing (even when the light is out). Keep the old dimmer with the filament bulbs you will save energy 😃
      Possible the circuit is designed for 120VAC then you still need at least 1/2watt resistor (and 1W powerloss)
      When you google a little i find combinations that use a transformer for the zero crossing.
      Also the circuit here on instructables can help you
      integrate this in the switch example is not a real good idea. Build the code for the zero crossing and dimming (firing triac) preferable in a seperate module /code block without the mysensors overhead. maybe you find some clues where you got the schema.
      When you can succesfully dim on/off the lamp with your code then you can start thinking to glue it on the Mysensor lib(s)
      I didn't search the forum here but i can imagine that building a interrupt driven zero crossing dimmer is a real challence. Particulary when it has to co-operate with the mysensor library...
      I hope this helps
      Regards ,
      Stefan

      posted in General Discussion
      stedew
      stedew

    Latest posts made by stedew

    • RE: Help needed - SSR switch / SCR dimmer

      @ksga
      well i suggest you use google for this (the trafo). Also your link provide schema and code not so bad as a start. also there is a module (the Bluetooth classs) that set the power output from a literal in %. This is exactly what you need to bind it to Mysensor lib...
      this is what i found on ebay Example link
      This trafo does not provide much power but it is small and maybe sufficiënt for powering the arduino.
      There is one catch when using a trafo : it introduce a phase shift so you must provide e methode (i believe a fix constant will do in most cases ) to trim the "offset" of the zero crossing.
      As i am not a specialist on mysensors internal structure but for a atmega328p (uno) TCCR1A is used inseverall places ,for analog write Altsoftserial (RS485) etc. So you must be sure not to re-use the timer it will behave strange. Same is for the attachInterrupt function it is used in hwSleep function. As there are only 2 HW irq's you must choose the "right" one in most designs i believe irq 1 is used for the NRF24l01 /RFM69 so choose the other one on your mcu . For all these reasons i believe it will take many hours off testing to get the dimmer "glitch" free.
      I believe for this resons it is better to offload the mcu and use a dedicated chip/mcu when you want to use Mysensors in your dimmer.

      posted in General Discussion
      stedew
      stedew
    • RE: Help needed - SSR switch / SCR dimmer

      @ksga
      idd the bridge is not needed because the H1AA1 has two antiparrallel diodes.
      As i said before the heat is a function I³*R. So yes, these resistors will get very hot (1W consumption @ 240V in total) It is ilmho not a good idea to use it like this given the fact that you get a few resistors in your circuit that always consume 1W even when the dimmer is off (and the resistors get very hot when you use a 1/2w type)
      Yust imagine you consume 8760W every year yust to know the zero crossing..

      posted in General Discussion
      stedew
      stedew
    • RE: Help needed - SSR switch / SCR dimmer

      @ksga
      For the R1 R2 it is easy P = I² * R so for 240v rms this gives 8mA² * 30000 gives 1.92W! this wil give you a constant energy loss off 2W only to know the zero crossing (even when the light is out). Keep the old dimmer with the filament bulbs you will save energy 😃
      Possible the circuit is designed for 120VAC then you still need at least 1/2watt resistor (and 1W powerloss)
      When you google a little i find combinations that use a transformer for the zero crossing.
      Also the circuit here on instructables can help you
      integrate this in the switch example is not a real good idea. Build the code for the zero crossing and dimming (firing triac) preferable in a seperate module /code block without the mysensors overhead. maybe you find some clues where you got the schema.
      When you can succesfully dim on/off the lamp with your code then you can start thinking to glue it on the Mysensor lib(s)
      I didn't search the forum here but i can imagine that building a interrupt driven zero crossing dimmer is a real challence. Particulary when it has to co-operate with the mysensor library...
      I hope this helps
      Regards ,
      Stefan

      posted in General Discussion
      stedew
      stedew
    • RE: Alternative to ArduinoIDE

      @andrew
      Hello Andrew, as Anticimex already answered also other IDE's are possible (Atmel Studio with a arduino plugin seems to work) Atom, and others I use the Eclipse + plugin solution and are happy with it. It is really a powerfull solution with many configuration options. I had a few discussions with the maintainer of sloeber (Jantje) and in general i made a few observations that summerize yours: lsee discussions on github
      The problem for cpp is that you have to declare the prototypes because you lose the confort from the ino suffix.
      Regards ,
      Stefan

      posted in General Discussion
      stedew
      stedew
    • RE: Esp8266 with wifi off

      @emc2

      Tnx spot on 👍

      Before i measure 88mA and now ~ 30mA. In reality the profit (% saving) will be even higher. The test setup is with all node mcu hardware so there will definitly be a higher gain with a "bare" esp.
      As for some may ask: why use a esp (nodeMCU) as a arduino?
      -"Solid" Integrated 3v3 regulator
      -Good RF design(shielding)
      -USB RS232 interface
      -High processing power (if needed).

      -I could not get the wifi gateway rock solid (compared to the RS232) .
      From the moment domoticz disconnect (or the ESP lost connection) there was no communication anymore without an intervention to domoticz.

      Regards,
      Stefan.

      posted in General Discussion
      stedew
      stedew
    • Esp8266 with wifi off

      Hello,
      I have a small question and maybe someone else already knows the answer.
      For testing i want to use a esp8266 (esp12 /nodemcu board) with a nrf24L01+) as a GW (serial).
      I have this working but i want to shut down the WIFI completely what instruction i have to use for this?

          wifi_set_sleep_type(MODEM_SLEEP_T);
      	delay(1);
          system_deep_sleep_set_option(MODEM_SLEEP_T);```
       
      

      I don't know exactly and also while testing i was pinging the wrong ip so i got a little confused 😉
      What i basicly want to do is use the esp as a high performance GW/node.
      So any suggest are welcome.
      regards,
      Stefan.

      posted in General Discussion
      stedew
      stedew
    • RE: RS485 Speed and different routing possible?

      haha,
      I knew you gonne hijack this thread
      As you answered the first question (more or less)
      i was looking for a good test rig
      long distance transmission line

      I yust have to re-read the specs off the ADM isolator i think 😃
      So there is no possibility to route from node to node pitty.
      Tnx for the answer anyway i will try the higher speed setting (57K6 or so)
      Btw good write up about the RS485 setup on the home page it will defenetly speed up things (as i spend a few hours wit wrong setup)
      Regards,
      Stefan.

      posted in General Discussion
      stedew
      stedew
    • RS485 Speed and different routing possible?

      Hello someone tested a higher speed setting for the (new) RS485 communication in MS2.0.?
      I think that 9600baud is really slow. That being sayed i have to admit it works like a charm.
      -So when someone can confirm that this works also with long(er) lines and higher speed i would like to know.
      In my setup i use on one side (GW + RPI) a ADM2483 (isolator) so that i have a galvanic separation and can play safely with the sensors. these are often near the life (electric cabinet/enclosures) on the other side (sensors /field) i use the MAX485 or an SN75HVD12DR RS485.
      Second question: is it possible to send a message from one sensors to another on the same bus? Without the need to use code in the GW? to route the recaiver?
      Regards,
      Stefan.

      posted in General Discussion
      stedew
      stedew
    • RE: Alternative to ArduinoIDE

      @Daniel-Oliveira
      Hello Daniel for what it's worth: Jantje posted a Fix in Github:
      the selection of subfolders included to the path is not consistent with the Arduino IDE

      Just have to test it further
      Regards,
      Stefan

      posted in General Discussion
      stedew
      stedew
    • RE: Best IDE to use for MySensors projects

      @ivankravets

      Ok as i mentioned before:
      At start nothing worked like i wanted in PIO then start reading....
      Testing &implement all steps that seems to be needed (forums are top sometimes 🙂
      Then changed computer (Wife...) and re-install everything from scratch.
      And so i came to this exhaustive (wrong) list
      So now the corrected one:

      PlatformIO:
      1) Choose Board (here tested with UNO)
      2) Choose Dir (only existing dir no create possible) (First make MKDIR BatteryPoweredSensor )
      2) Choose Dir ( existing dir or create "BatteryPoweredSensor" )
      3) Copy code file from Mysensors example dir to PlatformIO \src dir (right click open in explorer)
      4) Enable Use development Version of PlatformIO (at the moment for PIO 3.0) in settings
      ~~ 5) Add PATH string variable in settings (Good explanation anyway)~~
      ~~6) Start cmd (Powershell in Windoze) from PlatformIO ~~
      7) Execute the cmd >> platformio lib install 548 (For Mysensors 2.0 lib)
      5 ) add 1 line to your platformio.ini config: lib_deps = MySensors (Dmnn that i try-ed already did not work then ?? to many modifs made i think)
      6 ) Compile info: on my Laptop (slow one) compiles MySerialGw in 2sec!! (record for PIO)
      7 ) Download to controller

      About the other topics:
      Refractoring is handy especialy when you use constants over severall files.
      I am a chaotic person so i tend to forget one enum somewhere...
      Goto declaration >> ok have to switch OS maybe not you/team to blame.
      -Local history will try /need it (same problem as refractor point 😞 )
      -upload_port very good one... will test it .

      --Improvements ?? Don't know i already own you a couple of beers i think.
      I believe it is maybe handy to have a write up with screenshots "Adventures migration from Arduino to PIO".

      Regards,Stefan.

      posted in Development
      stedew
      stedew