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
  1. Home
  2. Hardware
  3. 110v-230v AC to Mysensors PCB board

110v-230v AC to Mysensors PCB board

Scheduled Pinned Locked Moved Hardware
269 Posts 63 Posters 270.9k Views 68 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OitzuO Offline
    OitzuO Offline
    Oitzu
    wrote on last edited by Oitzu
    #52

    @DrJeff said:

    Just Kidding I need to get my dimmers working properly also. You got the zerocross working right? 220v 110v? share sketch? will yours work locally with gateway off?

    Yes the zerocrossing is working right. Shouldn't working with gateway off only be a matter of programming? ^^
    Built vor 220V, but should also run at 110V (with different resistors), need to check the specifications of the combonents again to verify that.

    I got no working MySensors sketch or a drawn pcb layout yet, but i can describe how it works.
    Left connectors are (up to down): LOAD: Phase, Neutral; Source: Neutral, Phase
    Right connectors are (up to down): GND, PWM Output, Zero-Crossing Input, VCC

    The Zerocrossing detection is done by the bridge rectifier and the zerocrossing detection module 4N25.
    The Signal goes to a INT-Pin of an arduino.

    In a test sketch i use a timer and the interrupt to do the correct pwm output.
    The pwm output goes to the MOC3021 (Opto) that will fire the TRIAC seen left from it.

    Little test sketch:

    #include  <TimerOne.h>
    
    //Config
    int INTPin = 0;
    int outputPin = 11;
    int dimLevel = 64; // Dim level (0(on)-128(off))
    int freqStep = 75; //50Hz, should be 65 for 60Hz
    
    //Global
    volatile int i=0; // Counter. Only fire if i >= dimLevel
    volatile boolean zeroCross=0;
    
    void setup() {                                      
      pinMode(outputPin, OUTPUT);
      attachInterrupt(INTPin, zero_cross_detect, RISING);
      Timer1.initialize(freqStep);
      Timer1.attachInterrupt(dim_check, freqStep);                                           
    }
    
    void zero_cross_detect() {    
      zeroCross = true;
      i=0;
      digitalWrite(outputPin, LOW);
    }                                 
    
    void dim_check() {                   
      if(zeroCross == true) {              
        if(i>=dimLevel) {                     
          digitalWrite(outputPin, HIGH);
          i=0;
          zeroCross = false;
        } 
        else {
          i++;                    
        }                                
      }                                  
    }                                   
    
    void loop() {                        
    }
    
    DrJeffD 1 Reply Last reply
    0
    • A aproxx

      @scalz Yeah usually I'm going for 45 degree angles as well, but I guess I just forgot for those few. However I do have full confidence in Dirty PCBs, so I'm sure there wouldn't be any disruptions in the trace.

      Regarding trace thickness/width: I've been doing some calculations as well, but with 1oz copper traces I would need extremely wide traces to come up with a decent copper volume. So my plan is to solder a thin wire at the bottom side of the PCB between the AC connection points. That's why I've got the AC and 5v DC circuits separated as much as possible. :)

      But thanks for the feedback anyway! And congrats on taking the first step of ordering the board! I'll be doing the same tomorrow.

      J Offline
      J Offline
      jemish
      wrote on last edited by
      #53

      @aproxx If I want to buy this module then.........
      If you sell this module then I am ready to buy ...

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aproxx
        Hero Member
        wrote on last edited by aproxx
        #54

        @jemish I've made some minor changes to the board (nothing functional has been changed, just some updated silk screen and modified the 90 degree angles to 45 degree angles.)

        Please be aware that at this moment the board still isn't confirmed to be working. If you want to be 100% sure everything works properly, I strongly advise to wait for another 5-7 weeks. That way I can assemble the board myself and confirm everything is working as expected.

        J 1 Reply Last reply
        0
        • J Offline
          J Offline
          jemish
          wrote on last edited by
          #55

          yes I like to wait for your responce.
          please reply fast as possible.

          1 Reply Last reply
          0
          • OitzuO Oitzu

            @DrJeff said:

            Just Kidding I need to get my dimmers working properly also. You got the zerocross working right? 220v 110v? share sketch? will yours work locally with gateway off?

            Yes the zerocrossing is working right. Shouldn't working with gateway off only be a matter of programming? ^^
            Built vor 220V, but should also run at 110V (with different resistors), need to check the specifications of the combonents again to verify that.

            I got no working MySensors sketch or a drawn pcb layout yet, but i can describe how it works.
            Left connectors are (up to down): LOAD: Phase, Neutral; Source: Neutral, Phase
            Right connectors are (up to down): GND, PWM Output, Zero-Crossing Input, VCC

            The Zerocrossing detection is done by the bridge rectifier and the zerocrossing detection module 4N25.
            The Signal goes to a INT-Pin of an arduino.

            In a test sketch i use a timer and the interrupt to do the correct pwm output.
            The pwm output goes to the MOC3021 (Opto) that will fire the TRIAC seen left from it.

            Little test sketch:

            #include  <TimerOne.h>
            
            //Config
            int INTPin = 0;
            int outputPin = 11;
            int dimLevel = 64; // Dim level (0(on)-128(off))
            int freqStep = 75; //50Hz, should be 65 for 60Hz
            
            //Global
            volatile int i=0; // Counter. Only fire if i >= dimLevel
            volatile boolean zeroCross=0;
            
            void setup() {                                      
              pinMode(outputPin, OUTPUT);
              attachInterrupt(INTPin, zero_cross_detect, RISING);
              Timer1.initialize(freqStep);
              Timer1.attachInterrupt(dim_check, freqStep);                                           
            }
            
            void zero_cross_detect() {    
              zeroCross = true;
              i=0;
              digitalWrite(outputPin, LOW);
            }                                 
            
            void dim_check() {                   
              if(zeroCross == true) {              
                if(i>=dimLevel) {                     
                  digitalWrite(outputPin, HIGH);
                  i=0;
                  zeroCross = false;
                } 
                else {
                  i++;                    
                }                                
              }                                  
            }                                   
            
            void loop() {                        
            }
            
            DrJeffD Offline
            DrJeffD Offline
            DrJeff
            wrote on last edited by
            #56

            @Oitzu
            I seem to get all this working outside of MYSensors but I have very limited cut and paste ability in code. :) So what I was wondering do you have the sketch for controlling the dimmer and just firing the triac integrated with MYSensors yet?

            1 Reply Last reply
            0
            • A aproxx

              @jemish I've made some minor changes to the board (nothing functional has been changed, just some updated silk screen and modified the 90 degree angles to 45 degree angles.)

              Please be aware that at this moment the board still isn't confirmed to be working. If you want to be 100% sure everything works properly, I strongly advise to wait for another 5-7 weeks. That way I can assemble the board myself and confirm everything is working as expected.

              J Offline
              J Offline
              jemish
              wrote on last edited by
              #57

              @aproxx so now, what is the progress??
              we will wait for your response.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aproxx
                Hero Member
                wrote on last edited by
                #58

                @jemish
                All components are at my desk at the moment. The only thing missing is.. The PCB itself. :)
                DirtyPCBs' website states that the board was shipped to me at August 24. My packets from China usually arrive about 2 or 3 weeks after they have been sent from China, so I expect it to arrive somewhere next week.
                After the boards have arrived I'll make sure to have it assembled in less than a week. :)

                J 1 Reply Last reply
                0
                • A aproxx

                  @jemish
                  All components are at my desk at the moment. The only thing missing is.. The PCB itself. :)
                  DirtyPCBs' website states that the board was shipped to me at August 24. My packets from China usually arrive about 2 or 3 weeks after they have been sent from China, so I expect it to arrive somewhere next week.
                  After the boards have arrived I'll make sure to have it assembled in less than a week. :)

                  J Offline
                  J Offline
                  jemish
                  wrote on last edited by
                  #59

                  @aproxx please upload new design new that you make now.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    aproxx
                    Hero Member
                    wrote on last edited by
                    #60

                    @jemish : The design which I've posted 2 weeks ago (A few posts above this one) is the latest design I have.

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jemish
                      wrote on last edited by
                      #61

                      but, you said that you want to change something like 45 degree or 90 degree, so that ....

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        aproxx
                        Hero Member
                        wrote on last edited by
                        #62

                        @jemish : Yes, but that's already included in the design which I posted above.

                        J 2 Replies Last reply
                        0
                        • A aproxx

                          @jemish : Yes, but that's already included in the design which I posted above.

                          J Offline
                          J Offline
                          jemish
                          wrote on last edited by
                          #63

                          @aproxx can you make design for 2- relay board....

                          1 Reply Last reply
                          0
                          • A aproxx

                            @jemish : Yes, but that's already included in the design which I posted above.

                            J Offline
                            J Offline
                            jemish
                            wrote on last edited by
                            #64

                            @aproxx so, now what is the progress....we are waiting your response.....

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              aproxx
                              Hero Member
                              wrote on last edited by
                              #65

                              I received the newly designed PCB last weekend, and have been soldering/testing the board since it arrived. Just a few minor changes to the layout (not the schematic) and the board should be completely finished! So far the results look promising.
                              @jemish: I'm currently re-working the design a bit and working on documentation, but I'll make sure to post the new and completely finished design by the end of the week!

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                aproxx
                                Hero Member
                                wrote on last edited by aproxx
                                #66

                                As promised, I've got an update for this project. The board has been tested in the past week, and everything is working as expected. Compared to the previous board I've posted, I have updated the following:
                                • Solder pads of LE33CZ have been placed a little wider apart to avoid short circuit while soldering.
                                • Solder pads of the resettable fuse (Fuse2) has been placed closer together to better fit the fuses of the BOM.
                                • Moved the NRF24L01 connector a bit away from the solid state relay. Should make it easier to solder.
                                • Moved Fuse2 to another location on the board, away from the 230v circuit.

                                Some 3D pictures (Top and bottom):
                                Top.png
                                Bottom.png

                                Anyone who is interested can order the PCB HERE

                                Some documentation, and all gerber / DipTrace files (in case you would like to make some modifications) can be found here: MySensors board v3.2.3.zip.

                                YveauxY AWIA S 3 Replies Last reply
                                4
                                • S Offline
                                  S Offline
                                  shabba
                                  wrote on last edited by
                                  #67

                                  I just ordered 20. Can't think what I will need them all for but better to be looking at them than looking for them :-)

                                  Great work! Thanks!

                                  1 Reply Last reply
                                  0
                                  • A aproxx

                                    As promised, I've got an update for this project. The board has been tested in the past week, and everything is working as expected. Compared to the previous board I've posted, I have updated the following:
                                    • Solder pads of LE33CZ have been placed a little wider apart to avoid short circuit while soldering.
                                    • Solder pads of the resettable fuse (Fuse2) has been placed closer together to better fit the fuses of the BOM.
                                    • Moved the NRF24L01 connector a bit away from the solid state relay. Should make it easier to solder.
                                    • Moved Fuse2 to another location on the board, away from the 230v circuit.

                                    Some 3D pictures (Top and bottom):
                                    Top.png
                                    Bottom.png

                                    Anyone who is interested can order the PCB HERE

                                    Some documentation, and all gerber / DipTrace files (in case you would like to make some modifications) can be found here: MySensors board v3.2.3.zip.

                                    YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by
                                    #68

                                    @aproxx I guess you use a different Arduino Pro Mini as the one in the 3D view, because its row of pins pointing towards us seems to get awfully close to the mains coming from "Power in", right?

                                    http://yveaux.blogspot.nl

                                    DrJeffD A 2 Replies Last reply
                                    0
                                    • YveauxY Yveaux

                                      @aproxx I guess you use a different Arduino Pro Mini as the one in the 3D view, because its row of pins pointing towards us seems to get awfully close to the mains coming from "Power in", right?

                                      DrJeffD Offline
                                      DrJeffD Offline
                                      DrJeff
                                      wrote on last edited by
                                      #69

                                      @Yveaux
                                      I believe those are for the serial connection that usually are pointing up, or back for programing? It looks like they are just rendered as down in the 3D image? But I am curious how the clearance for the components on the other side (HLK) is when they are soldered, does it need some space off the board?

                                      1 Reply Last reply
                                      0
                                      • A aproxx

                                        As promised, I've got an update for this project. The board has been tested in the past week, and everything is working as expected. Compared to the previous board I've posted, I have updated the following:
                                        • Solder pads of LE33CZ have been placed a little wider apart to avoid short circuit while soldering.
                                        • Solder pads of the resettable fuse (Fuse2) has been placed closer together to better fit the fuses of the BOM.
                                        • Moved the NRF24L01 connector a bit away from the solid state relay. Should make it easier to solder.
                                        • Moved Fuse2 to another location on the board, away from the 230v circuit.

                                        Some 3D pictures (Top and bottom):
                                        Top.png
                                        Bottom.png

                                        Anyone who is interested can order the PCB HERE

                                        Some documentation, and all gerber / DipTrace files (in case you would like to make some modifications) can be found here: MySensors board v3.2.3.zip.

                                        AWIA Offline
                                        AWIA Offline
                                        AWI
                                        Hero Member
                                        wrote on last edited by
                                        #70

                                        @aproxx Could you share some photo's of the mounted board to get some feel or the 'real' thing? thanks

                                        1 Reply Last reply
                                        0
                                        • YveauxY Yveaux

                                          @aproxx I guess you use a different Arduino Pro Mini as the one in the 3D view, because its row of pins pointing towards us seems to get awfully close to the mains coming from "Power in", right?

                                          A Offline
                                          A Offline
                                          aproxx
                                          Hero Member
                                          wrote on last edited by
                                          #71

                                          @Yveaux: I'm using the standard Arduino Nano, but I agree that the 3D view looks a bit worrying. In real life it isn't needed to solder this row of pins to the Arduino, so it should be safe. So the assumption of @DrJeff is correct!
                                          The only reason why these pins look connected to the board is because I couldn't find a 3D design of the Arduino nano without these 6 pins soldered. :)
                                          But thanks for pointing this out, I'll add it to the documentation to make sure people aren't getting confused.

                                          @AWI: I'll try and see if I can take some decent pictures when I get home (in approximately 12 hours) and post them up here!

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

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