You need to use EasyEDA editor to create some projects before publishing
interference problems
1871 28
franco tizi 3 years ago
Goodmorning everyone, after spending months creating a "Universal" PCB (at least for me) successfully testing every single HW and SW block (including management of up to 8 lights with buttons and 8 separate actuators, as well as various sensors, interfacing with Alexa, Blynk , connection with other MCPs in the house via amplification / relaunch of the I2C, RTC, memory module, a management of the WiFi connection, etc. on the bench every part works fine, but as soon as I connect the house power supply to 220 it locks up, I noticed that the LEDs in parallel to the relay coils, when I connect the house power supply they light up slightly, maybe I realized the 220V home power supply tracks too close and / or overlapping those of the signals? If that is the problem, is there a way to remedy the cost of construction / shipping is not cheap? and also I have not made the ground plan, problem? Thanks for your attention the part with the largest tracks is where the 220V passes sorry for my english [https://oshwlab\.com/base222222/quadro\-v3\_copy\_copy](https://oshwlab.com/base222222/quadro-v3_copy_copy)<br> <br> [https://easyeda\.com/editor\#id=\|97a38746a7124e4781b8bd4082936d7d\|ad2a020dbe324cb2991e4f2b715e07ee](https://easyeda.com/editor#id=|97a38746a7124e4781b8bd4082936d7d|ad2a020dbe324cb2991e4f2b715e07ee)<br> <br>
Comments
andyfierman 3 years ago
It is difficult to know where to start to try to help you. You have no Design Requirement Specification. You have no "How it Works" description. You have no power supply decoupling capacitors anywhere on the board. It is unclear where power supplies enter the board. You have given no information on your mains power supply. You refer to "the part with the largest tracks is where the 220V passes" but all tracks seem to be similar widths. As you say, you have not used any ground or power planes. It looks like the PCB was Autorouted. The project you have made public appears to be an incomplete PCB with many ratlines showing many nets with incomplete connections: ![image.png](//image.easyeda.com/pullimage/Cm9xZ3VsZaKlLSzVsFxG6CEw0POfuZwu8hCIb5qb.png)
Reply
franco tizi 3 years ago
Thank you very much for the reply, I try to explain the specifics: sorry I was editing the card and it was incomplete, now it is updated. the buttons from 1 to 8 (CP2 ~ CP5), through the bridge with CP1, turn on the house lights, through the relays from 1 to 8 (CL1 ~ CL4), (220V power supply input from CLIN1) Instead the relays from 9 to 16 manage different loads and are activated by code (example; irrigation based on a time, opening garage door from Alexa, etc ..) the power supply of the board comes from the 12v U5 connector, I use a stabilized power supply. Could you please give me another feedback with this new info? I tried inserting ground planes but wasn't sure what I was doing so I didn't realize it :( Yes, I used Autorouted, I could not make this card without autorouted. Yes, I used the Autorouted, I don't have many skills on the correct realization of the PCBs, so I relied on the autoRouted
Reply
franco tizi 3 years ago
Good morning, I am trying in every way to be able to understand how the Autoroute works, (I must use it I cannot do it all by hand) but I cannot make him ignore the tracks I have made, he realizes them above mine that I have blocked or not connects them, can you please tell me which is the basic procedure to be able to combine the Autoroute with the manual creation of the tracks Thanks so much
Reply
andyfierman 3 years ago
Simply rebuilding your project by adding a ground plane and rerunning the autorouter will solve nothing. There are fundamental design problems in your project that have already been pointed out that you must address first. But before that you have to understand what you have to do before you ask anyone for any help on a project. If you want someone to help you with your project then the first thing you must do is imagine that you have to explain **everthing** about it to someone who knows **absolutely nothing** about it. It is no use vaguely talking about connecting it to the mains and controlling a Widget from a Wifi Thingummy to turn on a garage door with a bank of opto isolators, oh, and there's a bunch of relays. It is no use chatting about "...interfacing with Alexa, Blynk , connection with other MCPs in the house via amplification / relaunch of the I2C, RTC, memory module, a management of the WiFi connection, etc.".  Some people may know what you are talking about, a few may understand at a detailed level what may be required but very few if any may care enough to be prepared to help you. You know what you mean because you have been working on this for weeks but sure as heck no one else will have a clue. You have to be **detailed**, you have to be **specific** and you have to be **clear**. First you need to write down a detailed Design Requirements Specification: What are your aims with it? What do you want to achieve with it? What problem does it solve? How does it solve that problem? Describe the inputs and outputs. Describe the loads. Define the power supply parameters. Define the load parameters. Define the control parameters. Describe how it is to be controlled. Define the project environmental requirements (e.g. where will it be used, dimensions, operating and storage temperature, humidity, altitude, EMC requirements etc.) <br> If you are asking for help with a project that is already in design or is already built then you must write down a How It Works document: Break it down into unexplainable, understandable blocks. Explain what part of the problem each block solves. Explain in general what the function of each block is. Then explain in detail how each block achieves that function. Be specific in your explanations when referring to the function of each component in that block. Make sure your explanations are clear and to the best of your knowledge, correct. Be prepared to answer questions in timely manner and in a detailed, specific and clear way. If you ask a question, be prepared to pay attention to the answer. Be prepared to act on advice given to you, particularly if it involves effort on your part, such as reading topics that you may be referred to, in order to aid your understanding. Be prepared to accept - and to act positively in response to - criticism. <br> <br>
Reply
franco tizi 3 years ago
ok, I'm getting ready to write the detailed specifications, which I really care about this project, thanks again for the input
Reply
franco tizi 3 years ago
as they advised me, I insert some specifications, I hope you understand: The aim of the project is the creation of a board that can control up to 8 light bulbs (using the buttons installed at home) and have 8 relays available to control various loads, in general the board consists of; 1) Voltage regulator module via LM1085 2) External Display Connector 3) Display backlight driving circuit 4) Lights management 5) Automation Management 6) I2C amplifier circuit 7) Section ESP32 8) H2O sensor 9) East_I2c 10) PZEM energy meter 11) Buzzer 12) External conn 13) PIR 14) I2C address 15) RtC 16) AHT10 sensor 17) DHT22 sensor 18) Alarm in progress 19) Cycle Led \-\-\-\-\-in detail\-\-\-\-\- Block 1: From connector U5 there is a 12V or 5V power supply (coming from a stabilized power supply) connector H1 will position itself according to the input voltage Block 2: An external display is provided, the ILI9354ddd or the 956as13d and the brightness of this display is controlled by block 3. Block 4: Here are the 8 relays that will drive the house lights, the reference voltage is 220V, for an absorption that does not exceed 50 ~ 70 Watts The CNY1 and CNY2 opto isolators isolate the voltage coming from the contact of the buttons connected between CP1 and CP2 ~ CP5, from the board, then through the output signal from the opto isolators the MCP23017 is piloted which in turn activates the ULN2804A door. which in cascade activates the connected relays. Block 5: Here are the 8 relays that will drive the loads connected to them, the reference voltage is 220V, for an absorption that does not exceed 1,000 Watts The operation is similar to block 4, but in this case the relays will not be activated by the buttons but by code from the ESP32 Block 6: It is a circuit to amplify the I2C signal (which was created to be used over very short distances, in the order of Centimeters) and thus be able to reach greater distances (I have successfully tested it up to 30 meters), this circuit and identical for both the transmitting and the receiving part, therefore this module can be both RX and TX. Block 7: Here the heart of the system, an ESP32 is powered through the 5V on the Vin pin, it also integrates the WiFi the simplest method to program it is with Arduino IDE. Block 8: Connection with the DS18B20 sensor I wrote H2O because I connect it to the hot water production system and activate / deactivate the boiler Block 9: External connection for the I2C bus Block 10: Connection with PZEM-004T sensor Block 11: Connection with an external buzzer, for any use Block 12: Connection with two spare IO pins, for any use: Block 13: Connection to a proximity sensor, for the automatic management of the switching on of a light bulb or other uses, always with presence detection Block 14: Jumper to set the addresses of the two MCP23017 Block 15: Connection with a DS3231 RTC, for storing and managing the time, previously read by an NTP server Block 16: Connection with sensorAHT10 (temperature) Block 17 Connection with sensorDHT22 (temperature and humidity) Block 18: My dedicated use, I take the output of the 12V alarm siren in my home and with that I close the relay contacts and activate an alarm on my mobile phone Block 19: To monitor the activity of the ESP32, connected with an external LED, it flashes according to the cycle speed. the code I have already written and tested, can I insert it ? good evening
Reply
andyfierman 3 years ago
Please draw boxes or lines in your schematic and in your PCB to show where the blocks are. Please do this in the schematic and PCB for the board as it is in the state that you have built and are testing now. Not as they may have been changed since then. Please post the url to this as a public project and do not edit it further because otherwise people will not know what is changing or why. Please post more information about the 12V/5V "bench supply". Photos of how you have connected the board up in when testing separate blocks and the whole board would be helpful. Please also post links to the original manufacturer's datasheets for the LM1085, all of the sensors, processors and RTC
Reply
franco tizi 3 years ago
@andyfierman Please draw boxes or lines in your schematic and in your PCB to show where the blocks are.         - in the diagram I drew the boxes and assigned a reference number to all the blocks, in the PCB I can't the components are not grouped Please do this in the schematic and PCB for the board as it is in the state that you have built and are testing now. Not as they may have been changed since then.     - I'm sorry but I overwrote the old versions, I made some mistakes on the initial scheme and I corrected them on the current scheme (but they are really small things like an unconnected resistor etc.) however I want to clarify that all the tests of the single blocks have had positive result on the PCB I ordered, in fact I was able to test the board successfully, verifying its correct functioning, so all the blocks and their interconnections are perfectly functional, the problem is only when I connect the 220 V, in that case the system goes in block. Please post the url to this as a public project and do not edit it further because otherwise people will not know what is changing or why.     - is the initial link okay? ok I don't touch it anymore :) Please post more information about the 12V / 5V "bench supply". - it is a simple 12V or 5V 3A power supply, you can choose the power supply according to how the jumpers are set, I don't know what info I can give more <br> Datasheet [https://innovatorsguru.com/wp-content/uploads/2019/06/PZEM-004T-V3.0-Datasheet-User-Manual.pdf](https://innovatorsguru.com/wp-content/uploads/2019/06/PZEM-004T-V3.0-Datasheet-User-Manual.pdf) [https://www.alldatasheet.com/datasheet-pdf/pdf/228616/ETC2/LM1085.html](https://www.alldatasheet.com/datasheet-pdf/pdf/228616/ETC2/LM1085.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/575390/MAXIM/DS3231.html](https://www.alldatasheet.com/datasheet-pdf/pdf/575390/MAXIM/DS3231.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/1132459/ETC2/DHT22.html](https://www.alldatasheet.com/datasheet-pdf/pdf/1132459/ETC2/DHT22.html) [https://esphome.io/components/sensor/aht10.html](https://esphome.io/components/sensor/aht10.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/1148023/ESPRESSIF/ESP32.html](https://www.alldatasheet.com/datasheet-pdf/pdf/1148023/ESPRESSIF/ESP32.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/81944/TEMIC/CNY74-4.html](https://www.alldatasheet.com/datasheet-pdf/pdf/81944/TEMIC/CNY74-4.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/195324/MICROCHIP/MCP23017.html](https://www.alldatasheet.com/datasheet-pdf/pdf/195324/MICROCHIP/MCP23017.html) [https://www.alldatasheet.com/datasheet-pdf/pdf/55062/ALLEGRO/ULN2804.html](https://www.alldatasheet.com/datasheet-pdf/pdf/55062/ALLEGRO/ULN2804.html) [https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf](https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf)<br> <br> <br> <br> Photos of how you have connected the board up in when testing separate blocks and the whole board would be helpful.     -I attach photos of the card but I can not do it of the field connections <br> good night <br> ![Scheda (1).jpeg](//image.easyeda.com/pullimage/GNfxO39U6UixXxrLMr0ZyqLa9OT8nb39wdupB9EI.jpeg) <br> <br> ![WhatsApp Image 2021-06-12 at 01.25.53.jpeg](//image.easyeda.com/pullimage/udplZ60ru3A5EN629FxdROldWQJRJg2tPLB8jH3w.jpeg)
Reply
andyfierman 3 years ago
"Please post more information about the 12V / 5V "bench supply". - it is a simple 12V or 5V 3A power supply, you can choose the power supply according to how the jumpers are set, I don't know what info I can give more." * Link to a datasheet? * Link to a supplier's product page? * Photo? * Is it a linear or a switched mode psu?
Reply
franco tizi 3 years ago
i tested this two power supplies -[https://www\.amazon\.it/gp/product/B01HRR9GY4/ref=ppx\_yo\_dt\_b\_search\_asin\_title?ie=UTF8&psc=1](https://www.amazon.it/gp/product/B01HRR9GY4/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) [https://www\.amazon\.it/Alimentazione\-25W\-5V\-MeanWell\-RS\-25\-5/dp/B00MWQDAMU/ref=sr\_1\_6?adgrpid=52187762866&dchild=1&gclid=CjwKCAjwtpGGBhBJEiwAyRZX2jCU4B\_Ji5HLB25eGASlohalGI9f9zNHm\_ootCZCfnT93\_9B\-EgaSBoCINYQAvD\_BwE&hvadid=255138416854&hvdev=c&hvlocphy=1008736&hvnetw=g&hvqmt=e&hvrand=14122190048844821969&hvtargid=kwd\-340965598476&hydadcr=28840\_1805471&keywords=alimentatore\+switching\+5v&qid=1623490526&sr=8\-6](https://www.amazon.it/Alimentazione-25W-5V-MeanWell-RS-25-5/dp/B00MWQDAMU/ref=sr_1_6?adgrpid=52187762866&dchild=1&gclid=CjwKCAjwtpGGBhBJEiwAyRZX2jCU4B_Ji5HLB25eGASlohalGI9f9zNHm_ootCZCfnT93_9B-EgaSBoCINYQAvD_BwE&hvadid=255138416854&hvdev=c&hvlocphy=1008736&hvnetw=g&hvqmt=e&hvrand=14122190048844821969&hvtargid=kwd-340965598476&hydadcr=28840_1805471&keywords=alimentatore+switching+5v&qid=1623490526&sr=8-6)<br> <br>
Reply
andyfierman 3 years ago
Can you post some drawings to show how you connected up the bench supply to the board while you were testing the separate blocks and also how it and the 220V supply was connected when you found that the board locked up? Please clearly mark Live, Neutral and all earth and low voltage supply connections. When you have done that hopefully some more people can help you out.
Reply
andyfierman 3 years ago
@base222222, I have had a look at your schematic and have found a number of things you need to correct but without some drawings to show how you have connected the external components, it is not possible to give any further advice about what may be causing the problem. Have you tried disconnecting external components to see if there is a minimum configuration that can be made to work? Then add more external connections in different combinations to try to identify what breaks it?
Reply
franco tizi 3 years ago
thanks for your interest, but perhaps I have not been able to explain the problem well, as I have already said the card works well with all external connections (sensors and more) the connections are intuitive, practically the DS3231 must only be plugged into the socket, as well as but microcard, and the other sensors have a dedicated connector with the polarity and the bus well identified on the serigraphy, so it is not possible to be wrong, the problem is that as soon as I put the 220V (which is only needed to turn on the lights) on the CLIN connector the card is reset, the problem I am sure is due to the incorrect spacing of the tracks, which are superimposed with those of the signals, that was the help I was asking, drawing the tracks separating them correctly, now I have redesigned the card and rearranged just this morning , thank you that you pointed out to me about the mandanza of the coupling capacitor, and the ground plane (which I added both), and other things (like cond ensators on the output of the MCP and diodes in antiparallel on the relay coil) and I have separated the tracks in an (I hope) optimal way, I have worked on them for many hours since the first post. I am attaching an updated project. [https://oshwlab\.com/base222222/quadro\-v3\_copy\_copy](https://oshwlab.com/base222222/quadro-v3_copy_copy) [https://easyeda.com/editor#id=859f75783b004eb2812994143d07ec18](https://easyeda.com/editor#id=859f75783b004eb2812994143d07ec18)<br> <br> <br> <br>
Reply
Markus_ee 3 years ago
Hi! I just took a quick glance of your project. There is aaaalot of stuff that needs fixing just what Andy has pointed out and making a schematic more readable is the first step. I recommend using English on all blocks so that everyone understands the meaning and function of every building block. You can take some examples from my own open projects. Regards, Markus Virtanen HW / Electronics Designer
Reply
andyfierman 3 years ago
@base222222, Debugging EMC/Signal Integrity problems (which is what you have) is not a simple process. You should not assume just because the whole board worked until you connected the 220V mains that it is therefore the 220V connection that is the cause of the problem. It is possible that it will work with 220V connected but some of the external connections removed. You need to be methodical and, as I was trying to suggest, try out different board configurations. People test to see if something works but very few people test to see just how close their design is to not working. If your board falls over because you have connected 220V and 50Hz to it then it has no chance of surviving any of the other things that it will be exposed to like the effects of nearby lightning strikes, passing taxi radios, noise on the mains from your own switch mode mains PSU or cheap and nasty wall wart PSUs and so on and on... As Markus_ee has also pointed out, there are a number of things that you need to improve before you are likely to have a second spin that is any better than the first. You do not need to add flyback diodes across the relays because the relay drivers have them built in although moving the drivers closer to the relays that they are driving would help. The ground plane area that you have added is doing little to help because you have not tried to optimise the routing to maximise the ground plane ontegirty (it is very broken up and has floating areas that do not connect with the main plane area). Ground plane with only 2 layers is always hard to make effective but it can be done. The auto routing is making unnecessary layer swaps many of which could be avoided by carefgul manual routing. Doing that could significantly improve the ground plane integrity. Adding a 5V plane to the other would help too by removing the need to explicitly track 5V to each device. Although more expensive, going to a 4 layer board with dedicated ground and 5V planes on the inner layers or maybe even both inner layers set to ground plane is worth considering. Paying for someone to do the design for you is another option. You also need to make better use of the Schematic and PCB Design Managers. For example at the moment, there's a short on the 5VJPR net: ![image.png](//image.easyeda.com/pullimage/wphgLvLLKHuh6rnfwkLwJ8iwSNnsNA31RzL9mIi9.png) Connecting the #RESET pins on the ESP32s through an RC pullup network rather than directly to 5V may be a good plan.
Reply
andyfierman 3 years ago
"...to maximise the ground plane ontegirty..." Correction: "...to maximise the ground plane **integrity**..." More things to consider about your board. This board is being used to control lights and maybe other things around the house. How sure are you that it is not going to falsely trigger when and turn all your lights on just after you leave the house for a weeks holiday (when you can do things like that again!) during a thunderstorm. Or maybe turn them all off just as you are coming down the stairs one night because someone has plugged in a poorly filtered laptop mains adapter (I have one that wipes out our wifi hub)? :)
Reply
franco tizi 3 years ago
thanks for the answers and for the hints and also for pointing out an error, "" there is a short on the 5VJPR network: "" I will have to cut the track :() but here when you say "" The connection of the #RESET pins on the ESP32 via an RC pullup network instead of directly to 5V can be a good plan. "" This I did not understand. then you are right, but this is a hobby for me, not a job, and paying another to make the card would take away my taste for the realization, however for years my home has been managed with these cards, (attached the system I am replacing and it has worked perfectly for years) and the card that gives me problems look at the second photo, it could never have worked, (in the large tracks the 220V passes, in the small ones the signals) ... @Markus_ee Thanks a lot to you too, I'm learning :) ![WhatsApp.jpeg](//image.easyeda.com/pullimage/5JDTb7y6S99y7MutYVDgtsE5pSIoylpplM1ZBofa.jpeg) <br> ![Cattura.JPG](//image.easyeda.com/pullimage/93quMLOjxqbEAxMIHRQJUd186vGOrQTzqCqhPxZO.jpeg)
Reply
franco tizi 3 years ago
@[Markus_ee](https://easyeda.com/markus_jidoka) I look your project for example "" LM3886T\_ComboCat\_Amplifier\_v2\.0 "" and I'm envious :\) but the tracks in autoroute or in manual ?
Reply
franco tizi 3 years ago
Hello everyone, the new board now works, but the design deficiencies are present :( the WiFi connection of the ESP32 is not very stable, due to interference present on the board, in fact if I try to remove the ESP from the PCB the WiFi is stable , the copper area creates these interferences? was it better not to integrate it?
Reply
andyfierman 3 years ago
The antenna for the ESP32 needs to be in free space, away from planes and tracks. If this still represents your PCB: [https://oshwlab\.com/base222222/quadro\-v3\_copy\_copy](https://oshwlab.com/base222222/quadro-v3_copy_copy)<br> <br> then the antenna is obscured by tracks and bits of ground plane. The tracks will also pick up RFI when the ESP32 transmits. Moving the module so that the antenna is off the edge of the board would help.
Reply
franco tizi 3 years ago
yes, the card is that, and I imagined that it could be this, but it means to redo and buy the card again :( could I solve it with an iron plate under ESP connected to ground?
Reply
andyfierman 3 years ago
I said: "The antenna for the ESP32 needs to be in free space, away from planes and tracks." You said: "... could I solve it with an iron plate under ESP connected to ground?" What do you think? You could try covering the bottom layer of the board with plastic film and then  copper tape connected to ground but clear of the mains voltage areas. That may reduce any RFI from the ESP32 antenna to the rest of the board but it may also significantly reduce the TX range and RX sensitivity of the wifi.
Reply
andyfierman 3 years ago
Desolder the ESP32  and put it on long headers to lift it off the board. You may notice that in you original wired up prototype, the ESP32 is rotated 180 degrees and the antenna is at one edge of the box with respect to you PCB.
Reply
franco tizi 3 years ago
thanks for the advice, I'll try the options you have proposed, have a nice day
Reply
franco tizi 3 years ago
@[andyfierman](https://easyeda.com/andyfierman) For info, The iron plate under (and around) the chip has partially solved the RFI problem, however I am designing a new PCB with two ESPs for the reason that it is currently a bit slow, at least I separate the tasks, and also I have already purchased the ESP (32U) with external antenna so I definitively solve the problem of RFI Ciao
Reply
franco tizi 3 years ago
however, despite a minimum of slowness (about 0.5 "delay in turning on the lights, but I really put everything in the code) everything works perfectly :)
Reply
andyfierman 3 years ago
@base222222, Thanks for posting back. Glad it's all working for you now.
Reply
Markus_ee 3 years ago
"[franco tizi](https://easyeda.com/base222222) 2 months ago @[Markus_ee](https://easyeda.com/markus_jidoka) I look your project for example "" LM3886T\_ComboCat\_Amplifier\_v2\.0 "" and I'm envious :\) but the tracks in autoroute or in manual ?" I always do manual routing :-) -Markus
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice