Page 7 of 8 FirstFirst ... 5678 LastLast
Results 61 to 70 of 71

Thread: Help design new AC controller

  1. #61
    Join Date
    Apr 2020
    Posts
    62
    Post Thanks / Like

    Default Re: Help design new AC controller

    Nevermind, I do have enough pins. But I should skip the vcc on the header because the controller has its own power supply right?
    Last edited by Randomaker; 01-17-2021 at 06:18 PM.

  2. #62
    Join Date
    Apr 2020
    Posts
    62
    Post Thanks / Like

    Default Re: Help design new AC controller

    Schematic done, on to PCB design. Let me know if there is any problems I am missing before I get too far.Schematic_AC Light Controller_2021-01-19.pdf

  3. #63
    Join Date
    Dec 2011
    Location
    UK S80 postcode
    Posts
    1,518
    Post Thanks / Like

    Default Re: Help design new AC controller

    Hi, great work. With regard to the schematic, I offer the following points for your consideration:

    You may find you need something like a 10K pull up resistor on SCK and SDA. It is my understanding that I2C doesn’t source any current, only sinks which enables it to be use across multiple voltages with simple level shifters. You may be able to use the GPIO internal pull up resistors but they are not well documented and quite high values particularly when relied on where mains is being switched.

    https://ww1.microchip.com/downloads/..._Datasheet.pdf
    Page 173.


    SW1 connects outputs from the ATMega328 directly to ground. In my head it is always better when connecting to ground or a voltage source to use a resistor that will current limit according to the GPIO’s maximum current. The data sheet lists the ‘DC current per I/O pin’ as 40mA, if you are using 5V a resistance of 125 would prevent more than 40mA flowing in the event that the ATMega crashed or an unexpected sketch was loaded by mistake and this will prevent the GPIO's being overloaded.

    https://ww1.microchip.com/downloads/..._Datasheet.pdf
    Page 258 – 28.1 - DC current per I/O pin.


    R3, 4, 5 & 6 are not ideally suited to be SMD if that’s the way you are thinking of going. The regulation / advice varies from country to country. I’m UK and we need 6.3mm (1/4”) between Live and Neutral, not easy to do with SMD.

    LED 3 & 4 might be better as items that can be connected via a jumper for fault finding rather than being in circuit permanently. A red LED has a forward drop of about 2V, in series with a 220R resistor again at 5V this is going to draw about 15mA of current from the data line. The more units that are connected in series the greater the LEDs combined current draw will be on the data lines.

    These comments are offered from my personal collection of 101 things I did that didn’t go as expected. Wishing you every success with this and hoping to save you some time.

  4. #64
    Join Date
    May 2007
    Posts
    5,465
    Post Thanks / Like

    Default Re: Help design new AC controller

    I'm not going to do a detailed review, but one or two things that stick out.

    1) Pin 3 of the MAX485 (DE) needs to be tied low, not left floating.
    2) Placing LEDs and resistors on pins 6 and 7 of the MAX485 is not a good idea, bearing mind that there may be many of those in parallel if several boards are chained together. If you want a receive data LED indicator, put it on the other side of the MAX485.
    3) I think that you have fuses on the AC connections as they come into the board, but I can't be sure. There should be.
    4) Where do BUS2+ and BUS2- come from? I think that you meant for them to come from P2, but that's not what the schematic shows.
    5) I think that it would have been better to retain the components around the triacs that were shown in that video that you referenced in a post at the beginning of this thread. The components don't need to be installed, but having the option to install them might help in the future if flickering is encountered.
    6) I didn't see any bypass capacitors from +5v to ground. Did I somehow miss seeing them?
    7) The schematic is very hard to read, it would be a good idea to change it so that signal wires do not overlap with the components.
    Phil

  5. #65
    Join Date
    Apr 2020
    Posts
    62
    Post Thanks / Like

    Default Re: Help design new AC controller

    Thanks for the suggestions! Yes there are fuses, I already fixed the problem with bus 2 (It was supposed to be connected to P2) and I was assuming the power supply would already have all the filtering and such that I need? Its a HLK-5M05 power supply module, here is the datasheet.
    https://datasheet.lcsc.com/szlcsc/19...05_C209907.pdf
    I havent seen any pullup resistors in any of the diagrams I daw for using that pin expander, but Ill keep that in mind.
    Everything is tht, so spacing wont be a problem.

  6. #66
    Join Date
    Jan 2016
    Posts
    100
    Post Thanks / Like

    Default Re: Help design new AC controller

    Quote Originally Posted by Randomaker View Post
    I was assuming the power supply would already have all the filtering and such that I need? Its a HLK-5M05 power supply module, here is the datasheet.
    I use the same PS on my Renard controllers. I use the typical circuit shown in the datasheet for AC filtering and protection. They're not required but help protect the PS and smooth the output. I've used the HiLink's for the past 3 seasons and also use them in other non-blinky projects. They're more efficient than a linear PS and I don't want a switcher integrated with the controller. Having said that, you shouldn't need anywhere near 4A. My design requires 3A but it's doing more than controlling AC lights.

  7. #67
    Join Date
    May 2007
    Posts
    5,465
    Post Thanks / Like

    Default Re: Help design new AC controller

    Best practice is to place a bypass capacitor between power and ground leads of digital IC's as practical. The purpose of this is to reduce transient switching noise on the power leads to the part. A good choice would be a 0.1uF X7R capacitor in a radial lead package (as opposed to axial lead parts, which have greater series inductance due to the longer leads).

    Just as a note, this has nothing to do with the merits of the PS that you're using. The main factor, instead, is the inductance of the power and ground traces between the power supply and the various components. I suspect that you would never see any problem if you left these parts off, but the capacitors are cheap, and better safe than sorry.
    Phil

  8. #68
    Join Date
    Apr 2020
    Posts
    62
    Post Thanks / Like

    Default Re: Help design new AC controller

    The snubber in the circuit is only needed for inductive loads, so it won't help with flickering. There is something else sometimes called a snubber, its just a resistor in parallel with the lights. That can fix the flickering as well as ghosting in LED lights, so I may add an option for one of those.

  9. #69
    Join Date
    Apr 2020
    Posts
    62
    Post Thanks / Like

    Default Re: Help design new AC controller

    Does it need to be specifically an x7r? I should just be able to use basically any ceramic cap right?

  10. #70
    Join Date
    May 2007
    Posts
    5,465
    Post Thanks / Like

    Default Re: Help design new AC controller

    or z5u. But not, imo, terribly critical.
    Phil

Page 7 of 8 FirstFirst ... 5678 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •