Navigation

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

    Best posts made by bluman

    • RE: Relay for PCB relay node

      @viking said:

      @johnr great idea! i have spent a few days considering this myself. Have you put any thought in to how it will be integrated to the socket? My concern is that I'd like to re-use the existing mechanical buttons in the house, connecting the arduino as a multi-way connection (swedish: trapp-koppling) to be able to use both mechanical buttons and non-mechanical. For existing multi-way connections I was thinking of adding the arduino as a "cross" (Swedish: korskoppling) in between to facilitate that but that would require two relays

      I'm working on a Distributed Arduino Node (DAN) that is designed as a "per-room" style controller using the MySensors network talking back to my Vera via serial gateway.
      Lighting and temp/humidity is currently working.
      I also plan to add Lux and infrared send/receive.

      Local control of the lighting is possible using a normal wall switch which is also wired to a relay in a "two-way" switch configuration. Like this:
      http://www.electronics-project-design.com/images/TwoWayLightSwitch.GIF

      This circuit switches power to a 12V power supply feeding into an LED dimmer/driver like this:
      http://www.aliexpress.com/item/Free-Shipping-Constant-Voltage-DMX512-0-10V-Dimming-driver-1-Channel-Single-output-DC12-24V-10A/1329369736.html
      This dimmer has a 0-10V DC input which controls the brightness of the LED lighting.
      http://en.wikipedia.org/wiki/0-10_V_lighting_control

      A rotary encoder is then mounted with the normal wall switch as a dimmer control.
      The encoder controls the Arduino's digital-to-analog converter outputting 0-5V. This output is then fed through an operational amplifier with a gain of 2, scaling the output from 0-10V. This feeds the LED dimmer/driver above and is working well with no flicker!

      Feedback is required from the 12v power supply so Vera knows if the load is either on or off as there is no way of knowing this with the two-way switching.

      This is designed for bidirectional control, from the local wall switch / rotary encoder or from the Vera for example, scene control.

      Both on/off and brightness are fed back to the Vera so the DAN and Vera status is kept in sync.

      If people are interested I am happy to post more details, sketch, Eagle schematic etc. This is still a "work in progress" though for our new home which we hope to start building this year.

      Regards
      Bluman

      posted in Hardware
      bluman
      bluman
    • Less Optimised Code for Beginners PLEASE?

      Hi there,

      Thanks to Hek, I've been having a great time with My Sensors for a while. I've just got back into it after about a 12 month break and upgrading various sensors from 1.3 to 1.4.

      I'm struggling with the new 1.4 code as the examples under the Build section use some very nice code which helps optimise the sketch size.
      This optimisation makes it more difficult to clearly understand what is happening for "beginner coders" like myself.

      I use the function incomingMessage from the relay sketch below as an example. It contains a line of code to change the relay status as commented.

       // Change relay state
       digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      

      Trying to adapt this to work with ones own variables can be very confusing.

      Could someone please expand this out to show such code more clearly for beginners?
      It might make it easier if the expanded version of this line is shown as a comment in the code?

      This basic approach for the Build examples may help others overcome similar issues and increase the adoption of My Sensors in general.

      Regards
      Bluman

      posted in General Discussion
      bluman
      bluman