• Terminal
    Terminal
    An electrical connector acting as reusable interface to a conductor and creating a point where external circuits can be connected.
  • Ground
    A common return path for electric current. Commonly known as ground.
  • Net Portal
    A net identifier used to create connectivity to other Net Portal with the same designator. #portal
  • Power Net Portal
    Power net portal is a special schematic object used to define a power or ground net. Power ports allow you to conveniently indicate a power net at any location in the design. Power nets of the same designator automatically connect throughout your design #portal #power
  • Generic Resistor
    A generic fixed resistor for rapid developing circuit topology. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard resistor values: 1.0Ω 10Ω 100Ω 1.0kΩ 10kΩ 100kΩ 1.0MΩ 1.1Ω 11Ω 110Ω 1.1kΩ 11kΩ 110kΩ 1.1MΩ 1.2Ω 12Ω 120Ω 1.2kΩ 12kΩ 120kΩ 1.2MΩ 1.3Ω 13Ω 130Ω 1.3kΩ 13kΩ 130kΩ 1.3MΩ 1.5Ω 15Ω 150Ω 1.5kΩ 15kΩ 150kΩ 1.5MΩ 1.6Ω 16Ω 160Ω 1.6kΩ 16kΩ 160kΩ 1.6MΩ 1.8Ω 18Ω 180Ω 1.8KΩ 18kΩ 180kΩ 1.8MΩ 2.0Ω 20Ω 200Ω 2.0kΩ 20kΩ 200kΩ 2.0MΩ 2.2Ω 22Ω 220Ω 2.2kΩ 22kΩ 220kΩ 2.2MΩ 2.4Ω 24Ω 240Ω 2.4kΩ 24kΩ 240kΩ 2.4MΩ 2.7Ω 27Ω 270Ω 2.7kΩ 27kΩ 270kΩ 2.7MΩ 3.0Ω 30Ω 300Ω 3.0KΩ 30KΩ 300KΩ 3.0MΩ 3.3Ω 33Ω 330Ω 3.3kΩ 33kΩ 330kΩ 3.3MΩ 3.6Ω 36Ω 360Ω 3.6kΩ 36kΩ 360kΩ 3.6MΩ 3.9Ω 39Ω 390Ω 3.9kΩ 39kΩ 390kΩ 3.9MΩ 4.3Ω 43Ω 430Ω 4.3kΩ 43KΩ 430KΩ 4.3MΩ 4.7Ω 47Ω 470Ω 4.7kΩ 47kΩ 470kΩ 4.7MΩ 5.1Ω 51Ω 510Ω 5.1kΩ 51kΩ 510kΩ 5.1MΩ 5.6Ω 56Ω 560Ω 5.6kΩ 56kΩ 560kΩ 5.6MΩ 6.2Ω 62Ω 620Ω 6.2kΩ 62KΩ 620KΩ 6.2MΩ 6.8Ω 68Ω 680Ω 6.8kΩ 68kΩ 680kΩ 6.8MΩ 7.5Ω 75Ω 750Ω 7.5kΩ 75kΩ 750kΩ 7.5MΩ 8.2Ω 82Ω 820Ω 8.2kΩ 82kΩ 820kΩ 8.2MΩ 9.1Ω 91Ω 910Ω 9.1kΩ 91kΩ 910kΩ 9.1MΩ #generics #CommonPartsLibrary
  • Generic Capacitor
    A generic fixed capacitor for rapid developing circuit topology. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard capacitor values: 1.0pF 10pF 100pF 1000pF 0.01uF 0.1uF 1.0uF 10uF 100uF 1000uF 10,000uF 1.1pF 11pF 110pF 1100pF 1.2pF 12pF 120pF 1200pF 1.3pF 13pF 130pF 1300pF 1.5pF 15pF 150pF 1500pF 0.015uF 0.15uF 1.5uF 15uF 150uF 1500uF 1.6pF 16pF 160pF 1600pF 1.8pF 18pF 180pF 1800pF 2.0pF 20pF 200pF 2000pF 2.2pF 22pF 20pF 2200pF 0.022uF 0.22uF 2.2uF 22uF 220uF 2200uF 2.4pF 24pF 240pF 2400pF 2.7pF 27pF 270pF 2700pF 3.0pF 30pF 300pF 3000pF 3.3pF 33pF 330pF 3300pF 0.033uF 0.33uF 3.3uF 33uF 330uF 3300uF 3.6pF 36pF 360pF 3600pF 3.9pF 39pF 390pF 3900pF 4.3pF 43pF 430pF 4300pF 4.7pF 47pF 470pF 4700pF 0.047uF 0.47uF 4.7uF 47uF 470uF 4700uF 5.1pF 51pF 510pF 5100pF 5.6pF 56pF 560pF 5600pF 6.2pF 62pF 620pF 6200pF 6.8pF 68pF 680pF 6800pF 0.068uF 0.68uF 6.8uF 68uF 680uF 6800uF 7.5pF 75pF 750pF 7500pF 8.2pF 82pF 820pF 8200pF 9.1pF 91pF 910pF 9100pF #generics #CommonPartsLibrary
  • Generic Inductor
    A generic fixed inductor for rapid developing circuit topology. *You can now change the footprint and 3D model at the top level anytime you want. This is the power of #generics
  • 875105359001
    10uF Capacitor Aluminum Polymer 20% 16V SMD 5x5.3mm #forLedBlink #commonpartslibrary #capacitor #aluminumpolymer #radialcan
  • CTL1206FYW1T
    Yellow 595nm LED Indication - Discrete 1.7V 1206 (3216 Metric) #forLedBlink
  • 1070TR
    Battery Holder (Open) Coin, 20.0mm 1 Cell SMD (SMT) Tab bate or batt #forLedBlink
please explain what U2 does.

@copilot please explain what U2 does.
1mo
Someone is typing...
R2
Resistance
4K7 Ω
3V3
R1
Resistance
22 Ω
J3
C6
Capacitance
1u F
R4
Resistance
10K Ω
C4
Capacitance
10u F
C7
Capacitance
1u F
R5
Resistance
10K Ω
C5
Capacitance
1u F
3V3
J2
3V3
+5V
C8
Capacitance
1u F
+5V
R9
Resistance
430 Ω
C10
Capacitance
1u F
C3
Capacitance
1u F
C1
Capacitance
1u F
3V3
3V3
3V3
C9
Capacitance
10u F
3V3
R7
Resistance
390 Ω
3V3
R3
Resistance
4K7 Ω
R6
Resistance
390 Ω
C2
Capacitance
10u F
R8
Resistance
390 Ω
3V3
LED_G
LED_G
SWCLK-BOOT
J1
SW1
U3
I2C_SDA
LED_R
SW2
APDS_INT
K1
I2C_SCL
LED_B
U2
ACH
LED_B
ACL
STM_EN
I2C_SCL
ACH
LED1
I2C_SDA
Relay
STM_EN
SWCLK-BOOT
U1
Manufacturer Part Number
APDS-9960
SWCLK-BOOT
LED_R
STM_EN
SWDIO
APDS_INT
STM_EN
SWDIO
Relay
ACL

Gesture Light Switch Relay Reference Design

Gesture Light Switch Relay Reference Design
Description

Created
January 9th 2024
Last updated by vasyl
a year ago
1 Contributor(s)
vasyl

Controls

Availability & Pricing

DistributorQty 1
Digi-Key$7.01–$8.40
LCSC$1.38
Mouser$9.30

Assets

Simulation

µs

Simulation Speed

can you generate a detailed test plan of the board
@copilot can you generate a detailed test plan of the board
1mo
Creating a detailed test plan for the Gesture Light Switch Relay Reference Design involves outlining a series of test cases to verify the functionality of the board components, the integration of the system, and the overall performance. Here's a structured test plan that you can follow:

Test Plan for Gesture Light Switch Relay Reference Design 1. Power Supply Tests

  • Test 1.1: Voltage Regulation

    • Objective: Ensure that the AP2112K-3.3TRG1 voltage regulator is providing a stable 3.3V output.
    • Procedure:

      • Connect a multimeter to the output of the regulator (U3U3:VOUT).
      • Supply 5V to the input (U3U3:VIN).
      • Measure the voltage.
    • Expected Result: Voltage should be 3.3V ± 5%.
  • Test 1.2: Current Consumption

    • Objective: Measure the total current draw of the system under normal operation.
    • Procedure:

      • Use a multimeter in series with the power supply to measure current.
    • Expected Result: Current draw should be within expected limits for the design.
2. Microcontroller Tests

  • Test 2.1: Basic Functionality

    • Objective: Verify that the STM32G030F6P6 microcontroller is correctly powered and operational.
    • Procedure:

      • Power the board.
      • Upload a basic "blinky" firmware to make an external LED blink.
    • Expected Result: LED blinks at the programmed rate.
  • Test 2.2: I2C Communication

    • Objective: Test the I2C communication between the STM32G030F6P6 and the APDS-9960 sensor.
    • Procedure:

      • Write and read data to/from the APDS-9960.
      • Use an oscilloscope to verify the signal on SDA (I2C_SDAI2C\_SDA:P1) and SCL (I2C_SCLI2C\_SCL:P1).
    • Expected Result: Proper I2C waveforms are observed, and communication is successful.
3. Sensor Tests

  • Test 3.1: Gesture Detection

    • Objective: Confirm that the APDS-9960 is detecting gestures.
    • Procedure:

      • Implement a test firmware to read gesture data and output it to a serial console.
      • Perform gestures in front of the sensor.
    • Expected Result: Gestures are correctly identified and outputted to the console.
4. Relay Tests

  • Test 4.1: Relay Control

    • Objective: Verify that the relay is being controlled correctly by the microcontroller.
    • Procedure:

      • Write firmware to toggle the relay on and off.
      • Monitor the relay output terminals (K1K1:~) with a multimeter or oscilloscope.
    • Expected Result: Relay toggles state as expected.
5. LED Tests

  • Test 5.1: Tri-color LED Control

    • Objective: Test the control over the tri-color LED.
    • Procedure:

      • Write firmware to cycle through red, green, and blue on the LED (LED1LED1:R, G, B).
      • Visually confirm the LED color changes.
    • Expected Result: LED cycles through the colors.
6. Integration Tests

  • Test 6.1: Full System Test

    • Objective: Verify overall system functionality by integrating all components.
    • Procedure:

      • Deploy full firmware that connects power, sensor, microcontroller, relay, and LED functionalities.
      • Test the system with gestures to control light switching and LED color change.
    • Expected Result: The system should operate as intended, switching lights and changing LED colors based on gestures.

This test plan serves as a starting point. Make sure to adjust test cases and procedures based on the specific updates or variations in your project's requirements. Let me know if there are specific areas you'd like to expand upon or modify!
1mo
explain this project.
@copilot explain this project.
1mo
can you write me a short(100-200 symbols) description for this project
@copilot can you write me a short(100-200 symbols) description for this project
1y
This project is a Gesture Light Switch Relay Reference Design. It involves an STM32 microcontroller (STMicroelectronics) that interacts with an APDS-9960 sensor (Broadcom) to detect hand gestures. The gesture data is used to control a Toshiba TLP175A relay and an Everlight tri-color LED to switch the light and change colors, respectively. Power is supplied by a Diodes Incorporated's AP2112K-3.3TRG1 regulator.
1y
@copilot I need a solid AC relay with 220V AC 5A in small package/case
@copilot I need a solid AC relay with 220V AC 5A in small package/case
1y
I'd recommend reviewing solid state relays (SSRs) because of their long lifespan, no contact bounce, low electric noise, and small form factor. A suitable choice in this context could be the Sharp S202S02 series relay.
Here are its specs:

  • Control side input voltage: 0 ~ 1.5V Dc
  • Load voltage range: 75 to 264 V AC
  • Load current: 8A (maximum at Tc=80℃)
  • Isolation voltage: 2500 Vrms
It's available in a very compact DIP case.
Please ensure that you verify your application requirements and the relay's specifications, as this is merely a suggestion based on the provided information. Always consult the datasheet and possibly a local electronics engineer before making a final decision.
1y
I needs smd
1y
If you need an AC relay in a small SMD package, the Toshiba TLP172AM is a solid state relay that meets your requirements.
Here are its key features:

  • Suitable for high current switching with a 5A contact current rating.
  • Provides a high output peak off-state voltage of minimum 600V, well suited for your 220V AC requirement.
  • Features a simple 4-pin SMD SOP package, useful for space constrained applications.
  • The relay operates well within the industrial temperature range (-30 to 110 °C).
Make sure to verify that the selected components meet all your project requirements and regulatory compliance needs before making the final decision.
1y
what about TLP175A?
1y
The TLP175A from Toshiba is indeed a solid-state relay (SSR) and can certainly be used in variety of applications. But as a good practice, let's ensure it aligns with your needs based on its specifications:
• It's packaged in a tiny SOP-4 SMD package and thus, is useful for space constrained applications. • It has an OFF-state output terminal voltage of 60 V, which is too low for your requirement of 220V AC. • The continuous load current is rated at 0.13 A (130 mA), which is also significantly less than your requirement of 5A.
Therefore, the TLP175A would not be suitable to switch a 220 VAC, 5A load due to its lower breakdown voltage and load current ratings.
It is important to make sure that the selected relay fits all of your requirements. For your application, you may want to look at SSRs specifically designed for higher voltage and current applications.
1y
I will control it with U2 GPIO what resistor do I need to use?
1y
To select an appropriate resistor, we need to consider the forward dropout voltage and forward current of the TLP175A's input side (LED side).
From the TLP175A datasheet, we can see that:

  • The Forward Current (IF) is typically 5mA.
  • The Forward Voltage (VF) is typically 1.15V.
Given that you're using the STM32G030F6P6 microcontroller (U2) and its I/O pins work at 3.3V, you would calculate the resistor (to be connected in series with the input of TLP175A) using Ohm's law (V=IR):
So, setting V = 3.3V - 1.15V = 2.15V (the voltage across the resistor), and I = 5mA, we find:
R = V/I = 2.15V / 5mA = 430Ω
You should choose the closest standard resistor value, which is 430Ω. Please note that you can use a resistor with a lower value to increase the forward current, which can help ensure the relay activates properly. However, this will also increase power consumption and you should ensure that the GPIO and the TLP175A can handle the increased current.
1y
Someone is typing...
Checks that the power traveling across a given resistor is under its rating with 50% headroom.
Learn more
Checks that IC pins that require pull up or pull down resistors have them.
Learn more
Checks that capacitors have appropriate voltage ratings to prevent overheating and ensure reliable circuit operation.
Checks that all parts have a part number and are available from distributors.
Reports copper elements that are shorting.
Reports parts that have no footprint.
Reports nodes that are assigned to a layer that doesn't exist in the layout stackup.
Designator
Ruleset
*`REF`*
SW1
*`REF`*
R4
*`REF`*
R2
*`REF`*
J2
*`REF`*
C8
*`REF`*
U3
*`REF`*
C1
*`REF`*
C6
*`REF`*
C9
*`REF`*
R3
*`REF`*
C7
*`REF`*
C2
*`REF`*
C3
*`REF`*
R7
*`REF`*
C5
*`REF`*
J1
*`REF`*
SW2
*`REF`*
R1
*`REF`*
R8
*`REF`*
C4
*`REF`*
C10
Reports terminals that are not connected properly. NOTE: Only connections to the center of pads are considered valid.
Reports nodes that are using rules that are not supported anymore.
Reports layers that have multiple copper fills of different nets. Make sure the Connected Layers rule value of nets with fills is valid.
Detect any via, trace or copper fill island that is not connected to any net.