Navigation

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

    sebas

    @sebas

    2
    Reputation
    21
    Posts
    851
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website sebastiaanschimmel.me Location The Netherlands

    sebas Follow
    Hardware Contributor

    Best posts made by sebas

    • RE: RGBW LED Controller

      @Maciej-Kulawik said:

      Some comments:

      • You should include resistors (e.g. 100 ohm) between mc pin and transistor gate. Just to protect controller pin agains high current (when gate is charged).
      • PWM output is available only for some pins. "On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11."
        So I don't think you can use pin 4 for green.
      • Additionally - PWM on pins 5 and 6 is a little broken; arduino core libraries use the same timer for millis() and delay() functions. Refer to documentation:
        "This will be noticed mostly on low duty-cycle settings (e.g 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6."
      • R2 is not necessary. Just enable internal pull-up in controller. The same for R1.
      • Your schematic is a little bit ugly 🙂 There are missing may dots on signal connections.
        The rest is quite fine. I also plan to build similar node.

      It's the most beautiful schematic I've ever made. It's also the first one I've ever made 😄 Thanks for the feedback, really appreciate it. You're right about the PWM pins on the Arduino. My prototype seems to be working fine when connected to pin 4. I'll see what it does when the PCB's arrive.

      @Dwalt said:

      I am confused as to why this board would be powered by both 12V and 230V. Seems a bit redundant. What use case am I missing?

      You could run the board on 12V. This design just takes the GND of the LED power supply and feeds that through the MOSFET's for driving the LED's. With this you can use whatever power supply you need for the LED's and swap them if you upgrade from 12V to 24V for example. I take the 230V that goes in to the LED power supply and feed that in the board for powering the arduino, radio etc.

      posted in OpenHardware.io
      sebas
      sebas
    • RE: RGBW LED Controller

      This should work with Domoticz, it's what I intend to use with it. I've received the boards from China and I'm currently working on a version 2 of this board. There are some errors in the design of version 1 that I need to get out. New version will be up shortly.

      posted in OpenHardware.io
      sebas
      sebas

    Latest posts made by sebas

    • RE: RGBW LED Controller

      This should work with Domoticz, it's what I intend to use with it. I've received the boards from China and I'm currently working on a version 2 of this board. There are some errors in the design of version 1 that I need to get out. New version will be up shortly.

      posted in OpenHardware.io
      sebas
      sebas
    • RE: RGBW LED Controller

      @drock1985 said:

      Ok, going to have to look at this one very carefully. Just bought a Hue lightstrip a week ago; this looks like more fun. 🙂

      @sebas , did you by chance do this in KiCad? If you did, do you have a part for the HLK-PM01?

      The design is made in Eagle. Is it possible to import Eagle files in KiCad?

      posted in OpenHardware.io
      sebas
      sebas
    • RE: RGBW LED Controller

      @Maciej-Kulawik said:

      Some comments:

      • You should include resistors (e.g. 100 ohm) between mc pin and transistor gate. Just to protect controller pin agains high current (when gate is charged).
      • PWM output is available only for some pins. "On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11."
        So I don't think you can use pin 4 for green.
      • Additionally - PWM on pins 5 and 6 is a little broken; arduino core libraries use the same timer for millis() and delay() functions. Refer to documentation:
        "This will be noticed mostly on low duty-cycle settings (e.g 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6."
      • R2 is not necessary. Just enable internal pull-up in controller. The same for R1.
      • Your schematic is a little bit ugly 🙂 There are missing may dots on signal connections.
        The rest is quite fine. I also plan to build similar node.

      It's the most beautiful schematic I've ever made. It's also the first one I've ever made 😄 Thanks for the feedback, really appreciate it. You're right about the PWM pins on the Arduino. My prototype seems to be working fine when connected to pin 4. I'll see what it does when the PCB's arrive.

      @Dwalt said:

      I am confused as to why this board would be powered by both 12V and 230V. Seems a bit redundant. What use case am I missing?

      You could run the board on 12V. This design just takes the GND of the LED power supply and feeds that through the MOSFET's for driving the LED's. With this you can use whatever power supply you need for the LED's and swap them if you upgrade from 12V to 24V for example. I take the 230V that goes in to the LED power supply and feed that in the board for powering the arduino, radio etc.

      posted in OpenHardware.io
      sebas
      sebas
    • RE: 110v-230v AC to Mysensors PCB board

      A question about the fuses. The BOM in the Word document links to two 230V fuses, the PTC and slow blow fuse. If I read the schematic correctly one fuse is on the AC side and one is on the DC side. How does a 230V fuse help on the DC side where there should not be more than 5Vdc? Or am I missing something? As I'm quite new to this I'm probably not reading the schematic correctly or missing something 🙂

      posted in Hardware
      sebas
      sebas
    • RE: Classic Ethernetshield

      Yes, just stick it on your Arduino and your good to go.
      I did have to change the pin configuration with an Arduino Mega2560 and the ethernet shield. I've placed a comment with my pin config in that tutorial.

      posted in Hardware
      sebas
      sebas
    • RE: Compile error with relay example

      Thank you! That worked.
      Should have tried that...

      posted in Troubleshooting
      sebas
      sebas
    • Compile error with relay example

      I'm writing a sketch with the 1.5 version of MySensors and based on the relay example that's on this site. When I compile I get a lot of errors about stuff not being declared. I'm assuming that the example on the site is correct. What am I missing here?

      The compile errors:

      Arduino: 1.6.4 (Windows 8.1), Board: "LilyPad Arduino, ATmega328"
      
      In file included from C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.h:39:28: error: 'DEFAULT_CE_PIN' was not declared in this scope
         MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
                                  ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.h:39:59: error: 'DEFAULT_CS_PIN' was not declared in this scope
         MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
                                                                 ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In constructor 'MyGateway::MyGateway(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
       MyGateway::MyGateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er) : MySensor(_cepin, _cspin) {
                                                                                                                                                                             ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: note: candidates are:
      In file included from C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
                       from C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MySensor.h:145:2: note: MySensor::MySensor(MyTransport&, MyHw&)
        MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
        ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MySensor.h:145:2: note:   no known conversion for argument 1 from 'uint8_t {aka unsigned char}' to 'MyTransport&'
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MySensor.h:136:7: note: MySensor::MySensor(const MySensor&)
       class MySensor
             ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MySensor.h:136:7: note:   candidate expects 1 argument, 2 provided
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In member function 'void MyGateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void (*)(char*))':
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:41:20: error: 'setupRepeaterMode' was not declared in this scope
        setupRepeaterMode();
                          ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:78:39: error: 'setupRadio' was not declared in this scope
        setupRadio(paLevel, channel, dataRate);
                                             ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:79:36: error: 'BASE_RADIO_ID' was not declared in this scope
        RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID);
                                          ^
      C:\Users\Sebastiaan\Documents\Arduino\libraries\MySensors\MyGateway.cpp:81:23: error: cannot call member function 'void RF24::startListening()' without object
        RF24::startListening();
                             ^
      Error compiling.
      
        This report would have more information with
        "Show verbose output during compilation"
        enabled in File > Preferences.
      

      And the sketch

      #include <Adafruit_NeoPixel.h>
      #ifdef __AVR__
        #include <avr/power.h>
      #endif
      
      // MySensors
      #include <MySigningNone.h>
      #include <MyTransportNRF24.h>
      #include <MyHwATMega328.h>
      #include <MySensor.h>
      #include <SPI.h>
      
      MyTransportNRF24 radio(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
      MyHwATMega328 hw;
      MySensor gw(radio, hw);
      
      // Initialize leds
      #define ledPin 8
      #define numPixels 24
      
      Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, ledPin, NEO_GRB + NEO_KHZ400);
      
      int pinOff = 3;
      int pinWhite = 4;
      int pinRed = 5;
      int pinGreen = 6;
      int pinBlue = 7;
      int power = 0;
      
      void setup()
      {
        Serial.begin(9600);
        pinMode(pinOff, INPUT);
        pinMode(pinWhite, INPUT);
        pinMode(pinRed, INPUT);
        pinMode(pinGreen, INPUT);  
        pinMode(pinBlue, INPUT);
        strip.begin();
        
        // Turn light off
        strip.show();
        Serial.println("Led light ready");
        Serial.print("Power is: ");
        Serial.println(power);
      }
      
      void loop() {
        int off = digitalRead(pinOff);
        int white = digitalRead(pinWhite);
        int red = digitalRead(pinRed);
        int green = digitalRead(pinGreen);
        int blue = digitalRead(pinBlue);
        
        if(off == 0) {
          //Off button pushed
          Serial.println("Off button pushed");
          turnOff();
          delay(2000);
        }
        
        if(white == 0) {
          Serial.println("White button pushed");
          turnWhite();
          delay(2000);
        }
        
        if(red == 0) {
          Serial.println("Red button pushed");
          turnRed();
          delay(2000);
        }
        
        if(green == 0) {
          Serial.println("Green button pushed");
          turnGreen();
          delay(2000);
        }
        
        if(blue == 0) {
          Serial.println("Blue button pushed");
          turnBlue();
          delay(2000);
        }
      }
      
      void turnOff() {
        Serial.println("Turning lights of");
        strip.setBrightness(0);
        strip.show();
      }
      
      void turnWhite() {
        Serial.println("Setting light to white");
        for(int i=0;i<numPixels;i++) {
          strip.setPixelColor(i, 255, 255, 255);
        }
        strip.setBrightness(255);
        strip.show();
      }
      
      void turnRed() {
        Serial.println("Setting light to red");
        for(int i=0;i<numPixels;i++) {
          strip.setPixelColor(i, 255, 0, 0);
        }
        strip.setBrightness(255);
        strip.show();
      }
      
      void turnGreen() {
        Serial.println("Setting light to green");
        for(int i=0;i<numPixels;i++) {
          strip.setPixelColor(i, 0, 255, 0);
        }
        strip.setBrightness(255);
        strip.show();
      }
      
      void turnBlue() {
        Serial.println("Setting light to blue");
        for(int i=0;i<numPixels;i++) {
          strip.setPixelColor(i, 0, 0, 255);
        }
        strip.setBrightness(255);
        strip.show();
      }
      
      
      posted in Troubleshooting
      sebas
      sebas
    • RE: MySensors 1.5 Released

      Very nice. How do I find out how the new sensor types work? Specifically the RGB and RGBW sensors.
      I've browsed through the source code but haven't found it yet. What file should I be looking into?

      posted in Announcements
      sebas
      sebas
    • RGB control

      Is there an rgb control node type in the API? Just browsed through the API documentation and couldn't find it. I've got some neopixels I would like to control through mysensors. The dimmer and switch type allow me to switch the light on/off and dim them but would be nice if I'd be able to control the RGB colors.

      posted in Development
      sebas
      sebas
    • RE: Dimmer doesn't appear in devices

      Did you enable Domoticz to detect new hardware? It's the default setting but you can turn of the auto inclusion.

      posted in Domoticz
      sebas
      sebas