Chat

Welcome to Flux

Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More

Explain project
Write a project description
Find schematic issues
Create a test plan
Simulate a circuit
Prepare for Manufacturing
Component Selection Workflow
New Subsystem Wizard
Write I2C initialization code
Generate firmware skeleton
U3
Not Recommended for New Designs
U2
U4
I want to have a ground net for the 220v power lines. Should i use a different G...

@copilot I want to have a ground net for the 220v power lines. Should i use a different GND net that the one used for the low voltage circuits?
2y
In electronic circuit design, it's crucial to differentiate between the grounding practices for different sections of a design, especially when dealing with high voltage (e.g., 220V AC mains) and low voltage (e.g., 5V DC) circuits. This distinction ensures safety, functionality, and adherence to applicable standards. Here are the reasons and recommendations:
Reasons for Separate Ground Planes
  • Safety: The most important reason to keep the AC mains ground separate from the low voltage (LV) ground is safety. Mixing the two can pose significant risks, including electric shock or inadvertently introducing high voltage into low-voltage parts of the circuit, potentially causing damage or even fires.
  • Noise and Interference: High-voltage AC lines can introduce noise into the low voltage DC circuits, especially if the grounds are shared. This can lead to erratic behavior or malfunction of sensitive electronics.
  • Regulatory Compliance: Certain standards and regulations may necessitate the separation of grounds for AC mains and low-voltage circuits. Compliance ensures that the design can be legally and safely deployed in its intended environment.
Recommendations
  • Separate Ground Nets: Design your circuit with distinct ground nets for the 220V AC and low voltage components. In schematic representation and PCB layout, these should be clearly identified as such, for example, AC_GND and DC_GND.
  • Ground Connection: While the AC and DC grounds should be kept separate on the board, they should ideally connect at a single point, typically at the power supply. This practice, known as "single-point grounding," minimizes the risk of ground loops which can introduce interference.
  • Isolated Power Supply: If your design powers the low voltage circuitry from the 220V AC, use an isolated power supply. This ensures that the two grounds are physically separated and prevents high voltage from reaching the low voltage parts of your circuit.
  • Physical Separation: When laying out your PCB, ensure there's a clear physical separation between the high voltage and low voltage sections. Place components and route traces in a way that minimizes any risk of arcing or interference. Using slots or moats in the PCB around high voltage traces can enhance safety.
Additional Safety Features
  • Fusing and Protection: Incorporate appropriate fusing on the AC main input to protect against overcurrent conditions. Also, consider using surge protection devices (SPDs) and/or a Metal Oxide Varistor (MOV) for transient suppression.
  • Clear Labeling: Clearly label the different sections and ground nets on both your schematic and the PCB. This helps in maintenance and avoids confusion during assembly or inspection.
By adhering to these recommendations, you ensure that your design is not only functional but also safe for users and compliant with regulatory standards.
2y
3
I want to make a power supply circuit using the HLK-20M05? Is anything missing?

@copilot I want to make a power supply circuit using the HLK-20M05? Is anything missing?
2y
To create a functional power supply circuit using the HLK-20M05, let's examine the components and their connections based on the information provided in your project. The HLK-20M05 is a compact switching power supply module that outputs 5V and can supply up to 20W of power, making it suitable for driving many small to medium-sized electronic devices.
Current Configuration
  • HLK-20M05 (PS1): It's already included in your project, with connections to AC mains (AC(L) and AC(N)) and outputs (+VO and -VO).
Required Components and Connections
To ensure safety and reliability, and based on standard practices for using the HLK-20M05, the following components and connections are recommended if they are not already included:
  1. Fusing:
    • Include a fuse on the AC input line for overcurrent protection. If F1 isn't assigned this role, it should be. Connect it in series with the AC(L) line of the HLK-20M05.
  2. EMI Filtering and Varistor:
    • EMI filtering on the AC input is important for reducing electromagnetic interference. This can be accomplished with a combination of capacitors and inductors, but specific components are not listed in your project details.
    • A varistor across the AC input lines (AC(L) and AC(N)) for surge protection is advisable. If Z1 is a metal oxide varistor (MOV), then it's correctly placed for this purpose.
  3. Electrolytic Capacitor on Output:
    • It appears you have C6 (220uF), which is good for smoothing out ripples on the DC output. Ensure it's connected across the +VO and -VO (GND) outputs of the HLK-20M05.
  4. Rectification and Smoothing (If Needed):
    • Since HLK-20M05 provides a DC output, additional rectification isn't required. However, the inclusion of smoothing capacitors, like C6 mentioned before, is necessary.
  5. Load Connections:
    • Ensure that the output (+VO and -VO) of the HLK-20M05 is correctly connected to your circuit's power input nets. In your schematic, +VO should be connected to 5V nets and -VO to GND.
Connections:
  • Connect F1:P1 to AC mains (Live wire preferably), and F1:P2 to PS1:AC(L).
  • Connect AC mains Neutral wire to PS1:AC(N).
  • Connect PS1:+VO to 5V power net.
  • Place C6 with one leg on PS1:+VO and the other on PS1:-VO for output filtering.
  • Ensure PS1:-VO is connected to your project's ground net (GND).
Note:
  • Safety Considerations: The HLK-20M05 module should be enclosed in a suitably rated enclosure to prevent accidental contact with AC mains voltages.
  • Regulatory Compliance: Your stated compliance requirements are RoHS, FCC, CE. Make sure your overall design, including this power supply section, adheres to the appropriate standards and regulations regarding electromagnetic compatibility (EMC) and safety.
Please review and ensure these components and their connections are appropriately integrated into your schematic. If some components or connections are already in place, consider this as a validation of those parts of your design.
2y
2
What is the TAB pin in the ASM1117 used for?

@copilot What is the TAB pin in the ASM1117 used for?
2y
The TAB (Tab) pin on the AMS1117 device serves as an additional ground (GND) connection. It is electrically connected to the ground pin of the device (Pin 1: GND). Therefore, when designing circuits or PCB layouts with the AMS1117, it's important to connect the TAB to the ground plane or ground net in your design to ensure proper operation and heat dissipation.
2y
Is there anything missing in my power regulator?
2y
To evaluate the completeness of your power regulator setup with the AMS1117-3.3 (U2 in your project), let's review the essential components and connections based on the usual application of an AMS1117-3.3 and the details you've provided:
  1. Input Capacitor: A capacitor close to the VIN pin (3) of the AMS1117 can help smooth out any input noise and provide a more stable input voltage. The datasheet of similar LDO regulators recommends a value, typically around 10µF. It seems you have not explicitly mentioned an input capacitor for U2.
  2. Output Capacitor: For stability, the AMS1117-3.3 requires an output capacitor. You've provided a capacitor, C1 (10u capacity, connected likely on VOUT), based on general practices and the AMS1117 series requirements, which matches the recommendation to include a capacitor of around 10uF on the output to ensure stability[1].
  3. Ground Connections: Ensure that the GND Pin (1) and the TAB (also connected to GND internally) are properly connected to the ground net in your circuit. It appears you've followed this principle, considering the schematic conventions you've outlined.
  4. Proper Heat Sinking: The AMS1117 can dissipate heat through the TAB. Make sure there's enough copper area on your PCB acting as a heat sink to manage the heat, especially if you're dropping a significant voltage or drawing considerable current.
  5. Decoupling Capacitors on VIN/VOUT for Adjacent ICs: While not part of the AMS1117 directly, ensure that any IC powered by the AMS1117 has its decoupling capacitors close by. This isn't directly related to the AMS1117 but is good practice for stable power supply lines.
Given these points, it seems the critical component potentially missing from your description is the input capacitor on VIN of the AMS1117-3.3 (U2). Including a capacitor close to the input of the AMS1117 is recommended for optimal performance, to act as a buffer, and to smooth the input supply line. Other aspects appear covered based on your description and standard practices.
[1] Page 4
2y
5
VDD
U1 IO14 - R22
U1 IO32 - R12
J6 PIN1 - U1 IO1
AC_GND
AC_GND
VDD
SW1 P1 - U1 IO39
AC_GND
VDD
AC_GND
SCK/SCL
J7 P1 - U1 IO0
AC_GND
VDD
U1 IO14 - R22
SCK/SCL
U1 IO33 - R14
J6 PIN2 - U1 IO3
J6 PIN2 - U1 IO3
U1 IO25 - R16
U1 IO26 - R18
AC_GND
U1 IO35 - R10
AC_GND
VDD
U1 IO25 - R16
VDD
U1 IO33 - R14
U1 IO35 - R10
U1 IO26 - R18
U1 IO27 - R20
U1 IO34 - R8
U1 IO32 - R12
U1 IO27 - R20
U3 VIOUT - U1 IO36
J6 PIN1 - U1 IO1
SDI/SDA
AC_GND
U1 IO34 - R8
U3 VIOUT - U1 IO36
AC_GND
SDI/SDA
J7 P1 - U1 IO0
SW1 P1 - U1 IO39
AC_GND
R2
Resistance
10kΩ
AC_N
AC_L
5v
AC_L
AC_L
AC_N
AC_N
5v
AC_N
AC_N
5v
R22
Resistance
4.7kΩ
AC_N
R1
Resistance
10kΩ
5v
5v
AC_L
AC_L
AC_L
R21
Resistance
4.7kΩ
AC_L
AC_N
5v
5v
5v
AC_L
AC_L
AC_N
5v
AC_N
5v
5v
AC_N
5v
AC_L
R20
Resistance
10kΩ
F2
ESP32-WROOM-32E
J2
C4
Capacitance
0.1uF
C10
Capacitance
0.1uF
Main Switch
BME280
C9
Capacitance
0.1uF
C1
Capacitance
10uF
Power Relays
Current Sensor
C3
Capacitance
10uF
F1
Power Supply
K4
J9
K3
J3
J8
J11
K8
J4
K1
K6
K5
K2
J5
J7
J6
K7
J10
R19
Resistance
1kΩ
R13
Resistance
1kΩ
R11
Resistance
1kΩ
R16
Resistance
1kΩ
R17
Resistance
1kΩ
R12
Resistance
1kΩ
R8
Resistance
1kΩ
R15
Resistance
1kΩ
R7
Resistance
1kΩ
R4
Resistance
1kΩ
R3
Resistance
1kΩ
R18
Resistance
1kΩ
R14
Resistance
1kΩ
R9
Resistance
1kΩ
R5
Resistance
1kΩ
R10
Resistance
1kΩ
R6
Resistance
1kΩ
Q4
Not Recommended for New Designs
D2
Q5
Not Recommended for New Designs
D1
Q1
Not Recommended for New Designs
D7
Q2
Not Recommended for New Designs
D6
Q6
Not Recommended for New Designs
Q3
Not Recommended for New Designs
Q8
Not Recommended for New Designs
D8
D5
D3
D4
Q7
Not Recommended for New Designs
P6
DC_GND
C5
P5
LED6
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
DC_GND
LED2
LED1
LED9
DC_GND
DC_GND
DC_GND
LED8
DC_GND
DC_GND
LED5
LED3
DC_GND
LED7
DC_GND
DC_GND
DC_GND
DC_GND
LED4
DC_GND
J1
PS1
H2
C7
Capacitance
0.1uF
Z1
C6
Capacitance
220uF
T1
C2
Capacitance
22uF
H1
C8
Capacitance
1nF
SW1
U1

No files yet

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    rsamurti-RSA-IEC-Ground-Symbol.svg

    rsamurti-RSA-IEC-Ground-Symbol.svg

    gndSvg
    powerControll.jpg

    powerControll.jpg

    powerControllThumbnail
    warning.svg

    warning.svg

    voltageWarningDefault

    powerWizard

    powerWizard thumbnail
    Matter-enabled 8-channel Power Strip with built-in temperature and humidity sensor. #iot #esp32 #smarthome #matter

    Properties

    ESP-IDF

    WiFi

    MQTT

    5V

    10 to 90%

    %

    RoHS, FCC, CE

    -10 to 70

    °C

    PCB Trace

    Touchscreen, Buttons

    20,000

    hrs

    10

    yrs

    Small gadget

    1

    4

    Consumer Electronics

    Pricing & Availability

    Distributor

    Qty 1

    Digi-Key

    $0.73–$2.98

    LCSC

    $13.30–$14.01

    Mouser

    $3.12

    Controls