💬 Simple AC/DC Switch WeMos




  • Mod

    Is it going to be like a sonoff wifi relay?



  • That's correct. Except IMHO, safer with the fuses and clearly more flexible. Once you stack a relay we should be less than one inch tall. This board is 72.3mm x 40.3mm. I did not use screw terminals because I think it is safer to solder a 16 gauge stranded wire to the PCB as a pigtail for line and neutral connection. The GPIO and GND for the switch will also be soldered using solid 18 or 20 gauge wire. My vision is to use heatshrink tubing to encase and protect the unit and filling each end with hot glue. I think I got the idea from someone on this forum. I would love to do a box, but have no experience in that area not to mention a 3d printer.

    Any feedback on the eagle files and PCB?


  • Mod

    IMHO you should consider the screw terminals



  • Anyone have a recomendation on a US based PCB fabricator.? I don't want to wait 4-6 weeks for dirty PCB. thx


  • Hardware Contributor

    Hello,

    I had a quick look at the PCB and I think you should have capacitors at the output of the hlk as it can be quite noisy.
    You also have some right angles in the traces at the top of the PCB, you should change to 2*45° angles.



  • Thanks. I've removed the 90* traces and added a 100uf capacitor to the 5v output. @ Nca78 you said "capacitors" as in plural,, are you saying I should have 2 capacitors in series? 100uf capacitor good?


  • Hardware Contributor

    @Jonathan-Roberts said in 💬 Simple AC/DC Switch WeMos:

    Thanks. I've removed the 90* traces and added a 100uf capacitor to the 5v output. @ Nca78 you said "capacitors" as in plural,, are you saying I should have 2 capacitors in series? 100uf capacitor good?

    All in parallel between GND and VCC.
    I use 100uF + 4.7uF on my HLK nodes, it has proved efficient when using atmega/arduino, I'm not sure about ESP8266 but it should be good. As I said, you have space so you can put footprints for more caps and adjust values if your board is unstable.


  • Hardware Contributor

    I forgot also if you didn't change it yet. I would put a larger slot between the AC inputs of the HLK, the one you have made is really (too ?) thin.



  • @nca78 I tried to add a wider slot but I think something is off with my grid because I can't put the slot in the middle. Any ideas?


  • Hardware Contributor

    @Jonathan-Roberts said in 💬 Simple AC/DC Switch WeMos:

    @nca78 I tried to add a wider slot but I think something is off with my grid because I can't put the slot in the middle. Any ideas?

    Yes press the Alt button on your keyboard while you move, so you can use the alternate grid. If it's still not enough (but it should with default settings when you open the board editor) then change the settings in View ... Grid menu.



  • Sorry I haven't replied in a couple days I was at a college softball recruiting event with my daughter. So I have cleaned up the traces. A lot easier and cleaner now that I know the "Alt key" trick. I want to expose the Line and neutral so I can add tin to their traces. 100% overkill since we'll only be drawing about 3w @ 5v DC. So I moved them to the bottom, created polygons around them while in the bstop layer. I think I did this right however when I do a DRC check I get 144 errors if I have the tstop layer selected when running DRC. I just concerned I did something wrong. However using an online viewer it appears correct. If someone could take a look that would be awesome.

    I also...

    • shrunk the board down to 70mmx40mm.
    • added strain relief holes. I'll use these to create a loop for the wires before soldering. So, feed wire from bottom to top and then insert striped end into line and neutral inputs. IMHO this is much stronger than screw terminals and allows me to completely seal the unit by just allowing the pig-tails to be exposed. This also allows extremely simple installation.
    • cleaned up and added labels

    *** Any cheap and quick PCB recommendations

    Thanks for the help everyone!


  • Hardware Contributor

    @Jonathan-Roberts sorry I have never used the stop layers, I can't help you about that...
    But as you said it's overkill for low amperage, use a trace width calculator, taking the worst choice when you are not sure of an item, then use the suggested trace width and you don't need to worry about those layers. That's what I did with my only main powered PCB, I made sure I had at least the calculated width, and increased when it was possible.

    For the cheap PCB you can use Seeed, PCBWay or Elecrow, the 3 ask 5$ only for up to 10*10cm.
    With Elecrow you only have 5 instead of 10 for the others, but from my experience you rarely need 10 items of the first version of your PCB as you will quickly see some ways to improve it when it will be in your hands and in use.
    They produce PCB quickly (3-5 days) so the speed will depend on the shipment you chose.



  • @nca78 thanks for the FAB advise. I also decided to remove the stop layers. However I had to do a complete overhaul since stacking the Wemos and a relay was going to be too tall. My size still fits in most modern 1 Gang boxes @ 46mmx63mm. The new design has 2 Wemos sockets adjacent to each other. This allows the WeMos D1 mini in one socket and the relay in the other. As a bonus you can still stack other shields. Is it ok to trace the 3.3v and 5v from the D1 mini to the relay socket? I think this is coming along nicely thanks to all the great advise. Would you please give a quick look over. thx I think I'm going to order with easyEDA. Right now $2 + $9 shipping. hard to beat for a first run. thanks



  • I just thought of something... Can I panelize these? I get 100mm x 100mm. Is this just a matter of duplicating the layout and putting a cutout in the middle?


  • Hardware Contributor

    @Jonathan-Roberts I just checked EasyEDA and you can chose the "Panel by EasyEDA" option, if everything is less than 100*100mm (I suppose it means only 2 copies/PCB for you) then you will pay only 2$.
    EasyEDA is nice but with shipping cost it's not so cheap, over 10$ for first PCB and after that other PCBs cost 8$, and you have no option for color, thickness, etc...


  • Hardware Contributor

    I just had a look at your design and I'm afraid you'll have to change all your routing between wemos and relay.
    You cannot have tracks below the wifi antenna, this will make the radio reception extremely bad.
    Check the pins that are necessary for the relay board and only connect those to the wemos board (from the pictures it looks like you only need power + D1, but check it I'm not sure at all !). Then route them going around the antenna, staying as far as possible from it.



  • @nca78 bummer. So I think 2 options...

    1. What if the Wemos is raised off the PCB. That would be almost 5/8". In your experience would that help?
    2. And maybe the best option, slide the antenna module straight down,. move the relay up and spin it around so the connections are on the outside edge.
      I'm trying to make this multi-purpose and allowing both headers to be fully functional to other projects. thx for the advise.


  • Swapped position of Wemos and relay. no traces under antenna. Also spaced LINE and Neurtal pads for 5mm screw terminals. this way you ahve the choice to solder with strain loops or use screw terminals. Sending to PCB way after I panelize. Thx for all the help!


  • Hardware Contributor

    @Jonathan-Roberts said in 💬 Simple AC/DC Switch WeMos:

    @nca78 bummer. So I think 2 options...

    1. What if the Wemos is raised off the PCB. That would be almost 5/8". In your experience would that help?
    2. And maybe the best option, slide the antenna module straight down,. move the relay up and spin it around so the connections are on the outside edge.
      I'm trying to make this multi-purpose and allowing both headers to be fully functional to other projects. thx for the advise.

    1 would help but not that much. It's already not a good thing to have the transformer just next to it on the side, so you should avoid blocking one more direction with tracks.
    I don't understand your necessity to have connectors available for something else on the relay that is too high to put anything on top ?

    2 sounds like a much better option, make sure you have nothing right and left of the antenna when you move things around.
    The problem you will have with this layout is the USB in that situation...

    It doesn't sound like a great idea to me to use Wemos on this board especially for the relay part, it's just a cheap chinese relay with 3/4 components so why not just put them directly on you board to make the layout so much easier ?
    I have the feeling that you're trying to make things "easier" by using Wemos and its shields, but in the end you seem to lose more than you gain. And neither does it seem "safer" to use their relay shield as it forces you to have extra wires between main of the HLK and relay shield connector.



Suggested Topics

  • 8
  • 17
  • 14
  • 89
  • 18
  • 21
  • 10
  • 9

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts